[][src]Module merkletree::merkle

Merkle tree abstractions, implementation and algorithms.

Structs

MerkleTree

Merkle Tree.

ProofAndTree

Constants

BUILD_CHUNK_NODES
BUILD_DATA_BLOCK_SIZE
SMALL_TREE_BUILD

Tree size (number of nodes) used as threshold to decide which build algorithm to use. Small trees (below this value) use the old build algorithm, optimized for speed rather than memory, allocating as much as needed to allow multiple threads to work concurrently without interrupting each other. Large trees (above) use the new build algorithm, optimized for memory rather than speed, allocating as less as possible with multiple threads competing to get the write lock.

Traits

Element

Element stored in the merkle tree.

FromIndexedParallelIterator
FromIteratorWithConfig

Functions

get_merkle_tree_leafs
get_merkle_tree_len
log2_pow2

find power of 2 of a number which is power of 2

next_pow2

next_pow2 returns next highest power of two from a given number if it is not already a power of two.

populate_data

Type Definitions

Result