Expand description
Writing blocks to the finalized and non-finalized states.
Structsยง
- Block
Write ๐Sender - A worker with a task that reads, validates, and writes blocks to the
finalized_state
ornon_finalized_state
and channels for sending it blocks. - Write
Block ๐Worker Task - A worker task that reads, validates, and writes blocks to the
finalized_state
ornon_finalized_state
.
Enumsยง
- NonFinalized
Write Message - 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
, andnon_finalized_state_sender
channels with the latest non-finalizedChainTipBlock
andChain
. - 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.