-
Notifications
You must be signed in to change notification settings - Fork 893
Implement basic validator custody framework (no backfill) #7578
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Took a look at this as an opportunity to refamiliarise myself with the DAS code and spec. I hope I looked at the correct spec version x)
Also, just noting as I found no explicit TODO or code for this: I think we also need to update the ValidatorRegistrations if the effective balance changes due to beacon chain rewards, penalties, deposits and (partial) withdrawals.
4bb3ec9
to
178b08e
Compare
247c732
to
3d1a1ba
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Next changes (separate PRs)
- add lowest block slot to status message, update it on CGC change, & use lowest block slot for peer selection when making rpc requests
- use additional http api to register validators
- backfill
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM as well. Thanks for fixing up most of the outstanding issues!
Some required checks have failed. Could you please take a look @pawanjay176? 🙏 |
Issue Addressed
Resolves #6767
Proposed Changes
This PR implements a basic version of validator custody.
CustodyContext
object which contains info regarding number of validators attached to a node and the custody count they contribute to the cgc.CustodyContext
is added in the da_checker and has methods for returning the current cgc and the number of columns to sample at head. Note that the logic for returning the cgc existed previously in the network globals.beacon_committee_subscriptions
endpoint. This might overestimate the number of validators actually publishing attestations from the node in the case of multi BN setups. We could also potentially use thepublish_attestations
endpoint to get a more conservative estimate at a later point.custody_group_count
due to addition/removal of validators, the custody context should send an event on a broadcast channnel. The only subscriber for the channel exists in the network service which simply subscribes to more subnets. There can be additional subscribers in sync that will start a backfill once the cgc changes.TODO
CustodyContext
that emits an event onceMIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS
passes after updating the current cgc. This event should be picked up by a subscriber which updates the enr and metadata.