General-purpose zero-knowledge virtual machine (zkVM) over RISC-V. Write guest programs in Rust, generate zk-STARK proofs of execution, and verify on EVM/Solana/other chains. Bonsai is RISC Zero's hosted GPU prover network.
- 01verifiable off-chain compute
- 02ZK coprocessors for Ethereum/L2
- 03private inputs with public outputs
- 04rollup proving (Boundless)
- 05ZK ML / ZK ETL pipelines
- curl -L https://risczero.com/install | bash
- rzup install
- cargo install cargo-risczero
| Variable | Scope | Description |
|---|---|---|
| BONSAI_API_URL | Server | Bonsai prover API URL, e.g. https://api.bonsai.xyz/. |
| BONSAI_API_KEY | Server | Bonsai API key for submitting proving jobs. |
| RISC0_DEV_MODE | Server | Set to '1' for fake (unsound) proofs in local dev only; never in prod. |
Use RISC Zero zkVM for verifiable off-chain compute. Scaffold with `cargo risczero new`. Put deterministic logic in the guest crate (compiled to RISC-V), and from the host call `default_prover().prove(env, GUEST_ELF)` to get a `Receipt` containing a STARK seal and public journal. For prod, route proving to Bonsai by setting `BONSAI_API_URL` and `BONSAI_API_KEY` (host code transparently switches). Verify on EVM via the RISC Zero `RiscZeroGroth16Verifier` contract using the receipt's seal + image ID + journal.
- ⚑Local proving is RAM/CPU heavy (10s of GB RAM, minutes-to-hours per proof) — Bonsai is effectively required for production workloads.
- ⚑`RISC0_DEV_MODE=1` produces fake receipts — verifiers MUST reject dev-mode receipts on mainnet (check the env or pin verifier flags).
- ⚑Image ID changes whenever the guest code changes; on-chain verifiers must be re-pointed or you bricked the integration.
- ⚑Groth16 wrapping for EVM verification adds a final SNARK step and extra latency — budget proof completion time accordingly.
- ⚑Bonsai is centralized today (Boundless decentralizes proving but is rolling out) — for trust-minimized apps run a backup local prover.
- ⚑Guest std-lib support is limited; some crates won't compile to the zkVM target without patches.