feat(message_validator): reject ValidatorRegistration after Gloas - #1138
Conversation
SIP-94 deprecates the ValidatorRegistration duty at the Gloas fork: proposer preferences replace relay registrations. Reject inbound VR partial-signature messages whose envelope slot is at or after the fork. Wire values are retained for pre-Gloas decode per the SIP.
|
@claude, please take a look |
|
Claude finished @shane-moore's task in 3m 23s —— View job Review: reject
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## epbs #1138 +/- ##
=======================================
Coverage ? 67.66%
=======================================
Files ? 163
Lines ? 30596
Branches ? 0
=======================================
Hits ? 20702
Misses ? 9894
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Matches the boundary and consensus-path tests, which already pin Role::ValidatorRegistration in the expected failure pattern.
|
Claude finished @shane-moore's task in 29s —— View job Nit follow-up:
|
petarjuki7
left a comment
There was a problem hiding this comment.
Looks good, ready to merge after the conflicts are fixed.
|
Tick the box to add this pull request to the merge queue (same as
|
Problem, Evidence, and Context (Required)
ValidatorRegistrationduty at the Gloas fork: proposer preferences replace relay registrations, and the relay path is gone with blinded blocks. The emit side shipped in feat(validator_store): fork-gate RegistrationService at GLOAS_FORK_EPOCH #1137; this is the receive-side half: reject inbound VR partial-signature messages whose envelope slot is at/after Gloas.signature_collector,message_receiverdispatch) are role-blind, makingvalidate_role_for_forkthe single load-bearing inbound control.Change Overview (Required)
ValidationFailure::RoleNotActiveAfterEthForkvariant, filling the one empty cell in the existing 2x2 gate matrix (not-yet-active/deprecated x SSVFork/EthereumForkName), and a fourth branch invalidate_role_for_forkmirroring the PTCAttester gate with inverted polarity.lib.rs, the new branch invalidate_role_for_fork: the only production logic. The gate keys on the message envelope slot's epoch (not wall clock), so the first slot ofGLOAS_FORK_EPOCHrejects and every earlier slot accepts; registrations for pre-fork slots stay valid through their TTL window even when arriving post-fork.consensus_message.rs: the shared arrange/act of the Boole fork tests was factored intorun_role_fork_validationso the new VR test could reuse it. Confirm the 4 existing Boole tests still assert exactly what they did.partial_signature.rs: additive tests;spec_with_gloasmoved to the sharedcrate::testsmodule.Rolebyte[4,0,0,0],PartialSignatureKind::ValidatorRegistration = 4) are retained for pre-Gloas decode per SIP-94 §5, and the acceptance mapping is untouched (the new variant falls through to REJECT like its three siblings).Risks, Trade-offs, and Mitigations (Required)
gloas_fork_epoch = Noneeverywhere today); pinned by a dedicated assertion.RoleNotActiveAfterEthForkinstead of the structuralUnexpectedConsensusMessage(the fork gate runs first); both map to REJECT.Validation (Required)
cargo test -p message_validator: 66 passed. Workspace fmt, clippy, andcargo checkclean.Rollback (Required for behavior or runtime changes; optional otherwise)
Blockers / Dependencies (Optional)
N/A. Independent of #1062-#1064.