Packages

  • package root
    Definition Classes
    root
  • package sigma

    The following implicit values are used as type descriptors of all the predefined Sigma types.

    The following implicit values are used as type descriptors of all the predefined Sigma types.

    Definition Classes
    root
    See also

    RType class

  • package data

    Contains cores definitions which serves as a basis for sigma package implementations.

    Contains cores definitions which serves as a basis for sigma package implementations.

    Definition Classes
    sigma
  • package impl
    Definition Classes
    sigma
  • package kiama

    Kiama is a Scala library for language processing.

    Kiama is a Scala library for language processing. It is a project of the Programming Languages Research Group at Macquarie University. For full project details see the web site http://github.com/inkytonik/kiama.

    Kiama's main components address tree decoration via attribute grammars (package attribution), tree transformation via strategic term rewriting (package rewriting), dynamic semantics (package machine) and pretty-printing (package output).

    The util package contains support modules for parsing, input/output, read-eval-print loops (REPLs) and pattern matching.

    The examples package (available as part of the Kiama tests) contains many examples of using Kiama to solve small to medium language processing problems.

    Definition Classes
    sigma
  • package reflection

    Contains the Sigma Reflection API.

    Contains the Sigma Reflection API. Sigma reflection is a mechanism for obtaining metadata about classes, methods, fields, etc. at runtime. It is used by kiama to rewrite ErgoTree expressions. It is also used by the ErgoTree interpreter to implement MethodCall nodes.

    The Sigma Reflection API has two implementations: 1) based on the Java Reflection API 2) based on Sigma Reflection metadata declared in the StaticImpl.scala file

    Definition Classes
    sigma
  • package util
    Definition Classes
    sigma
  • package wrappers
    Definition Classes
    sigma
  • AnyValue
  • AvlTree
  • BigInt
  • Box
  • Coll
  • CollBuilder
  • Colls
  • CollsModule
  • Context
  • Environment
  • Extensions
  • GroupElement
  • Header
  • PairColl
  • PreHeader
  • RuntimePlatform
  • SigmaContract
  • SigmaDsl
  • SigmaDslBuilder
  • SigmaDslModule
  • SigmaProp
  • VersionContext
t

sigma

AvlTree

trait AvlTree extends AnyRef

Type of data which efficiently authenticates potentially huge dataset having key-value dictionary interface. Only root hash of dynamic AVL+ tree, tree height, key length, optional value length, and access flags are stored in an instance of the datatype.

Please note that standard hash function from scorex.crypto.hash is used, and height is stored along with root hash of the tree, thus digest size is always CryptoConstants.hashLength + 1 bytes.

This interface is used as runtime representation of the AvlTree type of ErgoTree.

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AvlTree
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def contains(key: Coll[Byte], proof: Coll[Byte]): Boolean

    Checks if an entry with key key exists in this tree using proof proof.

    Checks if an entry with key key exists in this tree using proof proof. Throws exception if proof is incorrect

    key

    a key of an element of this authenticated dictionary.

    proof

    data to reconstruct part of the tree enough to perform the check

    Note

    CAUTION! Does not support multiple keys check, use getMany instead. Return true if a leaf with the key key exists Return false if leaf with provided key does not exist.

  2. abstract def digest: Coll[Byte]

    Returns digest of the state represented by this tree.

    Returns digest of the state represented by this tree. Authenticated tree digest = root hash bytes ++ tree height

  3. abstract def enabledOperations: Byte

    Flags of enabled operations packed in single byte.

    Flags of enabled operations packed in single byte. isInsertAllowed == (enabledOperations & 0x01) != 0 isUpdateAllowed == (enabledOperations & 0x02) != 0 isRemoveAllowed == (enabledOperations & 0x04) != 0

  4. abstract def get(key: Coll[Byte], proof: Coll[Byte]): Option[Coll[Byte]]

    Perform a lookup of key key in this tree using proof proof.

    Perform a lookup of key key in this tree using proof proof. Throws exception if proof is incorrect

    key

    a key of an element of this authenticated dictionary.

    proof

    data to reconstruct part of the tree enough to get the value by the key

    Note

    CAUTION! Does not support multiple keys check, use getMany instead. Return Some(bytes) of leaf with key key if it exists Return None if leaf with provided key does not exist.

  5. abstract def getMany(keys: Coll[Coll[Byte]], proof: Coll[Byte]): Coll[Option[Coll[Byte]]]

    Perform a lookup of many keys keys in this tree using proof proof.

    Perform a lookup of many keys keys in this tree using proof proof.

    keys

    keys of elements of this authenticated dictionary.

    Note

    CAUTION! Keys must be ordered the same way they were in lookup before proof was generated. For each key return Some(bytes) of leaf if it exists and None if is doesn't.

  6. abstract def insert(operations: Coll[(Coll[Byte], Coll[Byte])], proof: Coll[Byte]): Option[AvlTree]

    Perform insertions of key-value entries into this tree using proof proof.

    Perform insertions of key-value entries into this tree using proof proof. Throws exception if proof is incorrect

    operations

    collection of key-value pairs to insert in this authenticated dictionary.

    proof

    data to reconstruct part of the tree

    Note

    CAUTION! Pairs must be ordered the same way they were in insert ops before proof was generated. Return Some(newTree) if successful Return None if operations were not performed.

  7. abstract def isInsertAllowed: Boolean

    Checks if Insert operation is allowed for this tree instance.

  8. abstract def isRemoveAllowed: Boolean

    Checks if Remove operation is allowed for this tree instance.

  9. abstract def isUpdateAllowed: Boolean

    Checks if Update operation is allowed for this tree instance.

  10. abstract def keyLength: Int

    All the elements under the tree have the same length of the keys

  11. abstract def remove(operations: Coll[Coll[Byte]], proof: Coll[Byte]): Option[AvlTree]

    Perform removal of entries into this tree using proof proof.

    Perform removal of entries into this tree using proof proof. Throws exception if proof is incorrect Return Some(newTree) if successful Return None if operations were not performed.

    operations

    collection of keys to remove from this authenticated dictionary.

    proof

    data to reconstruct part of the tree

    Note

    CAUTION! Keys must be ordered the same way they were in remove ops before proof was generated.

  12. abstract def update(operations: Coll[(Coll[Byte], Coll[Byte])], proof: Coll[Byte]): Option[AvlTree]

    Perform updates of key-value entries into this tree using proof proof.

    Perform updates of key-value entries into this tree using proof proof. Throws exception if proof is incorrect

    operations

    collection of key-value pairs to update in this authenticated dictionary.

    proof

    data to reconstruct part of the tree

    Note

    CAUTION! Pairs must be ordered the same way they were in update ops before proof was generated. Return Some(newTree) if successful Return None if operations were not performed.

  13. abstract def updateDigest(newDigest: Coll[Byte]): AvlTree

    Replace digest of this tree producing a new tree.

    Replace digest of this tree producing a new tree. Since AvlTree is immutable, this tree instance remains unchanged.

    newDigest

    a new digest

    returns

    a copy of this AvlTree instance where this.digest replaced by newDigest

  14. abstract def updateOperations(newOperations: Byte): AvlTree

    Enable/disable operations of this tree producing a new tree.

    Enable/disable operations of this tree producing a new tree. Since AvlTree is immutable, this tree instance remains unchanged.

    newOperations

    a new flags which specify available operations on a new tree.

    returns

    a copy of this AvlTree instance where this.enabledOperations replaced by newOperations

  15. abstract def valueLengthOpt: Option[Int]

    If non-empty, all the values under the tree are of the same length.

Concrete 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. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  14. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  16. def toString(): String
    Definition Classes
    AnyRef → Any
  17. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  18. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped