Skip to content

Commit

Permalink
Remove self from compute_aggregate_witness
Browse files Browse the repository at this point in the history
  • Loading branch information
xevisalle committed Jul 2, 2024
1 parent eae261b commit 7e6e4a2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
8 changes: 5 additions & 3 deletions src/commitment_scheme/kzg10/key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ impl CommitKey {
/// We apply the same optimization mentioned in when computing each witness;
/// removing f(z).
pub(crate) fn compute_aggregate_witness(
&self,
polynomials: &[Polynomial],
point: &BlsScalar,
transcript: &mut Transcript,
Expand Down Expand Up @@ -392,8 +391,11 @@ mod test {
}

// Compute the aggregate witness for polynomials
let witness_poly =
ck.compute_aggregate_witness(polynomials, point, transcript);
let witness_poly = CommitKey::compute_aggregate_witness(
polynomials,
point,
transcript,
);

// Commit to witness polynomial
let witness_commitment = ck.commit(&witness_poly)?;
Expand Down
13 changes: 6 additions & 7 deletions src/compiler/prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ impl Prover {

// compute aggregate witness to polynomials evaluated at the evaluation
// challenge z. The challenge v is selected inside
let aggregate_witness = self.commit_key.compute_aggregate_witness(
let aggregate_witness = CommitKey::compute_aggregate_witness(
&[
quot,
r_poly,
Expand All @@ -512,12 +512,11 @@ impl Prover {

// compute aggregate witness to polynomials evaluated at the shifted
// evaluation challenge
let shifted_aggregate_witness =
self.commit_key.compute_aggregate_witness(
&[z_poly, a_w_poly, b_w_poly, d_w_poly],
&(z_challenge * domain.group_gen),
&mut transcript,
);
let shifted_aggregate_witness = CommitKey::compute_aggregate_witness(
&[z_poly, a_w_poly, b_w_poly, d_w_poly],
&(z_challenge * domain.group_gen),
&mut transcript,
);
let w_z_chall_w_comm =
self.commit_key.commit(&shifted_aggregate_witness)?;

Expand Down

0 comments on commit 7e6e4a2

Please sign in to comment.