Module vm

Module vm 

Source
Expand description

Top level VmExecutor and VirtualMachine constructor and API. VmExecutor is the struct that can execute an arbitrary program, provided in the form of a [VmExe], for a fixed set of OpenVM instructions corresponding to a VmExecutionConfig. Internally once it is given a program, it will preprocess the program to rewrite it into a more optimized format for runtime execution. This instance of the executor will be a separate struct specialized to running a fixed program on different program inputs.

VirtualMachine will similarly be the struct that has done all the setup so it can execute+prove an arbitrary program for a fixed config - it will internally still hold VmExecutor

Structs§

ContinuationVmProof
PreflightExecutionOutput
Streams
VerifiedExecutionPayload
The payload of a verified guest VM execution.
VirtualMachine
The VirtualMachine struct contains the API to generate proofs for arbitrary programs for a fixed set of OpenVM instructions and a fixed VM circuit corresponding to those instructions. The API is specific to a particular StarkEngine, which specifies a fixed StarkGenericConfig and [ProverBackend] via associated types. The [VmProverBuilder] also fixes the choice of RecordArena associated to the prover backend via an associated type.
VmExecutor
VmExecutor is the struct that can execute an arbitrary program, provided in the form of a VmExe, for a fixed set of OpenVM instructions corresponding to a VmExecutionConfig. Internally once it is given a program, it will preprocess the program to rewrite it into a more optimized format for runtime execution. This instance of the executor will be a separate struct specialized to running a fixed program on different program inputs.
VmInstance
Virtual machine prover instance for a fixed VM config and a fixed program. For use in proving a program directly on bare metal.

Enums§

ExitCode
GenerationError
VirtualMachineError
VmVerificationError

Traits§

ContinuationVmProver
Prover for a specific exe in a specific continuation VM using a specific Stark config.
KvStore
A trait for key-value store for Streams.
SingleSegmentVmProver
Prover for a specific exe in a specific single-segment VM using a specific Stark config.

Functions§

debug_proving_ctx
Runs the STARK backend debugger to check the constraints against the trace matrices logically, instead of cryptographically. This will panic if any constraint is violated, and using RUST_BACKTRACE=1 can be used to read the stack backtrace of where the constraint failed in the code (this requires the code to be compiled with debug=true). Using lower optimization levels like -O0 will prevent the compiler from inlining and give better debugging information.
verify_segments
Verify segment proofs with boundary condition checks for continuation between segments.
verify_single
Verifies a single proof. This should be used for proof of VM without continuations.