To build the Cairo Verifier, follow these steps:
scarb build
scarb test
For local proof verification, follow these steps:
cargo run --release --bin runner -- --program target/dev/cairo_verifier.sierra.json -c cairo0 < examples/proofs/recursive/cairo0_example_proof.json
cargo run --release --bin runner -- --program target/dev/cairo_verifier.sierra.json -c cairo1 < examples/proofs/recursive/cairo1_example_proof.json
To verify proofs on Starknet, proceed with the following steps:
cargo run --release --bin snfoundry_proof_serializer -- -c cairo0 < examples/proofs/recursive/cairo0_example_proof.json > examples/starknet/calldata
cd examples/starknet
./1-verify-proof.sh 0x274d8165a19590bdeaa94d1dd427e2034462d7611754ab3e15714a908c60df7 calldata
List of deployed Verifier Contracts
By default, the verifier is configured for recursive layout and keccak hash for verifier unfriendly commitment layers. You can easily change that by using the configure python script (this script is in Experimental stage):
python configure.py -l recursive -s keccak
layout types: [dex, recursive, recursive_with_poseidon, small, starknet, starknet_with_keccak]
hash types: [keccak, blake2s]
In order to launch benchmarking, just run this (it requires recursive layout configuration):
cargo run --release --bin benches -- target/dev/cairo_verifier.sierra.json
For detailed instructions and examples, refer to the Stone Prover documentation.
How to prove Cairo0 program with Stone Prover.
How to prove Cairo1 program with Stone Prover.