Cartesi + RISC Zero Integration
Cartesi + RISC Zero Integration is one of my flagship projects: a toolkit for bringing RISC Zero zero-knowledge proofs into Cartesi's off-chain computation environment.
The project received a $5,000 grant through the Cartesi Community Grants Program, which helped support the work of turning the integration into a documented, reusable developer toolkit.
The project explores a practical question at the edge of blockchain infrastructure:
How do you combine private, provable computation with an execution environment powerful enough to handle real application logic?
RISC Zero provides the zkVM layer for proving that a computation was performed correctly. Cartesi provides the deterministic Linux environment for running complex off-chain logic. This project connects the two.
What It Does
The toolkit demonstrates how to generate zero-knowledge proofs with RISC Zero and verify them inside Cartesi through two integration patterns:
- Cartesi Rollups verification
- Cartesi Coprocessor verification
That makes it possible to move heavy or privacy-sensitive computation away from constrained on-chain environments while still preserving verifiability.
Generate
A RISC Zero host program prepares private inputs, runs the zkVM, and serializes the proof output.
Prove
A guest program defines the computation being proven and emits a receipt with controlled disclosure.
Verify
Cartesi verifies the proof inside a rollup or coprocessor workflow and reports the result back to the application.
Why It Matters
Blockchains are not designed to run every kind of computation directly on-chain.
That constraint is even sharper when applications need privacy, larger runtime environments, or verification logic that would be too expensive to execute directly in a smart contract.
This project treats Cartesi and RISC Zero as complementary infrastructure:
- RISC Zero proves the correctness of private or sensitive computation.
- Cartesi gives developers a Linux-based runtime for complex off-chain execution.
- The integration patterns show how proofs can flow through rollup and coprocessor systems.
The result is a bridge between zk computation and practical blockchain application architecture.
Architecture
The repository is organized around three main pieces.
RISC Zero Proof Generation
The generate_proof workspace contains the host and guest programs for creating RISC Zero proofs.
The host program manages proof generation, prepares private inputs, runs the zkVM, and serializes proof data into a format that downstream Cartesi components can consume.
The guest program defines the computation being proven. It keeps the proof boundary explicit, which is important for privacy, performance, and auditability.
Cartesi Rollups Verifier
The rollups-verifier package demonstrates proof verification in a Cartesi Rollups environment.
This pattern is useful when a decentralized application needs privacy-preserving computation but still wants rollup-style application flow and state handling.
Cartesi Coprocessor Verifier
The coprocessor-verifier package demonstrates the coprocessor path.
It combines Cartesi Machine execution with smart contract deployment, making it a better fit for computation-heavy workflows that still need blockchain coordination.
Technical Highlights
- Built primarily in Rust
- Includes Solidity smart contract components
- Uses Docker-based Cartesi development workflows
- Demonstrates RISC Zero host and guest proof generation
- Supports Cartesi Rollups and Cartesi Coprocessor integration paths
- Covers receipt tradeoffs across composite, succinct, and Groth16 proofs
- Documents production considerations such as Bonsai remote proving
Proof Strategy
RISC Zero supports multiple receipt types, and the project documents the tradeoffs clearly.
Composite receipts are useful for development and testing. Succinct receipts compress the proof into a smaller unified form. Groth16 receipts are the production-oriented option when proof size matters most, especially for on-chain verification or storage-constrained environments.
That distinction matters because proof systems are not only about correctness.
They are also about where verification happens, how much data must move through the system, and what kind of deployment environment the application can realistically support.
Repository
The source is available at masiedu4/cartesi-risczero.