mirror of
https://github.com/Qortal/pirate-librustzcash.git
synced 2025-07-30 20:11:23 +00:00
Move Jubjub, Pedersen hash and primitives into zcash_primitives
This commit is contained in:
@@ -13,7 +13,6 @@ directories = { version = "1", optional = true }
|
||||
ff = { path = "../ff" }
|
||||
pairing = { path = "../pairing" }
|
||||
rand_os = "0.2"
|
||||
sapling-crypto = { path = "../sapling-crypto" }
|
||||
zcash_primitives = { path = "../zcash_primitives" }
|
||||
|
||||
[dev-dependencies]
|
||||
|
@@ -1,14 +1,14 @@
|
||||
extern crate ff;
|
||||
extern crate sapling_crypto;
|
||||
extern crate bellman;
|
||||
extern crate pairing;
|
||||
extern crate rand_core;
|
||||
extern crate rand_xorshift;
|
||||
extern crate zcash_primitives;
|
||||
extern crate zcash_proofs;
|
||||
|
||||
use ff::Field;
|
||||
use std::time::{Duration, Instant};
|
||||
use sapling_crypto::jubjub::{
|
||||
use zcash_primitives::jubjub::{
|
||||
JubjubBls12,
|
||||
edwards,
|
||||
fs,
|
||||
@@ -16,7 +16,7 @@ use sapling_crypto::jubjub::{
|
||||
use zcash_proofs::circuit::sapling::{
|
||||
Spend
|
||||
};
|
||||
use sapling_crypto::primitives::{
|
||||
use zcash_primitives::primitives::{
|
||||
Diversifier,
|
||||
ProofGenerationKey,
|
||||
ValueCommitment
|
||||
|
@@ -15,7 +15,7 @@ use bellman::gadgets::num::{
|
||||
Num
|
||||
};
|
||||
|
||||
use sapling_crypto::jubjub::{
|
||||
use zcash_primitives::jubjub::{
|
||||
edwards,
|
||||
JubjubEngine,
|
||||
JubjubParams,
|
||||
@@ -754,14 +754,14 @@ mod test {
|
||||
use rand_xorshift::XorShiftRng;
|
||||
|
||||
use bellman::gadgets::test::*;
|
||||
use sapling_crypto::jubjub::{
|
||||
use zcash_primitives::jubjub::{
|
||||
montgomery,
|
||||
edwards,
|
||||
JubjubBls12,
|
||||
JubjubParams,
|
||||
FixedGenerators
|
||||
};
|
||||
use sapling_crypto::jubjub::fs::Fs;
|
||||
use zcash_primitives::jubjub::fs::Fs;
|
||||
|
||||
use super::{
|
||||
MontgomeryPoint,
|
||||
|
@@ -3,12 +3,12 @@ use super::ecc::{
|
||||
EdwardsPoint
|
||||
};
|
||||
use bellman::gadgets::boolean::Boolean;
|
||||
use sapling_crypto::jubjub::*;
|
||||
use zcash_primitives::jubjub::*;
|
||||
use bellman::{
|
||||
ConstraintSystem, SynthesisError
|
||||
};
|
||||
use bellman::gadgets::lookup::*;
|
||||
pub use sapling_crypto::pedersen_hash::Personalization;
|
||||
pub use zcash_primitives::pedersen_hash::Personalization;
|
||||
|
||||
fn get_constant_bools(person: &Personalization) -> Vec<Boolean> {
|
||||
person.get_bits()
|
||||
@@ -112,7 +112,7 @@ mod test {
|
||||
use super::*;
|
||||
use bellman::gadgets::test::*;
|
||||
use bellman::gadgets::boolean::{Boolean, AllocatedBit};
|
||||
use sapling_crypto::pedersen_hash;
|
||||
use zcash_primitives::pedersen_hash;
|
||||
use ff::PrimeField;
|
||||
use pairing::bls12_381::{Bls12, Fr};
|
||||
use rand_core::{RngCore, SeedableRng};
|
||||
|
@@ -6,14 +6,14 @@ use bellman::{
|
||||
Circuit
|
||||
};
|
||||
|
||||
use sapling_crypto::jubjub::{
|
||||
use zcash_primitives::jubjub::{
|
||||
JubjubEngine,
|
||||
FixedGenerators
|
||||
};
|
||||
|
||||
use sapling_crypto::constants;
|
||||
use zcash_primitives::constants;
|
||||
|
||||
use sapling_crypto::primitives::{
|
||||
use zcash_primitives::primitives::{
|
||||
ValueCommitment,
|
||||
ProofGenerationKey,
|
||||
PaymentAddress
|
||||
@@ -603,7 +603,7 @@ fn test_input_circuit_with_bls12_381() {
|
||||
use pairing::bls12_381::*;
|
||||
use rand_core::{RngCore, SeedableRng};
|
||||
use rand_xorshift::XorShiftRng;
|
||||
use sapling_crypto::{
|
||||
use zcash_primitives::{
|
||||
jubjub::{JubjubBls12, fs, edwards},
|
||||
pedersen_hash,
|
||||
primitives::{Diversifier, Note, ProofGenerationKey},
|
||||
@@ -747,7 +747,7 @@ fn test_output_circuit_with_bls12_381() {
|
||||
use pairing::bls12_381::*;
|
||||
use rand_core::{RngCore, SeedableRng};
|
||||
use rand_xorshift::XorShiftRng;
|
||||
use sapling_crypto::{
|
||||
use zcash_primitives::{
|
||||
jubjub::{JubjubBls12, fs, edwards},
|
||||
primitives::{Diversifier, ProofGenerationKey},
|
||||
};
|
||||
|
@@ -4,7 +4,6 @@ extern crate byteorder;
|
||||
extern crate ff;
|
||||
extern crate pairing;
|
||||
extern crate rand_os;
|
||||
extern crate sapling_crypto;
|
||||
extern crate zcash_primitives;
|
||||
|
||||
#[cfg(feature = "local-prover")]
|
||||
|
@@ -3,7 +3,7 @@
|
||||
use bellman::groth16::{Parameters, PreparedVerifyingKey};
|
||||
use directories::BaseDirs;
|
||||
use pairing::bls12_381::{Bls12, Fr};
|
||||
use sapling_crypto::{
|
||||
use zcash_primitives::{
|
||||
jubjub::{edwards, fs::Fs, Unknown},
|
||||
primitives::{Diversifier, PaymentAddress, ProofGenerationKey},
|
||||
};
|
||||
|
@@ -1,5 +1,5 @@
|
||||
use pairing::bls12_381::Bls12;
|
||||
use sapling_crypto::jubjub::{
|
||||
use zcash_primitives::jubjub::{
|
||||
edwards, fs::FsRepr, FixedGenerators, JubjubBls12, JubjubParams, Unknown,
|
||||
};
|
||||
use zcash_primitives::transaction::components::Amount;
|
||||
|
@@ -7,7 +7,7 @@ use bellman::{
|
||||
use ff::Field;
|
||||
use pairing::bls12_381::{Bls12, Fr};
|
||||
use rand_os::OsRng;
|
||||
use sapling_crypto::{
|
||||
use zcash_primitives::{
|
||||
jubjub::{edwards, fs::Fs, FixedGenerators, JubjubBls12, Unknown},
|
||||
primitives::{Diversifier, Note, PaymentAddress, ProofGenerationKey, ValueCommitment},
|
||||
};
|
||||
|
@@ -4,7 +4,7 @@ use bellman::{
|
||||
};
|
||||
use ff::Field;
|
||||
use pairing::bls12_381::{Bls12, Fr};
|
||||
use sapling_crypto::jubjub::{edwards, FixedGenerators, JubjubBls12, Unknown};
|
||||
use zcash_primitives::jubjub::{edwards, FixedGenerators, JubjubBls12, Unknown};
|
||||
use zcash_primitives::{
|
||||
redjubjub::{PublicKey, Signature},
|
||||
transaction::components::Amount,
|
||||
|
Reference in New Issue
Block a user