Crate essential_vm

Source
Expand description

The essential VM implementation.

§Reading State

The primary entrypoint for this crate is the Vm type.

The Vm allows for executing arbitrary essential ASM ops. The primary use-case is executing Programs that make up a Predicate’s program graph during Solution validation.

§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.

Re-exports§

Modules§

  • Assembly for the Essential VM.
  • Items related to bytecode representation for the VM assembly.
  • The types of errors that might occur throughout execution.
  • Items related to stepping forward VM execution by synchronous operations.

Structs§

  • All necessary solution access required to check an individual predicate.
  • A future that when polled attempts to make progress on VM execution.
  • Gas limits.
  • Lazily cache expensive to compute values.
  • Memory for temporary storage of words.
  • The set of operations that are performed asynchronously.
  • A stack of repeat counters.
  • The VM’s Stack, i.e. a Vec of Words updated during each step of execution.
  • The operation execution state of the VM.

Enums§

  • All operations available to the Essential VM execution.
  • The set of operations that are performed synchronously.
  • Update the program to a new position or halt it.

Traits§

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

Functions§

  • A helper for collecting all mutable keys that are proposed for mutation for the predicate at the given index.
  • Get the contract of mutable keys for this predicate.
  • Get the mutable keys as slices

Type Aliases§