Skip to content

Commit

Permalink
Ensure downsize trims when required.
Browse files Browse the repository at this point in the history
  • Loading branch information
tkerber committed Apr 29, 2024
1 parent 2a0b0bd commit 9988f8a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions halo2_proofs/src/poly/kzg/commitment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -475,9 +475,12 @@ where
}

fn downsize(&mut self, k: u32) {
assert!(k <= self.k);
let n = 1 << k;
if n < self.trimed_size {
*self = self.clone().trim(n as usize);
}
self.k = k;
self.n = 1 << k;
self.n = n as u64;
}

fn empty_msm(&'params self) -> MSMKZG<E> {
Expand Down

0 comments on commit 9988f8a

Please sign in to comment.