Skip to main content

Module progress

Module progress 

Source
Expand description

Progress tracking for blockchain syncing.

Structsยง

TipBlockDelay ๐Ÿ”’
Measures tip block delays from the tip changes this node observes.
TipGrowth ๐Ÿ”’
Tracks when the best chain tip height last increased, and the block lag measured when the tip last changed.

Constantsยง

LOG_INTERVAL ๐Ÿ”’
The amount of time between progress logs.
LOG_TARGET ๐Ÿ”’
The tracing target of the sync progress logs.
MAX_CLOSE_TO_TIP_BLOCKS ๐Ÿ”’
The number of blocks we consider to be close to the tip.
MIN_BLOCKS_MINED_AFTER_CHECKPOINT_UPDATE ๐Ÿ”’
The minimum number of extra blocks mined between updating a checkpoint list, and running an automated test that depends on that list.
MIN_SYNC_WARNING_BLOCKS ๐Ÿ”’
Skip slow sync warnings when we are this close to the tip.
PROGRESS_BAR_INTERVAL ๐Ÿ”’
The amount of time between progress bar updates.
SYNC_PERCENT_FRAC_DIGITS ๐Ÿ”’
The number of fractional digits in sync percentages.
TIP_BLOCK_DELAY_BACKLOG_MARGIN ๐Ÿ”’
How long before its parent became this nodeโ€™s tip a block can have been mined, and still have its tip delay recorded.

Functionsยง

record_tip_block_delay
Records how long after its header time each new best chain tip block was committed, with the blockโ€™s network upgrade once the network this node runs on is known, and sends each value to Sentry with the blockโ€™s height.
show_block_chain_progress
Logs Zebraโ€™s estimated progress towards the chain tip every minute or so, and updates a terminal progress bar every few seconds.