implemented geometric_till in gnark and some small optimizations#274
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Implements the geometricTill (“geometric_till”) approach for evaluating public-input geometric weights inside the gnark recursive verifier, and applies small constraint-count optimizations by precomputing RLC powers in batch paths.
Changes:
- Add
geometricTilland switchcomputePublicWeightEvaluationto use it (replacing the O(2^m) EQ-polynomial dot product). - Optimize batch RLC combinations by precomputing powers (γ powers in
RunZKWhirBatch, and B powers inrlcBatchedLeaves). - Extend test/fixture parsing to include
public_weights_evaluationsand adjust witness linear statement sizing when public inputs are present; add a new benchmark/test file for constraint comparisons.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| recursive-verifier/app/circuit/whir.go | Precomputes γ powers once and reuses them for batch RLC combinations to reduce repeated multiplications. |
| recursive-verifier/app/circuit/mtUtilities.go | Precomputes B powers in rlcBatchedLeaves to avoid recomputing powers per element. |
| recursive-verifier/app/circuit/matrix_evaluation.go | Adds geometricTill implementation for O(k) MLE evaluation of geometric vectors; introduces fmt import. |
| recursive-verifier/app/circuit/circuit.go | Switches public weight evaluation to geometricTill and removes the unused m parameter. |
| recursive-verifier/app/circuit/circuit_test.go | Parses public_weights_evaluations, allocates/assigns PublicInputs and PubWitnessEvaluations, and adjusts witness eval sizing when public inputs exist. |
| recursive-verifier/app/circuit/public_weight_bench_test.go | Adds new tests/benchmarks comparing naive vs optimized approaches (constraint counts + Groth16 benchmark). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ashpect
requested changes
Feb 9, 2026
ashpect
approved these changes
Feb 9, 2026
dcbuild3r
pushed a commit
that referenced
this pull request
May 16, 2026
implemented geometric_till in gnark and some small optimizations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
resolves #258
Implements
geometricTilloptimization for computing multilinear extension of geometric sequences in gnark circuits.Changes
geometricTillalgorithmPerformance
Constraint reduction scales with domain size:
Reduced zkPassport attestation circuit
t_attestfrom 5,252,539 → 5,114,167 constraints (~138k reduction, ~2.6% improvement).