Class/Object

org.ergoplatform

ErgoLikeContext

Related Docs: object ErgoLikeContext | package ergoplatform

Permalink

class ErgoLikeContext extends InterpreterContext

Represents a script evaluation context to be passed to a prover and a verifier to execute and validate guarding proposition of input boxes of a transaction.

Linear Supertypes
InterpreterContext, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ErgoLikeContext
  2. InterpreterContext
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ErgoLikeContext(lastBlockUtxoRoot: AvlTreeData, headers: Coll[Header], preHeader: PreHeader, dataBoxes: IndexedSeq[ErgoBox], boxesToSpend: IndexedSeq[ErgoBox], spendingTransaction: ErgoLikeTransactionTemplate[_ <: UnsignedInput], selfIndex: Int, extension: ContextExtension, validationSettings: SigmaValidationSettings, costLimit: Long, initCost: Long, activatedScriptVersion: Byte)

    Permalink

    lastBlockUtxoRoot

    - state root before current block application

    headers

    - fixed number of last block headers in descending order (first header is the newest one)

    preHeader

    - fields of block header with the current spendingTransaction, that can be predicted by a miner before it's formation

    dataBoxes

    - boxes, that corresponds to id's of spendingTransaction.dataInputs

    boxesToSpend

    - boxes, that corresponds to id's of spendingTransaction.inputs

    spendingTransaction

    - transaction that contains self box

    selfIndex

    - index of the box in boxesToSpend that contains the script we're evaluating

    extension

    - prover-defined key-value pairs, that may be used inside a script

    validationSettings

    validation parameters passed to Interpreter.verify to detect soft-fork conditions

    costLimit

    hard limit on accumulated execution cost, if exceeded lead to CostLimitException to be thrown

    initCost

    initial value of execution cost already accumulated before Interpreter.verify is called

    activatedScriptVersion

    Maximum version of ErgoTree currently activated on the network. The activation is performed via miners voting. For verification of *mined* blocks this parameter should be passed according to the latest voted (activated) script version on the network. However this is not the case for *candidate* blocks. When activatedScriptVersion > Interpreter.MaxSupportedScriptVersion then the interpreter accept script without verification which is not what should happen for *candidate* blocks. This means Ergo node should always pass Interpreter.MaxSupportedScriptVersion as a value of ErgoLikeContext.activatedScriptVersion during verification of candidate blocks (which is a default). The following values are used for current and upcoming forks:

    • version 3.x this value must be 0
    • in v4.0 must be 1
    • in v5.x must be 2 etc.

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. val activatedScriptVersion: Byte

    Permalink

    Maximum version of ErgoTree currently activated on the network.

    Maximum version of ErgoTree currently activated on the network. The activation is performed via miners voting. For verification of *mined* blocks this parameter should be passed according to the latest voted (activated) script version on the network. However this is not the case for *candidate* blocks. When activatedScriptVersion > Interpreter.MaxSupportedScriptVersion then the interpreter accept script without verification which is not what should happen for *candidate* blocks. This means Ergo node should always pass Interpreter.MaxSupportedScriptVersion as a value of ErgoLikeContext.activatedScriptVersion during verification of candidate blocks (which is a default). The following values are used for current and upcoming forks:

    • version 3.x this value must be 0
    • in v4.0 must be 1
    • in v5.x must be 2 etc.
    Definition Classes
    ErgoLikeContextInterpreterContext
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. val boxesToSpend: IndexedSeq[ErgoBox]

    Permalink

    - boxes, that corresponds to id's of spendingTransaction.inputs

  7. def canEqual(other: Any): Boolean

    Permalink
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. val costLimit: Long

    Permalink

    hard limit on accumulated execution cost, if exceeded lead to CostLimitException to be thrown

    hard limit on accumulated execution cost, if exceeded lead to CostLimitException to be thrown

    Definition Classes
    ErgoLikeContextInterpreterContext
  10. val dataBoxes: IndexedSeq[ErgoBox]

    Permalink

    - boxes, that corresponds to id's of spendingTransaction.dataInputs

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

    Permalink
    Definition Classes
    AnyRef
  12. def equals(other: Any): Boolean

    Permalink
    Definition Classes
    ErgoLikeContext → AnyRef → Any
  13. val extension: ContextExtension

    Permalink

    - prover-defined key-value pairs, that may be used inside a script

    - prover-defined key-value pairs, that may be used inside a script

    Definition Classes
    ErgoLikeContextInterpreterContext
  14. def finalize(): Unit

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

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

    Permalink
    Definition Classes
    ErgoLikeContext → AnyRef → Any
  17. val headers: Coll[Header]

    Permalink

    - fixed number of last block headers in descending order (first header is the newest one)

  18. val initCost: Long

    Permalink

    initial value of execution cost already accumulated before Interpreter.verify is called

    initial value of execution cost already accumulated before Interpreter.verify is called

    Definition Classes
    ErgoLikeContextInterpreterContext
  19. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  20. val lastBlockUtxoRoot: AvlTreeData

    Permalink

    - state root before current block application

  21. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  24. val preHeader: PreHeader

    Permalink

    - fields of block header with the current spendingTransaction, that can be predicted by a miner before it's formation

  25. val self: ErgoBox

    Permalink
  26. val selfIndex: Int

    Permalink

    - index of the box in boxesToSpend that contains the script we're evaluating

  27. val spendingTransaction: ErgoLikeTransactionTemplate[_ <: UnsignedInput]

    Permalink

    - transaction that contains self box

  28. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  29. def toSigmaContext(isCost: Boolean, extensions: Map[Byte, AnyValue] = Map()): Context

    Permalink

    Creates special.sigma.Context instance based on this context.

    Creates special.sigma.Context instance based on this context. The created instance contains all data represented using types form special.sigma package. These types are used internally by ErgoTree interpreter. Thus, this method performs transformation from Ergo to internal Sigma representation of all context data.

    Definition Classes
    ErgoLikeContextInterpreterContext
    See also

    sigmastate.eval.Evaluation

  30. def toString(): String

    Permalink
    Definition Classes
    ErgoLikeContext → AnyRef → Any
  31. val validationSettings: SigmaValidationSettings

    Permalink

    validation parameters passed to Interpreter.verify to detect soft-fork conditions

    validation parameters passed to Interpreter.verify to detect soft-fork conditions

    Definition Classes
    ErgoLikeContextInterpreterContext
  32. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. def withBindings(bindings: (Byte, EvaluatedValue[_ <: SType])*): InterpreterContext

    Permalink

    Creates a new instance with given bindings added to extension.

    Creates a new instance with given bindings added to extension.

    Definition Classes
    InterpreterContext
  36. def withCostLimit(newCostLimit: Long): ErgoLikeContext

    Permalink

    Creates a new instance with costLimit updated with given value.

    Creates a new instance with costLimit updated with given value.

    Definition Classes
    ErgoLikeContextInterpreterContext
  37. def withExtension(newExtension: ContextExtension): ErgoLikeContext

    Permalink

    Creates a new instance with extension updated with given value.

    Creates a new instance with extension updated with given value.

    Definition Classes
    ErgoLikeContextInterpreterContext
  38. def withInitCost(newInitCost: Long): ErgoLikeContext

    Permalink

    Creates a new instance with initCost updated with given value.

    Creates a new instance with initCost updated with given value.

    Definition Classes
    ErgoLikeContextInterpreterContext
  39. def withTransaction(newSpendingTransaction: ErgoLikeTransactionTemplate[_ <: UnsignedInput]): ErgoLikeContext

    Permalink
  40. def withValidationSettings(newVs: SigmaValidationSettings): ErgoLikeContext

    Permalink

    Creates a new instance with given validation settings.

    Creates a new instance with given validation settings.

    Definition Classes
    ErgoLikeContextInterpreterContext

Inherited from InterpreterContext

Inherited from AnyRef

Inherited from Any

Ungrouped