Module block

Source
Expand description

Blocks and block-related structures (heights, headers, etc.)

Re-exportsยง

pub use arbitrary::LedgerState;

Modulesยง

arbitrary
Randomised property testing for Blocks.
commitment ๐Ÿ”’
The Commitment enum, used for the corresponding block header field.
error ๐Ÿ”’
Errors that can occur when checking Block consensus rules.
genesis
Regtest genesis block
hash ๐Ÿ”’
header ๐Ÿ”’
The block header.
height ๐Ÿ”’
Block height.
merkle
The Bitcoin-inherited Merkle tree of transactions.
serialize ๐Ÿ”’
Serialization and deserialization for Zcash blocks.
tests
Tests for Zebra blocks

Structsยง

Block
A Zcash block, containing a header and a list of transactions.
ChainHistoryBlockTxAuthCommitmentHash
A block commitment to chain history and transaction auth.
ChainHistoryMmrRootHash
The root hash of a Merkle Mountain Range chain history tree.
CountedHeader
A header with a count of the number of transactions in its block. This structure is used in the Bitcoin network protocol.
Hash
A hash of a block, used to identify blocks and link blocks into a chain. โ›“๏ธ
Header
A block header, containing metadata about a block.
Height
The length of the chain back to the genesis block.
SerializedBlock
A serialized block.

Enumsยง

BlockTimeError
TODO: Use this error as the source for zebra_consensus::error::BlockError::Time, and make BlockError::Time add additional context. See https://github.com/ZcashFoundation/zebra/issues/1021 for more details.
Commitment
Zcash blocks contain different kinds of commitments to their contents, depending on the network and height.
CommitmentError
Errors that can occur when checking RootHash consensus rules.

Constantsยง

BLOCK_HASH_SIZE ๐Ÿ”’
A serialized Block hash takes 32 bytes
MAX_BLOCK_BYTES
The maximum size of a Zcash block, in bytes.
ZCASH_BLOCK_VERSION
The Zcash accepted block version.

Traitsยง

TryIntoHeight
Convenience trait for converting a type into a valid Zcash Height.

Type Aliasesยง

HeightDiff
A difference between two Heights, possibly negative.