-
Execute without proving:
RISC0_DEV_MODE=1 cargo run -p zkvm_host --features risc0 --release -- --test <test_case> execute
Prefix command with
RUST_LOG=infoand/orRISC0_INFO=1to include enhanced usage stats.Replace
<test_case>with needed test case:pectra-devnet-6 with epoch transition- pectra epoch state transition, 100k validators.pectra-devnet-6 without epoch transition- pectra state transition without epoch transition, 100k validators.mainnet without epoch transition- pectra state transition without epoch, mainnet.consensus spec tests mainnet electra empty block transition- an empty block transition from consensus spec tests.
-
Prove using local prover:
RISC0_DEV_MODE=0 cargo run -p zkvm_host --features risc0 --release -- --test <test_case> prove
Replace
<test_case>with one of the four test cases mentioned above. -
Prove using network prover:
RISC0_DEV_MODE=0 PROVER=boundless RPC_URL=<rpc_url> PRIVATE_KEY=<private_key> PINATA_JWT=<pinata_jwt> cargo run -p zkvm_host --features risc0 --release -- --test <test_case> prove
As with execution, you can prefix command with
RUST_LOG=infoand/orRISC0_INFO=1to include enhanced usage stats. Replace<test_case>with needed test case, and<private_key>/<pinata_jwt>/<rpc_url>with needed params as described in the boundless documentation.
-
Execute without proving:
cargo run -p zkvm_host --features sp1 --release -- --test <test_case> execute
Replace
<test_case>with one of the four test cases mentioned above. -
Prove using local prover:
cargo run -p zkvm_host --features sp1 --release -- --test <test_case> prove
Again, replace
<test_case>with one of the four test cases mentioned above. -
Prove using network prover:
SP1_PROVER=network NETWORK_RPC_URL=https://rpc.production.succinct.xyz NETWORK_PRIVATE_KEY=<private_key> cargo run -p zkvm_host --features sp1 --release -- --test <test_case> prove
Replace
<private_key>with your generated private key.
-
Execute without proving:
cargo +nightly-2025-08-04 run -p zkvm_host --features pico --release -- --test <test_case> execute
Replace
<test_case>with one of the four test cases mentioned above.Compiling Brevis pico libraries require using nightly rust. Prefix command with
RUST_LOG=infoto include enhanced usage stats. -
Prove using local prover:
cargo +nightly-2025-08-04 run -p zkvm_host --features pico --release -- --test <test_case> prove
Again, replace
<test_case>with one of the four test cases mentioned above.
-
Load ZKM env vars to current shell and build the guest program
cd zkvm/guest/ziren && source ~/.zkm-toolchain/env && $HOME/.cargo/bin/cargo +nightly-2025-06-30 build --release --target mipsel-zkm-zkvm-elf
Return back to the root directory after successful build
-
Execute without proving:
cargo run -p zkvm_host --features ziren --release -- --test <test_case> execute
Replace
<test_case>with one of the four test cases mentioned above. -
Prove using local prover:
cargo run -p zkvm_host --features ziren --release -- --test <test_case> prove
Again, replace
<test_case>with one of the four test cases mentioned above.
-
Execute without proving:
Install Zisk with proving key. Refer to the docs for steps.
Then run:
cargo run -p zkvm_host --features zisk --release -- --test <test_case> execute
Replace
<test_case>with one of the four test cases mentioned above. -
Prove using local prover:
In addition to what's needed in step 1, also generate the program setup files. Refer to the docs on steps for both generating and verifying the proof.
Then run:
cargo run -p zkvm_host --features zisk --release -- --test <test_case> prove
Again, replace
<test_case>with one of the four test cases mentioned above.
To add new zkvm, you need to:
- Update
zkvm/host/Cargo.tomland add new feature flag with new zkvm name, just likerisc0orsp1. - Implement needed structs & traits for new zkvm host code in
zkvm/host/src/backend.rs. - Create zkvm guest crate in
zkvm/guest/<zkvm_name>folder. Don't forget to add new crate to workspaceCargo.tomlif possible. - Add necessary patches/precompiles. Currently root
Cargo.tomlfile contains patches forsha2andbls12_381crates, so don't forget to comment out these. They're defined in three places: in[workspace.dependencies]section,[patch.crates-io]and[patch.'https://github.com/zkcrypto/bls12_381.git']. - Update Github workflow
.github/workflows/ci.yamlto add your zkvm build and test inside.