Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface EvaluationSample<ProgramState, Opcodes>

An evaluation sample extracted from a script reduction trace – includes the range of the evaluation from which the sample was extracted, the instruction which was evaluated, the range in the source script over which the instruction was defined, and the resulting program state.

Type parameters

  • ProgramState

  • Opcodes

Hierarchy

  • EvaluationSample

Index

Properties

evaluationRange

evaluationRange: Range

The range of the evaluation node in which this sample was generated.

This can be used to identify which other samples were part of the same evaluation that produced this sample.

Optional instruction

instruction: AuthenticationInstruction<Opcodes>

The final instruction which was evaluated during this sample.

Note, the first sample from any evaluation is the initial state before any instructions are executed, so its instruction is undefined. For all other samples, instruction must be defined.

internalStates

internalStates: { instruction: AuthenticationInstruction<Opcodes>; state: ProgramState }[]

An ordered array of instructions and program states which occurred within the range of a single reduction trace node before the final instruction and state (assigned to instruction and state, respectively).

This occurs in unusual cases where multiple opcodes are defined in the same reduced node, e.g. a long hex literal of operations as bytecode or an evaluation which is not wrapped in a push.

Usually, this will be an empty array.

range

range: Range

The range over which this sample was defined in the source script.

state

state: ProgramState

The program state after the evaluation of this sample's instruction.

Generated using TypeDoc