Module write

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.