Expand description
Checkpoint-based block verification.
Checkpoint-based verification uses a list of checkpoint hashes to speed up the initial chain sync for Zebra. This list is distributed with Zebra.
The checkpoint verifier queues pending blocks. Once there is a chain from the previous checkpoint to a target checkpoint, it verifies all the blocks in that chain, and sends accepted blocks to the state service as finalized chain state, skipping the majority of contextual verification checks.
Verification starts at the first checkpoint, which is the genesis block for the configured network.
Re-exportsยง
pub use list::CheckpointList;
Modulesยง
- list ๐
- Checkpoint lists for checkpoint-based block verification
- types ๐
- Supporting types for checkpoint-based block verification
Structsยง
- Checkpoint
Verifier - A checkpointing block verifier.
- Queued
Block ๐ - An unverified block, which is in the queue for checkpoint verification.
- Request
Block ๐ - The unverified block, with a receiver for the
QueuedBlock
โs result.
Enumsยง
Constantsยง
- MAX_
CHECKPOINT_ BYTE_ COUNT - We limit the memory usage and download contention for each checkpoint, based on the cumulative size of the serialized blocks in the chain.
- MAX_
CHECKPOINT_ HEIGHT_ GAP - We limit the maximum number of blocks in each checkpoint. Each block uses a constant amount of memory for the supporting data structures and futures.
- MAX_
QUEUED_ BLOCKS_ PER_ HEIGHT - The maximum number of queued blocks at any one height.
Functionsยง
- progress_
from_ ๐tip - Convert a tip into its hash and matching progress.
Type Aliasesยง
- Queued
Block ๐List - A list of unverified blocks at a particular height.