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§
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.
- Exec
Future - A future that when polled attempts to make progress on VM execution.
- GasLimit
- Gas limits.
- Lazy
Cache - Lazily cache expensive to compute values.
- Memory
- Memory for temporary storage of words.
- OpAsync
- The set of operations that are performed asynchronously.
- Repeat
- A stack of repeat counters.
- Stack
- The VM’s
Stack, i.e. aVecofWords updated during each step of execution. - Vm
- The operation execution state of the VM.
Enums§
- Op
- All operations available to the Essential VM execution.
- OpSync
- The set of operations that are performed synchronously.
- 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.
Functions§
- mut_
keys - A helper for collecting all mutable keys that are proposed for mutation for the predicate at the given index.
- mut_
keys_ set - Get the contract of mutable keys for this predicate.
- mut_
keys_ slices - Get the mutable keys as slices
Type Aliases§
- Bytecode
Mapped - Shorthand for the
BytecodeMappedtype representing a mapping to/fromOps. - Bytecode
Mapped Lazy - Shorthand for the
BytecodeMappedLazytype for mappingOps. - Bytecode
Mapped Slice - Shorthand for the
BytecodeMappedSlicetype for mappingOps. - Gas
- Unit used to measure gas.