mirror of
https://github.com/arnaucube/ark-r1cs-std.git
synced 2026-01-11 00:11:29 +01:00
Rename curves
This commit is contained in:
@@ -22,7 +22,7 @@ edition = "2018"
|
|||||||
################################# Dependencies ################################
|
################################# Dependencies ################################
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
algebra = { path = "../algebra", default-features = false, features = [ "edwards_bls12" ] }
|
algebra = { path = "../algebra", default-features = false, features = [ "edwards_on_bls12_377" ] }
|
||||||
blake2 = { version = "0.8", default-features = false }
|
blake2 = { version = "0.8", default-features = false }
|
||||||
criterion = "0.3.1"
|
criterion = "0.3.1"
|
||||||
crypto-primitives = { path = "../crypto-primitives" }
|
crypto-primitives = { path = "../crypto-primitives" }
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ use rand;
|
|||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate criterion;
|
extern crate criterion;
|
||||||
|
|
||||||
use algebra::{edwards_bls12::EdwardsProjective as Edwards, UniformRand};
|
use algebra::{edwards_on_bls12_377::EdwardsProjective as Edwards, UniformRand};
|
||||||
use criterion::Criterion;
|
use criterion::Criterion;
|
||||||
use crypto_primitives::commitment::{pedersen::*, CommitmentScheme};
|
use crypto_primitives::commitment::{pedersen::*, CommitmentScheme};
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ use rand;
|
|||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate criterion;
|
extern crate criterion;
|
||||||
|
|
||||||
use algebra::edwards_bls12::EdwardsProjective as Edwards;
|
use algebra::edwards_on_bls12_377::EdwardsProjective as Edwards;
|
||||||
use criterion::Criterion;
|
use criterion::Criterion;
|
||||||
use crypto_primitives::crh::{pedersen::*, FixedLengthCRH};
|
use crypto_primitives::crh::{pedersen::*, FixedLengthCRH};
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
extern crate criterion;
|
extern crate criterion;
|
||||||
|
|
||||||
mod affine {
|
mod affine {
|
||||||
use algebra::edwards_bls12::EdwardsAffine as Edwards;
|
use algebra::edwards_on_bls12_377::EdwardsAffine as Edwards;
|
||||||
use blake2::Blake2s;
|
use blake2::Blake2s;
|
||||||
use criterion::Criterion;
|
use criterion::Criterion;
|
||||||
use crypto_primitives::signature::{schnorr::*, SignatureScheme};
|
use crypto_primitives::signature::{schnorr::*, SignatureScheme};
|
||||||
@@ -90,7 +90,7 @@ mod affine {
|
|||||||
}
|
}
|
||||||
|
|
||||||
mod projective {
|
mod projective {
|
||||||
use algebra::edwards_bls12::EdwardsProjective as Edwards;
|
use algebra::edwards_on_bls12_377::EdwardsProjective as Edwards;
|
||||||
use blake2::Blake2s;
|
use blake2::Blake2s;
|
||||||
use criterion::Criterion;
|
use criterion::Criterion;
|
||||||
use crypto_primitives::signature::{schnorr::*, SignatureScheme};
|
use crypto_primitives::signature::{schnorr::*, SignatureScheme};
|
||||||
|
|||||||
@@ -46,6 +46,6 @@ std = ["r1cs", "algebra-core/std", "r1cs-core/std", "r1cs-std/std"]
|
|||||||
parallel = ["std", "rayon", "gm17/parallel", "groth16/parallel", "ff-fft/parallel"]
|
parallel = ["std", "rayon", "gm17/parallel", "groth16/parallel", "ff-fft/parallel"]
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
algebra = { path = "../algebra", default-features = false, features = [ "jubjub", "bls12_377", "mnt4_298", "mnt6_298" ] }
|
algebra = { path = "../algebra", default-features = false, features = [ "edwards_on_bls12_381", "bls12_377", "mnt4_298", "mnt6_298" ] }
|
||||||
r1cs-std = { path = "../r1cs-std", default-features = false, features = [ "jubjub", "bls12_377", "mnt4_298", "mnt6_298" ] }
|
r1cs-std = { path = "../r1cs-std", default-features = false, features = [ "edwards_on_bls12_381", "bls12_377", "mnt4_298", "mnt6_298" ] }
|
||||||
rand_xorshift = { version = "0.2" }
|
rand_xorshift = { version = "0.2" }
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ mod test {
|
|||||||
},
|
},
|
||||||
*,
|
*,
|
||||||
};
|
};
|
||||||
use algebra::{jubjub::Fq as Fr, test_rng};
|
use algebra::{edwards_on_bls12_381::Fq as Fr, test_rng};
|
||||||
use r1cs_core::ConstraintSystem;
|
use r1cs_core::ConstraintSystem;
|
||||||
use r1cs_std::{prelude::*, test_constraint_system::TestConstraintSystem};
|
use r1cs_std::{prelude::*, test_constraint_system::TestConstraintSystem};
|
||||||
use rand::Rng;
|
use rand::Rng;
|
||||||
|
|||||||
@@ -200,7 +200,7 @@ where
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod test {
|
mod test {
|
||||||
use algebra::{
|
use algebra::{
|
||||||
jubjub::{Fq, Fr, JubJubProjective as JubJub},
|
edwards_on_bls12_381::{EdwardsProjective as JubJub, Fq, Fr},
|
||||||
test_rng, ProjectiveCurve, UniformRand,
|
test_rng, ProjectiveCurve, UniformRand,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -215,7 +215,8 @@ mod test {
|
|||||||
};
|
};
|
||||||
use r1cs_core::ConstraintSystem;
|
use r1cs_core::ConstraintSystem;
|
||||||
use r1cs_std::{
|
use r1cs_std::{
|
||||||
jubjub::JubJubGadget, prelude::*, test_constraint_system::TestConstraintSystem,
|
edwards_on_bls12_381::JubJubGadget, prelude::*,
|
||||||
|
test_constraint_system::TestConstraintSystem,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|||||||
@@ -145,13 +145,13 @@ mod test {
|
|||||||
FixedLengthCRH, FixedLengthCRHGadget,
|
FixedLengthCRH, FixedLengthCRHGadget,
|
||||||
};
|
};
|
||||||
use algebra::{
|
use algebra::{
|
||||||
jubjub::{Fq as Fr, JubJubProjective as JubJub},
|
edwards_on_bls12_381::{EdwardsProjective as JubJub, Fq as Fr},
|
||||||
test_rng, ProjectiveCurve,
|
test_rng, ProjectiveCurve,
|
||||||
};
|
};
|
||||||
use r1cs_core::ConstraintSystem;
|
use r1cs_core::ConstraintSystem;
|
||||||
use r1cs_std::{
|
use r1cs_std::{
|
||||||
alloc::AllocGadget, jubjub::JubJubGadget, test_constraint_system::TestConstraintSystem,
|
alloc::AllocGadget, edwards_on_bls12_381::JubJubGadget,
|
||||||
uint8::UInt8,
|
test_constraint_system::TestConstraintSystem, uint8::UInt8,
|
||||||
};
|
};
|
||||||
|
|
||||||
type TestCRH = BoweHopwoodPedersenCRH<JubJub, Window>;
|
type TestCRH = BoweHopwoodPedersenCRH<JubJub, Window>;
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ mod test {
|
|||||||
crh::{bowe_hopwood::BoweHopwoodPedersenCRH, pedersen::PedersenWindow},
|
crh::{bowe_hopwood::BoweHopwoodPedersenCRH, pedersen::PedersenWindow},
|
||||||
FixedLengthCRH,
|
FixedLengthCRH,
|
||||||
};
|
};
|
||||||
use algebra::{jubjub::JubJubProjective, test_rng};
|
use algebra::{edwards_on_bls12_381::EdwardsProjective, test_rng};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_simple_bh() {
|
fn test_simple_bh() {
|
||||||
@@ -186,9 +186,9 @@ mod test {
|
|||||||
|
|
||||||
let rng = &mut test_rng();
|
let rng = &mut test_rng();
|
||||||
let params =
|
let params =
|
||||||
<BoweHopwoodPedersenCRH<JubJubProjective, TestWindow> as FixedLengthCRH>::setup(rng)
|
<BoweHopwoodPedersenCRH<EdwardsProjective, TestWindow> as FixedLengthCRH>::setup(rng)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
<BoweHopwoodPedersenCRH<JubJubProjective, TestWindow> as FixedLengthCRH>::evaluate(
|
<BoweHopwoodPedersenCRH<EdwardsProjective, TestWindow> as FixedLengthCRH>::evaluate(
|
||||||
¶ms,
|
¶ms,
|
||||||
&[1, 2, 3],
|
&[1, 2, 3],
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -133,12 +133,13 @@ mod test {
|
|||||||
FixedLengthCRH, FixedLengthCRHGadget,
|
FixedLengthCRH, FixedLengthCRHGadget,
|
||||||
};
|
};
|
||||||
use algebra::{
|
use algebra::{
|
||||||
jubjub::{Fq as Fr, JubJubProjective as JubJub},
|
edwards_on_bls12_381::{EdwardsProjective as JubJub, Fq as Fr},
|
||||||
test_rng, ProjectiveCurve,
|
test_rng, ProjectiveCurve,
|
||||||
};
|
};
|
||||||
use r1cs_core::ConstraintSystem;
|
use r1cs_core::ConstraintSystem;
|
||||||
use r1cs_std::{
|
use r1cs_std::{
|
||||||
jubjub::JubJubGadget, prelude::*, test_constraint_system::TestConstraintSystem,
|
edwards_on_bls12_381::JubJubGadget, prelude::*,
|
||||||
|
test_constraint_system::TestConstraintSystem,
|
||||||
};
|
};
|
||||||
use rand::Rng;
|
use rand::Rng;
|
||||||
|
|
||||||
|
|||||||
@@ -207,13 +207,15 @@ mod test {
|
|||||||
},
|
},
|
||||||
merkle_tree::*,
|
merkle_tree::*,
|
||||||
};
|
};
|
||||||
use algebra::jubjub::{Fq, JubJubAffine as JubJub};
|
use algebra::edwards_on_bls12_381::{EdwardsAffine as JubJub, Fq};
|
||||||
use r1cs_core::ConstraintSystem;
|
use r1cs_core::ConstraintSystem;
|
||||||
use rand::SeedableRng;
|
use rand::SeedableRng;
|
||||||
use rand_xorshift::XorShiftRng;
|
use rand_xorshift::XorShiftRng;
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
use r1cs_std::{jubjub::JubJubGadget, test_constraint_system::TestConstraintSystem};
|
use r1cs_std::{
|
||||||
|
edwards_on_bls12_381::JubJubGadget, test_constraint_system::TestConstraintSystem,
|
||||||
|
};
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub(super) struct Window4x256;
|
pub(super) struct Window4x256;
|
||||||
|
|||||||
@@ -369,7 +369,7 @@ mod test {
|
|||||||
crh::{pedersen::*, *},
|
crh::{pedersen::*, *},
|
||||||
merkle_tree::*,
|
merkle_tree::*,
|
||||||
};
|
};
|
||||||
use algebra::{jubjub::JubJubAffine as JubJub, Zero};
|
use algebra::{edwards_on_bls12_381::EdwardsAffine as JubJub, Zero};
|
||||||
use rand::SeedableRng;
|
use rand::SeedableRng;
|
||||||
use rand_xorshift::XorShiftRng;
|
use rand_xorshift::XorShiftRng;
|
||||||
|
|
||||||
|
|||||||
@@ -537,7 +537,7 @@ impl<ConstraintF: PrimeField> PRFGadget<Blake2s, ConstraintF> for Blake2sGadget
|
|||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod test {
|
mod test {
|
||||||
use algebra::jubjub::Fq as Fr;
|
use algebra::edwards_on_bls12_381::Fq as Fr;
|
||||||
use rand::{Rng, SeedableRng};
|
use rand::{Rng, SeedableRng};
|
||||||
use rand_xorshift::XorShiftRng;
|
use rand_xorshift::XorShiftRng;
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,8 @@ pub trait SignatureScheme {
|
|||||||
mod test {
|
mod test {
|
||||||
use crate::{signature::schnorr::SchnorrSignature, SignatureScheme};
|
use crate::{signature::schnorr::SchnorrSignature, SignatureScheme};
|
||||||
use algebra::{
|
use algebra::{
|
||||||
groups::Group, jubjub::JubJubAffine as JubJub, test_rng, to_bytes, ToBytes, UniformRand,
|
edwards_on_bls12_381::EdwardsAffine as JubJub, groups::Group, test_rng, to_bytes, ToBytes,
|
||||||
|
UniformRand,
|
||||||
};
|
};
|
||||||
use blake2::Blake2s;
|
use blake2::Blake2s;
|
||||||
|
|
||||||
|
|||||||
@@ -35,12 +35,12 @@ algebra = { path = "../algebra", default-features = false, features = [ "bls12_3
|
|||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["std"]
|
default = ["std"]
|
||||||
full = [ "bls12_377", "jubjub", "edwards_bls12", "edwards_sw6", "mnt4_298", "mnt4_753", "mnt6_298", "mnt6_753" ]
|
full = [ "bls12_377", "edwards_on_bls12_381", "edwards_on_bls12_377", "edwards_on_cp6_782", "mnt4_298", "mnt4_753", "mnt6_298", "mnt6_753" ]
|
||||||
|
|
||||||
bls12_377 = [ "algebra/bls12_377" ]
|
bls12_377 = [ "algebra/bls12_377" ]
|
||||||
jubjub = [ "algebra/jubjub" ]
|
edwards_on_bls12_381 = [ "algebra/edwards_on_bls12_381" ]
|
||||||
edwards_bls12 = [ "algebra/edwards_bls12" ]
|
edwards_on_bls12_377 = [ "algebra/edwards_on_bls12_377" ]
|
||||||
edwards_sw6 = [ "algebra/edwards_sw6" ]
|
edwards_on_cp6_782 = [ "algebra/edwards_on_cp6_782" ]
|
||||||
mnt4_298 = [ "algebra/mnt4_298" ]
|
mnt4_298 = [ "algebra/mnt4_298" ]
|
||||||
mnt4_753 = [ "algebra/mnt4_753" ]
|
mnt4_753 = [ "algebra/mnt4_753" ]
|
||||||
mnt6_298 = [ "algebra/mnt6_298" ]
|
mnt6_298 = [ "algebra/mnt6_298" ]
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
use crate::groups::curves::twisted_edwards::AffineGadget;
|
|
||||||
use algebra::edwards_bls12::*;
|
|
||||||
|
|
||||||
use crate::edwards_bls12::FqGadget;
|
|
||||||
|
|
||||||
pub type EdwardsBlsGadget = AffineGadget<EdwardsParameters, Fq, FqGadget>;
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn test() {
|
|
||||||
crate::groups::curves::twisted_edwards::test::<_, EdwardsParameters, EdwardsBlsGadget>();
|
|
||||||
}
|
|
||||||
11
r1cs-std/src/instantiated/edwards_on_bls12_377/curves.rs
Normal file
11
r1cs-std/src/instantiated/edwards_on_bls12_377/curves.rs
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
use crate::groups::curves::twisted_edwards::AffineGadget;
|
||||||
|
use algebra::edwards_on_bls12_377::*;
|
||||||
|
|
||||||
|
use crate::edwards_on_bls12_377::FqGadget;
|
||||||
|
|
||||||
|
pub type EdwardsGadget = AffineGadget<EdwardsParameters, Fq, FqGadget>;
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test() {
|
||||||
|
crate::groups::curves::twisted_edwards::test::<_, EdwardsParameters, EdwardsGadget>();
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
use crate::fields::fp::FpGadget;
|
use crate::fields::fp::FpGadget;
|
||||||
use algebra::edwards_sw6::fq::Fq;
|
use algebra::edwards_on_bls12_377::fq::Fq;
|
||||||
|
|
||||||
pub type FqGadget = FpGadget<Fq>;
|
pub type FqGadget = FpGadget<Fq>;
|
||||||
|
|
||||||
11
r1cs-std/src/instantiated/edwards_on_bls12_381/curves.rs
Normal file
11
r1cs-std/src/instantiated/edwards_on_bls12_381/curves.rs
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
use crate::groups::curves::twisted_edwards::AffineGadget;
|
||||||
|
use algebra::edwards_on_bls12_381::*;
|
||||||
|
|
||||||
|
use crate::edwards_on_bls12_381::FqGadget;
|
||||||
|
|
||||||
|
pub type EdwardsGadget = AffineGadget<EdwardsParameters, Fq, FqGadget>;
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test() {
|
||||||
|
crate::groups::curves::twisted_edwards::test::<Fq, _, EdwardsGadget>();
|
||||||
|
}
|
||||||
8
r1cs-std/src/instantiated/edwards_on_bls12_381/fields.rs
Normal file
8
r1cs-std/src/instantiated/edwards_on_bls12_381/fields.rs
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
use crate::fields::fp::FpGadget;
|
||||||
|
|
||||||
|
pub type FqGadget = FpGadget<algebra::edwards_on_bls12_381::Fq>;
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test() {
|
||||||
|
crate::fields::tests::field_test::<_, algebra::edwards_on_bls12_381::Fq, FqGadget>();
|
||||||
|
}
|
||||||
11
r1cs-std/src/instantiated/edwards_on_cp6_782/curves.rs
Normal file
11
r1cs-std/src/instantiated/edwards_on_cp6_782/curves.rs
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
use crate::groups::curves::twisted_edwards::AffineGadget;
|
||||||
|
use algebra::edwards_on_cp6_782::*;
|
||||||
|
|
||||||
|
use crate::edwards_on_cp6_782::FqGadget;
|
||||||
|
|
||||||
|
pub type EdwardsGadget = AffineGadget<EdwardsParameters, Fq, FqGadget>;
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test() {
|
||||||
|
crate::groups::curves::twisted_edwards::test::<_, EdwardsParameters, EdwardsGadget>();
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
use crate::fields::fp::FpGadget;
|
use crate::fields::fp::FpGadget;
|
||||||
use algebra::edwards_bls12::fq::Fq;
|
use algebra::edwards_on_cp6_782::fq::Fq;
|
||||||
|
|
||||||
pub type FqGadget = FpGadget<Fq>;
|
pub type FqGadget = FpGadget<Fq>;
|
||||||
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
use crate::groups::curves::twisted_edwards::AffineGadget;
|
|
||||||
use algebra::edwards_sw6::*;
|
|
||||||
|
|
||||||
use crate::edwards_sw6::FqGadget;
|
|
||||||
|
|
||||||
pub type EdwardsSWGadget = AffineGadget<EdwardsParameters, Fq, FqGadget>;
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn test() {
|
|
||||||
crate::groups::curves::twisted_edwards::test::<_, EdwardsParameters, EdwardsSWGadget>();
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
use crate::groups::curves::twisted_edwards::AffineGadget;
|
|
||||||
use algebra::jubjub::*;
|
|
||||||
|
|
||||||
use crate::jubjub::FqGadget;
|
|
||||||
|
|
||||||
pub type JubJubGadget = AffineGadget<JubJubParameters, Fq, FqGadget>;
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn test() {
|
|
||||||
crate::groups::curves::twisted_edwards::test::<Fq, _, JubJubGadget>();
|
|
||||||
}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
use crate::fields::fp::FpGadget;
|
|
||||||
|
|
||||||
pub type FqGadget = FpGadget<algebra::jubjub::Fq>;
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn test() {
|
|
||||||
crate::fields::tests::field_test::<_, algebra::jubjub::Fq, FqGadget>();
|
|
||||||
}
|
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
#[cfg(feature = "bls12_377")]
|
#[cfg(feature = "bls12_377")]
|
||||||
pub mod bls12_377;
|
pub mod bls12_377;
|
||||||
|
|
||||||
#[cfg(feature = "edwards_bls12")]
|
#[cfg(feature = "edwards_on_bls12_377")]
|
||||||
pub mod edwards_bls12;
|
pub mod edwards_on_bls12_377;
|
||||||
|
|
||||||
#[cfg(feature = "edwards_sw6")]
|
#[cfg(feature = "edwards_on_cp6_782")]
|
||||||
pub mod edwards_sw6;
|
pub mod edwards_on_cp6_782;
|
||||||
|
|
||||||
#[cfg(feature = "jubjub")]
|
#[cfg(feature = "edwards_on_bls12_381")]
|
||||||
pub mod jubjub;
|
pub mod edwards_on_bls12_381;
|
||||||
|
|
||||||
#[cfg(feature = "mnt4_298")]
|
#[cfg(feature = "mnt4_298")]
|
||||||
pub mod mnt4_298;
|
pub mod mnt4_298;
|
||||||
|
|||||||
@@ -48,14 +48,14 @@ mod instantiated;
|
|||||||
#[cfg(feature = "bls12_377")]
|
#[cfg(feature = "bls12_377")]
|
||||||
pub use instantiated::bls12_377;
|
pub use instantiated::bls12_377;
|
||||||
|
|
||||||
#[cfg(feature = "edwards_bls12")]
|
#[cfg(feature = "edwards_on_bls12_377")]
|
||||||
pub use instantiated::edwards_bls12;
|
pub use instantiated::edwards_on_bls12_377;
|
||||||
|
|
||||||
#[cfg(feature = "edwards_sw6")]
|
#[cfg(feature = "edwards_on_cp6_782")]
|
||||||
pub use instantiated::edwards_sw6;
|
pub use instantiated::edwards_on_cp6_782;
|
||||||
|
|
||||||
#[cfg(feature = "jubjub")]
|
#[cfg(feature = "edwards_on_bls12_381")]
|
||||||
pub use instantiated::jubjub;
|
pub use instantiated::edwards_on_bls12_381;
|
||||||
|
|
||||||
#[cfg(feature = "mnt4_298")]
|
#[cfg(feature = "mnt4_298")]
|
||||||
pub use instantiated::mnt4_298;
|
pub use instantiated::mnt4_298;
|
||||||
|
|||||||
@@ -132,7 +132,10 @@ impl<ConstraintF: Field> TestConstraintSystem<ConstraintF> {
|
|||||||
|
|
||||||
fn compute_path(ns: &[String], this: String) -> String {
|
fn compute_path(ns: &[String], this: String) -> String {
|
||||||
if this.chars().any(|a| a == '/') {
|
if this.chars().any(|a| a == '/') {
|
||||||
panic!(format!("'/' is not allowed in namespace names. Error in namespace name: {:?}", this));
|
panic!(format!(
|
||||||
|
"'/' is not allowed in namespace names. Error in namespace name: {:?}",
|
||||||
|
this
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut name = String::new();
|
let mut name = String::new();
|
||||||
|
|||||||
Reference in New Issue
Block a user