[WIP] Bor waypoint storage
Implementation of db and snapshot storage for additional synced hiemdall waypoint types
- Checkpoint
- Milestones
This is targeted at the Astrid downloader which uses waypoints to verify headers during syncing and fork choice selection.
Post milestones for heimdall these types are currently downloaded by erigon but not persisted locally. This change adds persistence for these types.
In addition to the pure persistence changes this PR also contains a refactor step which is part of the process of extracting polygon related types from erigon core into a seperate package which may eventually be extracted to a separate module and possibly repo.
The aim is rather than the core turbo\snapshotsync\freezeblocks having to know about types it manages and how to exaract and index their contents this can concern it self with a set of macro shard management actions.
This process is partially completed by this PR, a final step will be to remove BorSnapshots and to simplify the places in the code which has to remeber to deal with them. This requires further testing so has been left out of this PR to avoid delays in delivering the base types.
Status
- Waypont types and storage are complete and integrated in to the BorHeimdall stage, The code has been tested to check that types are inserted into mdbx, extracted and merged correctly
- I have verified that when produced from block 0 the new snapshot correctly follow the merging strategy of existing snapshots
- The functionality is enables by a --bor.waypoints=true this is false by default.
Next Steps
- Run a Mumbai instance to the tip and check current processing for milestones and checkpoints
- Produce and release snapshots for mumbai and bor mainnet
- Check existing node upgrades
- Remove --bor.waypoints flags
Quality Gate passed
Issues
29 New issues
0 Accepted issues
Measures
0 Security Hotspots
No data about Coverage
0.9% Duplication on New Code