Expand description
Shared test suite for STARK backend implementations.
This crate provides generic test functions that can be used to verify any
StarkEngine implementation against the BabyBearPoseidon2 configuration.
§Usage
The easiest way to use this crate is via the backend_test_suite! macro,
which generates the complete shared test suite with a single invocation:
ⓘ
openvm_backend_tests::backend_test_suite!(MyEngine);Individual test functions can also be called directly for custom wrappers:
ⓘ
#[test]
fn test_proof_shape_verifier() {
openvm_backend_tests::proof_shape_verifier::<MyEngine>().unwrap();
}§Adding New Tests
- Add a
pub fnhere (withE: StarkEngine<SC = SC>bound for engine-generic tests). - Add the test to the
backend_test_suite!macro. - Each backend automatically picks it up on next build.
Macros§
- backend_
test_ suite - Generate the complete shared backend test suite for the given engine type.
Functions§
- batch_
constraints_ with_ interactions - batch_
sumcheck_ zero_ interactions - batch_
sumcheck_ zero_ interactions_ malleable_ q0 - Negative test: with zero interactions, a
gkr_proof.q0_claim != EF::ONEmust causeverify_zerocheck_and_logupto reject withInvalidZeroRoundValue. - cached_
trace_ roundtrip - dummy_
interactions_ roundtrip - fib_
air_ roundtrip - fold_
double - Test binary k-fold operation with k=2.
- fold_
single - Test binary k-fold operation with k=1.
- generate_
random_ z - Generate random evaluation points for WHIR tests.
- gkr_
verify_ zero_ interactions - interaction_
all_ zero_ sender - interaction_
cached_ trace_ neg - interaction_
multi_ rows_ neg - interaction_
multi_ sender_ receiver - interaction_
multi_ senders - interaction_
multi_ senders_ neg - interaction_
trace_ height_ constraints - interactions_
single_ sender_ receiver_ happy - matrix_
stacking_ overflow - mixture_
traces_ stark - multi_
interaction_ traces_ stark - optional_
air - preprocessed_
and_ cached_ trace_ roundtrip - preprocessed_
trace_ roundtrip - proof_
shape_ verifier - proof_
shape_ verifier_ rng_ system_ params - run_
test_ on_ cpu_ ctx - Generic version of
StarkEngine::run_testthat accepts CPU-side contexts and handles device transport automatically. - single_
cached_ trace_ stark - single_
fib_ and_ dummy_ trace_ stark - single_
preprocessed_ trace_ stark - stacking_
openings_ for_ matrix - Compute stacking openings for a single matrix at the given evaluation point.
- trace_
height_ constraints_ implied_ removal - vkey_
methods - whir_
multiple_ commitments - Test CPU WHIR prover + verifier with 5 randomly generated commitments.
- whir_
multiple_ commitments_ negative - Soundness test: verify that WHIR correctly rejects tampered openings.
- whir_
single_ fib - Test CPU WHIR prover + verifier with a single Fibonacci commitment under varying stacking and folding parameters.
- whir_
test_ config - Build a
WhirConfigwith 2 rounds for multi-commitment WHIR tests.