From 5b00699d66086a99e41d7b6c7d09059a4c6b243f Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Wed, 1 Feb 2023 01:58:45 +0000 Subject: [PATCH 1/5] Update changelogs --- zcash_client_backend/CHANGELOG.md | 51 +++++++++++++++---------------- zcash_client_sqlite/CHANGELOG.md | 30 +++--------------- 2 files changed, 29 insertions(+), 52 deletions(-) diff --git a/zcash_client_backend/CHANGELOG.md b/zcash_client_backend/CHANGELOG.md index 6e12321bc..5a509c804 100644 --- a/zcash_client_backend/CHANGELOG.md +++ b/zcash_client_backend/CHANGELOG.md @@ -9,44 +9,43 @@ and this library adheres to Rust's notion of ### Added - `zcash_client_backend::data_api::wallet`: + - `input_selection::Proposal::{is_shielding, target_height}` - `propose_transfer` - `propose_shielding` - `create_proposed_transaction` ### Changed - MSRV is now 1.60.0. - -- `zcash_client_backend::data_api::wallet::shield_transparent_funds` now - takes a `shielding_threshold` argument that can be used to specify the - minimum value allowed as input to a shielding transaction. Previously - the shielding threshold was fixed at 100000 zatoshis. - +- `zcash_client_backend::data_api::chain`: + - `BlockSource::with_blocks` now takes `from_height` as `Option` + instead of `BlockHeight`. Trait implementors should return all available + blocks in the datastore when `from_height` is `None`. + - Various **breaking changes** to `validate_chain`: + - 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). + - A `limit: Option` 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 + expense of obtaining a partial result. When providing a `limit`, a result + of `Ok(())` means that the chain has been validated on its continuity of + heights and hashes in the range `[validate_from, validate_from + limit)`. + Callers are responsible for making subsequent calls to `validate_chain` in + order to complete validating the totality of `block_source`. +- `zcash_client_backend::data_api::wallet`: + - `input_selection::Proposal` no longer has a `TransparentInput` generic + parameter, and `Proposal::transparent_inputs` now returns + `&[zcash_client_backend::wallet::WalletTransparentOutput]`. + - `shield_transparent_funds` now takes a `shielding_threshold` argument that + can be used to specify the minimum value allowed as input to a shielding + transaction. Previously the shielding threshold was fixed at 100000 zatoshis. - Note commitments now use `zcash_primitives::sapling::note::ExtractedNoteCommitment` instead of `bls12_381::Scalar` in the following places: - The `cmu` field of `zcash_client_backend::wallet::WalletShieldedOutput`. - `zcash_client_backend::proto::compact_formats::CompactSaplingOutput::cmu`. -- **breaking changes** to `zcash_client_backend::data_api::chain::validate_chain` - - `validate_chain` now requires a non-optional `validate_from` parameter that - indicates the starting point of the `BlockSourceT` validation. An Optional - `limit` can be specified as well. This allows callers to validate smaller - intervals of blocks already present on the provided `BlockSource` shortening - processing times of the function call at the expense of obtaining a partial - result. - - - `params: &ParamsT` has been removed from the arguments since they were only - needed to fall back to `sapling_activation_height` when `None` as passed as - the `validate_from` argument. Implementors of `BlockSource` are resposible - of definining how they will fall back to a suitable value when `validate_from` - is `None`. - - - When passing a `limit` to the chain validation function, a successful output, - indicates that the chain has been validated on its continuity of heights and hashes - within the limits of the range `[validate_from, validate_from + limit)`. - Callers providing a `limit` argument are responsible for making subsequent calls to - `validate_chain()` in order to complete validating the totality of the block_source. - ### Removed - `zcash_client_backend::data_api`: - `WalletWrite::remove_unmined_tx` (was behind the `unstable` feature flag). diff --git a/zcash_client_sqlite/CHANGELOG.md b/zcash_client_sqlite/CHANGELOG.md index 6fb16f18a..57a7a0231 100644 --- a/zcash_client_sqlite/CHANGELOG.md +++ b/zcash_client_sqlite/CHANGELOG.md @@ -17,32 +17,10 @@ and this library adheres to Rust's notion of ### Changed - MSRV is now 1.60.0. - -- **breaking changes** to `validate_chain`. - - `zcash_client_backend::data_api::chain::validate_chain` now requires a - non-optional `validate_from` parameter that indicates the starting point of - the `BlockSourceT` validation. An Optional `limit` can be specified as - well. This allows callers to validate smaller intervals of the given - `BlockSourceT` shortening processing times of the function call at the - expense of obtaining a partial result on a given section of interest of the - block source. - - `params: &ParamsT` has been removed from the arguments since they were only needed - to fall back to `sapling_activation_height` when `None` as passed as the - `validate_from` argument. Passing `None` as validation start point on a - pre-populated `block_source` would result in an error - `ChainError::block_height_discontinuity(sapling_activation_height - 1, current_height)` - - With this new API callers must specify a concrete `validate_from` argument and - assume that `validate_chain` will not take any default fallbacks to chain - `ParamsT`. - - The addition of a `limit` to the chain validation function changes the - meaning of its successful output, being now a `BlockHeight, BlockHash)` tuple - indicating the block height and block has up to which the chain as been - validated on its continuity of heights and hashes. Callers providing a - `limit` aregumente are responsible of subsequent calls to `validate_chain()` - to complete validating the totality of the block_source. - -### Removed -- implementation of unstable function `WalletWrite::remove_unmined_tx`, +- `zcash_client_backend::FsBlockDbError`: + - Renamed `FsBlockDbError::{DbError, FsError}` to `FsBlockDbError::{Db, Fs}`. + - Added `FsBlockDbError::MissingBlockPath`. + - `impl fmt::Display for FsBlockDbError` ## [0.4.2] - 2022-12-13 ### Fixed From 9852c31970cb8190892d715936d647b29864bd32 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Wed, 1 Feb 2023 02:07:16 +0000 Subject: [PATCH 2/5] zcash_primitives 0.10.0 --- zcash_client_backend/CHANGELOG.md | 1 + zcash_client_backend/Cargo.toml | 2 +- zcash_client_sqlite/CHANGELOG.md | 1 + zcash_client_sqlite/Cargo.toml | 4 ++-- zcash_extensions/Cargo.toml | 2 +- zcash_primitives/CHANGELOG.md | 2 ++ zcash_primitives/Cargo.toml | 2 +- zcash_proofs/CHANGELOG.md | 1 + zcash_proofs/Cargo.toml | 2 +- 9 files changed, 11 insertions(+), 6 deletions(-) diff --git a/zcash_client_backend/CHANGELOG.md b/zcash_client_backend/CHANGELOG.md index 5a509c804..316961f74 100644 --- a/zcash_client_backend/CHANGELOG.md +++ b/zcash_client_backend/CHANGELOG.md @@ -16,6 +16,7 @@ and this library adheres to Rust's notion of ### Changed - MSRV is now 1.60.0. +- Bumped dependencies to `zcash_primitives 0.10`. - `zcash_client_backend::data_api::chain`: - `BlockSource::with_blocks` now takes `from_height` as `Option` instead of `BlockHeight`. Trait implementors should return all available diff --git a/zcash_client_backend/Cargo.toml b/zcash_client_backend/Cargo.toml index d8e73af23..d6c4475bb 100644 --- a/zcash_client_backend/Cargo.toml +++ b/zcash_client_backend/Cargo.toml @@ -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.9", path = "../zcash_primitives" } +zcash_primitives = { version = "0.10", path = "../zcash_primitives" } # Dependencies exposed in a public API: # (Breaking upgrades to these require a breaking upgrade to this crate.) diff --git a/zcash_client_sqlite/CHANGELOG.md b/zcash_client_sqlite/CHANGELOG.md index 57a7a0231..4abf697f2 100644 --- a/zcash_client_sqlite/CHANGELOG.md +++ b/zcash_client_sqlite/CHANGELOG.md @@ -17,6 +17,7 @@ and this library adheres to Rust's notion of ### Changed - MSRV is now 1.60.0. +- Bumped dependencies to `zcash_primitives 0.10`. - `zcash_client_backend::FsBlockDbError`: - Renamed `FsBlockDbError::{DbError, FsError}` to `FsBlockDbError::{Db, Fs}`. - Added `FsBlockDbError::MissingBlockPath`. diff --git a/zcash_client_sqlite/Cargo.toml b/zcash_client_sqlite/Cargo.toml index 52e865f24..f1b6b03c2 100644 --- a/zcash_client_sqlite/Cargo.toml +++ b/zcash_client_sqlite/Cargo.toml @@ -15,7 +15,7 @@ rust-version = "1.60" [dependencies] zcash_client_backend = { version = "0.6", path = "../zcash_client_backend" } -zcash_primitives = { version = "0.9", path = "../zcash_primitives" } +zcash_primitives = { version = "0.10", path = "../zcash_primitives" } # Dependencies exposed in a public API: # (Breaking upgrades to these require a breaking upgrade to this crate.) @@ -52,7 +52,7 @@ regex = "1.4" tempfile = "3" zcash_note_encryption = { version = "0.2", path = "../components/zcash_note_encryption" } zcash_proofs = { version = "0.9", path = "../zcash_proofs" } -zcash_primitives = { version = "0.9", path = "../zcash_primitives", features = ["test-dependencies"] } +zcash_primitives = { version = "0.10", path = "../zcash_primitives", features = ["test-dependencies"] } zcash_address = { version = "0.2", path = "../components/zcash_address", features = ["test-dependencies"] } [features] diff --git a/zcash_extensions/Cargo.toml b/zcash_extensions/Cargo.toml index ceeeda22f..613cd78fe 100644 --- a/zcash_extensions/Cargo.toml +++ b/zcash_extensions/Cargo.toml @@ -11,7 +11,7 @@ rust-version = "1.60" [dependencies] blake2b_simd = "1" -zcash_primitives = { version = "0.9", path = "../zcash_primitives", features = ["zfuture" ] } +zcash_primitives = { version = "0.10", path = "../zcash_primitives", features = ["zfuture" ] } [dev-dependencies] ff = "0.12" diff --git a/zcash_primitives/CHANGELOG.md b/zcash_primitives/CHANGELOG.md index 8a42f2c78..0dcaa7fbe 100644 --- a/zcash_primitives/CHANGELOG.md +++ b/zcash_primitives/CHANGELOG.md @@ -6,6 +6,8 @@ and this library adheres to Rust's notion of [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] + +## [0.10.0] - 2023-02-01 ### Added - `zcash_primitives::sapling`: - `keys::DiversifiedTransmissionKey` diff --git a/zcash_primitives/Cargo.toml b/zcash_primitives/Cargo.toml index 9111a3d15..861e2a24f 100644 --- a/zcash_primitives/Cargo.toml +++ b/zcash_primitives/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "zcash_primitives" description = "Rust implementations of the Zcash primitives" -version = "0.9.1" +version = "0.10.0" authors = [ "Jack Grigg ", "Kris Nuttycombe " diff --git a/zcash_proofs/CHANGELOG.md b/zcash_proofs/CHANGELOG.md index 2e10c8104..81a2c8d65 100644 --- a/zcash_proofs/CHANGELOG.md +++ b/zcash_proofs/CHANGELOG.md @@ -13,6 +13,7 @@ and this library adheres to Rust's notion of ### Changed - MSRV is now 1.60.0. +- Bumped dependencies to `zcash_primitives 0.10`. - Note commitments now use `zcash_primitives::sapling::note::ExtractedNoteCommitment` instead of `bls12_381::Scalar` in `zcash_proofs::sapling`: diff --git a/zcash_proofs/Cargo.toml b/zcash_proofs/Cargo.toml index 8e89fe802..acdc785c2 100644 --- a/zcash_proofs/Cargo.toml +++ b/zcash_proofs/Cargo.toml @@ -17,7 +17,7 @@ categories = ["cryptography::cryptocurrencies"] all-features = true [dependencies] -zcash_primitives = { version = "0.9", path = "../zcash_primitives" } +zcash_primitives = { version = "0.10", path = "../zcash_primitives" } # Dependencies exposed in a public API: # (Breaking upgrades to these require a breaking upgrade to this crate.) From 24b5e04c8db2e1c692cbb45b5a393ed52491ccab Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Wed, 1 Feb 2023 02:09:02 +0000 Subject: [PATCH 3/5] zcash_proofs 0.10.0 --- zcash_client_backend/Cargo.toml | 2 +- zcash_client_sqlite/Cargo.toml | 2 +- zcash_extensions/Cargo.toml | 2 +- zcash_proofs/CHANGELOG.md | 2 ++ zcash_proofs/Cargo.toml | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/zcash_client_backend/Cargo.toml b/zcash_client_backend/Cargo.toml index d6c4475bb..a9ce991ce 100644 --- a/zcash_client_backend/Cargo.toml +++ b/zcash_client_backend/Cargo.toml @@ -84,7 +84,7 @@ proptest = "1.0.0" rand_core = "0.6" rand_xorshift = "0.3" tempfile = "3.1.0" -zcash_proofs = { version = "0.9", path = "../zcash_proofs" } +zcash_proofs = { version = "0.10", path = "../zcash_proofs" } zcash_address = { version = "0.2", path = "../components/zcash_address", features = ["test-dependencies"] } [features] diff --git a/zcash_client_sqlite/Cargo.toml b/zcash_client_sqlite/Cargo.toml index f1b6b03c2..765274be6 100644 --- a/zcash_client_sqlite/Cargo.toml +++ b/zcash_client_sqlite/Cargo.toml @@ -51,7 +51,7 @@ rand_core = "0.6" regex = "1.4" tempfile = "3" zcash_note_encryption = { version = "0.2", path = "../components/zcash_note_encryption" } -zcash_proofs = { version = "0.9", path = "../zcash_proofs" } +zcash_proofs = { version = "0.10", path = "../zcash_proofs" } zcash_primitives = { version = "0.10", path = "../zcash_primitives", features = ["test-dependencies"] } zcash_address = { version = "0.2", path = "../components/zcash_address", features = ["test-dependencies"] } diff --git a/zcash_extensions/Cargo.toml b/zcash_extensions/Cargo.toml index 613cd78fe..e4abbb795 100644 --- a/zcash_extensions/Cargo.toml +++ b/zcash_extensions/Cargo.toml @@ -18,7 +18,7 @@ ff = "0.12" jubjub = "0.9" rand_core = "0.6" zcash_address = { version = "0.2", path = "../components/zcash_address" } -zcash_proofs = { version = "0.9", path = "../zcash_proofs" } +zcash_proofs = { version = "0.10", path = "../zcash_proofs" } [features] transparent-inputs = [] diff --git a/zcash_proofs/CHANGELOG.md b/zcash_proofs/CHANGELOG.md index 81a2c8d65..5b7f65895 100644 --- a/zcash_proofs/CHANGELOG.md +++ b/zcash_proofs/CHANGELOG.md @@ -6,6 +6,8 @@ and this library adheres to Rust's notion of [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] + +## [0.10.0] - 2023-02-01 ### Added - `zcash_proofs::circuit::sapling`: - `ValueCommitmentOpening` diff --git a/zcash_proofs/Cargo.toml b/zcash_proofs/Cargo.toml index acdc785c2..71b102fc8 100644 --- a/zcash_proofs/Cargo.toml +++ b/zcash_proofs/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "zcash_proofs" description = "Zcash zk-SNARK circuits and proving APIs" -version = "0.9.0" +version = "0.10.0" authors = [ "Jack Grigg ", ] From d8cb20e0916c5200ee102b80d07950edece22347 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Wed, 1 Feb 2023 02:11:56 +0000 Subject: [PATCH 4/5] zcash_client_backend 0.7.0 --- zcash_client_backend/CHANGELOG.md | 1 + zcash_client_backend/Cargo.toml | 2 +- zcash_client_sqlite/CHANGELOG.md | 2 +- zcash_client_sqlite/Cargo.toml | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/zcash_client_backend/CHANGELOG.md b/zcash_client_backend/CHANGELOG.md index 316961f74..6f1b10c5c 100644 --- a/zcash_client_backend/CHANGELOG.md +++ b/zcash_client_backend/CHANGELOG.md @@ -7,6 +7,7 @@ and this library adheres to Rust's notion of ## [Unreleased] +## [0.7.0] - 2023-02-01 ### Added - `zcash_client_backend::data_api::wallet`: - `input_selection::Proposal::{is_shielding, target_height}` diff --git a/zcash_client_backend/Cargo.toml b/zcash_client_backend/Cargo.toml index a9ce991ce..816d19970 100644 --- a/zcash_client_backend/Cargo.toml +++ b/zcash_client_backend/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "zcash_client_backend" description = "APIs for creating shielded Zcash light clients" -version = "0.6.1" +version = "0.7.0" authors = [ "Jack Grigg ", "Kris Nuttycombe " diff --git a/zcash_client_sqlite/CHANGELOG.md b/zcash_client_sqlite/CHANGELOG.md index 4abf697f2..b080f16a9 100644 --- a/zcash_client_sqlite/CHANGELOG.md +++ b/zcash_client_sqlite/CHANGELOG.md @@ -17,7 +17,7 @@ and this library adheres to Rust's notion of ### Changed - MSRV is now 1.60.0. -- Bumped dependencies to `zcash_primitives 0.10`. +- Bumped dependencies to `zcash_primitives 0.10`, `zcash_client_backend 0.7`. - `zcash_client_backend::FsBlockDbError`: - Renamed `FsBlockDbError::{DbError, FsError}` to `FsBlockDbError::{Db, Fs}`. - Added `FsBlockDbError::MissingBlockPath`. diff --git a/zcash_client_sqlite/Cargo.toml b/zcash_client_sqlite/Cargo.toml index 765274be6..f81fa3df5 100644 --- a/zcash_client_sqlite/Cargo.toml +++ b/zcash_client_sqlite/Cargo.toml @@ -14,7 +14,7 @@ edition = "2021" rust-version = "1.60" [dependencies] -zcash_client_backend = { version = "0.6", path = "../zcash_client_backend" } +zcash_client_backend = { version = "0.7", path = "../zcash_client_backend" } zcash_primitives = { version = "0.10", path = "../zcash_primitives" } # Dependencies exposed in a public API: From 5f7cae1762ee668cf3b19da6057f028dbbdd6715 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Wed, 1 Feb 2023 02:12:47 +0000 Subject: [PATCH 5/5] zcash_client_sqlite 0.5.0 --- zcash_client_sqlite/CHANGELOG.md | 4 +++- zcash_client_sqlite/Cargo.toml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/zcash_client_sqlite/CHANGELOG.md b/zcash_client_sqlite/CHANGELOG.md index b080f16a9..92e075519 100644 --- a/zcash_client_sqlite/CHANGELOG.md +++ b/zcash_client_sqlite/CHANGELOG.md @@ -6,7 +6,9 @@ and this library adheres to Rust's notion of [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] -### Added + +## [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 `WalletDb`. This function does not delete the files referenced by the rows diff --git a/zcash_client_sqlite/Cargo.toml b/zcash_client_sqlite/Cargo.toml index f81fa3df5..7f0d9e892 100644 --- a/zcash_client_sqlite/Cargo.toml +++ b/zcash_client_sqlite/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "zcash_client_sqlite" description = "An SQLite-based Zcash light client" -version = "0.4.2" +version = "0.5.0" authors = [ "Jack Grigg ", "Kris Nuttycombe "