feat: evaluate at zeta wo FFTs#14
Merged
Merged
Conversation
Contributor
|
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.
@gbotrel this is a variation of PR #8 . On my laptop it seems to be more efficient by a large margin (I kept your parallelisation layout, but I am using Lagrange evaluation now, with precomputed values per size). Can you confirm the gain ?
Note
Medium Risk
Changes a core proof-generation step (evaluations at ζ) with a new numerical path; correctness is covered by tests against the old evaluator, but any mismatch would break proofs.
Overview
Replaces FFT-based zeta evaluation in the prover’s
ComputeEvaluationsAtZetaphase with direct Lagrange interpolation at the challenge point ζ.Adds
LagrangesAtZetato precompute all basis valuesL_i(ζ)once per domain size (with batch inversion), plusEvaluateLagrangeAtExt/ExtEvaluateLagrangeAtExtto evaluate base and extension trace polynomials via a weighted sum over Lagrange values. Rotated columns are handled by indexing the cached basis with a shift instead of multiplying ζ by ω^shift and running the old evaluator.The prover now caches Lagrange weights per module size, builds one eval task per polynomial, and parallelizes per task (not per module). Size-1 (constant) columns still read the single coefficient directly. Tests assert the new path matches the previous
EvaluateAtExtresults.Reviewed by Cursor Bugbot for commit be34a77. Bugbot is set up for automated code reviews on this repo. Configure here.