Skip to content

Commit

Permalink
Fix StarkProof::new_dummy() (#234)
Browse files Browse the repository at this point in the history
fix new_dummy()
  • Loading branch information
plafer authored Dec 1, 2023
1 parent 67bdce2 commit b9043ad
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
10 changes: 7 additions & 3 deletions air/src/proof/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use crate::{ProofOptions, TraceInfo, TraceLayout};
use core::cmp;
use crypto::Hasher;
use fri::FriProof;
use math::FieldElement;
use utils::{
collections::Vec, ByteReader, Deserializable, DeserializationError, Serializable, SliceReader,
};
Expand All @@ -28,6 +29,9 @@ pub use ood_frame::OodFrame;
mod table;
pub use table::Table;

#[cfg(test)]
mod tests;

// CONSTANTS
// ================================================================================================

Expand Down Expand Up @@ -149,8 +153,8 @@ impl StarkProof {

Self {
context: Context::new::<DummyField>(
&TraceInfo::new(0, 0),
ProofOptions::new(0, 0, 0, FieldExtension::None, 0, 0),
&TraceInfo::new(1, 8),
ProofOptions::new(1, 2, 2, FieldExtension::None, 8, 1),
),
num_unique_queries: 0,
commitments: Commitments::default(),
Expand All @@ -161,7 +165,7 @@ impl StarkProof {
nodes: Vec::new(),
depth: 0,
},
Vec::new(),
vec![vec![DummyField::ONE]],
),
ood_frame: OodFrame::default(),
fri_proof: FriProof::new_dummy(),
Expand Down
6 changes: 6 additions & 0 deletions air/src/proof/tests.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
use super::StarkProof;

#[test]
pub fn starkproof_new_dummy_doesnt_panic() {
let _ = StarkProof::new_dummy();
}

0 comments on commit b9043ad

Please sign in to comment.