Module write

Source
Expand description

Writing blocks to the finalized and non-finalized states.

Structs§

BlockWriteSender 🔒
A worker with a task that reads, validates, and writes blocks to the finalized_state or non_finalized_state and channels for sending it blocks.
WriteBlockWorkerTask 🔒
A worker task that reads, validates, and writes blocks to the finalized_state or non_finalized_state.

Enums§

NonFinalizedWriteMessage
The message type for the non-finalized block write task channel.

Constants§

PARENT_ERROR_MAP_LIMIT 🔒
The maximum size of the parent error map.

Functions§

log_if_mined_by_zebra 🔒
Log a message if this block was mined by Zebra.
update_latest_chain_channels 🔒
Update the LatestChainTip, ChainTipChange, and non_finalized_state_sender channels with the latest non-finalized ChainTipBlock and Chain.
validate_and_commit_non_finalized 🔒
Run contextual validation on the prepared block and add it to the non-finalized state if it is contextually valid.