Skip to content

Conversation

@HiddenAndBound
Copy link
Contributor

This pull request adds implementations described in #1351.

  • Implement a FracAddCheckProver that builds fractional-addition layers (numerator/denominator) and reduces them via sumcheck, producing final
    multilinear evaluation claims.
  • Add a sumcheck-compatible FracAddMleCheckProver (Gruen32 + chunked accumulation) and wire it through MleToSumCheckDecorator for batch proving/
    verification.
  • Introduce verifier-side fractional-add check that validates batched sumcheck evaluations and recursively reduces to the final claim.
  • Add tests covering prover/verifier flow and layer correctness, plus a Criterion benchmark for fracaddcheck setup and proving.
  • Minor sumcheck utility tweak: make RoundEvals2 Copy to simplify accumulation.

@jimpo
Copy link
Collaborator

jimpo commented Jan 4, 2026

Great job!

My only comment is that we should be able to do the protocol with a batched MLE-check, withing needing the MleCheckToSumcheckDecorator. That is necessary in the BivariateProductMultiMlecheckProver because that needs to support multiple evaluation points. In this protocol, the evaluation points are still correlated. Could you make that change in a follow-up PR?

Now, as for the CI failures:

  1. The wasm tests are failing. The error appears locally if you do cargo build --no-default-features --package binius-prover. The --no-default-features here disables Rayon. This patch will fix the issue:
diff --git a/crates/prover/src/protocols/fracaddcheck.rs b/crates/prover/src/protocols/fracaddcheck.rs
index 9c6fdfb1..8bccdb52 100644
--- a/crates/prover/src/protocols/fracaddcheck.rs
+++ b/crates/prover/src/protocols/fracaddcheck.rs
@@ -86,12 +86,12 @@ where
                                (num_0.as_ref(), den_0.as_ref(), num_1.as_ref(), den_1.as_ref())
                                        .into_par_iter()
                                        .map(|(&a_0, &b_0, &a_1, &b_1)| (a_0 * b_1 + a_1 * b_0, b_0 * b_1))
-                                       .collect();
+                                       .unzip::<_, _, Vec<_>, Vec<_>>();
 
                        let next_layer = (
-                               FieldBuffer::new(num.log_len() - 1, next_layer_num)
+                               FieldBuffer::new(num.log_len() - 1, next_layer_num.into_boxed_slice())
                                        .expect("Should be half of previous layer"),
-                               FieldBuffer::new(den.log_len() - 1, next_layer_den)
+                               FieldBuffer::new(den.log_len() - 1, next_layer_den.into_boxed_slice())
                                        .expect("Should be half of previous layer"),
                        );
  1. Cargo fmt actually needs the nightly toolchain. See [chore] Update documentation about nightly cargo fmt #1367.

Once CI is passing, I'll merge.

@jimpo
Copy link
Collaborator

jimpo commented Jan 4, 2026

Fixes #1351

@jimpo jimpo merged commit e476a76 into binius-zk:main Jan 4, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants