makes phase2 compile
This commit is contained in:
parent
c08803f3be
commit
37bdc022d6
@ -31,12 +31,12 @@ cfg_if! {
|
|||||||
#[cfg(feature = "wasm")]
|
#[cfg(feature = "wasm")]
|
||||||
compile_error!("Multicore feature is not yet compatible with wasm target arch");
|
compile_error!("Multicore feature is not yet compatible with wasm target arch");
|
||||||
|
|
||||||
mod multicore;
|
pub mod multicore;
|
||||||
mod worker {
|
mod worker {
|
||||||
pub use crate::multicore::*;
|
pub use crate::multicore::*;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
mod singlecore;
|
pub mod singlecore;
|
||||||
mod worker {
|
mod worker {
|
||||||
pub use crate::singlecore::*;
|
pub use crate::singlecore::*;
|
||||||
}
|
}
|
||||||
@ -51,4 +51,4 @@ use std::env;
|
|||||||
|
|
||||||
fn verbose_flag() -> bool {
|
fn verbose_flag() -> bool {
|
||||||
option_env!("BELLMAN_VERBOSE").unwrap_or("0") == "1"
|
option_env!("BELLMAN_VERBOSE").unwrap_or("0") == "1"
|
||||||
}
|
}
|
||||||
|
@ -9,9 +9,8 @@ license = "MIT/Apache-2.0"
|
|||||||
repository = "https://github.com/ebfull/phase2"
|
repository = "https://github.com/ebfull/phase2"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
pairing = "0.14"
|
|
||||||
rand = "0.4"
|
rand = "0.4"
|
||||||
bellman = "0.1"
|
bellman_ce = { path = "../bellman" }
|
||||||
byteorder = "1"
|
byteorder = "1"
|
||||||
num_cpus = "1"
|
num_cpus = "1"
|
||||||
crossbeam = "0.3"
|
crossbeam = "0.3"
|
||||||
|
@ -195,8 +195,7 @@
|
|||||||
//! `params.params()`, so that you can interact with the bellman APIs
|
//! `params.params()`, so that you can interact with the bellman APIs
|
||||||
//! just as before.
|
//! just as before.
|
||||||
|
|
||||||
extern crate pairing;
|
extern crate bellman_ce;
|
||||||
extern crate bellman;
|
|
||||||
extern crate rand;
|
extern crate rand;
|
||||||
extern crate byteorder;
|
extern crate byteorder;
|
||||||
extern crate blake2_rfc;
|
extern crate blake2_rfc;
|
||||||
@ -226,10 +225,12 @@ use std::{
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
use pairing::{
|
use bellman_ce::pairing::{
|
||||||
Engine,
|
Engine,
|
||||||
PrimeField,
|
ff::{
|
||||||
Field,
|
PrimeField,
|
||||||
|
Field,
|
||||||
|
},
|
||||||
EncodedPoint,
|
EncodedPoint,
|
||||||
CurveAffine,
|
CurveAffine,
|
||||||
CurveProjective,
|
CurveProjective,
|
||||||
@ -246,7 +247,9 @@ use pairing::{
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
use bellman::{
|
pub use bellman_ce::multicore::*;
|
||||||
|
|
||||||
|
use bellman_ce::{
|
||||||
Circuit,
|
Circuit,
|
||||||
SynthesisError,
|
SynthesisError,
|
||||||
Variable,
|
Variable,
|
||||||
@ -257,7 +260,6 @@ use bellman::{
|
|||||||
Parameters,
|
Parameters,
|
||||||
VerifyingKey
|
VerifyingKey
|
||||||
},
|
},
|
||||||
multicore::Worker
|
|
||||||
};
|
};
|
||||||
|
|
||||||
use rand::{
|
use rand::{
|
||||||
@ -565,7 +567,7 @@ impl MPCParameters {
|
|||||||
let alpha_coeffs_g1 = alpha_coeffs_g1.clone();
|
let alpha_coeffs_g1 = alpha_coeffs_g1.clone();
|
||||||
let beta_coeffs_g1 = beta_coeffs_g1.clone();
|
let beta_coeffs_g1 = beta_coeffs_g1.clone();
|
||||||
|
|
||||||
scope.spawn(move || {
|
scope.spawn(move |_| {
|
||||||
for ((((((a_g1, b_g1), b_g2), ext), at), bt), ct) in
|
for ((((((a_g1, b_g1), b_g2), ext), at), bt), ct) in
|
||||||
a_g1.iter_mut()
|
a_g1.iter_mut()
|
||||||
.zip(b_g1.iter_mut())
|
.zip(b_g1.iter_mut())
|
||||||
@ -1200,7 +1202,7 @@ fn same_ratio<G1: CurveAffine>(
|
|||||||
/// ... with high probability.
|
/// ... with high probability.
|
||||||
fn merge_pairs<G: CurveAffine>(v1: &[G], v2: &[G]) -> (G, G)
|
fn merge_pairs<G: CurveAffine>(v1: &[G], v2: &[G]) -> (G, G)
|
||||||
{
|
{
|
||||||
use std::sync::{Arc, Mutex};
|
use std::sync::Mutex;
|
||||||
use rand::{thread_rng};
|
use rand::{thread_rng};
|
||||||
|
|
||||||
assert_eq!(v1.len(), v2.len());
|
assert_eq!(v1.len(), v2.len());
|
||||||
|
Loading…
Reference in New Issue
Block a user