Skip to content

Commit

Permalink
Fix the options for script execution (#25)
Browse files Browse the repository at this point in the history
* fix the options for script execution

* remove a println! debug code
  • Loading branch information
weikengchen authored May 31, 2024
1 parent b9c27b5 commit c7cfd53
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
14 changes: 14 additions & 0 deletions src/fibonacci/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#[cfg(test)]
mod test {
use stwo_prover::core::fields::m31::M31;
use stwo_prover::examples::fibonacci::Fibonacci;

#[test]
fn test_fib_prove() {
const FIB_LOG_SIZE: u32 = 5;
let fib = Fibonacci::new(FIB_LOG_SIZE, M31::reduce(443693538));

let proof = fib.prove().unwrap();
fib.verify(proof).unwrap();
}
}
8 changes: 5 additions & 3 deletions src/fri/bitcoin_script.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,8 +376,6 @@ mod test {
println!("FRI.Twiddle-Tree = {} bytes", script.len());

let exec_result = execute_script(script);
println!("{:8}", exec_result.final_stack);
println!("{:?}", exec_result.error);
assert!(exec_result.success);
}

Expand Down Expand Up @@ -707,7 +705,11 @@ mod test {
verify_csv: true,
verify_minimal_if: true,
enforce_stack_limit: false,
experimental: Experimental { op_cat: true },
experimental: Experimental {
op_cat: true,
op_mul: false,
op_div: false,
},
},
TxTemplate {
tx: Transaction {
Expand Down
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ pub mod circle;
pub mod circle_secure;
/// Module for constraints over the circle curve
pub mod constraints;
/// Module for Fibonacci end-to-end test.
pub mod fibonacci;
/// Module for FRI.
pub mod fri;
/// Module for the field and group arithmetics.
Expand Down

0 comments on commit c7cfd53

Please sign in to comment.