Expand description
Utility functions, type aliases, helper structs and enum definitions.
Structs§
- Builder
Commitment - Commitment that builders use to sign block options. A thin wrapper around a Sha256 digest.
- Round
Finished Event - A struct containing information about a finished round.
- View
- This exists so we can perform state transitions mutably
Enums§
- Epoch
Transition Indicator - A helper enum to indicate whether a node is in the epoch transition A node is in epoch transition when its high QC is for the last block in an epoch
- Terminator
- Whether or not to stop inclusively or exclusively when walking
- View
Inner - A view’s state
Functions§
- bincode_
opts - For the wire format, we use bincode with the following options:
- epoch_
from_ block_ number - Returns an epoch number given a block number and an epoch height
- genesis_
epoch_ from_ version - Returns Some(1) if epochs are enabled by V::Base, otherwise returns None
- is_
epoch_ root - Returns true if the given block number is the third from the last in the epoch based on the given epoch height.
- is_
epoch_ transition - Returns true if the block is part of the epoch transition (including the last non null block)
- is_
first_ transition_ block - returns true if it’s the first transition block (epoch height - 2)
- is_
ge_ epoch_ root - Returns true if the given block number is equal or greater than the epoch root block
- is_
gt_ epoch_ root - Returns true if the given block number is strictly greater than the epoch root block
- is_
last_ block - Returns true if the block is the last block in the epoch
- is_
middle_ transition_ block - Returns true if the block number is in trasntion but not the transition block or the last block in the epoch.
- is_
transition_ block - Return true if the given block number is the final full block, the “transition block”
- mnemonic
- A function for generating a cute little user mnemonic from a hash
- option_
epoch_ from_ block_ number - Returns an
Option<Epoch>
based on a boolean condition of whether or not epochs are enabled, a block number, and the epoch height. If epochs are disabled or the epoch height is zero, returns None. - root_
block_ in_ epoch - Returns the block number of the epoch root in the given epoch
- transition_
block_ for_ epoch - Get the block height of the transition block for the given epoch
- verify_
leaf_ chain
Type Aliases§
- Leaf
Commitment - The hash of a leaf.
- Sha256
Digest 🔒 - Type alias for byte array of SHA256 digest length
- State
AndDelta - Optional validated state and state delta.