Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leave and Join subnets on epoch duties calculation #1279

Open
rodrigo-o opened this issue Aug 16, 2024 · 1 comment
Open

Leave and Join subnets on epoch duties calculation #1279

rodrigo-o opened this issue Aug 16, 2024 · 1 comment
Labels
attester P2 This is a nice to have. Improves usability of the app or the libraries, but it's not urgent. sync committees

Comments

@rodrigo-o
Copy link
Collaborator

rodrigo-o commented Aug 16, 2024

During #1274, duties calculations have been simplified and shared across all Validators in the node. During this refactor a previous step has been removed, during duties recalculation (at the end of an epoch) this function was executed in each validator:

  defp move_subnets(%{attester: old_duties}, %{attester: new_duties}) do
    old_subnets = old_duties |> get_subnet_ids() |> MapSet.new()
    new_subnets = new_duties |> get_subnet_ids() |> MapSet.new()

    # leave old subnets (except for recurring ones)
    MapSet.difference(old_subnets, new_subnets) |> leave()

    # join new subnets (except for recurring ones)
    MapSet.difference(new_subnets, old_subnets) |> join()
  end

This hasn't been added in #1274 but the Validators work (specifically attestation) doesn't appear to be affected. We need to check this is actually the case and make sure it wasn't needed in the first place.

@rodrigo-o
Copy link
Collaborator Author

rodrigo-o commented Sep 9, 2024

Right now we are missing some of the attestations and sync committee messages that should be collected, this appears to be happening due to a late subscription to the gossip topic, we need to make sure subnets are joined and subscribed in a timely fashion.

Edit: This was moved to it's own issue #1300, to left this issue open for future research, there is no bug right now affecting this issue and it will be just a nice-to-have except we found anything related to the leave and join per slot instead of at the start of an epoch.

@rodrigo-o rodrigo-o added P2 This is a nice to have. Improves usability of the app or the libraries, but it's not urgent. sync committees and removed bug Something isn't working labels Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
attester P2 This is a nice to have. Improves usability of the app or the libraries, but it's not urgent. sync committees
Projects
Status: No status
Development

No branches or pull requests

1 participant