diff --git a/powersoftau/src/bn256/mod.rs b/powersoftau/src/bn256/mod.rs index 4194fdc..9c41ffc 100644 --- a/powersoftau/src/bn256/mod.rs +++ b/powersoftau/src/bn256/mod.rs @@ -24,15 +24,17 @@ use crate::parameters::*; use crate::keypair::*; use crate::utils::*; -#[cfg(not(feature = "smalltest"))] #[derive(Clone)] pub struct Bn256CeremonyParameters { } -#[cfg(not(feature = "smalltest"))] impl PowersOfTauParameters for Bn256CeremonyParameters { - const REQUIRED_POWER: usize = 28; // generate to have roughly 64 million constraints + #[cfg(not(feature = "smalltest"))] + const REQUIRED_POWER: usize = 28; + + #[cfg(feature = "smalltest")] + const REQUIRED_POWER: usize = 10; // This ceremony is based on the BN256 elliptic curve construction. const G1_UNCOMPRESSED_BYTE_SIZE: usize = 64; @@ -41,26 +43,6 @@ impl PowersOfTauParameters for Bn256CeremonyParameters { const G2_COMPRESSED_BYTE_SIZE: usize = 64; } -#[cfg(feature = "smalltest")] -#[derive(Clone)] -pub struct Bn256CeremonyParameters { - -} - -#[cfg(feature = "smalltest")] -impl PowersOfTauParameters for Bn256CeremonyParameters { - const REQUIRED_POWER: usize = 12; - const EMPIRICAL_BATCH_SIZE: usize = 1 << 10; - - // This ceremony is based on the BN256 elliptic curve construction. - const G1_UNCOMPRESSED_BYTE_SIZE: usize = 64; - const G2_UNCOMPRESSED_BYTE_SIZE: usize = 128; - const G1_COMPRESSED_BYTE_SIZE: usize = 32; - const G2_COMPRESSED_BYTE_SIZE: usize = 64; -} - - - #[test] fn test_pubkey_serialization() { use self::rand::thread_rng; diff --git a/powersoftau/test.sh b/powersoftau/test.sh index c525ab6..f2af161 100755 --- a/powersoftau/test.sh +++ b/powersoftau/test.sh @@ -8,18 +8,18 @@ rm tmp_* set -e -cargo run --release --bin new_constrained --features smalltest -- challenge1 -yes | cargo run --release --bin compute_constrained --features smalltest -- challenge1 response1 -cargo run --release --bin verify_transform_constrained --features smalltest -- challenge1 response1 challenge2 +cargo run --release --features smalltest --bin new_constrained challenge1 +yes | cargo run --release --features smalltest --bin compute_constrained challenge1 response1 +cargo run --release --features smalltest --bin verify_transform_constrained challenge1 response1 challenge2 -yes | cargo run --release --bin compute_constrained --features smalltest -- challenge2 response2 -cargo run --release --bin verify_transform_constrained --features smalltest -- challenge2 response2 challenge3 +yes | cargo run --release --features smalltest --bin compute_constrained challenge2 response2 +cargo run --release --features smalltest --bin verify_transform_constrained challenge2 response2 challenge3 -yes | cargo run --release --bin compute_constrained --features smalltest -- challenge3 response3 -cargo run --release --bin verify_transform_constrained --features smalltest -- challenge3 response3 challenge4 +yes | cargo run --release --features smalltest --bin compute_constrained challenge3 response3 +cargo run --release --features smalltest --bin verify_transform_constrained challenge3 response3 challenge4 -cargo run --release --bin beacon_constrained --features smalltest -- challenge4 response4 -cargo run --release --bin verify_transform_constrained --features smalltest -- challenge4 response4 challenge5 +cargo run --release --features smalltest --bin beacon_constrained challenge4 response4 +cargo run --release --features smalltest --bin verify_transform_constrained challenge4 response4 challenge5 cat response1 response2 response3 response4 > transcript -cargo run --release --bin verify --features smalltest -- transcript +cargo run --release --features smalltest --bin verify transcript