Object/Class

sigmastate

CalcBlake2b256

Related Docs: class CalcBlake2b256 | package sigmastate

Permalink

object CalcBlake2b256 extends SimpleTransformerCompanion with Serializable

Linear Supertypes
Serializable, Serializable, SimpleTransformerCompanion, ValueCompanion, SigmaNodeCompanion, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CalcBlake2b256
  2. Serializable
  3. Serializable
  4. SimpleTransformerCompanion
  5. ValueCompanion
  6. SigmaNodeCompanion
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def argInfos: Seq[ArgInfo]

    Permalink
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. val costKind: PerItemCost

    Permalink

    Cost of: of hashing 1 block of data.

    Cost of: of hashing 1 block of data.

    This cost is used as a baseline to connect cost units with absolute time. The block validation have 1000000 of cost units budget, and we want this to correspond to 1 second. Thus we can assume 1 cost unit == 1 micro-second.

    It takes approximately 1 micro-seconds on average to compute hash of 128 bytes block on MacBook Pro (16-inch, 2019) 2.3 GHz 8-Core Intel Core i9.

    Thus per block cost of Blake2b256 hashing can be limited by 1 cost units. However, on a less powerful processor it may take much more time, so we add a factor of 3 for that. Additionally, the interpreter has overhead so that performing 1000 of hashes in a tight loop is 3-4 times faster than doing the same via ErgoTreeEvaluator. Thus we should add another factor of 2 and this takes place for all operations. So we will use a total factor of 10 to convert actual operation micro-seconds time (obtained via benchmarking) to cost unit estimation (used for cost prediction).

    Cost_in_units = time_in_micro-seconds * 7 = 7

    NOTE, 128 is the size of message chunk processed by Blake2b256 algorithm.

    Definition Classes
    CalcBlake2b256ValueCompanion
    See also

    sigmastate.interpreter.ErgoTreeEvaluator.DataBlockSize

  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  13. def init(): Unit

    Permalink
    Definition Classes
    ValueCompanion
  14. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  15. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  16. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. def opCode: OpCode

    Permalink

    Unique id of the node class used in serialization of ErgoTree.

    Unique id of the node class used in serialization of ErgoTree.

    Definition Classes
    CalcBlake2b256ValueCompanion
  19. val opDesc: CompanionDesc

    Permalink
    Definition Classes
    ValueCompanion
  20. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  21. def toString(): String

    Permalink
    Definition Classes
    ValueCompanion → AnyRef → Any
  22. def typeName: String

    Permalink
    Definition Classes
    ValueCompanion
  23. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from ValueCompanion

Inherited from SigmaNodeCompanion

Inherited from AnyRef

Inherited from Any

Ungrouped