Crate essential_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.

Re-exports§

pub use essential_types as types;

Modules§

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

Structs§

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

Traits§

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

Type Aliases§

BytecodeMapped
Shorthand for the BytecodeMapped type representing a mapping to/from state read Ops.
BytecodeMappedLazy
Shorthand for the BytecodeMappedLazy type for mapping Ops.
BytecodeMappedSlice
Shorthand for the BytecodeMappedSlice type for mapping Ops.
Gas
Unit used to measure gas.
OpAsyncResult
Shorthand for a Result where the error type is an OpAsyncError.
OpResult
Shorthand for a Result where the error type is an OpError.
OpSyncResult
Shorthand for a Result where the error type is an OpSyncError.
StateMemoryResult
Shorthand for a Result where the error type is a StateMemoryError.
StateReadResult
Shorthand for a Result where the error type is a StateReadError.
StateSlotSlice
The state slots declared within the predicate.