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_stateornon_finalized_stateand channels for sending it blocks. - Write
Block πWorker Task - A worker task that reads, validates, and writes blocks to the
finalized_stateornon_finalized_state.
EnumsΒ§
- NonFinalized
Write Message - The message type for the non-finalized block write task channel.
- NonFinalized
Write πOutcome - What the block write task did with a non-finalized block, so the state service can update the blocks and outputs it tracks as sent.
ConstantsΒ§
- PARENT_
ERROR_ πMAP_ LIMIT - The maximum size of the parent error map.
FunctionsΒ§
- finalize_
root_ πblocks - Finalizes the best chainβs root blocks while
NonFinalizedState::should_finalize_root. - finalize_
root_ πblocks_ and_ forget_ evicted - Finalizes root blocks after a commit, then reports and publishes any forks that finalizing
evicted, because
NonFinalizedState::finalizere-inserts the remaining chains under the fork limits. - forget_
evicted_ πblocks - Sends the hashes of blocks evicted from the non-finalized state on
non_finalized_rejected_sender, so the state service accepts them again if the network extends their chain. - update_
latest_ πchain_ channels - Update the
LatestChainTip,ChainTipChange, andnon_finalized_state_senderchannels with the latest state. If there is no non-finalized chain, use the finalized tip. - 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.