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