You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(starfish): GC-based eviction of stale missing-ancestor and suspended-tx state
Bounds BlockManager's in-memory bookkeeping by dropping refs the network's
GC floor has already passed. An ancestor at or below
`DagState::gc_round_for_last_commit()` cannot influence any not-yet-sequenced
block, so retaining it as 'missing' or chasing it via HeaderSynchronizer
serves no purpose.
- Add `BlockSuspender::evict_below_round(round_floor)`: drops
`headers_to_fetch` entries below the floor, then treats every
`missing_ancestors` key below the floor as resolved and reuses
`recursively_unsuspend_dependents` to cascade. Returns headers that
became fully resolved.
- Add `BlockManager::maybe_evict_below_gc_floor` called at the top of
both `try_accept_blocks` and `try_accept_block_headers`, gated on
`consensus_block_restrictions` and on the floor having advanced since
the last call (`last_gc_floor_applied` field).
- In `find_missing_ancestors`, skip ancestors at or below the floor.
- In `filter_out_already_processed_and_sort`, drop incoming headers whose
own round is at or below the floor.
- Also retain `suspended_transactions` entries above the floor, addressing
the existing unbounded-growth TODO. Same floor as headers — a block at
or below `gc_round_for_last_commit` cannot be sequenced, so its txs
cannot reach DagState.
- Five new metrics under the `block_manager_gc_*` prefix to make sweep
activity visible on Grafana.
Without the hardening flag, behavior is unchanged: `Option<Round>`-typed
gates make the round filters true no-ops in legacy mode.
Closes#11401
0 commit comments