Key Terminology
Assumption
An assumption is receipt claim upon which a receipt is conditional. When the guest uses composition to verify a receipt in the zkVM, an assumption is added to the receipt. This assumption can be proven and resolved later, either through recursion or by providing proof of the assumption to the verifier.
Circuit
A mathematical construct that acts as the "CPU" of the zkVM in a manner that enables creating proofs.
See also: Arithmetic Circuits
Clock Cycles
The smallest unit of compute in the zkVM circuit, analogous to a clock cycle on a physical CPU. The complexity of a guest program's execution is measured in clock cycles as they directly affect the memory, proof size, and time performance of the zkVM.
Generally, a single cycle corresponds to a single RISC-V operation. However, some operations require two cycles.
See the Optimization Guide for more information about the zkVM cycles and performance.
Commit
Append data to the journal.
See also: env::commit()
Composition
As of our 0.20 release, the zkVM supports verification of RISC Zero receipts inside the RISC Zero guest through a feature known as composition. With this, multiple zkVM programs can be composed and produce a single receipt that verifies all computation done to reach the final result.
Some use cases for composition include:
- Splitting a program into multiple parts, proven by different parties, to preserve privacy and data ownership of each party.
- E.g. Produce a proof that a ciphertext is a correct encryption of some value to a valid public key.
- E.g. Produce a proof for a database query by joining receipts from the query over each privately held shard.
- Aggregating many proofs into one for efficient batch verification.
- E.g. Produce a proof for a block of transactions, where each transaction is itself verified by a receipt.
- Creating a single receipt for a workflow that might be split into many different operations.
- E.g. Produce a single receipt for the result of an image processing pipeline, where different filters are in their own guests.
Conditional
A receipt can be described as "conditional" if it is only true when one or more unproven assumptions are also true. When the assumptions are not proven to be true, a conditional receipt does not provide any guarantees, and so verifiers will reject conditional receipts. A conditional receipt can be made unconditional by providing receipts proving all assumptions. Conditional receipts are a part of the composition feature.
Continuations
As of our 0.15 release, the zkVM uses continuations to enable proof generation for very large programs without blowing up memory requirements.
Large proof generation is made possible by splitting the execution trace for a single session into a number of segments, and proving those segments independently.
See also: Continuations study club
Control ID
The control ID is the Merkle hash of the contents of the control columns, which are assumed to be known to the verifier as part of the circuit definition.
The control ID is the first entry in the seal and plays a key role in defining the operations of the circuit. Verifying a receipt involves:
- Checking the control ID on the receipt against the control ID for the expected version of the zkVM.
- Verifying the validity of the Merkle branches for various entries of the Control columns.
For a closer look at how the control columns are used to manage constraint enforcement, check out our STARK by Hand explainer.
Control Root
The control root is the Merkle hash of a set of control IDs.
The control root plays a key role in enforcing zkVM version control. Each control ID identifies one recursion program; the control root identifies the list of allowed recursion programs. When the RISC-V circuit or recursion programs change, the control root is updated to reflect the new set of allowed functions.
This design allows for updates to the RISC-V circuit without necessitating a new trusted setup for the Groth16 circuit.
See also: Code reference for control root
Deterministic Builds
A compilation process is called "deterministic" (or "reproducible") if it reliably produces the same binary file, on a byte-by-byte level.
In the context of RISC Zero application development, deterministic builds are necessary to ensure a clear linkage between the source code for the guest program and the resulting Image ID.
To access deterministic builds for your zkVM application, use cargo risczero build. Deterministic builds are made possible by running the rustc compiler inside a Docker container.
ELF Binary
The executable format for the RISC-V instruction set. Each method in a guest program is written in Rust and compiled into an ELF binary before execution begins. Then, the ELF binary is executed and proven.
Execute
Run a method inside the zkVM and produce an execution trace which can be used by the prover to create a proof of correct execution.
Executor
The portion of the zkVM responsible for generating the execution trace.
See also: Executor documentation, Prover
Execution Trace
A complete record of a computation. The execution trace is organized as a rectangular array, where each row describes a complete snapshot of the state of the zkVM at a given moment in time. The width of the execution trace relates to the number of registers/components in the machine, and the length of the execution trace relates to the number of clock cycles of the program's execution.
The execution trace is generated by the executor and checked for validity by the prover. A valid trace means that the ELF binary was faithfully executed according to the rules of the RISC-V instruction set architecture.
Groth16
A proof system that offers a very small proof size, suitable for on-chain verification.
Groth16 Circuit
RISC Zero's Groth16 Circuit is used to generate receipts that are small enough to support on-chain verification. The Groth16 Circuit is a circom implementation of the verifier for the Recursion Circuit.
Groth16 Receipt
A Groth16 Receipt is a very small validity proof, used primarily for on-chain verification. The Groth16 Receipt is constructed using the Groth16 Circuit.
Guest
The system running inside the zkVM.
See also: Rust crate for zkVM guest
Guest Program
The portion of a zkVM application that gets proven.
The guest program receives inputs from an (untrusted) host.
Depending on the application, the guest program can commit results to the journal and/or send them to the host.
See also: Rust crate for zkVM guest
Host
The system the zkVM runs on.
Host Program
The host-native, untrusted portion of a zkVM application. The host program loads the guest program and provides inputs to the guest program as necessary.