https://github.com/fuellabs/fuel-sp1
Implementation of fuel's proving games with the sp1 zkvm
https://github.com/fuellabs/fuel-sp1
Last synced: 8 months ago
JSON representation
Implementation of fuel's proving games with the sp1 zkvm
- Host: GitHub
- URL: https://github.com/fuellabs/fuel-sp1
- Owner: FuelLabs
- Created: 2025-04-08T12:30:19.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-08T16:52:43.000Z (about 1 year ago)
- Last Synced: 2025-05-21T18:34:19.988Z (about 1 year ago)
- Language: Rust
- Size: 90.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# fuel-sp1
## Install Dependencies
- 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
```
## Repository structure
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 -
1. If imported as a library, you may access helpers to generate and verify proofs for the associated proving game.
2. If executed as a binary, you may run proof generation & verification via CLI (upcoming).
## Run proving tests
```
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](https://docs.succinct.xyz/docs/sp1/generating-proofs/hardware-acceleration/cuda#usage) for cuda instructions specific to sp1.
## Run execution tests
```
cargo test -p fuel-proving-games-sp1 run_all_fixtures_and_collect_report
```
## Integration example
Using the default prover configured via SP1_PROVER env var,
```rs
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();
}
```