zcash_client_backend: Move features guarded by the `orchard` flag to a separate Unreleased section of the CHANGELOG
This commit is contained in:
parent
ea4d00a12d
commit
0ae986cad0
|
@ -7,18 +7,42 @@ and this library adheres to Rust's notion of
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
### Added
|
||||
- A new `orchard` feature flag has been added to make it possible to
|
||||
build client code without `orchard` dependendencies. Additions and
|
||||
changes related to `Orchard` below are introduced under this feature
|
||||
flag.
|
||||
- `zcash_client_backend::data_api`:
|
||||
- `AccountBalance::with_orchard_balance_mut`
|
||||
- `BlockMetadata::orchard_tree_size`
|
||||
- `ScannedBlock::orchard`
|
||||
- `ScannedBlockCommitments::orchard`
|
||||
- `zcash_client_backend::fees::orchard`
|
||||
- `zcash_client_backend::fees::ChangeValue::orchard`
|
||||
- `zcash_client_backend::wallet`:
|
||||
- `Note::Orchard`
|
||||
|
||||
### Changed
|
||||
- `zcash_client_backend::data_api`:
|
||||
- Arguments to `BlockMetadata::from_parts` have changed.
|
||||
- Arguments to `ScannedBlock::from_parts` have changed.
|
||||
- Changes to the `WalletRead` trait:
|
||||
- Added `get_orchard_nullifiers`
|
||||
- `ShieldedProtocol` has a new `Orchard` variant.
|
||||
- `zcash_client_backend::fees`:
|
||||
- Arguments to `ChangeStrategy::compute_balance` have changed.
|
||||
|
||||
## [0.11.0-pre-release] Unreleased
|
||||
|
||||
### Added
|
||||
- `zcash_client_backend::data_api`:
|
||||
- `BlockMetadata::orchard_tree_size` (when the `orchard` feature is enabled).
|
||||
- `InputSource`
|
||||
- `ScannedBlock::{into_commitments, sapling}`
|
||||
- `ScannedBlock::orchard` (when the `orchard` feature is enabled.)
|
||||
- `ScannedBundles`
|
||||
- `ScannedBlockCommitments`
|
||||
- `Balance::{add_spendable_value, add_pending_change_value, add_pending_spendable_value}`
|
||||
- `AccountBalance::{
|
||||
with_sapling_balance_mut,
|
||||
with_orchard_balance_mut,
|
||||
add_unshielded_value
|
||||
}`
|
||||
- `wallet::propose_standard_transfer_to_address`
|
||||
|
@ -27,8 +51,8 @@ and this library adheres to Rust's notion of
|
|||
- `wallet::input_selection::ShieldingSelector` has been
|
||||
factored out from the `InputSelector` trait to separate out transparent
|
||||
functionality and move it behind the `transparent-inputs` feature flag.
|
||||
- `zcash_client_backend::fees::{standard, orchard, sapling}`
|
||||
- `zcash_client_backend::fees::ChangeValue::{new, orchard}`
|
||||
- `zcash_client_backend::fees::{standard, sapling}`
|
||||
- `zcash_client_backend::fees::ChangeValue::new`
|
||||
- `zcash_client_backend::wallet`:
|
||||
- `Note`
|
||||
- `ReceivedNote`
|
||||
|
@ -49,8 +73,6 @@ and this library adheres to Rust's notion of
|
|||
wallet::{ReceivedSaplingNote, WalletTransparentOutput},
|
||||
wallet::input_selection::{Proposal, SaplingInputs},
|
||||
}`
|
||||
- A new `orchard` feature flag has been added to make it possible to
|
||||
build client code without `orchard` dependendencies.
|
||||
|
||||
### Moved
|
||||
- `zcash_client_backend::data_api::{PoolType, ShieldedProtocol}` have
|
||||
|
@ -63,9 +85,8 @@ and this library adheres to Rust's notion of
|
|||
|
||||
### Changed
|
||||
- `zcash_client_backend::data_api`:
|
||||
- Arguments to `BlockMetadata::from_parts` have changed to include Orchard.
|
||||
- `BlockMetadata::sapling_tree_size` now returns an `Option<u32>` instead of
|
||||
a `u32` for consistency with Orchard.
|
||||
a `u32` for future consistency with Orchard.
|
||||
- `WalletShieldedOutput` has an additional type parameter which is used for
|
||||
key scope. `WalletShieldedOutput::from_parts` now takes an additional
|
||||
argument of this type.
|
||||
|
@ -75,9 +96,6 @@ and this library adheres to Rust's notion of
|
|||
`WalletTx` change.
|
||||
- `ScannedBlock::metadata` has been renamed to `to_block_metadata` and now
|
||||
returns an owned value rather than a reference.
|
||||
- `ShieldedProtocol` has a new variant for `Orchard`, allowing for better
|
||||
reporting to callers trying to perform actions using `Orchard` before it is
|
||||
fully supported.
|
||||
- Fields of `Balance` and `AccountBalance` have been made private and the values
|
||||
of these fields have been made available via methods having the same names
|
||||
as the previously-public fields.
|
||||
|
@ -129,7 +147,6 @@ and this library adheres to Rust's notion of
|
|||
arguments. This helps to minimize the set of capabilities that the
|
||||
`data_api::InputSource` must expose.
|
||||
- Changes to the `WalletRead` trait:
|
||||
- Added `get_orchard_nullifiers` (under the `orchard` feature flag.)
|
||||
- `get_checkpoint_depth` has been removed without replacement. This
|
||||
is no longer needed given the change to use the stored anchor height for transaction
|
||||
proposal execution.
|
||||
|
@ -200,8 +217,7 @@ and this library adheres to Rust's notion of
|
|||
- `zcash_client_backend::data_api`
|
||||
- `zcash_client_backend::data_api::ScannedBlock::from_parts` has been made crate-private.
|
||||
- `zcash_client_backend::data_api::ScannedBlock::into_sapling_commitments` has been
|
||||
replaced by `into_commitments` which returns both Sapling and Orchard note commitments
|
||||
and associated note commitment retention information for the block.
|
||||
replaced by `into_commitments` which returns a `ScannedBlockCommitments` value.
|
||||
|
||||
## [0.10.0] - 2023-09-25
|
||||
|
||||
|
|
|
@ -453,6 +453,7 @@ impl sapling::OutputView for SaplingPayment {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "orchard")]
|
||||
pub(crate) struct OrchardPayment(NonNegativeAmount);
|
||||
|
||||
// TODO: introduce this method when it is needed for testing.
|
||||
|
@ -522,6 +523,7 @@ where
|
|||
{
|
||||
let mut transparent_outputs = vec![];
|
||||
let mut sapling_outputs = vec![];
|
||||
#[cfg(feature = "orchard")]
|
||||
let mut orchard_outputs = vec![];
|
||||
for payment in transaction_request.payments() {
|
||||
let mut push_transparent = |taddr: TransparentAddress| {
|
||||
|
@ -533,6 +535,7 @@ where
|
|||
let mut push_sapling = || {
|
||||
sapling_outputs.push(SaplingPayment(payment.amount));
|
||||
};
|
||||
#[cfg(feature = "orchard")]
|
||||
let mut push_orchard = || {
|
||||
orchard_outputs.push(OrchardPayment(payment.amount));
|
||||
};
|
||||
|
@ -551,6 +554,7 @@ where
|
|||
let has_orchard = false;
|
||||
|
||||
if has_orchard {
|
||||
#[cfg(feature = "orchard")]
|
||||
push_orchard();
|
||||
} else if addr.sapling().is_some() {
|
||||
push_sapling();
|
||||
|
|
Loading…
Reference in New Issue