Prove
Generates a cryptographic proof from a guest execution, emitting an aggregated STARK proof by default. Covers the input, proving-key, output, backend, and performance flags, including PLONK output for on-chain verification.
Generate a cryptographic proof from the execution of the guest
program. prove re-executes the guest, generates arithmetic
constraints over the resulting trace, and writes the proof file to
disk. STARK proofs are emitted by default.
cargo-zisk prove [OPTIONS]
Inputs
Identify the program to prove and the data fed to it.
| Flag | Short | Default | Description |
|---|---|---|---|
--elf <ELF> | -e | auto-detected | Path to the program ELF. If omitted, the ELF is auto-detected from the current project. |
--inputs <INPUTS> | -i | empty | Input fed to the guest. Accepts an inline string literal or a path to a binary file. |
--hints <HINTS> | Precompiles hints URI for the guest. Requires the ASM backend (--asm). |
If no program setup files are found at the resolved location, prove invokes
setup automatically before generating the proof, you can
go straight from build to prove without an explicit setup step.
Binary and profile selection
When the ELF is auto-detected (no --elf), these flags choose which
build to use, just like selecting a Cargo target. All three are
mutually exclusive with --elf.
| Flag | Default | Description |
|---|---|---|
--release | Use the release-profile build. | |
--debug | default | Use the debug-profile build (the default). |
--bin <BIN> | Select the binary when the crate defines more than one. |
Proving Keys
Use a proving key instead of pulling the one at the default location. Pick the right flag for the proof type you intend to generate.
| Flag | Short | Default | Description |
|---|---|---|---|
--proving-key <PROVING_KEY> | -k | cached key | Path to a precomputed STARK proving key. |
--proving-key-plonk <PROVING_KEY_PLONK> | -w | cached key | Path to a precomputed PLONK proving key. Only consulted when --plonk is set. |
Proof Output
Where the proof is written and what shape it takes.
| Flag | Short | Default | Description |
|---|---|---|---|
--output <OUTPUT> | -o | proofs/proof.bin | File path the generated proof is written to. |
--minimal | -c | false | Smaller STARK proof at the cost of longer proving time. Mutually exclusive with --plonk. |
--plonk | false | Emit a PLONK proof. Required for on-chain verification via the EVM verifier. Mutually exclusive with --minimal. | |
--verify-proof | -y | false | Verify the proof immediately after generating it. |
Execution Backend
By default prove runs the guest through the portable Rust emulator.
On Linux x86_64 you can switch to the native Assembly emulator, which
is significantly faster for large programs.
| Flag | Short | Default | Description |
|---|---|---|---|
--asm | -a | false | Use the native Assembly emulator instead of the default Rust emulator (Linux x86_64). |
Performance
Flags that trade off speed against memory or unlock platform-specific acceleration.
| Flag | Short | Default | Description |
|---|---|---|---|
--gpu | -g | false | Use GPU acceleration during proof generation. Requires a supported CUDA GPU. |
--minimal-memory | -m | false | Reduce memory footprint during proving at the cost of speed. |
--max-witness-stored <MAX_WITNESS_STORED> | -x | Maximum memory in bytes for witness storage during proving. Lowering this trades proving time for memory. | |
--unlock-mapped-memory | -u | false | Unlock the memory map for the ROM file. Only applies with --asm. |
Diagnostics
| Flag | Short | Default | Description |
|---|---|---|---|
--verbose | -v | off | Increase output verbosity. Pass -v for info, -vv for debug-level detail. |
Examples
Generate an aggregated STARK proof from the auto-detected ELF and an input — the simplest invocation:
cargo-zisk prove --inputs ./inputs/data.bin
Generate a proof for a binary input file and write it to a specific path:
cargo-zisk prove --inputs ./inputs/data.bin --output ./proofs/my-proof.bin
Generate a PLONK proof for on-chain verification via the EVM verifier:
cargo-zisk prove --inputs ./inputs/data.bin --plonk
Generate a smaller STARK proof (slower to produce):
cargo-zisk prove --inputs ./inputs/data.bin --minimal
Prove on a GPU:
cargo-zisk prove --inputs ./inputs/data.bin --gpu
Cap witness memory at 4 GiB and reduce overall memory footprint on a small host:
cargo-zisk prove --inputs ./inputs/data.bin --minimal-memory --max-witness-stored 4294967296
Outputs
cargo-zisk prove forwards the guest's stdout to your terminal as
it runs, then writes the resulting proof to the path specified by
--output (default ./proof.bin).