mirror of https://github.com/zcash/mpc.git
Remove ate-pairing, we shouldn't need it.
This commit is contained in:
parent
5e838fe2b4
commit
2102573efd
|
@ -1,9 +1,3 @@
|
|||
[submodule "snark/libsnark"]
|
||||
path = snark/libsnark
|
||||
url = https://github.com/zcash/libsnark.git
|
||||
[submodule "snark/ate-pairing"]
|
||||
path = snark/ate-pairing
|
||||
url = https://github.com/herumi/ate-pairing.git
|
||||
[submodule "snark/xbyak"]
|
||||
path = snark/xbyak
|
||||
url = https://github.com/herumi/xbyak.git
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Subproject commit dcb9da999b1113f90b115bccb6f4b57ddf3a8452
|
|
@ -1 +1 @@
|
|||
Subproject commit fa107871c84297dbf2f6ce8f1ddb9b682587d01c
|
||||
Subproject commit b9bf0dca4a53ee41c5201715b8f0236d753995c8
|
|
@ -1,25 +1,10 @@
|
|||
extern crate gcc;
|
||||
|
||||
const USE_ATE_PAIRING: bool = false;
|
||||
|
||||
fn main() {
|
||||
println!("cargo:rustc-link-lib=gmp");
|
||||
println!("cargo:rustc-link-lib=gmpxx");
|
||||
println!("cargo:rustc-link-lib=sodium");
|
||||
|
||||
if USE_ATE_PAIRING {
|
||||
let mut cfg = gcc::Config::new();
|
||||
|
||||
cfg.cpp(true)
|
||||
.opt_level(2)
|
||||
.define("BN_SUPPORT_SNARK", None)
|
||||
.include("ate-pairing/include")
|
||||
.include("xbyak")
|
||||
.file("ate-pairing/src/zm.cpp")
|
||||
.file("ate-pairing/src/zm2.cpp")
|
||||
.compile("libzm.a");
|
||||
}
|
||||
|
||||
let mut cfg = gcc::Config::new();
|
||||
|
||||
let cfg = cfg.cpp(true)
|
||||
|
@ -30,32 +15,17 @@ fn main() {
|
|||
.define("USE_ASM", None)
|
||||
.define("NO_PT_COMPRESSION", None)
|
||||
.define("BINARY_OUTPUT", None)
|
||||
.define("CURVE_ALT_BN128", None)
|
||||
.flag("-std=c++11")
|
||||
.include("libsnark/src")
|
||||
.file("libsnark/src/common/utils.cpp")
|
||||
.file("libsnark/src/common/profiling.cpp")
|
||||
.file("src/libsnarkwrap.cpp");
|
||||
|
||||
if USE_ATE_PAIRING {
|
||||
let cfg = cfg.define("CURVE_BN128", None)
|
||||
.define("BN_SUPPORT_SNARK", None)
|
||||
.include("ate-pairing/include")
|
||||
.file("libsnark/src/algebra/curves/bn128/bn128_g1.cpp")
|
||||
.file("libsnark/src/algebra/curves/bn128/bn128_g2.cpp")
|
||||
.file("libsnark/src/algebra/curves/bn128/bn128_gt.cpp")
|
||||
.file("libsnark/src/algebra/curves/bn128/bn128_init.cpp")
|
||||
.file("libsnark/src/algebra/curves/bn128/bn128_pairing.cpp")
|
||||
.file("libsnark/src/algebra/curves/bn128/bn128_pp.cpp");
|
||||
|
||||
cfg.compile("libsnarkwrap.a");
|
||||
} else {
|
||||
let cfg = cfg.define("CURVE_ALT_BN128", None)
|
||||
.file("libsnark/src/algebra/curves/alt_bn128/alt_bn128_g1.cpp")
|
||||
.file("libsnark/src/algebra/curves/alt_bn128/alt_bn128_g2.cpp")
|
||||
.file("libsnark/src/algebra/curves/alt_bn128/alt_bn128_init.cpp")
|
||||
.file("libsnark/src/algebra/curves/alt_bn128/alt_bn128_pairing.cpp")
|
||||
.file("libsnark/src/algebra/curves/alt_bn128/alt_bn128_pp.cpp");
|
||||
.file("libsnark/src/algebra/curves/alt_bn128/alt_bn128_pp.cpp")
|
||||
.file("src/libsnarkwrap.cpp");
|
||||
|
||||
cfg.compile("libsnarkwrap.a");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,8 +30,6 @@ extern "C" void libsnarkwrap_init() {
|
|||
assert(sizeof(curve_GT) == 8 * (4 * 6 * 2));
|
||||
|
||||
// Rust wrappers assume alignment.
|
||||
// This will trip up enabling ate-pairing until
|
||||
// the wrappers are changed.
|
||||
assert(alignof(curve_Fr) == alignof(uint64_t));
|
||||
assert(alignof(curve_G1) == alignof(uint64_t));
|
||||
assert(alignof(curve_G2) == alignof(uint64_t));
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 316e68b8c85f7a064a56465e253c022203eef4bd
|
Loading…
Reference in New Issue