You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We would like to be able to have a manual way to re-generate snapshot files for checkpoints, spans, state sync events using Astrid. Note to use Astrid standalone mode we use --polygon.sync=true (needs sync from scratch).
The flow would be something like:
User will stop erigon
To re-gen state sync events a user will
delete all snapshot files from datadir/snapshtos that relate to state sync events that we want to regenerate
rm -rf datadir/bridge to wipe off the Astrid Bridge DB
run ./build/bin/integration astrid_bridge_resync
To re-gen spans, checkpoint, milestones a user will
delete all snapshot files from datadir/snapshtos that relate to checkpoints, spans, milestones that we want to regenerate
rm -rf datadir/heimdall to wipe off the Astrid Heimdall DB
run ./build/bin/integration astrid_heimdall_resync
Start Erigon again which will cause it to go through the snapshots stage and that will retire the newly fetched data from the Bridge and Heidamll DBs
To create the astrid_bridge_resync command we need to:
initialise the polygon/bridge Bridge component
start it by calling bridge.Run in another goroutine (can be stopped by calling cancel on the run ctx)
call bridge.ProcessNewBlocks in batches of 5000 blocks to replay all block headers from genesis (block 0) to current latest canonical header (can use the block reader for that) - note can build empty block bodies (ie no need to fetch whole block from DB) as we just need the canonical header value (so can use types.NewBlockWithHeader)
ProcessNewBlocks has logic internally to wait for all events for each block to be fetched first so we do not have to worry about that at all
Once we've replayed all existing canonical blocks we're done - stop the bridge Run goroutine and exit
To create the astrid_heimdall_resync command we need to:
initialise the polygon/heimdall Service component
start it by calling heimdall.Run in another goroutine (can be stopped by calling cancel on the run ctx)
call heimdall.SynchronizeCheckpoints to wait for it to fetch all checkpoints
call heimdall.SynchronizeMilestones to wait for it to fetch all milestones
call heimdall.SynchronizeSpans to wait for it to fetch all spans
once the above 3 have finished we can stop the heimdall goroutine and exit
The text was updated successfully, but these errors were encountered:
relates to #12706 (comment)
We would like to be able to have a manual way to re-generate snapshot files for checkpoints, spans, state sync events using Astrid. Note to use Astrid standalone mode we use
--polygon.sync=true
(needs sync from scratch).The flow would be something like:
datadir/snapshtos
that relate to state sync events that we want to regeneraterm -rf datadir/bridge
to wipe off the Astrid Bridge DB./build/bin/integration astrid_bridge_resync
datadir/snapshtos
that relate to checkpoints, spans, milestones that we want to regeneraterm -rf datadir/heimdall
to wipe off the Astrid Heimdall DB./build/bin/integration astrid_heimdall_resync
To create the astrid_bridge_resync command we need to:
To create the astrid_heimdall_resync command we need to:
The text was updated successfully, but these errors were encountered: