Skip to content

Commit

Permalink
test: Test concurrent proof verification
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-ferdinand committed Dec 16, 2024
1 parent b9f78ad commit 0ee3161
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions triton-vm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,18 @@ mod tests {
assert!(verdict);
}

#[test]
fn prove_then_verify_concurrently() {
let program = crate::example_programs::FIBONACCI_SEQUENCE.clone();
let input = PublicInput::from(bfe_array![100]);

let (stark, claim, proof) =
prove_program(program, input, NonDeterminism::default()).unwrap();

let verify = || assert!(stark.verify(&claim, &proof).is_ok());
rayon::join(verify, verify);
}

#[test]
fn lib_prove_with_incorrect_program_digest_gives_appropriate_error() {
let program = triton_program!(push 1 assert halt);
Expand Down

0 comments on commit 0ee3161

Please sign in to comment.