Expand description
Consensus critical contextual checks
Re-exportsΒ§
pub use utxo::transparent_coinbase_spend;
ModulesΒ§
- anchors π
- Checks for whether cited anchors are previously-computed note commitment tree roots.
- difficulty π
- Block difficulty adjustment calculations for contextual validation.
- nullifier π
- Checks for nullifier uniqueness.
- utxo π
- Consensus rule checks for the finalized state.
FunctionsΒ§
- block_
commitment_ πis_ valid_ for_ chain_ history - Check that
block
is contextually valid fornetwork
, using thehistory_tree
up to and including the previous block. - block_
is_ πnot_ orphaned - Returns
ValidateContextError::OrphanedBlock
if the height of the given block is less than or equal to the finalized tip height. - block_
is_ πvalid_ for_ recent_ chain - Check that the semantically verified block is contextually valid for
network
, based on thefinalized_tip_height
andrelevant_chain
. - difficulty_
threshold_ πand_ time_ are_ valid - Validate the time and
difficulty_threshold
from a candidate blockβs header. - height_
one_ πmore_ than_ parent_ height - Returns
ValidateContextError::NonSequentialBlock
if the block height isnβt equal to the parent_height+1. - initial_
contextual_ πvalidity - Perform initial contextual validity checks for the configured network, based on the committed finalized and non-finalized state.
- legacy_
chain π - Check if zebra is following a legacy chain and return an error if so.