Commit ee9e06e
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 ProjectedState (from_head_state, advance, and the
score_entry scorer) plus 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 to
projected.score_entry. Deletes snapshot_current_slot_aggregation_inputs and
build_raw_signature_job (subsumed).
Builds on the block_builder refactor (ProjectedState owning projection +
scoring).1 parent 607d19f commit ee9e06e
4 files changed
Lines changed: 909 additions & 138 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
| |||
0 commit comments