Skip to content

Commit

Permalink
refactor: rename bn254_grumpkin -> bn256_grumpkin
Browse files Browse the repository at this point in the history
  • Loading branch information
huitseeker committed Jul 4, 2023
1 parent b872ae5 commit 56beb1f
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/bellperson/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,6 @@ mod tests {
#[test]
fn test_alloc_bit() {
test_alloc_bit_with::<pasta_curves::pallas::Point>();
test_alloc_bit_with::<crate::provider::bn254_grumpkin::bn256::Point>();
test_alloc_bit_with::<crate::provider::bn256_grumpkin::bn256::Point>();
}
}
8 changes: 4 additions & 4 deletions src/circuit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -487,14 +487,14 @@ mod tests {
fn test_recursive_circuit_grumpkin() {
let params1 = NovaAugmentedCircuitParams::new(BN_LIMB_WIDTH, BN_N_LIMBS, true);
let params2 = NovaAugmentedCircuitParams::new(BN_LIMB_WIDTH, BN_N_LIMBS, false);
let ro_consts1: ROConstantsCircuit<provider::bn254_grumpkin::grumpkin::Point> =
let ro_consts1: ROConstantsCircuit<provider::bn256_grumpkin::grumpkin::Point> =
PoseidonConstantsCircuit::new();
let ro_consts2: ROConstantsCircuit<provider::bn254_grumpkin::bn256::Point> =
let ro_consts2: ROConstantsCircuit<provider::bn256_grumpkin::bn256::Point> =
PoseidonConstantsCircuit::new();

test_recursive_circuit_with::<
provider::bn254_grumpkin::bn256::Point,
provider::bn254_grumpkin::grumpkin::Point,
provider::bn256_grumpkin::bn256::Point,
provider::bn256_grumpkin::grumpkin::Point,
>(params1, params2, ro_consts1, ro_consts2, 9983, 10536);
}
}
2 changes: 1 addition & 1 deletion src/gadgets/ecc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ mod tests {
r1cs::{NovaShape, NovaWitness},
{shape_cs::ShapeCS, solver::SatisfyingAssignment},
};
use crate::provider::bn254_grumpkin::{bn256, grumpkin};
use crate::provider::bn256_grumpkin::{bn256, grumpkin};
use ff::{Field, PrimeFieldBits};
use pasta_curves::{arithmetic::CurveAffine, group::Curve, pallas, vesta};
use rand::rngs::OsRng;
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@ fn compute_digest<G: Group, T: Serialize>(o: &T) -> G::Scalar {

#[cfg(test)]
mod tests {
use crate::provider::bn254_grumpkin::{bn256, grumpkin};
use crate::provider::bn256_grumpkin::{bn256, grumpkin};
use crate::provider::pedersen::CommitmentKeyExtTrait;

use super::*;
Expand Down
4 changes: 2 additions & 2 deletions src/nifs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ mod tests {
fn test_tiny_r1cs_bellperson() {
test_tiny_r1cs_bellperson_with::<G>();

test_tiny_r1cs_bellperson_with::<crate::provider::bn254_grumpkin::bn256::Point>();
test_tiny_r1cs_bellperson_with::<crate::provider::bn256_grumpkin::bn256::Point>();
}

#[allow(clippy::too_many_arguments)]
Expand Down Expand Up @@ -386,6 +386,6 @@ mod tests {
#[test]
fn test_tiny_r1cs() {
test_tiny_r1cs_with::<pasta_curves::pallas::Point>();
test_tiny_r1cs_with::<crate::provider::bn254_grumpkin::bn256::Point>();
test_tiny_r1cs_with::<crate::provider::bn256_grumpkin::bn256::Point>();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,8 @@ fn cpu_multiexp_serial<C: CurveAffine>(coeffs: &[C::Scalar], bases: &[C], acc: &
///
/// This will use multithreading if beneficial.
/// Adapted from zcash/halo2
// TODO: update once https://github.com/privacy-scaling-explorations/halo2curves/pull/29
// (or a successor thereof) is merged
fn cpu_best_multiexp<C: CurveAffine>(coeffs: &[C::Scalar], bases: &[C]) -> C::Curve {
assert_eq!(coeffs.len(), bases.len());

Expand Down
2 changes: 1 addition & 1 deletion src/provider/keccak.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ impl<G: Group> TranscriptEngineTrait<G> for Keccak256Transcript<G> {
#[cfg(test)]
mod tests {
use crate::{
provider::bn254_grumpkin::bn256,
provider::bn256_grumpkin::bn256,
provider::keccak::Keccak256Transcript,
traits::{Group, TranscriptEngineTrait},
};
Expand Down
2 changes: 1 addition & 1 deletion src/provider/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//! `RO` traits with Poseidon
//! `EvaluationEngine` with an IPA-based polynomial evaluation argument

pub mod bn254_grumpkin;
pub mod bn256_grumpkin;
pub mod ipa_pc;
pub mod keccak;
pub mod pasta;
Expand Down
2 changes: 1 addition & 1 deletion src/provider/poseidon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ where
#[cfg(test)]
mod tests {
use super::*;
use crate::provider::bn254_grumpkin::bn256;
use crate::provider::bn256_grumpkin::bn256;
use crate::{
bellperson::solver::SatisfyingAssignment, constants::NUM_CHALLENGE_BITS,
gadgets::utils::le_bits_to_num, traits::Group,
Expand Down
2 changes: 1 addition & 1 deletion src/spartan/pp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2185,7 +2185,7 @@ impl<G: Group, EE: EvaluationEngineTrait<G, CE = G::CE>, C: StepCircuit<G::Scala
#[cfg(test)]
mod tests {
use super::*;
use crate::provider::bn254_grumpkin::bn256;
use crate::provider::bn256_grumpkin::bn256;
use ::bellperson::{gadgets::num::AllocatedNum, ConstraintSystem, SynthesisError};
use core::marker::PhantomData;
use ff::PrimeField;
Expand Down

0 comments on commit 56beb1f

Please sign in to comment.