diff --git a/src/gadgets/ecc.rs b/src/gadgets/ecc.rs index 61e1785d9..f7e9668a8 100644 --- a/src/gadgets/ecc.rs +++ b/src/gadgets/ecc.rs @@ -909,7 +909,7 @@ mod tests { } /// Make the point io - pub fn inputize_allocted_point>( + pub fn inputize_allocated_point>( p: &AllocatedPoint, mut cs: CS, ) { @@ -991,7 +991,7 @@ mod tests { CS: ConstraintSystem, { let a = alloc_random_point(cs.namespace(|| "a")).unwrap(); - inputize_allocted_point(&a, cs.namespace(|| "inputize a")); + inputize_allocated_point(&a, cs.namespace(|| "inputize a")); let s = G::Scalar::random(&mut OsRng); // Allocate bits for s @@ -1003,7 +1003,7 @@ mod tests { .collect::, SynthesisError>>() .unwrap(); let e = a.scalar_mul(cs.namespace(|| "Scalar Mul"), &bits).unwrap(); - inputize_allocted_point(&e, cs.namespace(|| "inputize e")); + inputize_allocated_point(&e, cs.namespace(|| "inputize e")); (a, e, s) } @@ -1064,9 +1064,9 @@ mod tests { CS: ConstraintSystem, { let a = alloc_random_point(cs.namespace(|| "a")).unwrap(); - inputize_allocted_point(&a, cs.namespace(|| "inputize a")); + inputize_allocated_point(&a, cs.namespace(|| "inputize a")); let e = a.add(cs.namespace(|| "add a to a"), &a).unwrap(); - inputize_allocted_point(&e, cs.namespace(|| "inputize e")); + inputize_allocated_point(&e, cs.namespace(|| "inputize e")); (a, e) } @@ -1119,13 +1119,13 @@ mod tests { CS: ConstraintSystem, { let a = alloc_random_point(cs.namespace(|| "a")).unwrap(); - inputize_allocted_point(&a, cs.namespace(|| "inputize a")); + inputize_allocated_point(&a, cs.namespace(|| "inputize a")); let b = &mut a.clone(); b.y = AllocatedNum::alloc(cs.namespace(|| "allocate negation of a"), || { Ok(G::Base::ZERO) }) .unwrap(); - inputize_allocted_point(b, cs.namespace(|| "inputize b")); + inputize_allocated_point(b, cs.namespace(|| "inputize b")); let e = a.add(cs.namespace(|| "add a to b"), b).unwrap(); e } diff --git a/src/gadgets/nonnative/bignat.rs b/src/gadgets/nonnative/bignat.rs index e35126b6e..058eb5dc5 100644 --- a/src/gadgets/nonnative/bignat.rs +++ b/src/gadgets/nonnative/bignat.rs @@ -168,7 +168,7 @@ impl BigNat { } /// Allocates a `BigNat` in the circuit with `n_limbs` limbs of width `limb_width` each. - /// The `max_word` is gauranteed to be `(2 << limb_width) - 1`. + /// The `max_word` is guaranteed to be `(2 << limb_width) - 1`. /// The value is provided by a closure returning a natural number. pub fn alloc_from_nat( mut cs: CS, @@ -219,7 +219,7 @@ impl BigNat { } /// Allocates a `BigNat` in the circuit with `n_limbs` limbs of width `limb_width` each. - /// The `max_word` is gauranteed to be `(2 << limb_width) - 1`. + /// The `max_word` is guaranteed to be `(2 << limb_width) - 1`. /// The value is provided by an allocated number pub fn from_num>( mut cs: CS, diff --git a/src/gadgets/utils.rs b/src/gadgets/utils.rs index 9aab31175..7a43e5a33 100644 --- a/src/gadgets/utils.rs +++ b/src/gadgets/utils.rs @@ -93,7 +93,7 @@ where }) } -/// interepret scalar as base +/// interpret scalar as base pub fn scalar_as_base(input: E::Scalar) -> E::Base { let input_bits = input.to_le_bits(); let mut mult = E::Base::ONE; diff --git a/src/provider/ipa_pc.rs b/src/provider/ipa_pc.rs index ea412eb7e..e78c54ae1 100644 --- a/src/provider/ipa_pc.rs +++ b/src/provider/ipa_pc.rs @@ -182,7 +182,7 @@ where // absorb the instance in the transcript transcript.absorb(b"U", U); - // sample a random base for commiting to the inner product + // sample a random base for committing to the inner product let r = transcript.squeeze(b"r")?; ck_c.scale(&r); @@ -298,7 +298,7 @@ where // absorb the instance in the transcript transcript.absorb(b"U", U); - // sample a random base for commiting to the inner product + // sample a random base for committing to the inner product let r = transcript.squeeze(b"r")?; ck_c.scale(&r); diff --git a/src/provider/non_hiding_zeromorph.rs b/src/provider/non_hiding_zeromorph.rs index f0c150fdc..863417326 100644 --- a/src/provider/non_hiding_zeromorph.rs +++ b/src/provider/non_hiding_zeromorph.rs @@ -420,7 +420,7 @@ fn eval_and_quotient_scalars(y: F, x: F, z: F, point: &[F]) -> (F, (Ve // Note Φ_(n-i)(x^(2^i)) = (x^(2^i))^(2^(n-i) - 1) / (x^(2^i) - 1) = (x^(2^num_vars) - 1) / (x^(2^i) - 1) = vs[i] // Φ_(n-i-1)(x^(2^(i+1))) = (x^(2^(i+1)))^(2^(n-i-1)) - 1 / (x^(2^(i+1)) - 1) = (x^(2^num_vars) - 1) / (x^(2^(i+1)) - 1) = vs[i+1] let vs = { - let v_numer = squares_of_x[num_vars] - F::ONE; + let v_number = squares_of_x[num_vars] - F::ONE; let mut v_denoms = squares_of_x .iter() .map(|square_of_x| *square_of_x - F::ONE) @@ -428,7 +428,7 @@ fn eval_and_quotient_scalars(y: F, x: F, z: F, point: &[F]) -> (F, (Ve v_denoms.iter_mut().batch_invert(); v_denoms .iter() - .map(|v_denom| v_numer * v_denom) + .map(|v_denom| v_number * v_denom) .collect::>() }; diff --git a/src/traits/commitment.rs b/src/traits/commitment.rs index cb97eac61..92f5f61f4 100644 --- a/src/traits/commitment.rs +++ b/src/traits/commitment.rs @@ -57,7 +57,7 @@ pub trait CommitmentTrait: } /// A trait that helps determine the length of a structure. -/// Note this does not impose any memory representation contraints on the structure. +/// Note this does not impose any memory representation constraints on the structure. pub trait Len { /// Returns the length of the structure. fn length(&self) -> usize;