Skip to content
Draft
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
18 changes: 9 additions & 9 deletions algorithms/src/polycommit/sonic_pc/data_structures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ pub struct CommitterKey<E: PairingEngine> {
pub powers_of_beta_g: Vec<E::G1Affine>,

/// The key used to commit to polynomials in Lagrange basis.
/// This is `None` if `self` does not support lagrange bases
/// This is `None` if `self` does not support lagrange bases.
pub lagrange_bases_at_beta_g: Option<BTreeMap<usize, Vec<E::G1Affine>>>,

/// The key used to commit to hiding polynomials.
Expand Down Expand Up @@ -296,14 +296,14 @@ impl<E: PairingEngine> ToBytes for CommitterKey<E> {
}

impl<E: PairingEngine> CommitterKey<E> {
/// Update the committer_key
/// Update the committer_key.
/// The `powers_of_beta_g` and `shifted_powers_of_beta_g` may grow or shrink
/// as per the new supported_degree The `enforced_degree_bounds` and
/// as per the new supported_degree. The `enforced_degree_bounds` and
/// `shifted_powers_of_beta_times_gamma_g` will adjust to the new
/// degree_bounds The `lagrange_bases_at_beta_g` will optionally adjust
/// to the new degree_bounds The `powers_of_beta_times_gamma_g` is only
/// dependent on the `hiding_bound` so doesn't change This only works if
/// the SRS max_degree is fixed across specializations Note that this
/// degree_bounds. The `lagrange_bases_at_beta_g` will optionally adjust
/// to the new degree_bounds. The `powers_of_beta_times_gamma_g` is only
/// dependent on the `hiding_bound` so doesn't change. This only works if
/// the SRS max_degree is fixed across specializations. Note that this
/// implementation is not atomic. If specialize fails halfway through,
pub fn update(&mut self, srs: &UniversalParams<E>, degree_info: &DegreeInfo) -> Result<()> {
let trim_time = start_timer!(|| "Trimming public parameters");
Expand Down Expand Up @@ -456,7 +456,7 @@ impl<E: PairingEngine> CommitterKey<E> {
Ok(())
}

/// Obtain powers for the underlying KZG10 construction
/// Obtain powers for the underlying KZG10 construction.
pub fn powers(&self) -> kzg10::Powers<E> {
kzg10::Powers {
powers_of_beta_g: self.powers_of_beta_g.as_slice().into(),
Expand Down Expand Up @@ -585,7 +585,7 @@ impl fmt::Debug for LCTerm {
}

impl LCTerm {
/// Returns `true` if `self == LCTerm::One`
/// Returns `true` if `self == LCTerm::One`.
#[inline]
pub fn is_one(&self) -> bool {
matches!(self, LCTerm::One)
Expand Down
12 changes: 6 additions & 6 deletions algorithms/src/snark/varuna/varuna.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ impl<E: PairingEngine, FS: AlgebraicSponge<E::Fq, 2>, SM: SNARKMode> VarunaSNARK
/// Used to personalize the Fiat-Shamir RNG.
pub const PROTOCOL_NAME: &'static [u8] = b"VARUNA-2023";

/// Creates a set of proving and verifying keys for a set of circuits
/// We commit to each circuit's index polys separately
/// Performing a single batch commitment can be a future optimization
/// Creates a set of proving and verifying keys for a set of circuits.
/// We commit to each circuit's index polys separately.
/// Performing a single batch commitment can be a future optimization.
pub fn batch_circuit_setup<C: ConstraintSynthesizer<E::Fr>>(
srs: &UniversalSRS<E>,
universal_prover: &mut UniversalProver<E>,
Expand Down Expand Up @@ -228,7 +228,7 @@ where
}

/// Prove that the verifying key commitments commit to the indexed circuit's
/// polynomials
/// polynomials.
fn prove_vk(
universal_prover: &Self::UniversalProver,
fs_parameters: &Self::FSParameters,
Expand Down Expand Up @@ -273,8 +273,8 @@ where
}

/// Verify that the verifying key commitments commit to the indexed
/// circuit's polynomials Verify that the verifying key's circuit_info
/// is correct
/// circuit's polynomials. Verify that the verifying key's circuit_info
/// is correct.
fn verify_vk<C: ConstraintSynthesizer<Self::ScalarField>>(
universal_verifier: &Self::UniversalVerifier,
fs_parameters: &Self::FSParameters,
Expand Down