Conversation
decomment
Zyouell
requested changes
Feb 19, 2026
Zyouell
left a comment
There was a problem hiding this comment.
Great job on the GPU stuff. Just a couple of things on my end to do with if we are still using some of the functions defined for GPU.
| /// Evaluate a polynomial (given as a coefficient slice) at a point using Horner's method. | ||
| /// Equivalent to `DensePolynomial::eval_as_univariate` but operates on `&[F]` directly, | ||
| /// avoiding the need to wrap data in a `DensePolynomial`. | ||
| fn eval_as_univariate(coeffs: &[Fr], r: &Fr) -> Fr { |
There was a problem hiding this comment.
This isn't actually using Horner's method to evaluate the poly. Horners method would be:
let mut output = coeffs[coeffs.len() - 1];
for z in coeffs.iter().rev().skip(1) {
output *= r;
output += z;
}
output
nicholas-mainardi
approved these changes
Feb 19, 2026
Contributor
nicholas-mainardi
left a comment
There was a problem hiding this comment.
LGTM! Just few minor comments on CPU code duplication and on tests
dp-crypto/src/arkyper/mod.rs
Outdated
| let (pk, _): (HyperKZGProverKey<Bn254>, HyperKZGVerifierKey<Bn254>) = srs.trim(n); | ||
|
|
||
| let cpu_commit = msm::batch_poly_msm::<G1Affine>(pk.g1_powers(), &[&poly]).unwrap()[0]; | ||
| let gpu_commit = HyperKZG::<Bn254>::commit(&pk, &poly).unwrap().0; |
Contributor
There was a problem hiding this comment.
Are you sure this is using the GPU variant? Shouldn't we use HyperKZGGpu here rather than HyperKZG?
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.
No description provided.