- length of keys in tree
- length of values in tree. None if it is not fixed
- option root node and height of old tree. Tree should contain new nodes only WARNING if you pass it, all isNew and visited flags should be set correctly and height should be correct
- changed nodes will be collected to a separate buffer during tree modifications if true
- hash function
- A new prover node with two leaves: r on the left and a new leaf containing key and value on the right
Sequence of leafs and internal nodes that where likely by modified after last proof generation
Sequence of leafs and internal nodes that where likely by modified after last proof generation
Nodes that may, or may not be mofidied after last proof generation
Nodes that may, or may not be mofidied after last proof generation
- changed nodes will be collected to a separate buffer during tree modifications if true
- changed nodes will be collected to a separate buffer during tree modifications if true
true
if this tree has an element that has the same label, as node.label
, false
otherwise.
true
if this tree has an element that has the same label, as node.label
, false
otherwise.
Returns the current digest of the authenticated data structure, which contains the root hash and the root height
Returns the current digest of the authenticated data structure, which contains the root hash and the root height
- the digest
The digest consists of the label of the root node followed by its height, expressed as a single (unsigned) byte
The digest consists of the label of the root node followed by its height, expressed as a single (unsigned) byte
Generates the proof for all the operations performed (except the ones that failed) since the last generateProof call
Generates the proof for all the operations performed (except the ones that failed) since the last generateProof call
- the proof
Generates the proof for all the operations in the list.
Generates the proof for all the operations in the list. Does NOT modify the tree
- hash function
- length of keys in tree
- length of keys in tree
Determines if the leaf r contains the key
Determines if the leaf r contains the key
Figures out whether to go left or right when from node r when searching for the key; records the appropriate bit in the directions bit string to be used in the proof
Figures out whether to go left or right when from node r when searching for the key; records the appropriate bit in the directions bit string to be used in the proof
- true if to go left, false if to go right in the search
If operation.key exists in the tree and the operation succeeds, returns Success(Some(v)), where v is the value associated with operation.key before the operation.
If operation.key exists in the tree and the operation succeeds, returns Success(Some(v)), where v is the value associated with operation.key before the operation. If operation.key does not exists in the tree and the operation succeeds, returns Success(None). Returns Failure if the operation fails. Does not modify the tree or the proof in case return is Failure.
- Success(Some(old value)), Success(None), or Failure
- source of randomness
Random leaf from the tree that is not positive or negative infinity
nodes, that where presented in old tree (starting form oldTopNode, but are not presented in new tree
Deletions go down the tree twice -- once to find the leaf and realize that it needs to be deleted, and the second time to actually perform the deletion.
Deletions go down the tree twice -- once to find the leaf and realize that it needs to be deleted, and the second time to actually perform the deletion. This method will re-create comparison results using directions array and lastRightStep variable. Each time it's called, it will give the next comparison result of key and node.key, where node starts at the root and progresses down the tree according to the comparison results.
- result of previous comparison of key and relevant node's key
Longest path length in a tree
Longest path length in a tree
Walk from tree to a leaf.
Walk from tree to a leaf.
- result of applying internalNodeFn to internal node. E.g. some accumutalor of previous results
- result of applying leafFn to a leaf. Result of all walk application
- function applied to internal nodes. Takes current internal node and current IR, returns new internal nod and new IR
- function applied to leafss. Takes current leaf and current IR, returns result of walk LR
- initial value of IR
A simple non-modifying non-proof-generating lookup.
A simple non-modifying non-proof-generating lookup. Does not mutate the data structure
Some(value) for value associated with the given key if key is in the tree, and None otherwise
- length of values in tree.
- length of values in tree. None if it is not fixed
Implements the batch AVL prover from https://eprint.iacr.org/2016/994 Not thread safe if you use with ThreadUnsafeHash