Skip to main content

Module merkle

Module merkle 

Source
Expand description

The Bitcoin-inherited Merkle tree of transactions.

Structsยง

AuthDataRoot
The root of the authorizing data Merkle tree, binding the block header to the authorizing data of the block (signatures, proofs) as defined in ZIP-244.
Root
The root of the Bitcoin-inherited transaction Merkle tree, binding the block header to the transactions in the block.

Constantsยง

AUTH_DIGEST_PLACEHOLDER
The placeholder used for the AuthDigest of pre-v5 transactions.
MERKLE_PAIRS_PER_CHUNK ๐Ÿ”’
Each parallel task hashes up to 128 contiguous pairs into its own contiguous output slice.
PARALLEL_MERKLE_THRESHOLD ๐Ÿ”’
Keep levels below 1,024 input nodes serial to amortize Rayon scheduling over enough hashes.

Functionsยง

auth_data_hash ๐Ÿ”’
hash ๐Ÿ”’
reduce_merkle_root ๐Ÿ”’
Reduce ordered leaves, duplicating an unpaired final node at each level.