refactor: rename ValidatorConsensusData to ProposerConsensusData#808
refactor: rename ValidatorConsensusData to ProposerConsensusData#808shane-moore wants to merge 3 commits intosigp:unstablefrom
Conversation
|
Claude finished @shane-moore's task in 1m 18s —— View job Code Review Progress ✓
Review SummaryThis PR implements a straightforward and well-executed refactoring to align Anchor's naming with the SSV specification. The changes are consistent, correctly applied, and include proper documentation for future cleanup work. Detailed Findings✅ Strengths
📋 Observations
🔍 Minor Observations
VerificationI verified:
ConclusionApproved. This is a clean, well-documented refactoring that successfully aligns Anchor with the SSV specification naming. The SSZ size updates are correctly calculated and the TODO comments provide clear guidance for future cleanup work. |
|
Claude finished @shane-moore's task in 1m 4s —— View job Code Review Complete ✅
SummaryThis PR successfully renames Detailed Review✅ Type Renames - Complete and ConsistentThe rename from consensus.rs (anchor/common/ssv_types/src/consensus.rs)
qbft_manager/src/lib.rs
validator_store/src/lib.rs
✅ SSZ Max Size Updates - CorrectThe SSZ size calculations are accurate and properly justified: PartialSignatureMessages Max (partial_sig.rs:12-17) /// Maximum number of `PartialSignatureMessage`s: 5048
/// Worst case scenario for a committee with 3000 validators:
/// every validator has an aggregation duty (3000) +
/// every validator is in sync committee and is a contributor to all 4 subnets (512 * 4 = 2048)
/// Calculated as 3000 + 512 * 4 = 5048
pub type PartialSignatureMessagesLen = Sum<Prod<U3, U1000>, Prod<U512, U4>>;
SSVMessage.Data Max (message.rs:58-61) /// `SSVMessage.Data` max size: 726932
/// `max(consensus_msg_max, partial_sig_max)` = `max(722412, 726932)` = 726932
/// 726932 = 726 * 1000 + 932
pub type SSVMessageDataLen = Sum<Prod<U726, U1000>, U932>;
The size increase is due to the increased ✅ TODO Comments - AppropriateThe TODO comments are well-placed and clearly scoped: consensus.rs:340-342 // TODO(post-boole): remove `BEACON_ROLE_AGGREGATOR` and
// `BEACON_ROLE_SYNC_COMMITTEE_CONTRIBUTION` branches. Post-Boole, `ProposerConsensusData`
// is only used for `Proposer`.✅ Correctly identifies code paths to be removed after the Boole fork qbft_manager/src/lib.rs:79-80 // TODO(post-boole): remove `duty` field and `ValidatorDutyKind`. Post-boole,
// `Proposal` is the only validator specific duty✅ Marks the qbft_manager/src/lib.rs:85-86 // TODO(post-boole): remove this enum. Post-boole, `Proposal` is the only
// validator specific duty kind.✅ Marks entire These TODOs properly align with the spec changes where aggregator and sync committee will use the new committee-based consensus path post-Boole.
|
be010db to
94ce686
Compare
Issue Addressed
Spec alignment with SSV spec renaming PR #596 (commit
e5171469) and SSV Go commit7b3f7a77f.Proposed Changes
ValidatorConsensusDatatoProposerConsensusDataand related types (ValidatorConsensusDataValidator,ValidatorConsensusDataLen,ValidatorInstanceId) to align with the specTODO(post-boole)comments on pre-Boole code paths that will be removed when Aggregator and SyncCommittee post-forkPartialSignatureMessageslist max from 1512 to 5048 (3000 aggregators + 512×4 sync committee contributors), andSSVMessage.Datamax from 722412 to 726932 (now bounded by partial sig messages rather than consensus messages)Additional Info
N/A