Skip to content

Commit 26a262f

Browse files
committed
feat(aggregation): score interval-2 jobs like the block builder
The interval-2 session aggregated current-slot gossip groups in arbitrary order and ignored existing proofs, so it could not prioritize the groups whose aggregation most advances consensus. Rework snapshot_aggregation_inputs into a tiered greedy selector modeled on select_attestations: an up-front store pass resolves each candidate's material once (raw-first + trim), then a loop scores candidates by (current-slot-first, Finalize > Justify > Build) against an optimistically-projected state, emitting at most MAX_AGGREGATION_JOBS jobs. Candidates are filtered by the block builder's entry_passes_filters against a chain view covering [0, head_slot] (head root pushed onto the state's historical_block_hashes, which omits the head's own root), so prover time is spent only on aggregations a block could actually pack. Reuses the block builder's shared, coverage-based score_entry, its ProjectedState (from_head_state + advance), and entry_passes_filters, so proposer and aggregator can never drift on either the justify/finalize projection or the tiering. The aggregator passes each job's realized raw + child coverage straight to score_entry. Deletes snapshot_current_slot_aggregation_inputs and build_raw_signature_job (subsumed). Builds on the block_builder refactor (shared ProjectedState + coverage-based score_entry).
1 parent 0277f5c commit 26a262f

4 files changed

Lines changed: 913 additions & 138 deletions

File tree

Cargo.lock

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/blockchain/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ hex = { workspace = true }
4040
libssz.workspace = true
4141
libssz-types.workspace = true
4242
datatest-stable = "0.3.3"
43+
leansig.workspace = true
44+
rand.workspace = true
4345

4446
[[test]]
4547
name = "forkchoice_spectests"

0 commit comments

Comments
 (0)