-
Rust MSRV 1.85.0
rustup toolchain install 1.85.0 -
sp1 toolchain
curl -L https://sp1up.succinct.xyz | bash sp1up --version 4.1.3
Since each proving game should have its own entrypoint, it lives as its own crate.
We have fuel-proving-games-sp1 which aims to aggregate these and provides the following features -
- If imported as a library, you may access helpers to generate and verify proofs for the associated proving game.
- If executed as a binary, you may run proof generation & verification via CLI (upcoming).
cargo test -p fuel-proving-games-sp1 prove_all_fixtures_and_collect_report
Make sure you use the correct env vars for the specific prover.
For CUDA proving, use the following feature flag:
SP1_PROVER=cuda cargo test -p fuel-proving-games-sp1 prove_all_fixtures_and_collect_report --features cuda
see here for cuda instructions specific to sp1.
cargo test -p fuel-proving-games-sp1 run_all_fixtures_and_collect_report
Using the default prover configured via SP1_PROVER env var,
use fuel_proving_games_sp1::block_execution_game::defaults;
use fuel_proving_games_sp1::block_execution_game::common::ProvingMode;
fn main() {
let prover = defaults::game_prover();
let input = /* some input */;
let (proof, vk) = prover.prove(&input, ProvingMode::Groth16).unwrap(); // or Plonk / Core
prover.verify(&proof, &vk).unwrap();
}