diff --git a/air/src/proof/mod.rs b/air/src/proof/mod.rs index 50e1edc60..2c8d97e1f 100644 --- a/air/src/proof/mod.rs +++ b/air/src/proof/mod.rs @@ -180,6 +180,35 @@ impl StarkProof { } Ok(proof) } + + /// Creates a dummy `StarkProof` for use in tests. + pub fn new_dummy() -> Self { + use crate::FieldExtension; + use crypto::hashers::Blake3_192 as DummyHasher; + use crypto::BatchMerkleProof; + use math::fields::f64::BaseElement as DummyField; + + Self { + context: Context::new::( + &TraceInfo::new(0, 0), + ProofOptions::new(0, 0, 0, FieldExtension::None, 0, 0), + ), + num_unique_queries: 0, + commitments: Commitments::default(), + trace_queries: Vec::new(), + constraint_queries: Queries::new::<_, DummyField>( + BatchMerkleProof::> { + leaves: Vec::new(), + nodes: Vec::new(), + depth: 0, + }, + Vec::new(), + ), + ood_frame: OodFrame::default(), + fri_proof: FriProof::new_dummy(), + pow_nonce: 0, + } + } } // HELPER FUNCTIONS diff --git a/fri/src/proof.rs b/fri/src/proof.rs index 3d7f9ab3d..5cfc05508 100644 --- a/fri/src/proof.rs +++ b/fri/src/proof.rs @@ -67,6 +67,15 @@ impl FriProof { } } + /// Creates a dummy `FriProof` for use in tests. + pub fn new_dummy() -> Self { + Self { + layers: Vec::new(), + remainder: Vec::new(), + num_partitions: 0, + } + } + // PUBLIC ACCESSORS // --------------------------------------------------------------------------------------------