Skip to content

Commit 25ac945

Browse files
committed
Review comments
1 parent dd00d8e commit 25ac945

File tree

3 files changed

+7
-16
lines changed

3 files changed

+7
-16
lines changed

src/arithmetic.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -236,14 +236,12 @@ pub(crate) fn powers<F: Field>(base: F) -> impl Iterator<Item = F> {
236236
}
237237

238238
/// Multi scalar multiplication engine
239-
pub trait MSM<C: PrimeCurveAffine>: Clone + Debug + Send + Sync {
239+
pub trait MSM<C: PrimeCurveAffine>: Clone + Debug + Send + Sized + Sync {
240240
/// Add arbitrary term (the scalar and the point)
241241
fn append_term(&mut self, scalar: C::Scalar, point: C::Curve);
242242

243243
/// Add another multiexp into this one
244-
fn add_msm(&mut self, other: &Self)
245-
where
246-
Self: Sized;
244+
fn add_msm(&mut self, other: &Self);
247245

248246
/// Scale all scalars in the MSM by some scaling factor
249247
fn scale(&mut self, factor: C::Scalar);

src/plonk/prover.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,6 @@ where
476476
let vanishing = vanishing.construct::<CS, T>(params, domain, h_poly, transcript)?;
477477

478478
let x: F = transcript.squeeze_challenge();
479-
let xn = x.pow([params.n()]);
480479

481480
// Compute and hash advice evals for each circuit instance
482481
for advice in advice.iter() {
@@ -512,7 +511,7 @@ where
512511
transcript.write(eval)?;
513512
}
514513

515-
let vanishing = vanishing.evaluate(x, xn, domain, transcript)?;
514+
let vanishing = vanishing.evaluate(x, transcript)?;
516515

517516
// Evaluate common permutation data
518517
pk.permutation.evaluate(x, transcript)?;

src/plonk/vanishing/prover.rs

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -125,26 +125,20 @@ impl<F: PrimeField> Constructed<F> {
125125
pub(in crate::plonk) fn evaluate<T: Transcript>(
126126
self,
127127
x: F,
128-
_xn: F,
129-
_domain: &EvaluationDomain<F>,
130128
transcript: &mut T,
131129
) -> Result<Evaluated<F>, Error>
132130
where
133131
F: Hashable<T::Hash> + SerdeObject,
134132
{
135-
self.h_pieces
136-
.iter()
137-
// .fold(domain.empty_coeff(), |acc, eval| acc * xn + eval);
138-
.try_for_each(|p| {
139-
let random_eval = eval_polynomial(p, x);
140-
transcript.write(&random_eval)
141-
})?;
133+
self.h_pieces.iter().try_for_each(|p| {
134+
let eval = eval_polynomial(p, x);
135+
transcript.write(&eval)
136+
})?;
142137

143138
let random_eval = eval_polynomial(&self.committed.random_poly, x);
144139
transcript.write(&random_eval)?;
145140

146141
Ok(Evaluated {
147-
// h_poly,
148142
h_pieces: self.h_pieces,
149143
committed: self.committed,
150144
})

0 commit comments

Comments
 (0)