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 Program
s
that make up a Predicate
’s program graph
during Solution
validation.
§Executing Ops
There are two 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 Future
s 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§
pub use essential_types as types;
Modules§
- asm
- Assembly for the Essential VM.
- bytecode
- Items related to bytecode representation for the VM assembly.
- error
- The types of errors that might occur throughout execution.
- sync
- Items related to stepping forward VM execution by synchronous operations.
Structs§
- Access
- All necessary solution access required to check an individual predicate.
- GasLimit
- Gas limits.
- Lazy
Cache - Lazily cache expensive to compute values.
- Memory
- Memory for temporary storage of words.
- Repeat
- A stack of repeat counters.
- Stack
- The VM’s
Stack
, i.e. aVec
ofWord
s updated during each step of execution. - Vm
- The operation execution state of the VM.
Enums§
- Op
- All operations available to the Essential VM execution.
- Program
Control Flow - Update the program to a new position or halt it.
Traits§
- OpAccess
- Types that provide access to operations.
- OpGas
Cost - A mapping from an operation to its gas cost.
- State
Read - Read-only access to state required by the VM.
- State
Reads - Pre and post sync state reads.
Type Aliases§
- Bytecode
Mapped - Shorthand for the
BytecodeMapped
type representing a mapping to/fromOp
s. - Bytecode
Mapped Slice - Shorthand for the
BytecodeMappedSlice
type for mappingOp
s. - Gas
- Unit used to measure gas.