Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3597 +/- ##
========================================
Coverage 75.87% 75.87%
========================================
Files 387 393 +6
Lines 34918 35330 +412
========================================
+ Hits 26493 26806 +313
- Misses 6556 6614 +58
- Partials 1869 1910 +41 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
480986b to
f403dea
Compare
15a5437 to
22030a1
Compare
2220c26 to
6907a65
Compare
rodrodros
reviewed
May 6, 2026
4c820cc to
b899d50
Compare
6907a65 to
32ceaff
Compare
d3606cb to
8ef5a41
Compare
41c23ee to
b45d05e
Compare
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.
Adds optional migration for history-pruning (migration/historyprunner) that brings an existing node's database in line with the rolling pruner's retention window. Activated whenever
--prune-modeis passed (with or without a value, including--prune-mode=0); no-op otherwise.The migration runs in two pipelined, resumable phases. The keeper window is anchored on the L1-verified head (matching the rolling pruner's reorg-safe floor): with
minHead = min(l1Head, chainHeight)andretainedBlockstaken from the--prune-mode=Nvalue (defaulting to 0 when the flag is passed bare), the window covers[minHead - retainedBlocks + 1, chainHeight]. IfminHead < retainedBlocksthe chain is shorter than the window and the migration no-ops, leaving the rolling pruner to take over once blocks arrive.TransactionBlockNumbersAndIndicesByHash,L1HandlerTxnHashByMsgHash,BlockHeaderNumbersByHash), then copies in-window entries from the live history buckets (ContractStorageHistory,ContractClassHashHistory,ContractNonceHistory) into a scratch namespace.Resume state (
stagerProgress|restorerProgress|numRetainedBlocks, 24 bytes BE) is persisted between runs; the originally-configured retention pins the cutoff so a --prune-mode change mid-flight cannot retarget an in-progress migration (logged when ignored).