merge queue: embarking unstable (3351db1) and #9222 together#9269
Closed
mergify[bot] wants to merge 2 commits intounstablefrom
Closed
merge queue: embarking unstable (3351db1) and #9222 together#9269mergify[bot] wants to merge 2 commits intounstablefrom
mergify[bot] wants to merge 2 commits intounstablefrom
Conversation
Splits the inner replay loop out of `reconstruct_historic_states` into a new public `reconstruct_historic_states_on_range(with_state_at_slot, from_slot, to_slot, write_block_roots, on_commit)` so it can be reused by an upcoming ERA file importer (separate PR). `reconstruct_historic_states` keeps its signature and behaviour, now a thin shell that derives the slot range from the anchor/split, then delegates to the ranged helper with `write_block_roots = false` and an `on_commit` closure that performs the existing per-commit anchor advance and the final flip to `as_archive_anchor()`. The ranged helper: - iterates `BeaconBlockRoots` directly via `FrozenForwardsIterator`, - detects skipped slots via `block.slot() != iterator slot` instead of tuple-window comparison, - supports a starting state at any slot `<= from_slot` (catches up via `per_slot_processing` in a `while`), - optionally writes the `BeaconBlockRoots` index inline (for callers populating the cold DB rather than reading an already-populated one), - runs a tree-hash equality check against the last stored state root at the final slot of the batch. Verified with `make lint`, `cargo fmt --check`, `cargo nextest run -p store`, and `cargo nextest run --release -p beacon_chain --test beacon_chain_tests store_tests::weak_subjectivity_sync` (7/7 pass — covers the existing reconstruction code path).
|
|
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.
🎉 This pull request has been checked successfully and will be merged soon. 🎉
Branch unstable (3351db1) and #9222 are embarked together for merge.
This pull request has been created by Mergify to speculatively check the mergeability of #9222.
You don't need to do anything. Mergify will close this pull request automatically when it is complete.
Required conditions of queue rule
defaultfor merge:#approved-reviews-by >= 1[🛡 GitHub branch protection]#changes-requested-reviews-by = 0[🛡 GitHub branch protection]check-success=local-testnet-successcheck-success=test-suite-successRequired conditions to stay in the queue:
#approved-reviews-by >= 1#approved-reviews-by >= 1[🛡 GitHub branch protection]#changes-requested-reviews-by = 0[🛡 GitHub branch protection]check-success=license/clacheck-success=target-branch-checklabel!=do-not-merge