object CalcBlake2b256 extends SimpleTransformerCompanion with Serializable
- Alphabetic
- By Inheritance
- CalcBlake2b256
- Serializable
- Serializable
- SimpleTransformerCompanion
- ValueCompanion
- SigmaNodeCompanion
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
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
-
def
argInfos: Seq[ArgInfo]
- Definition Classes
- CalcBlake2b256 → SimpleTransformerCompanion
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
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
- CalcBlake2b256 → ValueCompanion
- See also
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
init(): Unit
- Definition Classes
- ValueCompanion
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
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
- CalcBlake2b256 → ValueCompanion
-
val
opDesc: CompanionDesc
- Definition Classes
- ValueCompanion
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- ValueCompanion → AnyRef → Any
-
def
typeName: String
- Definition Classes
- ValueCompanion
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()