Merge pull request #795 from nuttycom/upgrade/ff_0.13

Update dependencies to reflect changes in ff 0.13
This commit is contained in:
Kris Nuttycombe 2023-03-20 16:10:35 -06:00 committed by GitHub
commit b77c952583
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 67 additions and 33 deletions

View File

@ -21,3 +21,6 @@ codegen-units = 1
[patch.crates-io]
zcash_encoding = { path = "components/zcash_encoding" }
zcash_note_encryption = { path = "components/zcash_note_encryption" }
orchard = { git = "https://github.com/zcash/orchard.git", rev = "6cbde279e90974201bedbd9b5ddf155e8f8b1e8e" }
halo2_gadgets = { git = "https://github.com/zcash/halo2.git", rev = "642924d614305d882cc122739c59144109f4bd3f" }
halo2_proofs = { git = "https://github.com/zcash/halo2.git", rev = "642924d614305d882cc122739c59144109f4bd3f" }

View File

@ -7,6 +7,15 @@ and this library adheres to Rust's notion of
## [Unreleased]
### Changed
- Bumped dependencies to `bls12_381 0.8`, `group 0.13`,
- The dependency on `zcash_primitives` no longer enables the `multicore` feature
by default in order to support compilation under `wasm32-wasi`. Users of other
platforms may need to include an explicit dependency on `zcash_primitives`
without `default-features = false` or otherwise explicitly enable the
`zcash_primitives/multicore` feature if they did not already depend
upon `zcash_primitives` with default features enabled.
## [0.7.0] - 2023-02-01
### Added
- `zcash_client_backend::data_api::wallet`:
@ -26,7 +35,7 @@ and this library adheres to Rust's notion of
- The `parameters: &ParamsT` argument has been removed. When `None` is given
as the `validate_from` argument, `validate_chain` will now pass `None` to
`BlockSource::with_blocks` (instead of the Sapling network upgrade's
activation height).
activation height).
- A `limit: Option<u32>` argument has been added. This enables callers to
validate smaller intervals of blocks already present on the provided
`BlockSource`, shortening processing times of the function call at the
@ -48,7 +57,7 @@ and this library adheres to Rust's notion of
- The `cmu` field of `zcash_client_backend::wallet::WalletShieldedOutput`.
- `zcash_client_backend::proto::compact_formats::CompactSaplingOutput::cmu`.
### Removed
### Removed
- `zcash_client_backend::data_api`:
- `WalletWrite::remove_unmined_tx` (was behind the `unstable` feature flag).

View File

@ -23,7 +23,7 @@ development = ["zcash_proofs"]
zcash_address = { version = "0.2", path = "../components/zcash_address" }
zcash_encoding = { version = "0.2", path = "../components/zcash_encoding" }
zcash_note_encryption = { version = "0.2", path = "../components/zcash_note_encryption" }
zcash_primitives = { version = "0.10", path = "../zcash_primitives" }
zcash_primitives = { version = "0.10", path = "../zcash_primitives", default-features = false }
# Dependencies exposed in a public API:
# (Breaking upgrades to these require a breaking upgrade to this crate.)
@ -51,9 +51,9 @@ secrecy = "0.8"
subtle = "2.2.3"
# - Shielded protocols
bls12_381 = "0.7"
group = "0.12"
orchard = "0.3"
bls12_381 = "0.8"
group = "0.13"
orchard = { version = "0.3", default-features = false }
# - Test dependencies
proptest = { version = "1.0.0", optional = true }
@ -79,12 +79,12 @@ which = "4"
assert_matches = "1.5"
gumdrop = "0.8"
hex = "0.4"
jubjub = "0.9"
jubjub = "0.10"
proptest = "1.0.0"
rand_core = "0.6"
rand_xorshift = "0.3"
tempfile = "3.1.0"
zcash_proofs = { version = "0.10", path = "../zcash_proofs" }
zcash_proofs = { version = "0.10", path = "../zcash_proofs", default-features = false }
zcash_address = { version = "0.2", path = "../components/zcash_address", features = ["test-dependencies"] }
[features]

View File

@ -7,10 +7,19 @@ and this library adheres to Rust's notion of
## [Unreleased]
### Changed
- Bumped dependencies to `group 0.13`, `jubjub 0.10`
- The dependency on `zcash_primitives` no longer enables the `multicore` feature
by default in order to support compilation under `wasm32-wasi`. Users of other
platforms may need to include an explicit dependency on `zcash_primitives`
without `default-features = false` or otherwise explicitly enable the
`zcash_primitives/multicore` feature if they did not already depend
upon `zcash_primitives` with default features enabled.
## [0.7.0] - 2023-02-01
### Added
- `zcash_client_sqlite::FsBlockDb::rewind_to_height` rewinds the BlockMeta Db
to the specified height following the same logic as homonymous functions on
to the specified height following the same logic as homonymous functions on
`WalletDb`. This function does not delete the files referenced by the rows
that might be present and are deleted by this function call.
- `zcash_client_sqlite::FsBlockDb::find_block`

View File

@ -15,7 +15,7 @@ rust-version = "1.60"
[dependencies]
zcash_client_backend = { version = "0.7", path = "../zcash_client_backend" }
zcash_primitives = { version = "0.10", path = "../zcash_primitives" }
zcash_primitives = { version = "0.10", path = "../zcash_primitives", default-features = false }
# Dependencies exposed in a public API:
# (Breaking upgrades to these require a breaking upgrade to this crate.)
@ -33,8 +33,8 @@ prost = "0.11"
secrecy = "0.8"
# - SQLite databases
group = "0.12"
jubjub = "0.9"
group = "0.13"
jubjub = "0.10"
rusqlite = { version = "0.25", features = ["bundled", "time", "array"] }
schemer = "0.2"
schemer-rusqlite = "0.2.1"

View File

@ -11,11 +11,11 @@ rust-version = "1.60"
[dependencies]
blake2b_simd = "1"
zcash_primitives = { version = "0.10", path = "../zcash_primitives", features = ["zfuture" ] }
zcash_primitives = { version = "0.10", path = "../zcash_primitives", default-features = false, features = ["zfuture" ] }
[dev-dependencies]
ff = "0.12"
jubjub = "0.9"
ff = "0.13"
jubjub = "0.10"
rand_core = "0.6"
zcash_address = { version = "0.2", path = "../components/zcash_address" }
zcash_proofs = { version = "0.10", path = "../zcash_proofs" }

View File

@ -7,10 +7,17 @@ and this library adheres to Rust's notion of
## [Unreleased]
### Changed
- Bumped dependencies to `bls12_381 0.8`, `ff 0.13`, `group 0.13`, `jubjub 0.10`
## [0.10.2] - 2023-03-16
### Added
- `zcash_primitives::sapling::note`:
- `NoteCommitment::temporary_zcashd_derive`
- A new feature flag, `multicore`, has been added and is enabled by default.
This allows users to selectively disable multicore support for Orchard proof
creation by setting `default_features = false` on their `zcash_primitives`
dependency, such as is needed to enable `wasm32-wasi` compilation.
## [0.10.1] - 2023-03-08
### Added

View File

@ -39,13 +39,13 @@ memuse = "0.2.1"
subtle = "2.2.3"
# - Shielded protocols
bls12_381 = "0.7"
ff = "0.12"
group = { version = "0.12.1", features = ["wnaf-memuse"] }
bls12_381 = "0.8"
ff = "0.13"
group = { version = "0.13", features = ["wnaf-memuse"] }
incrementalmerkletree = "0.3"
jubjub = "0.9"
jubjub = "0.10"
nonempty = "0.7"
orchard = "0.3"
orchard = { version = "0.3", default-features = false }
# - Static constants
lazy_static = "1"
@ -90,13 +90,15 @@ criterion = "0.4"
proptest = "1.0.0"
assert_matches = "1.3.0"
rand_xorshift = "0.3"
orchard = { version = "0.3", features = ["test-dependencies"] }
orchard = { version = "0.3", default-features = false, features = ["test-dependencies"] }
[target.'cfg(unix)'.dev-dependencies]
pprof = { version = "0.11", features = ["criterion", "flamegraph"] } # MSRV 1.56
inferno = ">=0.11, <0.11.5" # MSRV 1.59
[features]
default = ["multicore"]
multicore = ["orchard/multicore"]
transparent-inputs = ["hdwallet", "ripemd", "secp256k1"]
temporary-zcashd = []
test-dependencies = ["proptest", "orchard/test-dependencies"]

View File

@ -7,6 +7,10 @@ and this library adheres to Rust's notion of
## [Unreleased]
### Changed
- Bumped dependencies to `bls12_381 0.8`, `group 0.13`, `jubjub 0.10`,
`bellman 0.14`
## [0.10.0] - 2023-02-01
### Added
- `zcash_proofs::circuit::sapling`:

View File

@ -17,14 +17,14 @@ categories = ["cryptography::cryptocurrencies"]
all-features = true
[dependencies]
zcash_primitives = { version = "0.10", path = "../zcash_primitives" }
zcash_primitives = { version = "0.10", path = "../zcash_primitives", default-features = false }
# Dependencies exposed in a public API:
# (Breaking upgrades to these require a breaking upgrade to this crate.)
bellman = { version = "0.13.1", default-features = false, features = ["groth16"] }
bls12_381 = "0.7"
group = "0.12"
jubjub = "0.9"
bellman = { version = "0.14", default-features = false, features = ["groth16"] }
bls12_381 = "0.8"
group = "0.13"
jubjub = "0.10"
lazy_static = "1"
minreq = { version = "2", features = ["https"], optional = true }
rand_core = "0.6"
@ -51,7 +51,7 @@ default = ["local-prover", "multicore"]
bundled-prover = ["wagyu-zcash-parameters"]
download-params = ["minreq", "directories"]
local-prover = ["directories"]
multicore = ["bellman/multicore"]
multicore = ["bellman/multicore", "zcash_primitives/multicore"]
[lib]
bench = false

View File

@ -107,7 +107,7 @@ impl InputNote {
// if enforce is one, they must be equal
cs.enforce(
|| format!("conditionally enforce correct root for bit {}", i),
|_| cur.lc(CS::one(), Scalar::one()) - &rt.lc(CS::one(), Scalar::one()),
|_| cur.lc(CS::one(), Scalar::ONE) - &rt.lc(CS::one(), Scalar::ONE),
|lc| lc + enforce.get_variable(),
|lc| lc,
);
@ -156,9 +156,9 @@ where
// x = rhs
cs.enforce(
|| "conditional swap for x",
|lc| lc + &rhs.lc(CS::one(), Scalar::one()) - &lhs.lc(CS::one(), Scalar::one()),
|lc| lc + &rhs.lc(CS::one(), Scalar::ONE) - &lhs.lc(CS::one(), Scalar::ONE),
|lc| lc + condition.get_variable(),
|lc| lc + &x.lc(CS::one(), Scalar::one()) - &lhs.lc(CS::one(), Scalar::one()),
|lc| lc + &x.lc(CS::one(), Scalar::ONE) - &lhs.lc(CS::one(), Scalar::ONE),
);
let y = Boolean::from(AllocatedBit::alloc(
@ -172,9 +172,9 @@ where
// y - rhs = condition (lhs - rhs)
cs.enforce(
|| "conditional swap for y",
|lc| lc + &lhs.lc(CS::one(), Scalar::one()) - &rhs.lc(CS::one(), Scalar::one()),
|lc| lc + &lhs.lc(CS::one(), Scalar::ONE) - &rhs.lc(CS::one(), Scalar::ONE),
|lc| lc + condition.get_variable(),
|lc| lc + &y.lc(CS::one(), Scalar::one()) - &rhs.lc(CS::one(), Scalar::one()),
|lc| lc + &y.lc(CS::one(), Scalar::ONE) - &rhs.lc(CS::one(), Scalar::ONE),
);
new_lhs.push(x);

View File

@ -264,7 +264,7 @@ impl NoteValue {
fn lc<Scalar: PrimeField>(&self) -> LinearCombination<Scalar> {
let mut tmp = LinearCombination::zero();
let mut coeff = Scalar::one();
let mut coeff = Scalar::ONE;
for b in &self.bits {
tmp = tmp + (coeff, b.get_variable());
coeff = coeff.double();