fix(validator_store): publish decided AggregatorCommittee aggregates from the metadata service - #1245
Draft
shane-moore wants to merge 3 commits into
Draft
Conversation
…nce per slot Both Boole post-consensus callbacks sized the committee partial-signature batch from the full decided value but each signed only its own object class, so any decided entry whose class the local Lighthouse did not request left the batch permanently under-filled and the operator's single post-consensus message was never sent. The whole duty then failed cluster-wide. Drive the signing from the decided value instead. The slot pipeline starts one execution per committee when it publishes that value at 2/3 slot, so exactly one message per (committee, slot) holds by construction rather than by locking, and the two Lighthouse callbacks become lookups that filter the shared outcome for the roots they asked for. The batch size is the number of entries actually submitted, so it is always reachable by local filtering. This reuses the crate's existing signing pipeline rather than duplicating it: SigningRequest and resolve now key results by (validator index, signing root) so one validator can hold five distinct roots, and collect_prepared_signatures shares the drain helper with the new path. collect_signature is unchanged. Refs sigp#1227
Registering an AggregatorCommittee execution overwrote any existing entry for the same (committee, slot). The slot pipeline publishes once per slot today, so this was not reachable, but it moved the exactly-once guarantee out of this module and into another module's timing loop. Overwriting would spawn a second QBFT round and a second set of detached signing tasks while the first set kept running, putting two post-consensus messages on the wire for one slot, which peers reject with a gossip penalty. Register only into a vacant entry so exactly-once holds here regardless of how often the pipeline publishes, and correct the field doc, which still described the superseded callback-triggered design. Raised in review of sigp#1229.
…from the metadata service Lighthouse's attestation service clones its duty view before Anchor's distributed selection proofs finish, so post-Boole aggregates were signed but silently never published (13-73 of 200 expected in scale-100 ssv-mini campaigns). Make Anchor the authoritative Boole+ aggregate publisher: the Lighthouse aggregate callback returns one empty batch, and a detached metadata-service publisher joins each newly registered post-consensus execution, drains the decided aggregate signatures under the existing two-slot deadline, and posts them via first_success. This matches go-ssv, which publishes decided aggregates from the SSV node itself, and makes publication independent of Lighthouse's snapshot timing.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## unstable #1245 +/- ##
============================================
+ Coverage 65.42% 69.89% +4.47%
============================================
Files 164 166 +2
Lines 28075 29803 +1728
============================================
+ Hits 18367 20832 +2465
+ Misses 9708 8971 -737
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:
|
shane-moore
marked this pull request as draft
August 13, 2026 02:04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem, Evidence, and Context (Required)
Post-Boole, Anchor completes every attestation selection proof but most aggregates are never published. Anchor's selection proofs are distributed signing rounds finishing ~250-500ms into the slot, while embedded Lighthouse's attestation service clones its duty view (including
selection_proof: Option) when attestation production starts and never re-reads it. All-Noneclones makeproduce_and_publish_aggregatesreturnOksilently. Both Lighthouse trigger paths (head event and timer) share the clone, so delaying the head event cannot close the race.Change Overview (Required)
Make Anchor the single authoritative Boole+ aggregate publisher, working from the decided value instead of Lighthouse's snapshot:
sign_aggregate_and_proofsnow yields one emptyOkbatch (Lighthouse's publish loop drops empty batches silently, verified at pin b263df5), andsign_committee_aggregate_and_proofsis deleted.start_aggregator_post_consensusreturns its vacant-only insertions; the metadata service spawns one detached publisher per slot that joins each new execution, drains the decided aggregate signatures under the existing two-slot deadline, assemblesSignedAggregateAndProof(v1/v2 by decided variant), and POSTs viafirst_success(Lighthouse's own aggregate publication policy).anchor_aggregator_committee_publish_total{result}metric whose labels partition every committee processed; per-aggregate publish logs reproduce Lighthouse's field set (type="aggregated").Reading order:
aggregator_post_consensus.rs(registration, resolve, publisher driver), thenmetadata_service.rs(spawn + POST), then thelib.rsdeletion, then tests.Did not change: pre-Boole per-validator aggregate signing (Lighthouse still publishes), the contributions callback, PR #1229's exactly-once registration and detached signing, and all head-event/timer plumbing.
Risks, Trade-offs, and Mitigations (Required)
Validation (Required)
make cargo-fmt-check,make lintclean.no_signaturesoutcome (decided aggregates, no root reaches quorum) is unit-tested but was not reproducible live (local reconstruction outruns slot-precise fault injection).Rollback (Required for behavior or runtime changes; optional otherwise)
Single revertible commit; reverting restores the Lighthouse callback path (and its snapshot race). No config, schema, or wire-format changes; the new metric disappears on revert.
Blockers / Dependencies (Optional)
Additional Info / Next Steps (Optional)
AggregatorCommitteeDataValidatorversion-vs-duty-slot-fork validation (mirrors b680964; makes the endpoint variant-sniff provably redundant), and an upstream Lighthouse issue for the duty-snapshot race (bites their remote-signer/DVT users).