Skip to content

Commit

Permalink
Migrate to ff 0.9 et al.
Browse files Browse the repository at this point in the history
  • Loading branch information
str4d committed May 19, 2021
1 parent 05bd98b commit 5623e02
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 43 deletions.
8 changes: 4 additions & 4 deletions components/zcash_note_encryption/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ edition = "2018"
blake2b_simd = "0.5"
byteorder = "1"
crypto_api_chachapoly = "0.4"
ff = "0.8"
group = "0.8"
rand_core = "0.5.1"
ff = "0.9"
group = "0.9"
rand_core = "0.6"
subtle = "2.2.3"

[dev-dependencies]
zcash_primitives = { version = "0.5", path = "../../zcash_primitives" }
jubjub = "0.5.1"
jubjub = "0.6"
13 changes: 6 additions & 7 deletions zcash_client_backend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ edition = "2018"

[dependencies]
bech32 = "0.8"
bls12_381 = "0.3.1"
bls12_381 = "0.4"
bs58 = { version = "0.4", features = ["check"] }
base64 = "0.13"
ff = "0.8"
group = "0.8"
ff = "0.9"
group = "0.9"
hex = "0.4"
jubjub = "0.5.1"
jubjub = "0.6"
nom = "6.1"
percent-encoding = "2.1.0"
proptest = { version = "0.10.1", optional = true }
protobuf = "2.20"
rand_core = "0.5.1"
rand_core = "0.6"
subtle = "2.2.3"
time = "0.2"
zcash_note_encryption = { version = "0.0", path = "../components/zcash_note_encryption" }
Expand All @@ -36,8 +36,7 @@ protobuf-codegen-pure = "2.20"

[dev-dependencies]
gumdrop = "0.8"
rand_core = "0.5.1"
rand_xorshift = "0.2"
rand_xorshift = "0.3"
tempfile = "3.1.0"
zcash_client_sqlite = { version = "0.3", path = "../zcash_client_sqlite" }
zcash_proofs = { version = "0.5", path = "../zcash_proofs" }
Expand Down
9 changes: 4 additions & 5 deletions zcash_client_sqlite/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,17 @@ edition = "2018"
[dependencies]
bech32 = "0.8"
bs58 = { version = "0.4", features = ["check"] }
ff = "0.8"
group = "0.8"
jubjub = "0.5.1"
ff = "0.9"
group = "0.9"
jubjub = "0.6"
protobuf = "2.20"
rand_core = "0.5.1"
rand_core = "0.6"
rusqlite = { version = "0.24", features = ["bundled", "time"] }
time = "0.2"
zcash_client_backend = { version = "0.5", path = "../zcash_client_backend" }
zcash_primitives = { version = "0.5", path = "../zcash_primitives" }

[dev-dependencies]
rand_core = "0.5.1"
tempfile = "3"
zcash_proofs = { version = "0.5", path = "../zcash_proofs" }

Expand Down
6 changes: 3 additions & 3 deletions zcash_extensions/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ blake2b_simd = "0.5"
zcash_primitives = { version = "0.5", path = "../zcash_primitives", features = ["zfuture"] }

[dev-dependencies]
ff = "0.8"
jubjub = "0.5.1"
rand_core = "0.5.1"
ff = "0.9"
jubjub = "0.6"
rand_core = "0.6"
zcash_proofs = { version = "0.5", path = "../zcash_proofs" }
14 changes: 7 additions & 7 deletions zcash_primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@ aes = "0.6"
bitvec = "0.18"
blake2b_simd = "0.5"
blake2s_simd = "0.5"
bls12_381 = "0.3.1"
bls12_381 = "0.4"
byteorder = "1"
crypto_api_chachapoly = "0.4"
equihash = { version = "0.1", path = "../components/equihash" }
ff = "0.8"
ff = "0.9"
fpe = "0.4"
group = "0.8"
group = "0.9"
hex = "0.4"
jubjub = "0.5.1"
jubjub = "0.6"
lazy_static = "1"
log = "0.4"
proptest = { version = "0.10.1", optional = true }
rand = "0.7"
rand_core = "0.5.1"
rand = "0.8"
rand_core = "0.6"
ripemd160 = { version = "0.9", optional = true }
secp256k1 = { version = "0.20", optional = true }
sha2 = "0.9"
Expand All @@ -47,7 +47,7 @@ funty = "=1.1.0"
criterion = "0.3"
hex-literal = "0.3"
proptest = "0.10.1"
rand_xorshift = "0.2"
rand_xorshift = "0.3"

[features]
transparent-inputs = ["ripemd160", "secp256k1"]
Expand Down
14 changes: 7 additions & 7 deletions zcash_proofs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,23 @@ edition = "2018"
all-features = true

[dependencies]
bellman = { version = "0.8", default-features = false, features = ["groth16"] }
bellman = { version = "0.9", default-features = false, features = ["groth16"] }
blake2b_simd = "0.5"
bls12_381 = "0.3.1"
bls12_381 = "0.4"
byteorder = "1"
directories = { version = "3", optional = true }
ff = "0.8"
group = "0.8"
jubjub = "0.5.1"
ff = "0.9"
group = "0.9"
jubjub = "0.6"
lazy_static = "1"
minreq = { version = "2", features = ["https"], optional = true }
rand_core = "0.5.1"
rand_core = "0.6"
wagyu-zcash-parameters = { version = "0.2", optional = true }
zcash_primitives = { version = "0.5", path = "../zcash_primitives" }

[dev-dependencies]
criterion = "0.3"
rand_xorshift = "0.2"
rand_xorshift = "0.3"

[features]
default = ["local-prover", "multicore"]
Expand Down
8 changes: 4 additions & 4 deletions zcash_proofs/src/circuit/ecc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -737,9 +737,9 @@ mod test {

let s_bits = s
.to_le_bits()
.into_iter()
.iter()
.by_val()
.take(jubjub::Fr::NUM_BITS as usize)
.cloned()
.enumerate()
.map(|(i, b)| {
AllocatedBit::alloc(cs.namespace(|| format!("scalar bit {}", i)), Some(b))
Expand Down Expand Up @@ -788,9 +788,9 @@ mod test {

let s_bits = s
.to_le_bits()
.into_iter()
.iter()
.by_val()
.take(jubjub::Fr::NUM_BITS as usize)
.cloned()
.enumerate()
.map(|(i, b)| {
AllocatedBit::alloc(cs.namespace(|| format!("scalar bit {}", i)), Some(b))
Expand Down
20 changes: 14 additions & 6 deletions zcash_proofs/src/circuit/sapling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -591,10 +591,14 @@ fn test_input_circuit_with_bls12_381() {

cur = jubjub::ExtendedPoint::from(pedersen_hash::pedersen_hash(
pedersen_hash::Personalization::MerkleTree(i),
lhs.into_iter()
lhs.iter()
.by_val()
.take(bls12_381::Scalar::NUM_BITS as usize)
.chain(rhs.into_iter().take(bls12_381::Scalar::NUM_BITS as usize))
.cloned(),
.chain(
rhs.iter()
.by_val()
.take(bls12_381::Scalar::NUM_BITS as usize),
),
))
.to_affine()
.get_u();
Expand Down Expand Up @@ -765,10 +769,14 @@ fn test_input_circuit_with_bls12_381_external_test_vectors() {

cur = jubjub::ExtendedPoint::from(pedersen_hash::pedersen_hash(
pedersen_hash::Personalization::MerkleTree(i),
lhs.into_iter()
lhs.iter()
.by_val()
.take(bls12_381::Scalar::NUM_BITS as usize)
.chain(rhs.into_iter().take(bls12_381::Scalar::NUM_BITS as usize))
.cloned(),
.chain(
rhs.iter()
.by_val()
.take(bls12_381::Scalar::NUM_BITS as usize),
),
))
.to_affine()
.get_u();
Expand Down

0 comments on commit 5623e02

Please sign in to comment.