Skip to content

perf(prune): backport efficient history shard pruning to v2.5.2 - #26

Merged
0x00101010 merged 1 commit into
backport/v2.5.2/mainfrom
backport/26900-history-pruning
Oct 14, 2026
Merged

0x00101010 merged 1 commit into
backport/v2.5.2/mainfrom
backport/26900-history-pruning

Conversation

@0x00101010

@0x00101010 0x00101010 commented Oct 13, 2026 •

Copy link
Copy Markdown

Why

History pruning blocks persistence while decoding retained shards that cannot contain expired data. Backports the upstream optimization onto backport/v2.5.2/main, currently tagged base-v2.5.2.7.

What

  • Cherry-pick the complete merged upstream patch unchanged, preserving attribution, provenance, and regression tests.
  • Stop history scans after the boundary shard and trim expired bitmap ranges in place, preserving the live sentinel and propagating iterator errors. Retention, database formats, and scheduling are unchanged.

Notes

  • A separate A/B/A mainnet-snapshot trial at 200ms with a 1,339,200-block window measured 3.73 → 4.99 → 3.60 blocks/s and mean prune times of 4.20s → 0.124s → 4.33s. The backport kept pruning one old block per new block. Each run measured 120s after 30s warm-up on one host; runs advanced the same datadir, and the backport binary used local Reth dependency overrides.
  • The 13,392,000-block window, longer runs, and other hosts remain untested.

…gmxyz#26900)

Co-authored-by: ControlCplusControlV <44706811+ControlCplusControlV@users.noreply.github.com>
(cherry picked from commit 8fce12d)
Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: T-01a135b5-d2d1-70a1-8aa3-be9ba6089506
@0x00101010

Copy link
Copy Markdown
Author

Local verification: 326 tests passed across reth-db-api, reth-provider, and reth-prune; nightly workspace formatting and all-target/all-feature Clippy for those crates passed. The patch ID matches the upstream commit.

The expanded all-feature test run passed 330/331 tests. The failure, remove_block_and_execution_above_returns_persistence_frontiers, also fails on unchanged base-v2.5.2.7 with the same missing-trie-updates error. Full-workspace all-feature Clippy is blocked locally by missing LLVM 22 and m4.

The lint workflow failed at startup before creating jobs; the unchanged workflow has the same startup failure on another PR against this base. No unrelated code or workflow changes are included.

@0x00101010
0x00101010 merged commit 7134be3 into backport/v2.5.2/main Oct 14, 2026
11 of 12 checks passed
@0x00101010

Copy link
Copy Markdown
Author

The workspace unit tests, both E2E suites, doctests, and codec checks passed. Ethereum state tests were interrupted by a runner shutdown after 34 tests passed, so the aggregate unit check failed. The previous release had the same runner-shutdown failure before a successful retry. I requested one retry of the failed jobs; no source changes are needed for this interruption.

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.

3 participants