Crate essential_check::state_read_vm

source ·
Expand description

The essential state read VM implementation.

§Reading State

The primary entrypoint for this crate is the Vm type.

The Vm allows for executing operations that read state and apply any necessary operations in order to form the final, expected state slot layout within the VM’s [Memory]. The Vm’s memory can be accessed directly from the Vm, or the Vm can be consumed and state slots returned with Vm::into_state_slots.

§Executing Ops

There are three primary methods available for executing operations:

Each have slightly different performance implications, so be sure to read the docs before selecting a method.

§Execution Future

The Vm::exec_* functions all return Futures that not only yield on async operations, but yield based on a user-specified gas limit too. See the ExecFuture docs for further details on the implementation.

Modules§

  • Assembly for state read operations.
  • The essential constraint checking implementation.
  • The types of errors that might occur throughout state read execution.

Structs§

  • All necessary solution data and state access required to check an individual predicate.
  • A future that when polled attempts to make progress on VM execution.
  • Gas limits.
  • All necessary solution data access required to check an individual predicate.
  • The VM’s Stack, i.e. a Vec of Words updated during each step of execution.
  • The pre and post mutation state slot values for the predicate being solved.
  • A type representing the VM’s mutable state slots.
  • The operation execution state of the State Read VM.

Traits§

  • Types that provide access to operations.
  • A mapping from an operation to its gas cost.
  • Access to state required by the state read VM.

Type Aliases§

  • Shorthand for the BytecodeMapped type representing a mapping to/from state read Ops.
  • Shorthand for the BytecodeMappedLazy type for mapping Ops.
  • Shorthand for the BytecodeMappedSlice type for mapping Ops.
  • Unit used to measure gas.
  • Shorthand for a Result where the error type is an OpAsyncError.
  • Shorthand for a Result where the error type is an OpError.
  • Shorthand for a Result where the error type is an OpSyncError.
  • Shorthand for a Result where the error type is a StateReadError.
  • The state slots declared within the predicate.
  • Shorthand for a Result where the error type is a StateSlotsError.