From a63cf37c7ba1cbdecb3ed6939b3146d052204435 Mon Sep 17 00:00:00 2001 From: Oscar Pepper Date: Thu, 7 Mar 2024 11:33:10 +0000 Subject: [PATCH 1/4] zcash_client_backend: Fixed cargo doc build failure when transparent-inputs feature is not specified (cherry picked from commit ab701118f38ae3471fd9e72ac752907828f3ecf4) --- zcash_client_backend/src/data_api/wallet.rs | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/zcash_client_backend/src/data_api/wallet.rs b/zcash_client_backend/src/data_api/wallet.rs index 6648810fd..182dfe944 100644 --- a/zcash_client_backend/src/data_api/wallet.rs +++ b/zcash_client_backend/src/data_api/wallet.rs @@ -7,16 +7,12 @@ //! shielded internal address belonging to their wallet. //! //! The important high-level operations provided by this module are [`propose_transfer`], -//! [`propose_shielding`], and [`create_proposed_transactions`]. +//! and [`create_proposed_transactions`]. //! //! [`propose_transfer`] takes a [`TransactionRequest`] object, selects inputs notes and //! computes the fees required to satisfy that request, and returns a [`Proposal`] object that //! describes the transaction to be made. //! -//! [`propose_shielding`] takes a set of transparent source addresses, and constructs a -//! [`Proposal`] to send those funds to a wallet-internal shielded address, as described in -//! [ZIP 316](https://zips.z.cash/zip-0316). -//! //! [`create_proposed_transactions`] constructs one or more Zcash [`Transaction`]s based upon a //! provided [`Proposal`], stores them to the wallet database, and returns the [`TxId`] for each //! constructed transaction to the caller. The caller can then use the @@ -24,9 +20,18 @@ //! the responsibility of the caller to retrieve and serialize the transactions and submit them for //! inclusion into the Zcash blockchain. //! +#![cfg_attr( + feature = "transparent-inputs", + doc = " +Another important high-level operation provided by this module is [`propose_shielding`], which +takes a set of transparent source addresses, and constructs a [`Proposal`] to send those funds +to a wallet-internal shielded address, as described in [ZIP 316](https://zips.z.cash/zip-0316). + +[`propose_shielding`]: crate::data_api::wallet::propose_shielding +" +)] //! [`TransactionRequest`]: crate::zip321::TransactionRequest //! [`propose_transfer`]: crate::data_api::wallet::propose_transfer -//! [`propose_shielding`]: crate::data_api::wallet::propose_shielding use nonempty::NonEmpty; use rand_core::OsRng; From 075a155a292a1562f574db1368152fa6aff114aa Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Sat, 9 Mar 2024 11:34:54 +0000 Subject: [PATCH 2/4] Remove `orchard` feature flag from docs.rs builds while not public --- zcash_client_backend/Cargo.toml | 11 ++++++++++- zcash_client_sqlite/Cargo.toml | 9 ++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/zcash_client_backend/Cargo.toml b/zcash_client_backend/Cargo.toml index bef853dbd..d67b28312 100644 --- a/zcash_client_backend/Cargo.toml +++ b/zcash_client_backend/Cargo.toml @@ -21,7 +21,16 @@ exclude = ["*.proto"] development = ["zcash_proofs"] [package.metadata.docs.rs] -all-features = true +# Manually specify features while `orchard` is not in the public API. +#all-features = true +features = [ + "lightwalletd-tonic", + "transparent-inputs", + "test-dependencies", + "unstable", + "unstable-serialization", + "unstable-spanning-tree", +] rustdoc-args = ["--cfg", "docsrs"] [dependencies] diff --git a/zcash_client_sqlite/Cargo.toml b/zcash_client_sqlite/Cargo.toml index 6b3599c56..dda89a24b 100644 --- a/zcash_client_sqlite/Cargo.toml +++ b/zcash_client_sqlite/Cargo.toml @@ -15,7 +15,14 @@ rust-version.workspace = true categories.workspace = true [package.metadata.docs.rs] -all-features = true +# Manually specify features while `orchard` is not in the public API. +#all-features = true +features = [ + "multicore", + "test-dependencies", + "transparent-inputs", + "unstable", +] rustdoc-args = ["--cfg", "docsrs"] [dependencies] From 7f38b79c3cd995cc958ab9ba0f5ba151060d42da Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Sat, 9 Mar 2024 11:38:33 +0000 Subject: [PATCH 3/4] zcash_client_backend 0.11.1 --- Cargo.lock | 2 +- zcash_client_backend/CHANGELOG.md | 5 +++++ zcash_client_backend/Cargo.toml | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 800b60f29..61a1bb04e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3006,7 +3006,7 @@ dependencies = [ [[package]] name = "zcash_client_backend" -version = "0.11.0" +version = "0.11.1" dependencies = [ "assert_matches", "base64", diff --git a/zcash_client_backend/CHANGELOG.md b/zcash_client_backend/CHANGELOG.md index 10ee7c5ea..1c5aeef9a 100644 --- a/zcash_client_backend/CHANGELOG.md +++ b/zcash_client_backend/CHANGELOG.md @@ -53,6 +53,11 @@ and this library adheres to Rust's notion of - `zcash_client_backend::fees`: - Arguments to `ChangeStrategy::compute_balance` have changed. +## [0.11.1] - 2024-03-09 + +### Fixed +- Documentation now correctly builds with all feature flags. + ## [0.11.0] - 2024-03-01 ### Added diff --git a/zcash_client_backend/Cargo.toml b/zcash_client_backend/Cargo.toml index d67b28312..ab45a5c7d 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.11.0" +version = "0.11.1" authors = [ "Jack Grigg ", "Kris Nuttycombe " From c6f1fdb73d47b8ae275a6d8f982fa5e529d2220c Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Sat, 9 Mar 2024 11:39:38 +0000 Subject: [PATCH 4/4] zcash_client_sqlite 0.9.1 --- Cargo.lock | 2 +- zcash_client_sqlite/CHANGELOG.md | 5 +++++ zcash_client_sqlite/Cargo.toml | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 61a1bb04e..482743753 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3051,7 +3051,7 @@ dependencies = [ [[package]] name = "zcash_client_sqlite" -version = "0.9.0" +version = "0.9.1" dependencies = [ "assert_matches", "bs58", diff --git a/zcash_client_sqlite/CHANGELOG.md b/zcash_client_sqlite/CHANGELOG.md index f8d353446..bb188e501 100644 --- a/zcash_client_sqlite/CHANGELOG.md +++ b/zcash_client_sqlite/CHANGELOG.md @@ -11,6 +11,11 @@ and this library adheres to Rust's notion of - A new `orchard` feature flag has been added to make it possible to build client code without `orchard` dependendencies. +## [0.9.1] - 2024-03-09 + +### Fixed +- Documentation now correctly builds with all feature flags. + ## [0.9.0] - 2024-03-01 ### Changed diff --git a/zcash_client_sqlite/Cargo.toml b/zcash_client_sqlite/Cargo.toml index dda89a24b..ea9b36e89 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.9.0" +version = "0.9.1" authors = [ "Jack Grigg ", "Kris Nuttycombe "