Expand description
The syncer downloads and verifies large numbers of blocks from peers to Zebra.
It is used when Zebra is a long way behind the current chain tip.
Modules§
- downloads πA download stream for Zebraβs block syncer.
- End of support checking task.
- gossip πA task that gossips newly verified
block::Hash
es to peers. - progress πProgress tracking for blockchain syncing.
- recent_
sync_ πlengths A channel which holds a list of recent syncer response lengths. - status πSyncer chain tip status, based on recent block locator responses from peers.
Structs§
- Checked
Tip πHelps work around defects in the bitcoin protocol by checking whether the returned hashes actually extend a chain tip. - Sync configuration section.
- A helper type which holds a list of recent syncer response lengths. These sync lengths can be used to work out if Zebra has reached the end of the chain.
- A helper type to determine if the synchronizer has likely reached the chain tip.
Enums§
- Errors that can occur when gossiping committed blocks
Constants§
- Controls how many times we will retry each block download.
- Controls how long we wait for a block download request to complete.
- BLOCK_
VERIFY_ πTIMEOUT Controls how long we wait for a block verify request to complete. - The default for the user-specified lookahead limit.
- FANOUT πControls the number of peers used for each ObtainTips and ExtendTips request.
- A shorter timeout used for the first few blocks after the final checkpoint.
- The number of blocks after the final checkpoint that get the shorter timeout.
- Controls how long we wait to retry a failed attempt to download and verify the genesis block.
- The expected maximum number of hashes in an ObtainTips or ExtendTips response.
- A lower bound on the user-specified checkpoint verification concurrency limit.
- A lower bound on the user-specified concurrency limit.
- Controls how long we wait between gossiping successive blocks or transactions.
- SYNC_
RESTART_ πDELAY Controls how long we wait to restart syncing after finishing a sync run. - Controls how long we wait for a tips response to return.
- A multiplier used to calculate the extra number of blocks we allow in the verifier, state, and block commit pipelines, on top of the lookahead limit.
Functions§
- Run continuously, gossiping newly verified
block::Hash
es to peers. - Logs Zebraβs estimated progress towards the chain tip every minute or so, and updates a terminal progress bar every few seconds.