Skip to content

Commit

Permalink
verify: STARK proof
Browse files Browse the repository at this point in the history
  • Loading branch information
supragya committed Jul 7, 2024
1 parent de5155f commit b7b3c07
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/stark_program_instructions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ use crate::vm_specs::Program;
const NUMBER_OF_COLS: usize = 3;
const PUBLIC_INPUTS: usize = 0;

#[derive(Clone, Copy)]
pub struct ProgramInstructionsStark<F, const D: usize> {
pub _f: PhantomData<F>,
}
Expand Down Expand Up @@ -152,6 +153,7 @@ mod tests {
config::StarkConfig,
proof::StarkProofWithPublicInputs,
prover::prove,
verifier::verify_stark_proof,
};

use super::*;
Expand All @@ -176,7 +178,15 @@ mod tests {
ProgramInstructionsStark::<F, D>::generate_program_instructions_trace(
&program,
);
let proof: Result<PR, anyhow::Error> =
prove(stark, &config, trace, &[], &mut TimingTree::default());
let proof: Result<PR, anyhow::Error> = prove(
stark.clone(),
&config,
trace,
&[],
&mut TimingTree::default(),
);
assert!(proof.is_ok());
let verification = verify_stark_proof(stark, proof.unwrap(), &config);
assert!(verification.is_ok());
}
}

0 comments on commit b7b3c07

Please sign in to comment.