Expand description
An implementation of an exucutor for the SP1 RISC-V zkVM.
Modules§
- Type definitions for the events emitted by the
crate::Executor
during execution. - Types and methods for subproof verification inside the
crate::Executor
. - Syscall definitions & implementations for the
crate::Executor
.
Structs§
- An error type used for converting from
RiscvAirId
toCoreAirId
. - An iterator over the variants of CoreAirId
- A record of the execution of a program.
- An execution report.
- Holds data describing the current state of a program’s execution.
- An executor for the SP1 RISC-V zkVM.
- Holds data to track changes made to the runtime since a fork point.
- Environment that a hook may read from.
- A registry of hooks to call, indexed by the file descriptors through which they are accessed.
- RISC-V 32IM Instruction.
- Information about event counts which are relevant for shape fixing.
- Defines a set of maximal shapes for generating core proofs.
- A memory access record.
- A program that can be executed by the SP1 zkVM.
- An iterator over the variants of RiscvAirId
- Context to run a program inside SP1.
- A builder for
SP1Context
. - An intermediate proof which proves the execution.
Enums§
- Byte Opcode.
- RV32IM AIR Identifiers.
- Whether to verify deferred proofs during execution.
- Errors that the
Executor
can throw. - The different modes the executor can run in.
- An opcode (short for “operation code”) specifies the operation to be performed by the processor.
- A register stores a 32-bit value used by operations.
- RV32IM AIR Identifiers.
Constants§
- The default increment for the program counter. Is used for all instructions except for branches and jumps.
- The file descriptor through which to access
hook_bls12_381_inverse
. - The file descriptor through which to access
hook_bls12_381_sqrt
. - The file descriptor through which to access
hook_ecrecover
. - The file descriptor through which to access
hook_ed_decompress
. - The file descriptor for hints.
- The file descriptor for public values.
- The file descriptor through which to access
hook_rsa_mul_mod
. - The minimum file descriptor.
- The maximum number of instructions in a program.
- This is used in the
InstrEvent
to indicate that the instruction is not from the CPU. A valid pc should be divisible by 4, so we use 1 to indicate that the pc is not used.
Traits§
- A runtime hook. May be called during execution by writing to a specified file descriptor, accepting and returning arbitrary data.
Functions§
- Aligns an address to the nearest word below or equal to it.
- Deserialize a
Vec<(u32, V)>
as aHashMap<u32, V>
. - Estimates the LDE area.
- Calculate the most significant bit of the given 32-bit integer
a
, and returns it as a u8. - Calculate the correct
quotient
andremainder
for the givenb
andc
per RISC-V spec. - The hook for the
ecrecover
patches. - Checks if a compressed Edwards point can be decompressed.
- Given the product of some 256-byte numbers and a modulus, this function does a modular reduction and hints back the values to the vm in order to constrain it.
- Wrap a function in a smart pointer so it may be placed in a
HookRegistry
. - Returns
true
if the givenopcode
is a signed operation. - Pads the event counts to account for the worst case jump in events across N cycles.
- Load the cost of each air from the predefined JSON.
- Serialize a
HashMap<u32, V>
as aVec<(u32, V)>
.
Type Aliases§
- A runtime hook, wrapped in a smart pointer.