From 8cfacca86244a16c37a65cc87eccba36f17e7ee2 Mon Sep 17 00:00:00 2001 From: Alex Vlasov Date: Sun, 31 Mar 2019 10:27:08 +0300 Subject: [PATCH] fix imports in SONICs --- Cargo.toml | 4 ++-- src/sonic/tests/sonics.rs | 8 ++++---- src/sonic/unhelped/padding.rs | 8 ++++---- src/sonic/util.rs | 12 ++++++------ 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ef5fa53..6a73d80 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,8 +32,8 @@ tiny-keccak = {version = "1.4.2", optional = true} blake2-rfc = {version = "0.2.18", optional = true} [features] -default = ["multicore"] -#default = ["multicore", "gm17", "sonic"] +#default = ["multicore"] +default = ["multicore", "gm17", "sonic"] #default = ["wasm"] multicore = ["futures-cpupool", "num_cpus", "crossbeam"] sonic = ["tiny-keccak", "blake2-rfc"] diff --git a/src/sonic/tests/sonics.rs b/src/sonic/tests/sonics.rs index 4bc0d7d..7464c89 100644 --- a/src/sonic/tests/sonics.rs +++ b/src/sonic/tests/sonics.rs @@ -543,7 +543,7 @@ fn test_high_level_sonic_api() { #[test] fn test_constraints_info() { - use pairing::bn256::{Bn256}; + use crate::pairing::bn256::{Bn256}; use std::time::{Instant}; use crate::sonic::unhelped::padding::{constraints_info}; { @@ -572,9 +572,9 @@ fn test_constraints_info() { #[test] fn test_padding_using_mimc() { - use pairing::ff::{Field, PrimeField}; - use pairing::{Engine, CurveAffine, CurveProjective}; - use pairing::bls12_381::{Bls12, Fr}; + use crate::pairing::ff::{Field, PrimeField}; + use crate::pairing::{Engine, CurveAffine, CurveProjective}; + use crate::pairing::bls12_381::{Bls12, Fr}; use std::time::{Instant}; use crate::sonic::srs::SRS; diff --git a/src/sonic/unhelped/padding.rs b/src/sonic/unhelped/padding.rs index 99229ff..99b471a 100644 --- a/src/sonic/unhelped/padding.rs +++ b/src/sonic/unhelped/padding.rs @@ -1,5 +1,5 @@ -use pairing::ff::{Field}; -use pairing::{Engine, CurveProjective}; +use crate::pairing::ff::{Field}; +use crate::pairing::{Engine, CurveProjective}; use std::marker::PhantomData; use crate::sonic::cs::{Backend}; @@ -655,8 +655,8 @@ pub fn create_constraints_info, S: SynthesisDriver>( #[test] fn my_fun_circuit_test() { - use pairing::ff::PrimeField; - use pairing::bls12_381::{Bls12, Fr}; + use crate::pairing::ff::PrimeField; + use crate::pairing::bls12_381::{Bls12, Fr}; struct MyCircuit; diff --git a/src/sonic/util.rs b/src/sonic/util.rs index fefc4d6..45efc93 100644 --- a/src/sonic/util.rs +++ b/src/sonic/util.rs @@ -1048,8 +1048,8 @@ fn test_mut_distribute_powers() { #[test] fn test_trivial_parallel_kate_division() { - use pairing::ff::PrimeField; - use pairing::bls12_381::{Bls12, Fr}; + use crate::pairing::ff::PrimeField; + use crate::pairing::bls12_381::{Bls12, Fr}; let mut minus_one = Fr::one(); minus_one.negate(); @@ -1072,8 +1072,8 @@ fn test_trivial_parallel_kate_division() { #[test] fn test_less_trivial_parallel_kate_division() { - use pairing::ff::PrimeField; - use pairing::bls12_381::{Bls12, Fr}; + use crate::pairing::ff::PrimeField; + use crate::pairing::bls12_381::{Bls12, Fr}; let z = Fr::one(); @@ -1113,8 +1113,8 @@ fn test_less_trivial_parallel_kate_division() { #[test] fn test_parallel_kate_division() { - use pairing::ff::PrimeField; - use pairing::bls12_381::{Bls12, Fr}; + use crate::pairing::ff::PrimeField; + use crate::pairing::bls12_381::{Bls12, Fr}; let mut poly = vec![ Fr::from_str("328947234").unwrap(),