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

Simple Subnet Management #6146

Open
wants to merge 17 commits into
base: unstable
Choose a base branch
from

Conversation

AgeManning
Copy link
Member

Overview

This is an implementation of ethereum/consensus-specs#3735

Essentially, rather than having Lighthouse rotate every 24 hours around long-lived subnets, it will stay fixed on subnets for the duration of its run (and it's lifetime until a user manually deletes the network.key in the lighthouse directory).

The rotations have a dubious practical importance and adds quite a bit of complexity in our code base. By removing the rotations I was able to simplify the code. This also helps with debugging and keeping tracking of subnets and ENRs (our ENRs will also be stable, as we no longer need to rotate the subnet ids there).

While I was in there, I took the liberty to combine the SyncCommitteeSubnets with the AttestationSubnets into a single SubnetService which I think is a bit cleaner and easier to reason about.

Because this PR changes a bit of code and if there are bugs will immediately impact the performance of validators, we should take caution in merging this before significant testing.

@AgeManning AgeManning added the v6.0.0 New major release for hierarchical state diffs label Jul 22, 2024
@AgeManning AgeManning added the ready-for-review The code is ready for review label Jul 22, 2024
@jimmygchen jimmygchen added waiting-on-author The reviewer has suggested changes and awaits thier implementation. and removed ready-for-review The code is ready for review labels Jul 29, 2024
@AgeManning
Copy link
Member Author

Thanks for the review @jimmygchen - I think i've addressed all of these

@AgeManning AgeManning added ready-for-review The code is ready for review and removed waiting-on-author The reviewer has suggested changes and awaits thier implementation. labels Sep 9, 2024
@jimmygchen jimmygchen added under-review A reviewer has only partially completed a review. and removed ready-for-review The code is ready for review labels Oct 4, 2024
Copy link
Member

@jimmygchen jimmygchen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've reviewed the PR and it looks much cleaner! I've added a few comments / questions.
I think this will simplify implementing PeerDAS validator custody (subscriptions) too.

beacon_node/network/src/subnet_service/mod.rs Show resolved Hide resolved
beacon_node/network/src/subnet_service/mod.rs Show resolved Hide resolved
beacon_node/network/src/subnet_service/mod.rs Outdated Show resolved Hide resolved
beacon_node/network/src/subnet_service/mod.rs Outdated Show resolved Hide resolved
beacon_node/network/src/subnet_service/mod.rs Show resolved Hide resolved
beacon_node/network/src/subnet_service/mod.rs Outdated Show resolved Hide resolved
beacon_node/network/src/subnet_service/mod.rs Outdated Show resolved Hide resolved
beacon_node/network/src/subnet_service/mod.rs Show resolved Hide resolved
beacon_node/network/src/subnet_service/mod.rs Show resolved Hide resolved
@jimmygchen jimmygchen added waiting-on-author The reviewer has suggested changes and awaits thier implementation. and removed under-review A reviewer has only partially completed a review. labels Oct 14, 2024
@AgeManning AgeManning added ready-for-review The code is ready for review and removed waiting-on-author The reviewer has suggested changes and awaits thier implementation. labels Oct 30, 2024
Copy link
Member

@jimmygchen jimmygchen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, looks good to me now! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-review The code is ready for review v6.0.0 New major release for hierarchical state diffs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants