refactor: extract DomainConstants struct#573
Merged
Merged
Conversation
Group the four precomputed barycentric interpolation values (coset points, offset^N, 1/N, 1/offset^N) into a DomainConstants struct with a from_domain constructor. This reduces get_trace_evaluations_from_lde from 10 parameters to 6 and removes the clippy::too_many_arguments suppression.
|
Clean refactor. Two minor issues flagged inline:
No security or correctness issues. The |
Codex Code ReviewNo issues found in the PR diff. I also attempted a targeted |
ColoCarletti
approved these changes
Apr 30, 2026
The previous message ("hence non-zero in the field") overstated the
guarantee — it only holds when char(F) does not divide n. Reword to
state the actual precondition.
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.
Summary
DomainConstants<F>indomain.rs— groups the four precomputed barycentric interpolation values (points,offset_pow_n,size_inv,offset_pow_n_inv) with afrom_domainconstructorget_trace_evaluations_from_ldefrom 10 parameters to 6, removing the#[allow(clippy::too_many_arguments)]suppressionprover.rs) withDomainConstants::from_domain(domain)Test plan
cargo test -p stark --lib)barycentric_trace_eval_matches_horner_trace_eval— verifies the refactored path matches Horner evaluationtest_deep_poly_direct_2n_matches_interpolate_fft_extend— verifies DEEP poly direct 2N pathPure refactor, no behavioral changes.