To build the Cairo Verifier, follow these steps:
- Build the project by running the following command in your terminal:
scarb build
- (Optional) Test the project to ensure everything works correctly:
scarb test
For local proof verification, follow these steps:
- Run the verifier locally on example proof using the following command:
cargo run --release --bin runner -- target/dev/cairo_verifier.sierra.json < examples/proofs/recursive/example_proof.json
To verify proofs on Starknet, proceed with the following steps:
- Prepare calldata of example proof for sncast:
cargo run --release --bin snfoundry_proof_serializer < examples/proofs/recursive/example_proof.json > examples/starknet/calldata
- Call the function with calldata on the Starknet contract:
cd examples/starknet
./1-verify-proof.sh 0x487810706cc0dfdba0c82403d98e9d32dc36793ed2b731231e5ea19f00c5861 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.
For information on how to use the Stone Prover SDK tool, please refer to the documentation.