Synchronization
Synchronization brings the local node in sync with the network and feeds ready blocks into consensus.
Phases
Archive and full nodes follow a fixed phase pipeline:
CatchUpRecoverBlockHeaderFromDB
CatchUpSyncBlockHeader
CatchUpCheckpoint
CatchUpFillBlockBodyPhase
CatchUpSyncBlock
Normal
Each phase drives specific network requests and graph updates.
SynchronizationGraph
The sync graph stores all received headers and blocks and tracks their status:
Header-only, graph-ready, block-ready.
Parent and referee connectivity.
Frontiers for not-ready blocks and old-era blocks.
Only blocks that are graph-ready and have full bodies are delivered to consensus.
State sync
Snapshot-based state sync uses:
Snapshot manifest requests.
Chunk requests/responses.
Candidate selection and restoration helpers.
Key source files
crates/mazzecore/core/src/sync/synchronization_phases.rscrates/mazzecore/core/src/sync/synchronization_graph.rscrates/mazzecore/core/src/sync/message/mod.rscrates/mazzecore/core/src/sync/state/mod.rs
Last updated
Was this helpful?