From 6dc935317f31aab8794221dec87208c5e7052196 Mon Sep 17 00:00:00 2001 From: erabinov Date: Wed, 7 Aug 2024 11:15:01 -0700 Subject: [PATCH] removed extra reduce and added comment --- crates/recursion/circuit/src/fri.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/recursion/circuit/src/fri.rs b/crates/recursion/circuit/src/fri.rs index 8c2617d0f0..f7bf84ac04 100644 --- a/crates/recursion/circuit/src/fri.rs +++ b/crates/recursion/circuit/src/fri.rs @@ -204,8 +204,9 @@ pub fn verify_query( let index_sibling: Var<_> = builder.eval(one - index_bits.clone()[offset]); let index_pair = &index_bits[(offset + 1)..]; + // Reduce folded_eval (mod the BabyBear prime) since it gets used multiple times below and + // the reductions will be repeated. builder.reduce_e(folded_eval); - builder.reduce_e(step.sibling_value); let evals_ext = [ builder.select_ef(index_sibling, folded_eval, step.sibling_value),