package
1.4.4
Repository: https://github.com/prysmaticlabs/prysm.git
Documentation: pkg.go.dev

# Functions

ConcatGeneralizedIndices concats the generalized indices together.
CreateTrieFromProto creates a Sparse Merkle Trie from its corresponding merkle trie.
GeneralizedIndexBit returns the given bit of a generalized index.
GeneralizedIndexChild returns the child of a generalized index.
GeneralizedIndexLength returns the generalized index length from a given index.
GeneralizedIndexParent returns the parent of a generalized index.
GeneralizedIndexSibling returns the sibling of a generalized index.
GenerateTrieFromItems constructs a Merkle trie from a sequence of byte slices.
MerkleTree returns all the nodes in a merkle tree from inputting merkle leaves.
NewTrie returns a new merkle trie filled with zerohashes to use.
NextPowerOf2 returns the next power of 2 >= the input Spec pseudocode definition: def get_power_of_two_ceil(x: int) -> int: """ Get the power of 2 for given input, or the closest higher power of 2 if the input is not a power of 2.
PrevPowerOf2 returns the previous power of 2 >= the input Spec pseudocode definition: def get_power_of_two_floor(x: int) -> int: """ Get the power of 2 for given input, or the closest lower power of 2 if the input is not a power of 2.
VerifyMerkleBranch verifies a Merkle branch against a root of a trie.

# Variables

ZeroHashes is a representation of all zerohashes of varying depths till h=100.

# Structs

SparseMerkleTrie implements a sparse, general purpose Merkle trie to be used across Ethereum consensus functionality.