Skip to content

Commit

Permalink
Revert "fix(snark_wrapper): compute the correct number of PoW seed ch…
Browse files Browse the repository at this point in the history
…allenges (#45)"

This reverts commit c2999e1.
  • Loading branch information
robik75 committed Nov 21, 2024
1 parent d300c01 commit b4349c4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions crates/snark-wrapper/src/verifier/fri.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,11 @@ pub(crate) fn verify_fri_part<
transcript.witness_field_elements(cs, &proof.final_fri_monomials[1])?;

if constants.new_pow_bits != 0 {
const SEED_BITS: usize = 256;
// pull enough challenges from the transcript
let num_challenges = SEED_BITS.next_multiple_of(GL::CHAR_BITS) / GL::CHAR_BITS;
let mut num_challenges = 256 / GL::CHAR_BITS;
if num_challenges % GL::CHAR_BITS != 0 {
num_challenges += 1;
}
let challenges: Vec<_> = transcript.get_multiple_challenges(cs, num_challenges as usize)?;
let (is_valid, pow_challenge_limbs) = POW::verify_from_field_elements(cs, challenges, proof.pow_challenge_le, constants.new_pow_bits)?;
match is_valid.get_value() {
Expand Down

0 comments on commit b4349c4

Please sign in to comment.