mirror of
https://github.com/Qortal/pirate-librustzcash.git
synced 2025-02-12 10:05:47 +00:00
Make pairing and groth16 optional 🎉
This commit is contained in:
parent
276e09f1fb
commit
4272cfa5b0
@ -22,6 +22,13 @@ byteorder = "1"
|
||||
[dependencies.pairing]
|
||||
git = "https://github.com/str4d/pairing"
|
||||
rev = "3d41ee5abaa4888ff3607689aba007be8856816d"
|
||||
optional = true
|
||||
|
||||
[features]
|
||||
default = []
|
||||
groth16 = ["pairing"]
|
||||
default = ["groth16"]
|
||||
|
||||
[[test]]
|
||||
name = "mimc"
|
||||
path = "tests/mimc.rs"
|
||||
required-features = ["groth16"]
|
||||
|
@ -371,6 +371,7 @@ fn parallel_fft<E: ScalarEngine, T: Group<E>>(
|
||||
|
||||
// Test multiplying various (low degree) polynomials together and
|
||||
// comparing with naive evaluations.
|
||||
#[cfg(feature = "pairing")]
|
||||
#[test]
|
||||
fn polynomial_arith() {
|
||||
use pairing::bls12_381::Bls12;
|
||||
@ -418,6 +419,7 @@ fn polynomial_arith() {
|
||||
test_mul::<Bls12, _>(rng);
|
||||
}
|
||||
|
||||
#[cfg(feature = "pairing")]
|
||||
#[test]
|
||||
fn fft_composition() {
|
||||
use pairing::bls12_381::Bls12;
|
||||
@ -456,6 +458,7 @@ fn fft_composition() {
|
||||
test_comp::<Bls12, _>(rng);
|
||||
}
|
||||
|
||||
#[cfg(feature = "pairing")]
|
||||
#[test]
|
||||
fn parallel_fft_consistency() {
|
||||
use pairing::bls12_381::Bls12;
|
||||
|
@ -1,5 +1,6 @@
|
||||
extern crate ff;
|
||||
extern crate group;
|
||||
#[cfg(feature = "pairing")]
|
||||
extern crate pairing;
|
||||
extern crate rand;
|
||||
extern crate num_cpus;
|
||||
@ -12,6 +13,7 @@ extern crate byteorder;
|
||||
pub mod multicore;
|
||||
mod multiexp;
|
||||
pub mod domain;
|
||||
#[cfg(feature = "groth16")]
|
||||
pub mod groth16;
|
||||
|
||||
use ff::{Field, ScalarEngine};
|
||||
|
@ -255,6 +255,7 @@ pub fn multiexp<Q, D, G, S>(
|
||||
multiexp_inner(pool, bases, density_map, exponents, 0, c, true)
|
||||
}
|
||||
|
||||
#[cfg(feature = "pairing")]
|
||||
#[test]
|
||||
fn test_with_bls12() {
|
||||
fn naive_multiexp<G: CurveAffine>(
|
||||
|
Loading…
x
Reference in New Issue
Block a user