@@ -6,18 +6,39 @@ and this library adheres to Rust's notion of
6
6
[ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
7
7
8
8
## [ Unreleased]
9
+ ### Notable changes
10
+ ` zcash_client_backend ` now supports TEX (transparent-source-only) addresses as specified
11
+ in ZIP 320. Sending to one or more TEX addresses will automatically create a multi-step
12
+ proposal that uses two transactions.
13
+
14
+ In order to take advantage of this support, client wallets will need to be able to send
15
+ multiple transactions created from ` zcash_client_backend::data_api::wallet::create_proposed_transactions ` .
16
+ This API was added in ` zcash_client_backend ` 0.11.0 but previously could only return a
17
+ single transaction.
18
+
19
+ ** Note:** This feature changes the use of transparent addresses in ways that are relevant
20
+ to security and access to funds, and that may interact with other wallet behaviour. In
21
+ particular it exposes new ephemeral transparent addresses belonging to the wallet, which
22
+ need to be scanned in order to recover funds if the first transaction of the proposal is
23
+ mined but the second is not, or if someone (e.g. the TEX-address recipient) sends back
24
+ funds to those addresses. See [ ZIP 320] ( https://zips.z.cash/zip-0320 ) for details.
9
25
10
26
### Added
11
27
- ` zcash_client_backend::data_api ` :
12
28
- ` chain::BlockCache ` trait, behind the ` sync ` feature flag.
13
29
- ` WalletRead::get_spendable_transparent_outputs ` .
14
30
- ` zcash_client_backend::fees ` :
15
- - ` ChangeValue::{transparent, shielded} `
31
+ - ` EphemeralBalance `
32
+ - ` ChangeValue::shielded, is_ephemeral `
33
+ - ` ChangeValue::ephemeral_transparent ` (when "transparent-inputs" is enabled)
16
34
- ` sapling::EmptyBundleView `
17
35
- ` orchard::EmptyBundleView `
36
+ - ` zcash_client_backend::proposal ` :
37
+ - ` impl Hash for {StepOutput, StepOutputIndex} `
18
38
- ` zcash_client_backend::scanning ` :
19
39
- ` testing ` module
20
- - ` zcash_client_backend::sync ` module, behind the ` sync ` feature flag
40
+ - ` zcash_client_backend::sync ` module, behind the ` sync ` feature flag.
41
+ - ` zcash_client_backend::wallet::Recipient::map_ephemeral_transparent_outpoint `
21
42
22
43
### Changed
23
44
- MSRV is now 1.70.0.
@@ -31,36 +52,54 @@ and this library adheres to Rust's notion of
31
52
` change_memo ` is given, and defends against losing money by using
32
53
` DustAction::AddDustToFee ` with a too-high dust threshold.
33
54
See [ #1430 ] ( https://github.com/zcash/librustzcash/pull/1430 ) for details.
34
- - ` zcash_client_backend::zip321 ` has been extracted to, and is now a reexport
55
+ - ` zcash_client_backend::zip321 ` has been extracted to, and is now a reexport
35
56
of the root module of the ` zip321 ` crate. Several of the APIs of this module
36
57
have changed as a consequence of this extraction; please see the ` zip321 `
37
58
CHANGELOG for details.
38
59
- ` zcash_client_backend::data_api ` :
39
- - ` error::Error ` has a new ` Address ` variant.
60
+ - ` WalletRead ` has new ` get_known_ephemeral_addresses ` ,
61
+ ` find_account_for_ephemeral_address ` , and ` get_transparent_address_metadata `
62
+ methods when the "transparent-inputs" feature is enabled.
63
+ - ` WalletWrite ` has a new ` reserve_next_n_ephemeral_addresses ` method when
64
+ the "transparent-inputs" feature is enabled.
65
+ - ` error::Error ` has new ` Address ` and (when the "transparent-inputs" feature
66
+ is enabled) ` PaysEphemeralTransparentAddress ` variants.
40
67
- ` wallet::input_selection::InputSelectorError ` has a new ` Address ` variant.
41
- - `zcash_client_backend::proto::proposal::Proposal::{from_standard_proposal,
42
- try_into_standard_proposal}` each no longer require a ` consensus::Parameters`
43
- argument.
44
68
- ` zcash_client_backend::data_api::fees `
45
- - The return type of ` ChangeValue::output_pool ` , and the type of the
46
- ` output_pool ` argument to ` ChangeValue::new ` , have changed from
47
- ` ShieldedProtocol ` to ` zcash_protocol::PoolType ` .
48
- - The return type of ` ChangeValue::new ` is now optional; it returns ` None `
49
- if a memo is given for the transparent pool. Use ` ChangeValue::shielded `
50
- to avoid this error case when creating a ` ChangeValue ` known to be for a
51
- shielded pool.
69
+ - When the "transparent-inputs" feature is enabled, ` ChangeValue ` can also
70
+ represent an ephemeral transparent output in a proposal. Accordingly, the
71
+ return type of ` ChangeValue::output_pool ` has (unconditionally) changed
72
+ from ` ShieldedProtocol ` to ` zcash_protocol::PoolType ` .
73
+ - ` ChangeStrategy::compute_balance ` : this trait method has an additional
74
+ ` Option<&EphemeralBalance> ` parameter. If the "transparent-inputs" feature is
75
+ enabled, this can be used to specify whether the change memo should be
76
+ ignored, and the amounts of additional transparent P2PKH inputs and
77
+ outputs. Passing ` None ` will retain the previous
78
+ behaviour (and is necessary when the "transparent-inputs" feature is
79
+ not enabled).
52
80
- ` zcash_client_backend::input_selection::GreedyInputSelectorError ` has a
53
81
new variant ` UnsupportedTexAddress ` .
82
+ - ` zcash_client_backend::proposal::ProposalError ` has new variants
83
+ ` SpendsChange ` , ` EphemeralOutputLeftUnspent ` , and ` PaysTexFromShielded ` .
84
+ (the last two are conditional on the "transparent-inputs" feature).
85
+ - ` zcash_client_backend::proto ` :
86
+ - ` ProposalDecodingError ` has a new variant ` InvalidEphemeralRecipient ` .
87
+ - ` proposal::Proposal::{from_standard_proposal, try_into_standard_proposal} `
88
+ each no longer require a ` consensus::Parameters ` argument.
54
89
- ` zcash_client_backend::wallet::Recipient ` variants have changed. Instead of
55
- wrapping protocol-address types, the ` Recipient ` type now wraps a
56
- ` zcash_address::ZcashAddress ` . This simplifies the process of tracking the
57
- original address to which value was sent.
90
+ wrapping protocol-address types, the ` External ` and ` InternalAccount ` variants
91
+ now wrap a ` zcash_address::ZcashAddress ` . This simplifies the process of
92
+ tracking the original address to which value was sent. There is also a new
93
+ ` EphemeralTransparent ` variant, and an additional generic parameter for the
94
+ type of metadata associated with an ephemeral transparent outpoint.
58
95
59
96
### Removed
60
97
- ` zcash_client_backend::data_api ` :
61
98
- ` WalletRead::get_unspent_transparent_outputs ` has been removed because its
62
99
semantics were unclear and could not be clarified. Use
63
100
` WalletRead::get_spendable_transparent_outputs ` instead.
101
+ - ` zcash_client_backend::fees::ChangeValue::new ` . Use ` ChangeValue::shielded `
102
+ or ` ChangeValue::ephemeral_transparent ` instead.
64
103
65
104
## [ 0.12.1] - 2024-03-27
66
105
0 commit comments