Module hotshot_types::utils
source · Expand description
Utility functions, type aliases, helper structs and enum definitions.
Structs§
- Commitment that builders use to sign block options. A thin wrapper around a Sha256 digest.
- A struct containing information about a finished round.
- This exists so we can perform state transitions mutably
Enums§
- 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
- Whether or not to stop inclusively or exclusively when walking
- A view’s state
Functions§
- For the wire format, we use bincode with the following options:
- Returns an epoch number given a block number and an epoch height
- Returns Some(0) if epochs are enabled by V::Base, otherwise returns None
- Returns true if the given block number is the third from the last in the epoch based on the given epoch height.
- Returns true if the given block number is the last in the epoch based on the given epoch height.
- A function for generating a cute little user mnemonic from a hash
- Returns an Option
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.
Type Aliases§
- The hash of a leaf.
- Type alias for byte array of SHA256 digest length
- Optional validated state and state delta.