Skip to content

Commit

Permalink
Merge pull request 0xPolygonMiden#786 from 0xPolygonMiden/bobbin-fri-…
Browse files Browse the repository at this point in the history
…test-fixes

Fix failing FRI tests
  • Loading branch information
bobbinth authored Mar 24, 2023
2 parents 5c9ff4d + d91847c commit 3c404c0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions miden/tests/integration/stdlib/crypto/fri/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ pub use verifier_fri_e2f4::*;
mod remainder;

#[test]
#[ignore = "the unbound integrated test struct needs to be refactored to use merkle store"]
fn fri_fold4_ext2_remainder32() {
let source = "
use.std::crypto::fri::frie2f4
Expand Down Expand Up @@ -57,7 +56,6 @@ fn fri_fold4_ext2_remainder32() {
}

#[test]
#[ignore = "the unbound integrated test struct needs to be refactored to use merkle store"]
fn fri_fold4_ext2_remainder64() {
let source = "
use.std::crypto::fri::frie2f4
Expand Down Expand Up @@ -122,7 +120,8 @@ fn prepare_advice(

stack.extend_from_slice(&com[(4 * i)..(4 * i + 4)]);
stack.extend_from_slice(&alphas[(4 * i)..(4 * i + 2)]);
stack.extend_from_slice(&vec![current_depth - 1, current_domain_size]);
// TODO: explain why "-2" for depth; related to folding factor?
stack.extend_from_slice(&vec![current_depth - 2, current_domain_size]);
current_depth -= 2;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ fn iterate_query_fold_4_quad_ext(
// Assumes the num_partitions == 1
let position_index = folded_pos;

let tree_depth = log2(target_domain_size) + 1;
let tree_depth = log2(target_domain_size);

let query_nodes = m_path_sets[depth]
.get_node(NodeIndex::new(tree_depth as u8, position_index as u64))
Expand Down Expand Up @@ -456,7 +456,7 @@ impl UnBatch<QuadExt, MidenHasher> for MidenFriVerifierChannel<QuadExt, MidenHas
})
.collect();

let new_set = MerklePathSet::new((log2(current_domain_size / N) + 1) as u8);
let new_set = MerklePathSet::new((log2(current_domain_size / N)) as u8);

let iter_pos = folded_positions.iter_mut().map(|a| *a as u64);
let nodes_tmp = nodes.clone();
Expand Down

0 comments on commit 3c404c0

Please sign in to comment.