diff --git a/algorithms/src/polycommit/sonic_pc/data_structures.rs b/algorithms/src/polycommit/sonic_pc/data_structures.rs index 703873b744..5ee1c39f14 100644 --- a/algorithms/src/polycommit/sonic_pc/data_structures.rs +++ b/algorithms/src/polycommit/sonic_pc/data_structures.rs @@ -54,7 +54,7 @@ pub struct CommitterKey { pub powers_of_beta_g: Vec, /// 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>>, /// The key used to commit to hiding polynomials. @@ -296,14 +296,14 @@ impl ToBytes for CommitterKey { } impl CommitterKey { - /// 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, degree_info: &DegreeInfo) -> Result<()> { let trim_time = start_timer!(|| "Trimming public parameters"); @@ -456,7 +456,7 @@ impl CommitterKey { Ok(()) } - /// Obtain powers for the underlying KZG10 construction + /// Obtain powers for the underlying KZG10 construction. pub fn powers(&self) -> kzg10::Powers { kzg10::Powers { powers_of_beta_g: self.powers_of_beta_g.as_slice().into(), @@ -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) diff --git a/algorithms/src/snark/varuna/varuna.rs b/algorithms/src/snark/varuna/varuna.rs index 3ba7790c48..d5eb381185 100644 --- a/algorithms/src/snark/varuna/varuna.rs +++ b/algorithms/src/snark/varuna/varuna.rs @@ -62,9 +62,9 @@ impl, 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>( srs: &UniversalSRS, universal_prover: &mut UniversalProver, @@ -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, @@ -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>( universal_verifier: &Self::UniversalVerifier, fs_parameters: &Self::FSParameters,