feat(validator_store): fork-gate RegistrationService at GLOAS_FORK_EPOCH - #1137
Conversation
Skip the periodic register_validators publish once the current slot's fork is Gloas: SIP-94 §4 removes the relay-builder registration flow, so the calls no longer feed block production. The service stays spawned and re-evaluates each epoch, leaving pre-Gloas networks and the transition window unaffected.
Consolidate the four gate tests into two: the fork-boundary test already covers the before/after cases, and the unscheduled case stays. Trim the helper doc so the call-site comment owns the SIP-94 §4 rationale.
|
@claude, please take a look |
|
Claude finished @shane-moore's task in 2m 32s —— View job Review: fork-gate RegistrationService at GLOAS_FORK_EPOCH
Solid, well-scoped change. The gate logic is correct and consistent with the established fork-gating pattern already used in No blocking issues found. A few observations: 1. Startup is not gated for Gloas-from-genesis networks (minor, and intentional)The PR notes startup is intentionally left ungated. Worth flagging the consequence: on a network where Gloas is active from genesis, this task spawns and then loops forever doing nothing but one 2. PR description is stale on test countThe description says "Four runtime-free unit tests," but the current diff (after 3. Fallback arithmetic (
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## epbs #1137 +/- ##
=======================================
Coverage ? 65.67%
=======================================
Files ? 163
Lines ? 29058
Branches ? 0
=======================================
Hits ? 19083
Misses ? 9975
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:
|
|
|
Claude finished @shane-moore's task in 33s —— View job Re: review follow-upsThanks for the detailed responses — all three land well. 1. Startup gate polarity. Agreed, and the reasoning is airtight. The PTC gate ( 2. Test count. Confirmed against the current file — two consolidated tests:
They cover the inclusive boundary and the unscheduled-fork case, which are the two that matter. Description now matches. 3. 👍 No blocking issues, nothing further from me. LGTM. |
|
Queued — the merge queue status continues in this comment ↓. |
Merge Queue Status
This pull request spent 12 minutes 45 seconds in the queue, including 11 minutes 31 seconds running CI. Required conditions to merge
|
Problem, Evidence, and Context (Required)
RegistrationService's periodicpost_validator_register_validatorcalls no longer feed block production; they are wasted RPC and operator-log noise.Change Overview (Required)
fork_name_at_slot(slot).gloas_enabled(), the loop logs at debug, sleeps to the next epoch, and re-evaluates. No BN call, no signing.should_skip_for_gloashelper so it is unit-testable without a runtime, mirroringis_scheduled_for_slotin the same file.ValidatorRegistrationpartial-sig rejection is out of scope (feat(message_validator): reject ValidatorRegistration partial-sig at/after Gloas #1115).Risks, Trade-offs, and Mitigations (Required)
breakwould rest on a single wall-clock reading, so a transient forward clock step (bad NTP) on a pre-Gloas network would permanently stop registrations until restart. The sleeping loop self-heals next epoch and matches how the sibling fork-aware services (proposer preferences, payload attestation, metadata) gate.Validation (Required)
cargo test -p anchor_validator_store: 58 passed. Workspace fmt and clippy clean.Rollback (Required for behavior or runtime changes; optional otherwise)
Blockers / Dependencies (Optional)
N/A. Independent of #1062-#1064; all required LH symbols are already in the current pin.