This repository contains example Substrate and RISC Zero interactions. The main interaction that this repository focuses on is using RISC Zero as a prover, and a Substrate pallet as the verifier. Proving Substrate transactions has no public examples as of yet.
See this tutorial for an introduction to the prover and verifier used here.
The host cost runs the existing "hello world" example from Risc0. This component uses Subxt to send transactions to the chain.
To run the prover: Start the local node, then:
cd provers/factors
cargo run
The pallet serves as the verifier, using the risc0-zkvm . This was derived from the Substrate template, so the pallet still shares the name of the boilerplate template pallet.
If unfamiliar with Substrate and how to install Substrate dependencies and run Substrate-based nodes, please see the Substrate Node Template.
Building the node:
cargo nightly build --release
Run the node:
./target/release/node-template --dev