Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates message validation rules for the Boole fork, introducing support for a new RoleAggregatorCommittee role and refactoring validation logic to handle committee-related roles more consistently.
Key Changes:
- Introduced
RoleAggregatorCommitteerole and updated validation rules to distinguish betweenRoleCommitteeandRoleAggregatorCommittee - Updated message size constants to accommodate larger messages (MaxMsgSize increased from ~4.9MB to ~9.1MB)
- Refactored beacon duty validation to focus only on proposer duties, removing sync committee aggregation duty checks
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| p2p/MessageValidation/Rules.md | Updated validation rules, constants, and logic to support the new AggregatorCommittee role; added helper function isCommitteeRole() to check committee-related roles; updated partial signature validation with role-specific limits |
| p2p/MessageValidation/ReceivedMessagesEstimation.md | Added deprecation warning noting the document is outdated due to Alan and Boole fork protocol changes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| > [!WARNING] | ||
| > This document is deprecated due to protocol changes as the Alan and Boole forks. | ||
|
|
There was a problem hiding this comment.
how hard it is to do a simulator that auto updates from spec you reckon 😅 ?
There was a problem hiding this comment.
you have simulators in ssv/research?
There was a problem hiding this comment.
Yup, I have the old and new simulators in ssv-research :)
I would say it's not that easy to auto update it from spec repo though
Co-authored-by: Nikita Kryuchkov <nkryuchkov10@gmail.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| | -------------------- | ------------------------- | -------------- |--------------------------------------------------------------------------------------------------------------------------------------------| | ||
| | Signers in committee | ErrSignerNotInCommittee | Reject | Signers must belong to validator's or CommitteeID's committee. | | ||
| | Different Domain | ErrWrongDomain | Ignore | MsgID.Domain is different than self domain. | | ||
| | Invalid Role | ErrInvalidRole | Reject | MsgID.Role is wrong (not `RoleCommittee`, `RoleProposer`, `RoleValidatorRegistration`, `RoleVoluntaryExit`, or `RoleAggregatorCommittee`). | |
There was a problem hiding this comment.
Can we define that Alan roles are rejected during Boole and vice versa? (ssvlabs/ssv#2503 (comment))
There was a problem hiding this comment.
It's kind of defined implicitly I think ?
- the updated rule set contains
RoleAggregatorCommitteebut notRoleAggregator/RoleSyncCommitteeContribution - and although there is no explicit list of roles prior to this PR, if it were there - it would contain
RoleAggregator/RoleSyncCommitteeContributionbut notRoleAggregatorCommittee
But it would be nice for us devs to see "what changed" rather than trying to decipher the diff :) Maybe we could get that for the next fork ...
There was a problem hiding this comment.
we have a taks to migrate to spec repo...
We need to think about how to make it as easy as possible.
Maybe you guys canuse this thread to write recommendations about what you like/don't like in the current structure
There was a problem hiding this comment.
Maybe you guys canuse this thread to write recommendations about what you like/don't like in the current structure
Not strictly about the structure of these files, but I would think some sort of writeup in English about every rule added/changed/deleted (before vs after the fork) would be useful to have whenever we are doing these changes
49f11a9
GalRogozinski
left a comment
There was a problem hiding this comment.
The list of changes from the SIP are hard to see here so I will be adding it to the description
* add global shared state validation * improve wording and optimize * Revert "improve wording and optimize" This reverts commit 4464b48. * use RFC language --------- Co-authored-by: Gal Rogozinski <galrogogit@gmail.com>
* draft * fix build * WIP on setting up aggregator committee runner * implement reverted beacon client changes * run aggregator committee duty * add aggregator committee checks to message validation * add basic fork handling to handlers * add submission logs for aggregator committee * fix missed RoleAggregatorCommittee handling * fix message validation aggregator committee issues * fix some message validation issues * WIP on issues after merging * fix issues after merging * fix some bugs * fix aggregator committee post-consensus message validation * fix on timeout logic for aggregator committee * fix aggregator committee value check * fix aggregator committee post consensus message validation * filter messages matching the runner role from the queue * fix expected aggregator committee duty type * pass error on failure to decide * fix ProcessConsensus * fix merging leftovers * fix queue bugs * fix post-consensus bug * fix assertion bug * missing metrics * set fork epoch in all configs * fork epoch 0 in test/local networks * fetch attester and sync committee duties * fix log text * update spec * add fulu to constructSignedAggregateAndProof * fix a bug in constructSignedAggregateAndProof * fix a bug in constructSignedAggregateAndProof [2] * update spec version * update spec version * update spec version * fix linter * fix some tests * fix a data race in tests * fix using wrong cache * fix root caching * add missing AggregatorCommittee in tests * fix duty scheduler unit tests * add a TODO * partially fix ssv mapping tests * leftovers for AggregatorRunners in ssv mapping * fix spec tests * fix linter * simplify GetProcessMessageF * further simplification * delete ExecuteAggregatorCommitteeDuty * delete CreateAggregatorRunnerFn * code review * simplify validator committee * delete confusing comment * delete hardcoded consts * check PostDutyCommitteeRoot for aggregator committee * fix aggregator duty submission bug * delete unnecessary normalizeAggregatorDecidedValues * update spec version * cleanup some leftovers * Revert "update spec version" This reverts commit 30cc104. * code review suggestions * fix spec tests data race * get rid of the aggregator committee handler * wait only for committee role in duty scheduler * add waiting in aggregator committee runner * aggregator committee runner: improve formatting * rename AggregatorCommittee fork to Boole; delete Alan fork from config * attempt to fix TestScheduler_Committee_Indices_Changed_Attester_Only * align to the latest spec changes * improve the comment * use trace.SpanFromContext * align to the latest spec * align to #2629 * code review comments * code review comments * message/validation: update rules according to ssvlabs/knowledge-base#2 * fix variable name * align with the latest spec * align with the latest spec * fix compilation issue * fix tests * get message size limits from spec * add nil share checks * use spec without jsons * update spec version for ssvsigner * fix linter * fix missing roles in the updated spec * fix remaining usages of duty.RunnerRole() * fix pre-fork duty runner choice * fix a committeeDuty bug * fix loop iteration * fix issues after merging * apply changes from #2658 to the aggregator committee runner * fix TestFieldPreservation * fix code review comments * use spec without some tests * fix some spec tests * fix deduplication in agg comm runner * fix value checker in spec tests * remove redundant spec tests code * simplify ssv spec test * refactor ssv mapping test * simplify fixCommitteeForRun * fix linter * improve comments * reject Boole roles during Alan and Alan roles during Boole * optimize the role check * add 'slot' to error log * fix a bug with validator consensus data value check during Alan * use the correct root(s) when calculating SyncCommitteeSubnetID * fix a panic on nil interface * fix issues after merging * deduplicate messages if validator has already been seen for a subnet * debug logs on errors in loops * cache aggregator committee roots * fix a typo * end consensus on failure in decide() * iterate over consensus data instead of duty * add slot in returned error * pass logger to where it's missing * struct tags for SSVForks * use correct type for sync committee index * implement missing checks for aggregator committee * attempt to fix unit tests * Revert "implement missing checks for aggregator committee" This reverts commit ece1a85. * Revert "deduplicate messages if validator has already been seen for a subnet" This reverts commit cfe7d1a. * fix issues after merging * fix linter * attempt to fix linter * fix unit tests after pulling changes from the base branch * Revert "attempt to fix linter" This reverts commit 8596dbb. * fix tests --------- Co-authored-by: Nikita Kryuchkov <nkryuchkov10@gmail.com>
Overview
This PR updates the message validation rules for the Boole fork.
SSVMessage.MsgIDmust include a CommitteeID encoded with a 16-byte 0x00 prefix to matchValidatorPublicKeylength. If the CommitteeID doesn't exist in the current network, it should ignore the message.ValidatorIndexinSignedPartialSignatureMessage.Message.Messagesis incorrect, considering theValidatorPublicKeyor theCommitteeIDin theMessageID, it should ignore the message.ValidatorIndexappears more than five times in aPartialSignatureMessages(both forPostConsensusPartialSigandAggregatorCommitteePartialSig), the message is rejected.Five comes from the fact that, at most, a validator may have one aggregator duty and four sync committee contribution duties (one for each subnet).
/ssv/<ethereum_network_name>/boole/<subnet>