From 10bc1f68ffe2ae4a7d1730c9ea4c17ccfa8163ab Mon Sep 17 00:00:00 2001 From: arnaucube Date: Sun, 25 Feb 2024 10:25:51 +0100 Subject: [PATCH] Apply typos suggestions --- .github/workflows/typos.toml | 1 - folding-schemes/examples/multi_inputs.rs | 10 +++---- folding-schemes/examples/sha256.rs | 4 +-- folding-schemes/examples/utils.rs | 2 +- folding-schemes/src/ccs/r1cs.rs | 2 +- folding-schemes/src/commitment/kzg.rs | 4 +-- .../src/folding/circuits/nonnative.rs | 2 +- .../src/folding/hypernova/lcccs.rs | 4 +-- folding-schemes/src/folding/nova/circuits.rs | 2 +- .../src/folding/nova/decider_eth.rs | 2 +- folding-schemes/src/folding/nova/mod.rs | 4 +-- folding-schemes/src/folding/nova/nifs.rs | 26 +++++++++---------- .../src/folding/protogalaxy/folding.rs | 6 ++--- folding-schemes/src/lib.rs | 4 +-- 14 files changed, 36 insertions(+), 37 deletions(-) diff --git a/.github/workflows/typos.toml b/.github/workflows/typos.toml index 7983df75..3c432fa5 100644 --- a/.github/workflows/typos.toml +++ b/.github/workflows/typos.toml @@ -3,5 +3,4 @@ extend-ignore-identifiers-re = [ ] [default.extend-words] -# Don't correct the surname "Teh" groth = "groth" diff --git a/folding-schemes/examples/multi_inputs.rs b/folding-schemes/examples/multi_inputs.rs index 4d5fc55b..fea52929 100644 --- a/folding-schemes/examples/multi_inputs.rs +++ b/folding-schemes/examples/multi_inputs.rs @@ -58,12 +58,12 @@ impl FCircuit for MultiInputsFCircuit { z_i: Vec>, ) -> Result>, SynthesisError> { let four = FpVar::::new_constant(cs.clone(), F::from(4u32))?; - let fourty = FpVar::::new_constant(cs.clone(), F::from(40u32))?; + let forty = FpVar::::new_constant(cs.clone(), F::from(40u32))?; let onehundred = FpVar::::new_constant(cs.clone(), F::from(100u32))?; let a = z_i[0].clone() + four.clone(); - let b = z_i[1].clone() + fourty.clone(); + let b = z_i[1].clone() + forty.clone(); let c = z_i[2].clone() * four; - let d = z_i[3].clone() * fourty; + let d = z_i[3].clone() * forty; let e = z_i[4].clone() + onehundred; Ok(vec![a, b, c, d, e]) @@ -140,7 +140,7 @@ fn main() { println!("Nova::prove_step {}: {:?}", i, start.elapsed()); } - let (running_instance, incomming_instance, cyclefold_instance) = folding_scheme.instances(); + let (running_instance, incoming_instance, cyclefold_instance) = folding_scheme.instances(); println!("Run the Nova's IVC verifier"); NOVA::verify( @@ -149,7 +149,7 @@ fn main() { folding_scheme.state(), // latest state Fr::from(num_steps as u32), running_instance, - incomming_instance, + incoming_instance, cyclefold_instance, ) .unwrap(); diff --git a/folding-schemes/examples/sha256.rs b/folding-schemes/examples/sha256.rs index 4a179459..a1f8e828 100644 --- a/folding-schemes/examples/sha256.rs +++ b/folding-schemes/examples/sha256.rs @@ -125,7 +125,7 @@ fn main() { println!("Nova::prove_step {}: {:?}", i, start.elapsed()); } - let (running_instance, incomming_instance, cyclefold_instance) = folding_scheme.instances(); + let (running_instance, incoming_instance, cyclefold_instance) = folding_scheme.instances(); println!("Run the Nova's IVC verifier"); NOVA::verify( @@ -134,7 +134,7 @@ fn main() { folding_scheme.state(), // latest state Fr::from(num_steps as u32), running_instance, - incomming_instance, + incoming_instance, cyclefold_instance, ) .unwrap(); diff --git a/folding-schemes/examples/utils.rs b/folding-schemes/examples/utils.rs index b5fee5e8..c1bdc934 100644 --- a/folding-schemes/examples/utils.rs +++ b/folding-schemes/examples/utils.rs @@ -13,7 +13,7 @@ use folding_schemes::transcript::poseidon::poseidon_test_config; // This method computes the Prover & Verifier parameters for the example. // Warning: this method is only for testing purposes. For a real world use case those parameters -// should be generated carefuly (both the PoseidonConfig and the PedersenParams). +// should be generated carefully (both the PoseidonConfig and the PedersenParams). #[allow(clippy::type_complexity)] pub(crate) fn test_nova_setup>( F_circuit: FC, diff --git a/folding-schemes/src/ccs/r1cs.rs b/folding-schemes/src/ccs/r1cs.rs index 6e85ebd5..4d0f0d13 100644 --- a/folding-schemes/src/ccs/r1cs.rs +++ b/folding-schemes/src/ccs/r1cs.rs @@ -97,7 +97,7 @@ pub fn extract_r1cs(cs: &ConstraintSystem) -> R1CS { }; R1CS:: { - l: cs.num_instance_variables - 1, // -1 to substract the first '1' + l: cs.num_instance_variables - 1, // -1 to subtract the first '1' A, B, C, diff --git a/folding-schemes/src/commitment/kzg.rs b/folding-schemes/src/commitment/kzg.rs index debab156..fdb66015 100644 --- a/folding-schemes/src/commitment/kzg.rs +++ b/folding-schemes/src/commitment/kzg.rs @@ -80,7 +80,7 @@ where /// commit implements the CommitmentProver commit interface, adapting the implementation from /// https://github.com/arkworks-rs/poly-commit/tree/c724fa666e935bbba8db5a1421603bab542e15ab/poly-commit/src/kzg10/mod.rs#L178 - /// with the main difference being the removal of the blinding factors and the no-dependancy to + /// with the main difference being the removal of the blinding factors and the no-dependency to /// the Pairing trait. fn commit( params: &Self::Params, @@ -105,7 +105,7 @@ where /// prove implements the CommitmentProver prove interface, adapting the implementation from /// https://github.com/arkworks-rs/poly-commit/tree/c724fa666e935bbba8db5a1421603bab542e15ab/poly-commit/src/kzg10/mod.rs#L307 - /// with the main difference being the removal of the blinding factors and the no-dependancy to + /// with the main difference being the removal of the blinding factors and the no-dependency to /// the Pairing trait. fn prove( params: &Self::Params, diff --git a/folding-schemes/src/folding/circuits/nonnative.rs b/folding-schemes/src/folding/circuits/nonnative.rs index d6b1c991..c8c695a1 100644 --- a/folding-schemes/src/folding/circuits/nonnative.rs +++ b/folding-schemes/src/folding/circuits/nonnative.rs @@ -10,7 +10,7 @@ use ark_relations::r1cs::{Namespace, SynthesisError}; use ark_std::{One, Zero}; use core::borrow::Borrow; -/// NonNativeAffineVar represents an elliptic curve point in Affine represenation in the non-native +/// NonNativeAffineVar represents an elliptic curve point in Affine representation in the non-native /// field, over the constraint field. It is not intended to perform operations, but just to contain /// the affine coordinates in order to perform hash operations of the point. #[derive(Debug, Clone)] diff --git a/folding-schemes/src/folding/hypernova/lcccs.rs b/folding-schemes/src/folding/hypernova/lcccs.rs index f7c25270..c45841c6 100644 --- a/folding-schemes/src/folding/hypernova/lcccs.rs +++ b/folding-schemes/src/folding/hypernova/lcccs.rs @@ -133,7 +133,7 @@ pub mod tests { let pedersen_params = Pedersen::::new_params(&mut rng, ccs.n - ccs.l - 1); let (lcccs, _) = ccs.to_lcccs(&mut rng, &pedersen_params, &z).unwrap(); - // with our test vector comming from R1CS, v should have length 3 + // with our test vector coming from R1CS, v should have length 3 assert_eq!(lcccs.v.len(), 3); let vec_L_j_x = lcccs.compute_Ls(&ccs, &z); @@ -164,7 +164,7 @@ pub mod tests { let pedersen_params = Pedersen::::new_params(&mut rng, ccs.n - ccs.l - 1); // Compute v_j with the right z let (lcccs, _) = ccs.to_lcccs(&mut rng, &pedersen_params, &z).unwrap(); - // with our test vector comming from R1CS, v should have length 3 + // with our test vector coming from R1CS, v should have length 3 assert_eq!(lcccs.v.len(), 3); // Bad compute L_j(x) with the bad z diff --git a/folding-schemes/src/folding/nova/circuits.rs b/folding-schemes/src/folding/nova/circuits.rs index a1a4302c..51eab0e4 100644 --- a/folding-schemes/src/folding/nova/circuits.rs +++ b/folding-schemes/src/folding/nova/circuits.rs @@ -445,7 +445,7 @@ where (cf_u_i.cmE.is_zero()?).conditional_enforce_equal(&Boolean::TRUE, &is_not_basecase)?; (cf_u_i.u.is_one()?).conditional_enforce_equal(&Boolean::TRUE, &is_not_basecase)?; - // check the fold of all the parameteres of the CycleFold instances, where the elliptic + // check the fold of all the parameters of the CycleFold instances, where the elliptic // curve points relations are checked natively in Curve1 circuit (this one) let v = NIFSFullGadget::::verify( cf_r_bits, diff --git a/folding-schemes/src/folding/nova/decider_eth.rs b/folding-schemes/src/folding/nova/decider_eth.rs index 4aadf157..6c07a088 100644 --- a/folding-schemes/src/folding/nova/decider_eth.rs +++ b/folding-schemes/src/folding/nova/decider_eth.rs @@ -50,7 +50,7 @@ where ::ScalarField: Absorb, C1: CurveGroup, for<'b> &'b GC2: GroupOpsBounds<'b, C2, GC2>, - // constrain FS into Nova, since this is a Decider specificly for Nova + // constrain FS into Nova, since this is a Decider specifically for Nova Nova: From, { type ProverParam = S::ProvingKey; diff --git a/folding-schemes/src/folding/nova/mod.rs b/folding-schemes/src/folding/nova/mod.rs index 203b0232..d7c21bce 100644 --- a/folding-schemes/src/folding/nova/mod.rs +++ b/folding-schemes/src/folding/nova/mod.rs @@ -491,11 +491,11 @@ where z_i: Vec, // last state num_steps: C1::ScalarField, running_instance: Self::CommittedInstanceWithWitness, - incomming_instance: Self::CommittedInstanceWithWitness, + incoming_instance: Self::CommittedInstanceWithWitness, cyclefold_instance: Self::CFCommittedInstanceWithWitness, ) -> Result<(), Error> { let (U_i, W_i) = running_instance; - let (u_i, w_i) = incomming_instance; + let (u_i, w_i) = incoming_instance; let (cf_U_i, cf_W_i) = cyclefold_instance; if u_i.x.len() != 1 || U_i.x.len() != 1 { diff --git a/folding-schemes/src/folding/nova/nifs.rs b/folding-schemes/src/folding/nova/nifs.rs index b95053f2..212f75c7 100644 --- a/folding-schemes/src/folding/nova/nifs.rs +++ b/folding-schemes/src/folding/nova/nifs.rs @@ -161,7 +161,7 @@ where NIFS::::fold_committed_instance(r, ci1, ci2, cmT) } - /// Verify commited folded instance (ci) relations. Notice that this method does not open the + /// Verify committed folded instance (ci) relations. Notice that this method does not open the /// commitments, but just checks that the given committed instances (ci1, ci2) when folded /// result in the folded committed instance (ci3) values. pub fn verify_folded_instance( @@ -426,16 +426,16 @@ pub mod tests { let num_iters = 10; for i in 0..num_iters { - // prepare the incomming instance - let incomming_instance_z = get_test_z(i + 4); - let (w, x) = r1cs.split_z(&incomming_instance_z); - let incomming_instance_w = Witness::::new(w.clone(), r1cs.A.n_rows); - let incomming_committed_instance = incomming_instance_w + // prepare the incoming instance + let incoming_instance_z = get_test_z(i + 4); + let (w, x) = r1cs.split_z(&incoming_instance_z); + let incoming_instance_w = Witness::::new(w.clone(), r1cs.A.n_rows); + let incoming_committed_instance = incoming_instance_w .commit::>(&pedersen_params, x) .unwrap(); r1cs.check_relaxed_instance_relation( - &incomming_instance_w, - &incomming_committed_instance, + &incoming_instance_w, + &incoming_committed_instance, ) .unwrap(); @@ -447,16 +447,16 @@ pub mod tests { &r1cs, &running_instance_w, &running_committed_instance, - &incomming_instance_w, - &incomming_committed_instance, + &incoming_instance_w, + &incoming_committed_instance, ) .unwrap(); let (folded_w, _) = NIFS::>::fold_instances( r, &running_instance_w, &running_committed_instance, - &incomming_instance_w, - &incomming_committed_instance, + &incoming_instance_w, + &incoming_committed_instance, &T, cmT, ) @@ -466,7 +466,7 @@ pub mod tests { let folded_committed_instance = NIFS::>::verify( r, &running_committed_instance, - &incomming_committed_instance, + &incoming_committed_instance, &cmT, ); diff --git a/folding-schemes/src/folding/protogalaxy/folding.rs b/folding-schemes/src/folding/protogalaxy/folding.rs index 192b292d..1c421b71 100644 --- a/folding-schemes/src/folding/protogalaxy/folding.rs +++ b/folding-schemes/src/folding/protogalaxy/folding.rs @@ -40,7 +40,7 @@ where // running instance instance: &CommittedInstance, w: &Witness, - // incomming instances + // incoming instances vec_instances: &[CommittedInstance], vec_w: &[Witness], ) -> Result< @@ -226,7 +226,7 @@ where r1cs: &R1CS, // running instance instance: &CommittedInstance, - // incomming instances + // incoming instances vec_instances: &[CommittedInstance], // polys from P F_coeffs: Vec, @@ -440,7 +440,7 @@ mod tests { assert!(!is_zero_vec(&f_w)); } - // k represents the number of instances to be fold, appart from the running instance + // k represents the number of instances to be fold, apart from the running instance #[allow(clippy::type_complexity)] fn prepare_inputs( k: usize, diff --git a/folding-schemes/src/lib.rs b/folding-schemes/src/lib.rs index c8b967c0..256e92af 100644 --- a/folding-schemes/src/lib.rs +++ b/folding-schemes/src/lib.rs @@ -42,7 +42,7 @@ pub enum Error { NotExpectedLength(usize, usize), #[error("Can not be empty")] Empty, - #[error("Pedersen parameters length is not suficient (generators.len={0} < vector.len={1} unsatisfied)")] + #[error("Pedersen parameters length is not sufficient (generators.len={0} < vector.len={1} unsatisfied)")] PedersenParamsLen(usize, usize), #[error("Commitment verification failed")] CommitmentVerificationFail, @@ -116,7 +116,7 @@ where // number of steps between the initial state and the last state num_steps: C1::ScalarField, running_instance: Self::CommittedInstanceWithWitness, - incomming_instance: Self::CommittedInstanceWithWitness, + incoming_instance: Self::CommittedInstanceWithWitness, cyclefold_instance: Self::CFCommittedInstanceWithWitness, ) -> Result<(), Error>; }