- length of keys in tree
- length of values in tree. None if it is not fixed
- option the maximum number of operations that this proof can be for, to limit running time in case of malicious proofs. If None, running time limits will not be enforced.
- at most, how many of maxNumOperations can be deletions; for a tighter running time bound and better attack protection. If None, defaults to maxNumOperations.
- hash function
- A new verifier 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
Returns Some[the current digest of the authenticated data structure], where the digest contains the root hash and the root height Returns None if the proof verification failed at construction or during any of the operations.
Returns Some[the current digest of the authenticated data structure], where the digest contains the root hash and the root height Returns None if the proof verification failed at construction or during any of the operations.
- Some[digest] or None
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
- length of keys in tree
- length of keys in tree
Determines if the leaf r contains the key or if r.key < r < r.nextLeafKey If neither of those holds, causes an exception.
Determines if the leaf r contains the key or if r.key < r < r.nextLeafKey If neither of those holds, causes an exception.
Default implementation of error logging.
Default implementation of error logging.
Figures out whether to go left or right when from node r when searching for the key, using the appropriate bit in the directions bit string from the proof
Figures out whether to go left or right when from node r when searching for the key, using the appropriate bit in the directions bit string from 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 or the proof does not verify. After one failure, all subsequent operations will fail and digest is None.
- Success(Some(old value)), Success(None), or Failure
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 in the proof 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
- length of values in tree.
- length of values in tree. None if it is not fixed
Implements the batch AVL verifier from https://eprint.iacr.org/2016/994