class CAvlTreeVerifier extends BatchAVLVerifier[Digest32, Blake2b256.type] with AvlTreeVerifier
Implements operations of AVL tree verifier based on scorex.crypto.authds.avltree.batch.BatchAVLVerifier.
- See also
BatchAVLVerifier, CAvlTreeVerifier
- Alphabetic
- By Inheritance
- CAvlTreeVerifier
- AvlTreeVerifier
- BatchAVLVerifier
- AuthenticatedTreeOps
- ToStringHelper
- ScorexEncoding
- BatchProofConstants
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val EndOfTreeInPackagedProof: Byte
- Definition Classes
- BatchProofConstants
- val LabelInPackagedProof: Byte
- Definition Classes
- BatchProofConstants
- val LeafInPackagedProof: Byte
- Definition Classes
- BatchProofConstants
- val NegativeInfinityKey: ADKey
- Attributes
- protected
- Definition Classes
- AuthenticatedTreeOps
- val PositiveInfinityKey: ADKey
- Attributes
- protected
- Definition Classes
- AuthenticatedTreeOps
- def addNode(r: Leaf[Digest32], key: ADKey, v: ADValue): InternalVerifierNode[Digest32]
- Attributes
- protected
- Definition Classes
- BatchAVLVerifier → AuthenticatedTreeOps
- def arrayToString(a: Array[Byte]): String
- Attributes
- protected
- Definition Classes
- ToStringHelper
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- val changedNodesBuffer: ArrayBuffer[ProverNodes[Digest32]]
- Attributes
- protected
- Definition Classes
- AuthenticatedTreeOps
- val changedNodesBufferToCheck: ArrayBuffer[ProverNodes[Digest32]]
- Attributes
- protected
- Definition Classes
- AuthenticatedTreeOps
- def clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- val collectChangedNodes: Boolean
- Definition Classes
- BatchAVLVerifier → AuthenticatedTreeOps
- def digest: Option[ADDigest]
Returns Some(d), where d - the current digest of the authenticated data structure.
Returns Some(d), where d - the current digest of the authenticated data structure. 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 with this verifier.
- returns
- Some[digest] or None
- Definition Classes
- CAvlTreeVerifier → AvlTreeVerifier → BatchAVLVerifier
- def digest(rootNode: Node[Digest32]): ADDigest
- Attributes
- protected
- Definition Classes
- AuthenticatedTreeOps
- implicit val encoder: BytesEncoder
- Definition Classes
- ScorexEncoding
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def extractFirstNode(extractor: (VerifierNodes[Digest32]) => Boolean): Option[VerifierNodes[Digest32]]
- Definition Classes
- BatchAVLVerifier
- def extractNodes(extractor: (VerifierNodes[Digest32]) => Boolean): Option[Seq[VerifierNodes[Digest32]]]
- Definition Classes
- BatchAVLVerifier
- def finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val keyLength: Int
- Definition Classes
- CAvlTreeVerifier → BatchAVLVerifier → AuthenticatedTreeOps
- def keyMatchesLeaf(key: ADKey, r: Leaf[Digest32]): Boolean
- Attributes
- protected
- Definition Classes
- BatchAVLVerifier → AuthenticatedTreeOps
- val labelLength: Int
- Attributes
- protected
- Definition Classes
- BatchAVLVerifier
- def logError(t: Throwable): Unit
Override default logging which outputs stack trace to the console.
Override default logging which outputs stack trace to the console.
- Attributes
- protected
- Definition Classes
- CAvlTreeVerifier → BatchAVLVerifier
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def nextDirectionIsLeft(key: ADKey, r: InternalNode[Digest32]): Boolean
- Attributes
- protected
- Definition Classes
- BatchAVLVerifier → AuthenticatedTreeOps
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def onNodeVisit(n: Node[Digest32], operation: Operation, isRotate: Boolean): Unit
- Attributes
- protected
- Definition Classes
- AuthenticatedTreeOps
- def performInsert(key: Array[Byte], value: Array[Byte]): Try[Option[Array[Byte]]]
Check the key-value pair has been inserted in the tree.
Check the key-value pair has been inserted in the tree. If
key
exists in the tree and the operation succeeds, returnsSuccess(Some(value))
, where value is associated withkey
. Ifkey
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 with this verifier will fail and digest is None.- key
key to look up
- value
value to check it was inserted
- returns
Success(Some(inserted value)), Success(None), or Failure
- Definition Classes
- CAvlTreeVerifier → AvlTreeVerifier
- def performLookup(key: Array[Byte]): Try[Option[Array[Byte]]]
Looks up a key in the tree.
Looks up a key in the tree. If
key
exists in the tree and the operation succeeds, returnsSuccess(Some(v))
, where v is the value associated withkey
. Ifkey
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 with this verifier will fail and digest is None.- key
key to look up
- returns
Success(Some(value)), Success(None), or Failure
- Definition Classes
- CAvlTreeVerifier → AvlTreeVerifier
- def performOneOperation(operation: Operation): Try[Option[ADValue]]
- Definition Classes
- BatchAVLVerifier
- def performRemove(key: Array[Byte]): Try[Option[Array[Byte]]]
Check the key has been removed in the tree.
Check the key has been removed in the tree. If
key
exists in the tree and the operation succeeds, returnsSuccess(Some(v))
, where v is old value associated withkey
. Ifkey
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 with this verifier will fail and digest is None.- key
key to look up
- returns
Success(Some(old value)), Success(None), or Failure
- Definition Classes
- CAvlTreeVerifier → AvlTreeVerifier
- def performUpdate(key: Array[Byte], value: Array[Byte]): Try[Option[Array[Byte]]]
Check the key-value pair has been updated in the tree.
Check the key-value pair has been updated in the tree. If
key
exists in the tree and the operation succeeds, returnsSuccess(Some(value))
, where value is associated withkey
. Ifkey
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 with this verifier will fail and digest is None.- key
key to look up
- value
value to check it was updated
- returns
Success(Some(value)), Success(None), or Failure
- Definition Classes
- CAvlTreeVerifier → AvlTreeVerifier
- def replayComparison: Int
- Attributes
- protected
- Definition Classes
- BatchAVLVerifier → AuthenticatedTreeOps
- def returnResultOfOneOperation(operation: Operation, rootNode: Node[Digest32]): Try[(Node[Digest32], Option[ADValue])]
- Attributes
- protected
- Definition Classes
- AuthenticatedTreeOps
- var rootNodeHeight: Int
- Attributes
- protected
- Definition Classes
- BatchAVLVerifier → AuthenticatedTreeOps
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- BatchAVLVerifier → AnyRef → Any
- def treeHeight: Int
Height of the tree.
Height of the tree.
- Definition Classes
- CAvlTreeVerifier → AvlTreeVerifier
- val valueLengthOpt: Option[Int]
- Definition Classes
- CAvlTreeVerifier → BatchAVLVerifier → AuthenticatedTreeOps
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()