Skip to content

prevent attestation starvation by tracking included bits - #9

Open
tosynthegeek wants to merge 5 commits into
ream-collective:developfrom
tosynthegeek:feat/prune-attestation-group
Open

prevent attestation starvation by tracking included bits#9
tosynthegeek wants to merge 5 commits into
ream-collective:developfrom
tosynthegeek:feat/prune-attestation-group

Conversation

@tosynthegeek

@tosynthegeek tosynthegeek commented Jul 29, 2026

Copy link
Copy Markdown

Changes

  • Add included_attestation_bits: HashMap<AttestationKey, HashSet<usize>> that records which aggregation bits have already appeared in an imported block.
  • mark_attestations_included – called on every successfully imported block; records the bits of single-committee attestations.
  • get_attestations_for_block / aggregate_attestation_group – skip already-included bits. A group that has nothing new returns None and does not consume a packing slot.
  • clean_attestations – also drops expired entries from the bit map.
  • Wire the mark call into BeaconChain::process_block_attestations (both the normal on_block path and the data-availability path).

Fixes ReamLabs#1539

perfogic and others added 5 commits July 21, 2026 02:23
* test(beacon): add block production and finality e2e

Add a mock execution engine and a multi-node beacon e2e test that verifies block production, gossip import, fork-choice convergence, and checkpoint finality.

* fix(consensus): align beacon block processing with specs

Process block attestations through fork choice, fix withdrawal sweep wraparound, and skip blob availability checks for blocks without blob commitments.

* fix(operation-pool): aggregate attestations for block production

Select only includable attestations for block production, aggregate non-overlapping pooled votes, and cap the result at the Electra block limit.

* fix(validator): align signing domains and roots

Use the real genesis validators root for validator signing domains and sign the consensus objects expected by the spec.

* fix(validator): execute scheduled beacon duties

Load current and next epoch duties, run proposer and attester duties at their assigned slots, and schedule sync committee normal and aggregator work with the correct slot and subcommittee index.

* fix(beacon-api): return validator-facing data from correct roots

Fix validator client block-root requests, duty state lookup, state-root response shape, broadcast validation query values, and produced block response handling.

* fix(gossip): import accepted beacon messages locally

Import accepted gossip attestations into the local operation pool and fork choice, keep forwarding accepted messages, and validate Electra attestation and sync committee signing fields correctly.

* fix(sync): stabilize beacon fork convergence

Build attestation data from the fork-choice head, initialize fork-choice weight state, relax validator API syncing tolerance, and make block range sync request contiguous ranges from fresh peer metadata.

* fix(beacon-api): build proposal blocks from fork-choice head

* fix(gossip): publish beacon topics with fork digest

* fix(p2p): redial beacon bootnodes after disconnect

* chore(test): change from 4 nodes to 2 nodes for testing 8 validators

* fix(gossip): report validation for beacon messages
* feat(beacon): broadcast data column sidecars from proposer

* feat: add e2e test for multihop, address ef-test fail
- include develop in pull request branch filters
- enable Rust, documentation, interop, and PR title checks for develop-based PRs
- keep push workflows restricted to master
…abs#4)

* feat(beacon): integrate data column sidecars with availability checks

- add pending data availability tracking for beacon blocks
- defer block import until all required data columns are available
- validate and persist incoming data column sidecars
- resume pending block import when availability requirements are met
- backfill columns stored before their corresponding block arrives
- prune stale pending entries using finality and the configured retention window
- preserve pending blocks after the finalized checkpoint slot
- prevent imported blocks from recreating orphan availability entries
- harden data column sidecar gossip validation
- add regression tests for finalized-slot and retention-boundary pruning

* test(beacon): verify blob blocks finalize after data availability

- reuse the data column propagation scenario for finality coverage
- enable data availability checks explicitly for the Electra-based E2E fixture
- wait until the blob block epoch is finalized on both beacon nodes
- assert the finalized canonical chain contains the propagated blob block
- keep production data availability checks gated by the configured Fulu fork

* fix(networking): initialize KZG before sidecar validation

- initialize the KZG trusted setup before processing data column gossip
- prevent the first sidecar validation from exceeding gossipsub cache retention
- rename the multi-hop propagation test to avoid overlapping Cargo test filters

* fix(beacon): stabilize data column availability handling

- persist data column sidecars atomically to prevent partial reads during concurrent writes
- allow tests to override gossipsub history length for slow CI validation
- extend relay message retention in the multi-hop propagation test
- validate EF data column fixtures before storing them
- require EF blocks to be fully imported instead of treating pending availability as success
- key EF sidecars by their signed block root and column index
- remove unused fork-choice KZG dependencies

* test(beacon): stabilize data availability finality test

- route all validators through a single canonical beacon node
- keep the second node as a peer for sidecar propagation and storage checks
- avoid unrelated unknown-parent forks preventing finality

* fix(test): apply finality validator setup to the correct flow

- restore the standard block production test setup
- use a single canonical validator endpoint for the DA finality test
- fix clippy and cargo-udeps compilation

* fix(beacon): use configured data column retention window

- read the sidecar retention period from BeaconNetworkSpec
- remove the duplicated consensus constant
- keep the availability boundary test independent of network defaults
@perfogic

perfogic commented Jul 30, 2026

Copy link
Copy Markdown
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prune attestations from OperationPool on inclusion to prevent justification stall

3 participants