Skip to content

Commit

Permalink
[automated] Fix typos (#314)
Browse files Browse the repository at this point in the history
Co-authored-by: github-merge-queue <118344674+github-merge-queue@users.noreply.github.com>
  • Loading branch information
1 parent 5fd2c38 commit af32a9a
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
14 changes: 7 additions & 7 deletions src/gadgets/ecc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,7 @@ mod tests {
}

/// Make the point io
pub fn inputize_allocted_point<G: Group, CS: ConstraintSystem<G::Base>>(
pub fn inputize_allocated_point<G: Group, CS: ConstraintSystem<G::Base>>(
p: &AllocatedPoint<G>,
mut cs: CS,
) {
Expand Down Expand Up @@ -991,7 +991,7 @@ mod tests {
CS: ConstraintSystem<G::Base>,
{
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
Expand All @@ -1003,7 +1003,7 @@ mod tests {
.collect::<Result<Vec<AllocatedBit>, 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)
}

Expand Down Expand Up @@ -1064,9 +1064,9 @@ mod tests {
CS: ConstraintSystem<G::Base>,
{
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)
}

Expand Down Expand Up @@ -1119,13 +1119,13 @@ mod tests {
CS: ConstraintSystem<G::Base>,
{
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
}
Expand Down
4 changes: 2 additions & 2 deletions src/gadgets/nonnative/bignat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,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 @@ -219,7 +219,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
2 changes: 1 addition & 1 deletion src/gadgets/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ where
})
}

/// interepret scalar as base
/// interpret scalar as base
pub fn scalar_as_base<E: Engine>(input: E::Scalar) -> E::Base {
let input_bits = input.to_le_bits();
let mut mult = E::Base::ONE;
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 @@ -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);

Expand Down Expand Up @@ -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);

Expand Down
4 changes: 2 additions & 2 deletions src/provider/non_hiding_zeromorph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -420,15 +420,15 @@ fn eval_and_quotient_scalars<F: Field>(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)
.collect::<Vec<_>>();
v_denoms.iter_mut().batch_invert();
v_denoms
.iter()
.map(|v_denom| v_numer * v_denom)
.map(|v_denom| v_number * v_denom)
.collect::<Vec<_>>()
};

Expand Down
2 changes: 1 addition & 1 deletion src/traits/commitment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ pub trait CommitmentTrait<E: Engine>:
}

/// 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;
Expand Down

1 comment on commit af32a9a

@github-actions
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmarks

Table of Contents

Overview

This benchmark report shows the Arecibo GPU benchmarks.
NVIDIA L4
Intel(R) Xeon(R) CPU @ 2.20GHz
32 vCPUs
125 GB RAM
Workflow run: https://github.com/lurk-lab/arecibo/actions/runs/7863683361

Benchmark Results

RecursiveSNARK-NIVC-2

ref=5fd2c38 ref=af32a9a
Prove-NumCons-6540 53.07 ms (✅ 1.00x) 52.97 ms (✅ 1.00x faster)
Verify-NumCons-6540 32.89 ms (✅ 1.00x) 32.78 ms (✅ 1.00x faster)
Prove-NumCons-1028888 342.85 ms (✅ 1.00x) 365.09 ms (✅ 1.06x slower)
Verify-NumCons-1028888 253.88 ms (✅ 1.00x) 275.76 ms (✅ 1.09x slower)

CompressedSNARK-NIVC-Commitments-2

ref=5fd2c38 ref=af32a9a
Prove-NumCons-6540 13.98 s (✅ 1.00x) 14.03 s (✅ 1.00x slower)
Verify-NumCons-6540 78.52 ms (✅ 1.00x) 78.59 ms (✅ 1.00x slower)
Prove-NumCons-1028888 110.40 s (✅ 1.00x) 109.74 s (✅ 1.01x faster)
Verify-NumCons-1028888 773.19 ms (✅ 1.00x) 771.72 ms (✅ 1.00x faster)

Made with criterion-table

Please sign in to comment.