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

Commit

Permalink
sync with upstream change: channel digest location change
Browse files Browse the repository at this point in the history
  • Loading branch information
weikengchen committed Sep 9, 2024
1 parent a8cfcb7 commit b61e097
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/bitcoin_script/fiat_shamir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ impl FibonacciFiatShamirGadget {
{ Sha256ChannelGadget::draw_numbers_with_hint(N_QUERIES, (FIB_LOG_SIZE + LOG_BLOWUP_FACTOR + 1) as usize) }

// drop channel digest
{ N_QUERIES } OP_ROLL OP_DROP
OP_DROP

// stack:
// c1, oods point (8)
Expand Down
4 changes: 4 additions & 0 deletions src/fiat_shamir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,10 @@ pub fn compute_fiat_shamir_hints(
let column_log_sizes = components.components().column_log_sizes();
commitment_scheme.commit(proof.commitments[0], &column_log_sizes[0], channel);

if column_log_sizes.len() == 2 {
commitment_scheme.commit(proof.commitments[1], &column_log_sizes[1], channel);
}

channel.mix_felts(
&proof
.lookup_values
Expand Down
11 changes: 4 additions & 7 deletions src/split/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,16 +349,13 @@ impl CovenantProgram for FibonacciSplitProgram {
};

let witness = convert_to_witness(script! {
{ *fiat_shamir_hints.clone() }
})
.unwrap();
{ *fiat_shamir_hints.clone() }
})
.unwrap();

println!("fiat-shamir witness size: {}", witness.len());

let final_stack = get_final_stack(
script,
witness,
);
let final_stack = get_final_stack(script, witness);

let stack_hash = StackHash::compute(&final_stack);

Expand Down

0 comments on commit b61e097

Please sign in to comment.