Packages

object CalcBlake2b256 extends SimpleTransformerCompanion with Serializable

Linear Supertypes
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
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def argInfos: Seq[ArgInfo]
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  7. val costKind: PerItemCost

    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
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. def init(): Unit
    Definition Classes
    ValueCompanion
  14. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  15. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  17. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  18. def opCode: OpCode

    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
    Definition Classes
    ValueCompanion
  20. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  21. def toString(): String
    Definition Classes
    ValueCompanion → AnyRef → Any
  22. def typeName: String
    Definition Classes
    ValueCompanion
  23. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from Serializable

Inherited from Serializable

Inherited from ValueCompanion

Inherited from SigmaNodeCompanion

Inherited from AnyRef

Inherited from Any

Ungrouped