From 1011c302accfe188ba4f73205480f4bab00b5413 Mon Sep 17 00:00:00 2001 From: wborgeaud Date: Fri, 4 Feb 2022 16:02:45 +0100 Subject: [PATCH] Add test for system zero --- starky/src/fibonacci_stark.rs | 4 ++-- starky/src/lib.rs | 3 +-- system_zero/src/system_zero.rs | 13 +++++++++++++ 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/starky/src/fibonacci_stark.rs b/starky/src/fibonacci_stark.rs index ad9685bb..a7cb0a87 100644 --- a/starky/src/fibonacci_stark.rs +++ b/starky/src/fibonacci_stark.rs @@ -97,7 +97,7 @@ mod tests { use crate::config::StarkConfig; use crate::fibonacci_stark::FibonacciStark; use crate::prover::prove; - use crate::stark_testing::test_low_degree; + use crate::stark_testing::test_stark_low_degree; use crate::verifier::verify; fn fibonacci(n: usize, x0: usize, x1: usize) -> usize { @@ -141,6 +141,6 @@ mod tests { let config = StarkConfig::standard_fast_config(); let num_rows = 1 << 5; let stark = S::new(num_rows); - test_low_degree(stark) + test_stark_low_degree(stark) } } diff --git a/starky/src/lib.rs b/starky/src/lib.rs index dd3a6ec3..dc61e7e7 100644 --- a/starky/src/lib.rs +++ b/starky/src/lib.rs @@ -12,10 +12,9 @@ mod get_challenges; pub mod proof; pub mod prover; pub mod stark; +pub mod stark_testing; pub mod vars; pub mod verifier; #[cfg(test)] pub mod fibonacci_stark; -#[cfg(test)] -pub mod stark_testing; diff --git a/system_zero/src/system_zero.rs b/system_zero/src/system_zero.rs index e5990af9..6b8576c9 100644 --- a/system_zero/src/system_zero.rs +++ b/system_zero/src/system_zero.rs @@ -97,6 +97,7 @@ mod tests { use starky::config::StarkConfig; use starky::prover::prove; use starky::stark::Stark; + use starky::stark_testing::test_stark_low_degree; use starky::verifier::verify; use crate::system_zero::SystemZero; @@ -118,4 +119,16 @@ mod tests { verify(system, proof, &config) } + + #[test] + #[ignore] // TODO + fn degree() -> Result<()> { + type F = GoldilocksField; + type C = PoseidonGoldilocksConfig; + const D: usize = 2; + + type S = SystemZero; + let system = S::default(); + test_stark_low_degree(system) + } }