pruner: covering reorg scenarios
Description
We added two mechanisms to make the pruner handle online and offline reorgs correctly: it now persists the last seen canonical head and compares it to the current head on each run, allowing it to detect and clean up reverted data even after restarts; and it includes a cursor-clamp and rollback logic so both the cursor and pruned ranges remain consistent whenever a reorg is detected.
Changes
- [ ] Bugfix (non-breaking change that solves an issue)
- [ ] Hotfix (change that solves an urgent issue, and requires immediate attention)
- [x] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (change that is not backwards-compatible and/or changes current functionality)
- [ ] Changes only for a subset of nodes
Testing
- [x] I have added unit tests
- [ ] I have added tests to CI
- [ ] I have tested this code manually on local environment
- [ ] I have tested this code manually on remote devnet using express-cli
- [ ] I have tested this code manually on amoy
- [ ] I have created new e2e tests into express-cli
Quality Gate passed
Issues
8 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
This PR is stale because it has been open 21 days with no activity. Remove stale label or comment or this will be closed in 14 days.