Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zf/pcs trait minor change #188

Merged
merged 1 commit into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion poly_commit/src/orion/pcs_for_expander_gkr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ where
poly: &impl MultilinearExtension<C::SimdCircuitField>,
eval_point: &ExpanderGKRChallenge<C>,
transcript: &mut T, // add transcript here to allow interactive arguments
scratch_pad: &mut Self::ScratchPad,
scratch_pad: &Self::ScratchPad,
) -> Self::Opening {
let num_vars_each_core = *params + C::SimdCircuitField::PACK_SIZE.ilog2() as usize;
assert_eq!(num_vars_each_core, proving_key.num_vars);
Expand Down
4 changes: 2 additions & 2 deletions poly_commit/src/orion/pcs_trait_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ where
proving_key: &<Self::SRS as StructuredReferenceString>::PKey,
poly: &Self::Poly,
x: &Self::EvalPoint,
scratch_pad: &mut Self::ScratchPad,
scratch_pad: &Self::ScratchPad,
transcript: &mut T,
) -> (EvalF, Self::Opening) {
assert_eq!(*params, proving_key.num_vars);
Expand Down Expand Up @@ -174,7 +174,7 @@ where
proving_key: &<Self::SRS as StructuredReferenceString>::PKey,
poly: &Self::Poly,
x: &Self::EvalPoint,
scratch_pad: &mut Self::ScratchPad,
scratch_pad: &Self::ScratchPad,
transcript: &mut T,
) -> (EvalF, Self::Opening) {
assert_eq!(*params, proving_key.num_vars);
Expand Down
10 changes: 3 additions & 7 deletions poly_commit/src/raw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,16 +100,12 @@ impl<F: ExtensionField, T: Transcript<F>> PolynomialCommitmentScheme<F, T> for R
_proving_key: &<Self::SRS as StructuredReferenceString>::PKey,
poly: &Self::Poly,
x: &Self::EvalPoint,
scratch_pad: &mut Self::ScratchPad,
_scratch_pad: &Self::ScratchPad,
_transcript: &mut T,
) -> (F, Self::Opening) {
assert!(x.len() == params.n_vars);
(
MultiLinearPoly::<F>::evaluate_with_buffer(
&poly.coeffs,
x,
&mut scratch_pad.eval_buffer,
),
MultiLinearPoly::<F>::evaluate_jolt(poly, x),
Self::Opening::default(),
)
}
Expand Down Expand Up @@ -217,7 +213,7 @@ impl<C: GKRFieldConfig, T: Transcript<C::ChallengeField>> PCSForExpanderGKR<C, T
_poly: &impl MultilinearExtension<C::SimdCircuitField>,
_x: &ExpanderGKRChallenge<C>,
_transcript: &mut T,
_scratch_pad: &mut Self::ScratchPad,
_scratch_pad: &Self::ScratchPad,
) -> Self::Opening {
// For GKR, we don't need the evaluation result
Self::Opening::default()
Expand Down
4 changes: 2 additions & 2 deletions poly_commit/src/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pub trait PolynomialCommitmentScheme<F: ExtensionField, T: Transcript<F>> {
proving_key: &<Self::SRS as StructuredReferenceString>::PKey,
poly: &Self::Poly,
x: &Self::EvalPoint,
scratch_pad: &mut Self::ScratchPad,
scratch_pad: &Self::ScratchPad,
transcript: &mut T,
) -> (F, Self::Opening);

Expand Down Expand Up @@ -151,7 +151,7 @@ pub trait PCSForExpanderGKR<C: GKRFieldConfig, T: Transcript<C::ChallengeField>>
poly: &impl MultilinearExtension<C::SimdCircuitField>,
x: &ExpanderGKRChallenge<C>,
transcript: &mut T, // add transcript here to allow interactive arguments
scratch_pad: &mut Self::ScratchPad,
scratch_pad: &Self::ScratchPad,
) -> Self::Opening;

/// Verify the opening of a polynomial at a point.
Expand Down
Loading