-
-
Notifications
You must be signed in to change notification settings - Fork 416
feat: update vc to submit beacon committee selections once per epoch #8669
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
base: unstable
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @nflaig, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly refactors the handling of beacon and sync committee selections for distributed validator clients. The core change involves shifting the submission of selection proofs from a per-slot operation within the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request refactors the submission of beacon committee selections to occur once per epoch, rather than per slot. This is achieved by relocating the runDistributedAggregationSelectionTasks logic from AttestationService to AttestationDutiesService. A similar refactoring has been applied to sync committee duties, moving logic from SyncCommitteeService to SyncCommitteeDutiesService. The changes are logical and align with the goal of reducing submission frequency.
I have one suggestion to improve the robustness of the new implementation in attestationDuties.ts.
Performance Report🚀🚀 Significant benchmark improvement detected
Full benchmark results
|
|
|
||
| this.logger.debug("Submitting partial beacon committee selection proofs", {epoch, count: partialSelections.length}); | ||
|
|
||
| const res = await this.api.validator.submitBeaconCommitteeSelections({selections: partialSelections}); |
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.
we call this with duties for a whole epoch, could consider batching the request but generally assume vc and charon run on the same host without any proxy in-between that could cause issues due to large request body size
| * 3. Mutate duty objects to set selection proofs for aggregators | ||
| * 4. Resubscribe validators as aggregators on beacon committee subnets | ||
| * | ||
| * See https://docs.google.com/document/d/1q9jOTPcYQa-3L8luRvQJ-M0eegtba4Nmon3dpO79TMk/mobilebasic |
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.
the google doc is no longer accessible
Motivation
Closes #8606
Description
This updates our implementation to be compliant with latest spec ethereum/beacon-APIs#368.
For sync committee aggregation selection (unchanged)
submitSyncCommitteeSelectionsat the start of the slotCONTRIBUTION_DUE_BPSinto the slot (8 seconds)For attestation aggregation selection
submitBeaconCommitteeSelectionsat the start of the epoch for current and next epoch (2 separate calls)SLOT_DURATION_MS(12 seconds)prepareBeaconCommitteeSubnetonce the above call either resolved or fails, this should fine as it's not that time sensitive (one epoch lookahead)submitBeaconCommitteeSelectionswith duties of affected epochPrevious PR #5344