Skip to content
Closed
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
6 changes: 3 additions & 3 deletions poly-commit/src/kzg10/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -488,10 +488,10 @@ mod tests {
impl<E: Pairing, P: DenseUVPolynomial<E::ScalarField>> KZG10<E, P> {
/// Specializes the public parameters for a given maximum degree `d` for polynomials
/// `d` should be less that `pp.max_degree()`.
pub(crate) fn trim(
pp: &UniversalParams<E>,
pub(crate) fn trim<'a>(
pp: &'a UniversalParams<E>,
mut supported_degree: usize,
) -> Result<(Powers<E>, VerifierKey<E>), Error> {
) -> Result<(Powers<'a, E>, VerifierKey<E>), Error> {
if supported_degree == 1 {
supported_degree += 1;
}
Expand Down
8 changes: 4 additions & 4 deletions poly-commit/src/sonic_pc/data_structures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,18 @@ pub struct CommitterKey<E: Pairing> {

impl<E: Pairing> CommitterKey<E> {
/// Obtain powers for the underlying KZG10 construction
pub fn powers(&self) -> kzg10::Powers<E> {
pub fn powers<'a>(&'a self) -> kzg10::Powers<'a, E> {
kzg10::Powers {
powers_of_g: self.powers_of_g.as_slice().into(),
powers_of_gamma_g: self.powers_of_gamma_g.as_slice().into(),
}
}

/// Obtain powers for committing to shifted polynomials.
pub fn shifted_powers(
&self,
pub fn shifted_powers<'a>(
&'a self,
degree_bound: impl Into<Option<usize>>,
) -> Option<kzg10::Powers<E>> {
) -> Option<kzg10::Powers<'a, E>> {
match (&self.shifted_powers_of_g, &self.shifted_powers_of_gamma_g) {
(Some(shifted_powers_of_g), Some(shifted_powers_of_gamma_g)) => {
let max_bound = self
Expand Down
Loading