RISC Zero on Ethereum
Warning: The zkVM and Bonsai are still in development. Do not use in production.
Prove computation with the RISC Zero zkVM and verify the results in your Ethereum contract.
The zkVM and Bonsai together can act as a coprocessor to the smart contract application. This unlocks powerful new applications on Ethereum that offload computationally intensive (i.e. gas expensive) and difficult to implement (e.g. ed25519 signature verification, or HTML parsing) functions to the zkVM. This is possible because, through Bonsai, STARK proofs generated by the zkVM can be wrapped in circom Groth16 SNARKs that are significantly smaller and faster to verify on-chain.
Getting Started
The RISC Zero Foundry Template provides a template and instructions for developing your application. You can get started right away by cloning the template and following the instructions there.
Overview
Below is a diagram and overview of a typical application with RISC Zero on Ethereum, utilizing Bonsai proving.
- Run your application logic in the zkVM. The off-chain component of your app (e.g. server or dApp client) sends a proof request to the Bonsai proving service.
- Bonsai generates the program result, written to the journal, and a SNARK proof of its correctness.
- The app submits this proof and journal on-chain to your app contract for validation.
- Your app contract calls the RISC Zero verifier contract to validate the proof. If the verification is successful, the journal is deemed trustworthy and can be safely used.