Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Commit

Permalink
update the dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
weikengchen committed Sep 29, 2024
1 parent 55065c0 commit 933ed65
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 16 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "fibonacci-example"
version = "0.1.0"
name = "fibonacci-example-non-table"
version = "1.0.0"
edition = "2021"

[dependencies]
rust-bitcoin-m31 = { git = "https://github.com/Bitcoin-Wildlife-Sanctuary/rust-bitcoin-m31/" }
rust-bitcoin-m31 = { git = "https://github.com/Bitcoin-Wildlife-Sanctuary/rust-bitcoin-m31/", tag = "1.0.0" }
bitcoin-script = { git = "https://github.com/Bitcoin-Wildlife-Sanctuary/rust-bitcoin-script" }
bitcoin = "0.32.0"
bitcoin-scriptexec = { git = "https://github.com/Bitcoin-Wildlife-Sanctuary/rust-bitcoin-scriptexec", features = ["debug"] }
Expand Down
21 changes: 12 additions & 9 deletions src/bin/demo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ use clap::Parser;
use colored::Colorize;
use covenants_gadgets::test::SimulationInstruction;
use covenants_gadgets::{get_script_pub_key, get_tx, CovenantInput, CovenantProgram, DUST_AMOUNT};
use fibonacci_example::fiat_shamir::compute_fiat_shamir_hints;
use fibonacci_example::fold::compute_fold_hints;
use fibonacci_example::prepare::compute_prepare_hints;
use fibonacci_example::quotients::compute_quotients_hints;
use fibonacci_example::split::{FibonacciSplitInput, FibonacciSplitProgram, FibonacciSplitState};
use fibonacci_example::FIB_LOG_SIZE;
use fibonacci_example_non_table::fiat_shamir::compute_fiat_shamir_hints;
use fibonacci_example_non_table::fold::compute_fold_hints;
use fibonacci_example_non_table::prepare::compute_prepare_hints;
use fibonacci_example_non_table::quotients::compute_quotients_hints;
use fibonacci_example_non_table::split::{FibonacciSplitInput, FibonacciSplitProgram, FibonacciSplitState};
use fibonacci_example_non_table::FIB_LOG_SIZE;
use std::io::Write;
use stwo_prover::core::channel::Sha256Channel;
use stwo_prover::core::fields::m31::{BaseField, M31};
Expand All @@ -37,7 +37,10 @@ struct Args {
fn main() {
let args = Args::parse();

let amount = (2800u64 + 473977 + 325136 + 591311 * 8 + 10000) / 7 + 330 * 10;
let amount = (2800u64 + 474845 + 325136 + 591542 * 8 + 10000) / 7 + 330 * 10;
let amount_display =
(((amount as f64) / 1000.0 / 1000.0 / 100.0) * 10000.0).ceil() / 10000.0;
let amount = (amount_display * 100.0 * 1000.0 * 1000.0) as u64;
let rest = amount - 330 - 400;

if args.funding_txid.is_none() || args.initial_program_txid.is_none() {
Expand Down Expand Up @@ -156,7 +159,7 @@ fn main() {
if old_state.pc == 0 {
Some(SimulationInstruction::<FibonacciSplitProgram> {
program_index: 0,
fee: 67711,
fee: 67835,
program_input: FibonacciSplitInput::FiatShamir(Box::new(
fiat_shamir_hints.clone(),
)),
Expand All @@ -174,7 +177,7 @@ fn main() {
let i = old_state.pc - 2;
Some(SimulationInstruction {
program_index: old_state.pc,
fee: 84473,
fee: 84506,
program_input: FibonacciSplitInput::PerQuery(
old_state.stack.clone(),
per_query_quotients_hints[i].clone(),
Expand Down
8 changes: 4 additions & 4 deletions src/split/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -509,10 +509,10 @@ mod test {
program_input: FibonacciSplitInput::Reset,
})
} else if old_state.pc == 0 {
total_fee.borrow_mut().add_assign(473977);
total_fee.borrow_mut().add_assign(474845);
Some(SimulationInstruction {
program_index: 0,
fee: 473977,
fee: 474845,
program_input: FibonacciSplitInput::FiatShamir(Box::new(
fiat_shamir_hints.clone(),
)),
Expand All @@ -528,11 +528,11 @@ mod test {
),
})
} else if old_state.pc >= 2 && old_state.pc <= 9 {
total_fee.borrow_mut().add_assign(591311);
total_fee.borrow_mut().add_assign(591542);
let i = old_state.pc - 2;
Some(SimulationInstruction {
program_index: old_state.pc,
fee: 591311,
fee: 591542,
program_input: FibonacciSplitInput::PerQuery(
old_state.stack.clone(),
per_query_quotients_hints[i].clone(),
Expand Down

0 comments on commit 933ed65

Please sign in to comment.