This crate benchmarks real STARK proof generation and verification using the STWO Circle STARK prover.
- Nightly version:
nightly-2025-06-23(pinned inrust-toolchain.toml) - This specific version is required because the STWO prover uses unstable Rust features (portable_simd, array_chunks)
The crate pulls dependencies from GitHub:
stwo-cairo-proverv1.1.0 (from starkware-libs/stwo-cairo)stwo-cairo-adapterv1.1.0cairo-airv1.1.0
The benchmarks use the STWO prover API:
prove_cairo::<Blake2sMerkleChannel>()for proof generationverify_cairo::<Blake2sMerkleChannel>()for verificationProverInputfromstwo_cairo_adapterProverParameterswith Blake2s channel
cd stwo-bench
cargo benchThe rust-toolchain.toml file will automatically use the correct nightly version when running cargo commands in this directory.
Actual STWO proof generation and verification times:
| Operation | Time |
|---|---|
| Proof Generation (merkle_batch) | ~25-28 seconds |
| Proof Verification (merkle_batch) | ~15 ms |
Benchmarks cover:
- merkle_batch - Merkle batch verification program
- hexary_verify - Hexary proof verification
- state_transition - State transition program
stwo-bench/
├── Cargo.toml # Dependencies (GitHub v1.1.0)
├── rust-toolchain.toml # Pins nightly-2025-06-23
├── stwo_proof.rs # Benchmark implementation
└── README.md # This file
Ensure you're using nightly-2025-06-23. Check with:
rustup showProof generation takes ~25-30 seconds per iteration. Use sample_size(3) for faster testing.