class BatchAVLProver[D <: Digest, HF <: ThreadUnsafeHash[D]] extends AuthenticatedTreeOps[D] with ToStringHelper

Implements the batch AVL prover from https://eprint.iacr.org/2016/994

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BatchAVLProver
  2. ToStringHelper
  3. AuthenticatedTreeOps
  4. ScryptoLogging
  5. BatchProofConstants
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new BatchAVLProver(keyLength: Int, valueLengthOpt: Option[Int], oldRootAndHeight: Option[(ProverNodes[D], Int)] = None)(implicit hf: HF = new Blake2b256Unsafe)

    keyLength

    - length of keys in tree

    valueLengthOpt

    - length of values in tree. None if it is not fixed

    oldRootAndHeight

    - 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

    hf

    - hash function

Type Members

  1. type ChangeHappened = Boolean
    Definition Classes
    AuthenticatedTreeOps
  2. type HeightIncreased = Boolean
    Definition Classes
    AuthenticatedTreeOps
  3. type ToDelete = Boolean
    Definition Classes
    AuthenticatedTreeOps

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val EndOfTreeInPackagedProof: Byte
    Definition Classes
    BatchProofConstants
  5. val LabelInPackagedProof: Byte
    Definition Classes
    BatchProofConstants
  6. val LeafInPackagedProof: Byte
    Definition Classes
    BatchProofConstants
  7. val NegativeInfinityKey: ADKey
    Attributes
    protected
    Definition Classes
    AuthenticatedTreeOps
  8. val PositiveInfinityKey: ADKey
    Attributes
    protected
    Definition Classes
    AuthenticatedTreeOps
  9. def addNode(r: Leaf[D], key: ADKey, v: ADValue): InternalProverNode[D]

    returns

    - A new prover node with two leaves: r on the left and a new leaf containing key and value on the right

    Attributes
    protected
    Definition Classes
    BatchAVLProverAuthenticatedTreeOps
  10. def arrayToString(a: Array[Byte]): String
    Attributes
    protected
    Definition Classes
    ToStringHelper
  11. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  12. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  13. def digest: ADDigest

    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

    returns

    - the digest

  14. def digest(rootNode: Node[D]): ADDigest

    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

    Attributes
    protected
    Definition Classes
    AuthenticatedTreeOps
  15. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  17. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  18. def generateProof(): ADProof

    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

    returns

    - the proof

  19. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  20. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  21. implicit val hf: HF
  22. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  23. val keyLength: Int
    Definition Classes
    BatchAVLProverAuthenticatedTreeOps
  24. def keyMatchesLeaf(key: ADKey, r: Leaf[D]): Boolean

    Determines if the leaf r contains the key

    Determines if the leaf r contains the key

    Attributes
    protected
    Definition Classes
    BatchAVLProverAuthenticatedTreeOps
  25. val labelLength: Int
    Attributes
    protected
  26. def log: Logger
    Attributes
    protected
    Definition Classes
    ScryptoLogging
  27. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  28. def nextDirectionIsLeft(key: ADKey, r: InternalNode[D]): Boolean

    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

    returns

    - true if to go left, false if to go right in the search

    Attributes
    protected
    Definition Classes
    BatchAVLProverAuthenticatedTreeOps
  29. final def notify(): Unit
    Definition Classes
    AnyRef
  30. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  31. def performOneOperation(operation: Operation): Try[Option[ADValue]]

    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.

    returns

    - Success(Some(old value)), Success(None), or Failure

  32. def replayComparison: Int

    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.

    returns

    - result of previous comparison of key and relevant node's key

    Attributes
    protected
    Definition Classes
    BatchAVLProverAuthenticatedTreeOps
  33. def returnResultOfOneOperation(operation: Operation, rootNode: Node[D]): Try[(Node[D], Option[ADValue])]
    Attributes
    protected
    Definition Classes
    AuthenticatedTreeOps
  34. var rootNodeHeight: Int
    Definition Classes
    BatchAVLProverAuthenticatedTreeOps
  35. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  36. def toString(): String
    Definition Classes
    BatchAVLProver → AnyRef → Any
  37. def unauthenticatedLookup(key: ADKey): Option[ADValue]

    A simple non-modifying non-proof-generating lookup.

    A simple non-modifying non-proof-generating lookup. Does not mutate the data structure

    returns

    Some(value) for value associated with the given key if key is in the tree, and None otherwise

  38. val valueLengthOpt: Option[Int]
    Definition Classes
    BatchAVLProverAuthenticatedTreeOps
  39. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  40. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  41. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from ToStringHelper

Inherited from AuthenticatedTreeOps[D]

Inherited from ScryptoLogging

Inherited from BatchProofConstants

Inherited from AnyRef

Inherited from Any

Ungrouped