Skip to content

Commit

Permalink
fix typos in comments (argumentcomputer#236)
Browse files Browse the repository at this point in the history
  • Loading branch information
shuoer86 authored Oct 27, 2023
1 parent 8278d60 commit 2e89ed8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/gadgets/nonnative/bignat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ impl<Scalar: PrimeField> BigNat<Scalar> {
}

/// 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<CS, F>(
mut cs: CS,
Expand Down Expand Up @@ -218,7 +218,7 @@ impl<Scalar: PrimeField> BigNat<Scalar> {
}

/// 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<CS: ConstraintSystem<Scalar>>(
mut cs: CS,
Expand Down
4 changes: 2 additions & 2 deletions src/provider/ipa_pc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,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")?;
let ck_c = ck_c.scale(&r);

Expand Down Expand Up @@ -302,7 +302,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")?;
let ck_c = ck_c.scale(&r);

Expand Down
4 changes: 2 additions & 2 deletions src/r1cs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ impl<G: Group> R1CSShape<G> {
})
}

/// returnd the digest of the `R1CSShape`
/// returned the digest of the `R1CSShape`
pub fn digest(&self) -> G::Scalar {
self
.digest
Expand Down Expand Up @@ -301,7 +301,7 @@ impl<G: Group> R1CSShape<G> {
}

/// Pads the `R1CSShape` so that the number of variables is a power of two
/// Renumbers variables to accomodate padded variables
/// Renumbers variables to accommodate padded variables
pub fn pad(&self) -> Self {
// equalize the number of variables and constraints
let m = max(self.num_vars, self.num_cons).next_power_of_two();
Expand Down

0 comments on commit 2e89ed8

Please sign in to comment.