Skip to content

fix(unwind): commit view and set prune distance for execution unwind#313

Merged
AshinGau merged 2 commits intoGalxe:mainfrom
AshinGau:main
Mar 30, 2026
Merged

fix(unwind): commit view and set prune distance for execution unwind#313
AshinGau merged 2 commits intoGalxe:mainfrom
AshinGau:main

Conversation

@AshinGau
Copy link
Copy Markdown
Collaborator

@AshinGau AshinGau commented Mar 30, 2026

Fix unwind in pipe execution mode with two key changes:

  1. Prune safety distance: Enforce MINIMUM_PRUNING_DISTANCE gap in get_next_block_range() so the pruner always retains enough historical blocks for unwind, preventing missing data errors.

  2. RocksDB commit view: Insert commit_view() calls between write and read steps during unwind. Unlike MDBX, RocksDB's WriteBatch doesn't provide immediate read-after-write visibility within a transaction, so explicit flushes are needed before state root recalculation and state removal can read the updated data.

Also includes: moving nested_hash to reth-trie-db for reuse, skipping init_genesis on already-initialized databases, and minor logging improvements.

@AshinGau AshinGau force-pushed the main branch 3 times, most recently from 80f64d6 to fd932b3 Compare March 30, 2026 01:52
@AshinGau AshinGau merged commit ff103f9 into Galxe:main Mar 30, 2026
30 checks passed
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.

2 participants