39 KiB
39 KiB
Changelog
All notable changes to this library will be documented in this file.
The format is based on Keep a Changelog, and this library adheres to Rust's notion of Semantic Versioning.
[Unreleased]
Added
- A new
orchard
feature flag has been added to make it possible to build client code withoutorchard
dependendencies. Additions and changes related toOrchard
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
- Added
ShieldedProtocol
has a newOrchard
variant.
- Arguments to
zcash_client_backend::fees
:- Arguments to
ChangeStrategy::compute_balance
have changed.
- Arguments to
[0.11.0-pre-release] Unreleased
Added
zcash_client_backend::data_api
:InputSource
ScannedBlock::{into_commitments, sapling}
ScannedBundles
ScannedBlockCommitments
Balance::{add_spendable_value, add_pending_change_value, add_pending_spendable_value}
AccountBalance::{ with_sapling_balance_mut, add_unshielded_value }
WalletSummary::next_sapling_subtree_index
wallet::propose_standard_transfer_to_address
wallet::input_selection::Proposal::{from_parts, shielded_inputs}
wallet::input_selection::ShieldedInputs
wallet::input_selection::ShieldingSelector
has been factored out from theInputSelector
trait to separate out transparent functionality and move it behind thetransparent-inputs
feature flag.
zcash_client_backend::fees::{standard, sapling}
zcash_client_backend::fees::ChangeValue::new
zcash_client_backend::wallet
:Note
ReceivedNote
WalletSaplingOutput::recipient_key_scope
wallet::TransparentAddressMetadata
(which replaceszcash_keys::address::AddressMetadata
).
zcash_client_backend::zip321::TransactionRequest::total
zcash_client_backend::zip321::parse::Param::name
zcash_client_backend::proto::
PROPOSAL_SER_V1
ProposalDecodingError
proposal
module, for parsing and serializing transaction proposals.
impl Clone for zcash_client_backend::{ zip321::{Payment, TransactionRequest, Zip321Error, parse::Param, parse::IndexedParam}, wallet::{ReceivedSaplingNote, WalletTransparentOutput}, wallet::input_selection::{Proposal, SaplingInputs}, }
impl {PartialEq, Eq} for zcash_client_backend::{ zip321::{Zip321Error, parse::Param, parse::IndexedParam}, wallet::{ReceivedSaplingNote, WalletTransparentOutput}, wallet::input_selection::{Proposal, SaplingInputs}, }
zcash_client_backend::zip321::to_uri
now returns aString
rather than anOption<String>
and provides canonical serialization for the empty proposal.
Moved
zcash_client_backend::data_api::{PoolType, ShieldedProtocol}
have been moved into thezcash_client_backend
root module.zcash_client_backend::data_api::{NoteId, Recipient}
have been moved into thezcash_client_backend::wallet
module.ScannedBlock::{sapling_tree_size, sapling_nullifier_map, sapling_commitments}
have been moved toScannedBlockSapling
and in that context are now named{tree_size, nullifier_map, commitments}
respectively.
Changed
-
zcash_client_backend::data_api
:BlockMetadata::sapling_tree_size
now returns anOption<u32>
instead of au32
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.WalletTx
has an additional type parameter as a consequence of theWalletShieldedOutput
change.ScannedBlock
has an additional type parameter as a consequence of theWalletTx
change.ScannedBlock::metadata
has been renamed toto_block_metadata
and now returns an owned value rather than a reference.- Fields of
Balance
andAccountBalance
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. WalletSummary::new
now takes an additionalnext_sapling_subtree_index
argument.WalletWrite::get_next_available_address
now takes an additionalUnifiedAddressRequest
argument.chain::scan_cached_blocks
now returns aScanSummary
containing metadata about the scanned blocks on success.error::Error
enum changes:- The
NoteMismatch
variant now wraps aNoteId
instead of a backend-specific note identifier. The relatedNoteRef
type parameter has been removed fromerror::Error
. - A new variant
UnsupportedPoolType
has been added. - A new variant
NoSupportedReceivers
has been added. - A new variant
NoSpendingKey
has been added. - Variant
ChildIndexOutOfRange
has been removed.
- The
wallet::shield_transparent_funds
no longer takes amemo
argument; instead, memos to be associated with the shielded outputs should be specified in the construction of the value of theinput_selector
argument, which is used to construct the proposed shielded values as internal "change" outputs.wallet::create_proposed_transaction
no longer takes achange_memo
argument; instead, change memos are represented in the individual values of theproposed_change
field of theProposal
'sTransactionBalance
.wallet::create_proposed_transaction
now takes itsproposal
argument by reference instead of as an owned value.wallet::create_proposed_transaction
no longer takes amin_confirmations
argument. Instead, it uses the anchor height from itsproposal
argument.wallet::create_spend_to_address
now takes an additionalchange_memo
argument.- The error type of
wallet::create_spend_to_address
has been changed to usezcash_primitives::transaction::fees::zip317::FeeError
instead ofzcash_primitives::transaction::components::amount::BalanceError
. - The following methods now take
&impl SpendProver, &impl OutputProver
instead ofimpl TxProver
:wallet::create_proposed_transaction
wallet::create_spend_to_address
wallet::shield_transparent_funds
wallet::spend
wallet::input_selection::InputSelector::propose_shielding
, has been moved out to the newly-createdShieldingSelector
trait.ShieldingSelector::propose_shielding
has been altered such that it takes an explicittarget_height
in order to minimize the capabilities that thedata_api::InputSource
trait must expose. Also, it now takes itsmin_confirmations
argument asu32
instead ofNonZeroU32
.
- The
wallet::input_selection::InputSelector::DataSource
associated type has been renamed toInputSource
. - The signature of
wallet:input_selection::InputSelector::propose_transaction
has been altered such that it longer takesmin_confirmations
as an argument, instead taking explicittarget_height
andanchor_height
arguments. This helps to minimize the set of capabilities that thedata_api::InputSource
must expose. - Changes to the
WalletRead
trait: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.is_valid_account_extfvk
has been removed; it was unused in the ECC mobile wallet SDKs and has been superseded byget_account_for_ufvk
.get_spendable_sapling_notes
,select_spendable_sapling_notes
, andget_unspent_transparent_outputs
have been removed; usedata_api::InputSource
instead.- Added
get_account_ids
. get_transparent_receivers
andget_transparent_balances
are now guarded by thetransparent-inputs
feature flag, with noop default implementations provided.get_transparent_receivers
now returnsOption<zcash_client_backend::wallet::TransparentAddressMetadata>
as part of its result where previously it returnedzcash_keys::address::AddressMetadata
.
wallet::{propose_shielding, shield_transparent_funds}
now takes theirmin_confirmations
arguments asu32
rather than aNonZeroU32
to permit implmentations to enable zero-conf shielding.wallet::create_proposed_transaction
now forces implementations to ignore the database identifiers for its contained notes by universally quantifying theNoteRef
type parameter.- Arguments to
wallet::input_selection::Proposal::from_parts
have changed. wallet::input_selection::Proposal::min_anchor_height
has been removed in favor of storing this value inSaplingInputs
.wallet::input_selection::GreedyInputSelector
now has relaxed requirements for itsInputSource
associated type.
-
zcash_client_backend::fees
:ChangeStrategy::compute_balance
arguments have changed.ChangeValue
is now a struct. In addition to the existing change value, it now also provides the output pool to which change should be sent and an optional memo to be associated with the change output.ChangeError
has a newBundleError
variant.fixed::SingleOutputChangeStrategy::new
andzip317::SingleOutputChangeStrategy::new
each now accept an additionalchange_memo
argument.
-
zcash_client_backend::wallet
:- The fields of
ReceivedSaplingNote
are now private. UseReceivedSaplingNote::from_parts
for construction instead. Accessor methods are provided for each previously public field.
- The fields of
-
zcash_client_backend::scanning::ScanError
has a new variant,TreeSizeInvalid
. -
The following fields now have type
NonNegativeAmount
instead ofAmount
:zcash_client_backend::data_api
:error::Error::InsufficientFunds.{available, required}
wallet::input_selection::InputSelectorError::InsufficientFunds.{available, required}
zcash_client_backend::fees
:ChangeError::InsufficientFunds.{available, required}
zcash_client_backend::zip321::Payment.amount
-
The following methods now take
NonNegativeAmount
instead ofAmount
:zcash_client_backend::data_api
:SentTransactionOutput::from_parts
wallet::create_spend_to_address
wallet::input_selection::InputSelector::propose_shielding
zcash_client_backend::fees
:ChangeValue::sapling
DustOutputPolicy::new
TransactionBalance::new
zcash_client_backend::wallet::ReceivedSaplingNote::from_parts
-
The following methods now return
NonNegativeAmount
instead ofAmount
:zcash_client_backend::data_api::SentTransactionOutput::value
zcash_client_backend::fees
:ChangeValue::value
DustOutputPolicy::dust_threshold
TransactionBalance::{fee_required, total}
zcash_client_backend::wallet
:ReceivedSaplingNote::value
WalletTransparentOutput::value
Removed
zcash_client_backend::wallet::ReceivedSaplingNote
has been replaced byzcash_client_backend::ReceivedNote
.zcash_client_backend::wallet::input_selection::Proposal::sapling_inputs
has been replaced byProposal::shielded_inputs
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 byinto_commitments
which returns aScannedBlockCommitments
value.
[0.10.0] - 2023-09-25
Notable Changes
zcash_client_backend
now supports out-of-order scanning of blockchain history. See the module documentation forzcash_client_backend::data_api::chain
for details on how to make use of the new scanning capabilities.- This release of
zcash_client_backend
defines the concept of an account birthday. The account birthday is defined as the minimum height among blocks to be scanned when recovering an account. - Account creation now requires the caller to provide account birthday information, including the state of the note commitment tree at the end of the block prior to the birthday height. A wallet's birthday is the earliest birthday height among accounts maintained by the wallet.
Added
impl Eq for zcash_client_backend::address::RecipientAddress
impl Eq for zcash_client_backend::zip321::{Payment, TransactionRequest}
impl Debug
forzcash_client_backend::{data_api::wallet::input_selection::Proposal, wallet::ReceivedSaplingNote}
zcash_client_backend::data_api
:AccountBalance
AccountBirthday
Balance
BirthdayError
BlockMetadata
NoteId
NullifierQuery
for use withWalletRead::get_sapling_nullifiers
Ratio
ScannedBlock
ShieldedProtocol
WalletCommitmentTrees
WalletSummary
WalletRead::{ chain_height, block_metadata, block_max_scanned, block_fully_scanned, suggest_scan_ranges, get_wallet_birthday, get_account_birthday, get_wallet_summary }
WalletWrite::{put_blocks, update_chain_tip}
chain::CommitmentTreeRoot
scanning
A new module containing types required forsuggest_scan_ranges
testing::MockWalletDb::new
wallet::input_sellection::Proposal::{min_target_height, min_anchor_height}
SAPLING_SHARD_HEIGHT
constant
zcash_client_backend::proto::compact_formats
:impl<A: sapling::Authorization> From<&sapling::SpendDescription<A>> for CompactSaplingSpend
impl<A: sapling::Authorization> From<&sapling::OutputDescription<A>> for CompactSaplingOutput
impl<SpendAuth> From<&orchard::Action<SpendAuth>> for CompactOrchardAction
zcash_client_backend::wallet::WalletSaplingOutput::note_commitment_tree_position
zcash_client_backend::scanning
:ScanError
impl<K: ScanningKey> ScanningKey for &K
impl ScanningKey for (zip32::Scope, sapling::SaplingIvk, sapling::NullifierDerivingKey)
- Test utility functions
zcash_client_backend::keys::UnifiedSpendingKey::{default_address, default_transparent_address}
are now available under thetest-dependencies
feature flag.
Changed
- MSRV is now 1.65.0.
- Bumped dependencies to
hdwallet 0.4
,zcash_primitives 0.13
,zcash_note_encryption 0.4
,incrementalmerkletree 0.5
,orchard 0.6
,bs58 0.5
,tempfile 3.5.0
,prost 0.12
,tonic 0.10
. zcash_client_backend::data_api
:WalletRead::TxRef
has been removed in favor of consistently usingTxId
instead.WalletRead::get_transaction
now takes aTxId
as its argument.WalletRead::create_account
now takes an additionalbirthday
argument.WalletWrite::{store_decrypted_tx, store_sent_tx}
now returnResult<(), Self::Error>
as theWalletRead::TxRef
associated type has been removed. UseWalletRead::get_transaction
with the transaction'sTxId
instead.WalletRead::get_memo
now takes aNoteId
as its argument instead ofSelf::NoteRef
and returnsResult<Option<Memo>, Self::Error>
instead ofResult<Memo, Self::Error>
in order to make representable wallet states where the full note plaintext is not available.WalletRead::get_nullifiers
has been renamed toWalletRead::get_sapling_nullifiers
and its signature has changed; it now subsumes the removedWalletRead::get_all_nullifiers
.WalletRead::get_target_and_anchor_heights
now takes its argument as aNonZeroU32
chain::scan_cached_blocks
now takes afrom_height
argument that permits the caller to control the starting position of the scan range. In addition, thelimit
parameter is now required and has typeusize
.chain::BlockSource::with_blocks
now takes its limit as anOption<usize>
instead ofOption<u32>
. It is also now required to return an error iffrom_height
is set to a block that does not exist inself
.- A new
CommitmentTree
variant has been added todata_api::error::Error
wallet::{create_spend_to_address, create_proposed_transaction, shield_transparent_funds}
all now require thatWalletCommitmentTrees
be implemented for the type passed to them for thewallet_db
parameter.wallet::create_proposed_transaction
now takes an additionalmin_confirmations
argument.wallet::{spend, create_spend_to_address, shield_transparent_funds, propose_transfer, propose_shielding, create_proposed_transaction}
now take their respectivemin_confirmations
arguments asNonZeroU32
- A new
Scan
variant replaces theChain
variant ofdata_api::chain::error::Error
. TheNoteRef
parameter todata_api::chain::error::Error
has been removed in favor of usingNoteId
to report the specific note for which a failure occurred. - A new
SyncRequired
variant has been added todata_api::wallet::input_selection::InputSelectorError
. - The variants of the
PoolType
enum have changed; thePoolType::Sapling
variant has been removed in favor of aPoolType::Shielded
variant that wraps aShieldedProtocol
value.
zcash_client_backend::wallet
:SpendableNote
has been renamed toReceivedSaplingNote
.- Arguments to
WalletSaplingOutput::from_parts
have changed.
zcash_client_backend::data_api::wallet::input_selection::InputSelector
:- Arguments to
{propose_transaction, propose_shielding}
have changed. InputSelector::{propose_transaction, propose_shielding}
now take their respectivemin_confirmations
arguments asNonZeroU32
- Arguments to
zcash_client_backend::data_api::wallet::{create_spend_to_address, spend, create_proposed_transaction, shield_transparent_funds}
now return theTxId
for the newly created transaction instead an internal database identifier.zcash_client_backend::wallet::ReceivedSaplingNote::note_commitment_tree_position
has replaced thewitness
field in the same struct.zcash_client_backend::welding_rig
has been renamed tozcash_client_backend::scanning
zcash_client_backend::scanning::ScanningKey::sapling_nf
has been changed to take a note position instead of an incremental witness for the note.- Arguments to
zcash_client_backend::scanning::scan_block
have changed. This method now takes an optionalBlockMetadata
argument instead of a base commitment tree and incremental witnesses for each previously-known note. In addition, the return type has now been updated to return aResult<ScannedBlock, ScanError>
. zcash_client_backend::proto::service
:- The module is no longer behind the
lightwalletd-tonic
feature flag; that now only gates theservice::compact_tx_streamer_client
submodule. This exposes the service types to parse messages received by other gRPC clients. - The module has been updated to include the new gRPC endpoints supported by
lightwalletd
v0.4.15.
- The module is no longer behind the
Removed
zcash_client_backend::data_api
:WalletRead::block_height_extrema
has been removed. Usechain_height
instead to obtain the wallet's view of the chain tip instead, orsuggest_scan_ranges
to obtain information about blocks that need to be scanned.WalletRead::get_balance_at
has been removed. UseWalletRead::get_wallet_summary
instead.WalletRead::{get_all_nullifiers, get_commitment_tree, get_witnesses}
have been removed without replacement. The utility of these methods is now subsumed by those available from theWalletCommitmentTrees
trait.WalletWrite::advance_by_block
(useWalletWrite::put_blocks
instead).PrunedBlock
has been replaced byScannedBlock
testing::MockWalletDb
, which is available under thetest-dependencies
feature flag, has been modified by the addition of asapling_tree
property.wallet::input_selection
:Proposal::target_height
(useProposal::min_target_height
instead).
zcash_client_backend::data_api::chain::validate_chain
(logic merged intochain::scan_cached_blocks
.zcash_client_backend::data_api::chain::error::{ChainError, Cause}
have been replaced byzcash_client_backend::scanning::ScanError
zcash_client_backend::proto::compact_formats
:impl<A> From<sapling::OutputDescription<A>> for CompactSaplingOutput
(useFrom<&sapling::OutputDescription<A>>
instead).
zcash_client_backend::wallet::WalletSaplingOutput::{witness, witness_mut}
have been removed as individual incremental witnesses are no longer tracked on a per-note basis. The global note commitment tree for the wallet should be used to obtain witnesses for spend operations instead.- Default implementations of
zcash_client_backend::data_api::WalletRead::{ get_target_and_anchor_heights, get_max_height_hash }
have been removed. These should be implemented in a backend-specific fashion.
[0.9.0] - 2023-04-28
Added
data_api::SentTransactionOutput::from_parts
data_api::WalletRead::get_min_unspent_height
Changed
decrypt::DecryptedOutput
is now parameterized by aNote
type parameter, to allow reuse of the data structure for non-Sapling contexts.data_api::SentTransactionOutput
must now be constructed usingSentTransactionOutput::from_parts
. The internal state ofSentTransactionOutput
is now private, and accessible via methods that have the same names as the previously exposed fields.
Renamed
- The following types and fields have been renamed in preparation for supporting
orchard
in wallet APIs:WalletTx::shielded_spends
->WalletTx::sapling_spends
WalletTx::shielded_outputs
->WalletTx::sapling_outputs
WalletShieldedSpend
->WalletSaplingSpend
. Also, the internals of this data structure have been made private.WalletShieldedOutput
->WalletSaplingOutput
. Also, the internals of this data structure have been made private.
- The
data_api::WalletWrite::rewind_to_height
method has been renamed totruncate_to_height
to better reflect its semantics.
Removed
wallet::WalletTx::num_spends
wallet::WalletTx::num_outputs
wallet::WalletSaplingOutput::to
is redundant and has been removed; the recipient address can be obtained from the note.decrypt::DecryptedOutput::to
is redundant and has been removed; the recipient address can be obtained from the note.
[0.8.0] - 2023-04-15
Changed
- Bumped dependencies to
bls12_381 0.8
,group 0.13
,orchard 0.4
,tonic 0.9
,base64 0.21
,bech32 0.9
,zcash_primitives 0.11
. - The dependency on
zcash_primitives
no longer enables themulticore
feature by default in order to support compilation underwasm32-wasi
. Users of other platforms may need to include an explicit dependency onzcash_primitives
withoutdefault-features = false
or otherwise explicitly enable thezcash_primitives/multicore
feature if they did not already depend uponzcash_primitives
with default features enabled.
Fixed
zcash_client_backend::fees::zip317::SingleOutputChangeStrategy
now takes into account the Sapling output padding behaviour ofzcash_primitives::transaction::components::sapling::builder::SaplingBuilder
.
[0.7.0] - 2023-02-01
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.
- Bumped dependencies to
zcash_primitives 0.10
. zcash_client_backend::data_api::chain
:BlockSource::with_blocks
now takesfrom_height
asOption<BlockHeight>
instead ofBlockHeight
. Trait implementors should return all available blocks in the datastore whenfrom_height
isNone
.- Various breaking changes to
validate_chain
:- The
parameters: &ParamsT
argument has been removed. WhenNone
is given as thevalidate_from
argument,validate_chain
will now passNone
toBlockSource::with_blocks
(instead of the Sapling network upgrade's activation height). - A
limit: Option<u32>
argument has been added. This enables callers to validate smaller intervals of blocks already present on the providedBlockSource
, shortening processing times of the function call at the expense of obtaining a partial result. When providing alimit
, a result ofOk(())
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 tovalidate_chain
in order to complete validating the totality ofblock_source
.
- The
zcash_client_backend::data_api::wallet
:input_selection::Proposal
no longer has aTransparentInput
generic parameter, andProposal::transparent_inputs
now returns&[zcash_client_backend::wallet::WalletTransparentOutput]
.shield_transparent_funds
now takes ashielding_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 ofbls12_381::Scalar
in the following places:- The
cmu
field ofzcash_client_backend::wallet::WalletShieldedOutput
. zcash_client_backend::proto::compact_formats::CompactSaplingOutput::cmu
.
- The
Removed
zcash_client_backend::data_api
:WalletWrite::remove_unmined_tx
(was behind theunstable
feature flag).
[0.6.1] - 2022-12-06
Added
zcash_client_backend::data_api::chain::scan_cached_blocks
now generatestracing
spans, which can be used for profiling.
Fixed
zcash_client_backend:zip321
no longer returns an error when trying to parse a URI without query parameters.
[0.6.0] - 2022-11-12
Added
- Functionality that enables the receiving and spending of transparent funds,
behind the new
transparent-inputs
feature flag.- A new
zcash_client_backend::data_api::wallet::shield_transparent_funds
method has been added to facilitate the automatic shielding of transparent funds received by the wallet. - A
zcash_client_backend::wallet::WalletTransparentOutput
type in support oftransparent-inputs
functionality.
- A new
- An
unstable
feature flag; this is added to parts of the API that may change in any release. zcash_client_backend::address
:RecipientAddress::Unified
AddressMetadata
impl Eq for UnifiedAddress
zcash_client_backend::data_api
:wallet::spend
method, intended to supersede thewallet::create_spend_to_address
method. This new method now constructs transactions via interpretation of azcash_client_backend::zip321::TransactionRequest
value. This facilitates the implementation of ZIP 321 support in wallets and provides substantially greater flexibility in transaction creation.PoolType
ShieldedPool
Recipient
SentTransactionOutput
WalletRead::get_unified_full_viewing_keys
WalletRead::get_account_for_ufvk
WalletRead::get_current_address
WalletRead::get_all_nullifiers
WalletRead::get_transparent_receivers
WalletRead::get_unspent_transparent_outputs
WalletRead::get_transparent_balances
WalletWrite::create_account
WalletWrite::remove_unmined_tx
(behind theunstable
feature flag).WalletWrite::get_next_available_address
WalletWrite::put_received_transparent_utxo
impl From<prost::DecodeError> for error::Error
chain::error
: a module containing error types type that that can occur only in chain validation and sync have been separated out from errors related to other wallet operations.input_selection
: a module containing types related to the process of selecting inputs to be spent, given a transaction request.
zcash_client_backend::decrypt
:TransferType
zcash_client_backend::proto
:actions
field oncompact_formats::CompactTx
compact_formats::CompactOrchardAction
- gRPC bindings for the
lightwalletd
server, behind alightwalletd-tonic
feature flag.
zcash_client_backend::zip321::TransactionRequest
methods:TransactionRequest::empty
for constructing a new empty request.TransactionRequest::new
for constructing a request fromVec<Payment>
.TransactionRequest::payments
for accessing thePayments
that make up a request.
zcash_client_backend::encoding
KeyError
AddressCodec
implementations forsapling::PaymentAddress
andUnifiedAddress
.
zcash_client_backend::fees
ChangeError
ChangeStrategy
ChangeValue
TransactionBalance
fixed
, a module containing change selection strategies for the old fixed fee rule.zip317
, a module containing change selection strategies for the ZIP 317 fee rule.
- New experimental APIs that should be considered unstable, and are
likely to be modified and/or moved to a different module in a future
release:
zcash_client_backend::address::UnifiedAddress
zcash_client_backend::keys::{UnifiedSpendingKey
,UnifiedFullViewingKey
,Era
,DecodingError
}zcash_client_backend::encoding::AddressCodec
zcash_client_backend::encoding::encode_payment_address
zcash_client_backend::encoding::encode_transparent_address
Changed
- MSRV is now 1.56.1.
- Bumped dependencies to
ff 0.12
,group 0.12
,bls12_381 0.7
zcash_primitives 0.9
,orchard 0.3
. zcash_client_backend::proto
:- The Protocol Buffers bindings are now generated for
prost 0.11
instead ofprotobuf 2
. compact_formats::CompactSpend
has been renamed toCompactSaplingSpend
, and itsepk
field (and associatedset_epk
method) has been renamed toephemeralKey
(andset_ephemeralKey
).compact_formats::CompactOutput
has been renamed toCompactSaplingOutput
.
- The Protocol Buffers bindings are now generated for
epk: jubjub::ExtendedPoint
has been replaced byephemeral_key: zcash_note_encryption::EphemeralKeyBytes
in various places:zcash_client_backend::wallet::WalletShieldedOutput
: theepk
field has been replaced byephemeral_key
.zcash_client_backend::proto::compact_formats::CompactSaplingOutput
: theepk
method has been replaced byephemeral_key
.
zcash_client_backend::data_api
:- Renamed the following to use lower-case abbreviations (matching Rust naming
conventions):
testing::MockWalletDB
totesting::MockWalletDb
- Changes to the
WalletRead
trait:WalletRead::get_target_and_anchor_heights
now takes amin_confirmations
argument that is used to compute an upper bound on the anchor height being returned; this had previously been hardcoded towallet::ANCHOR_OFFSET
.WalletRead::get_spendable_notes
has been renamed toget_spendable_sapling_notes
, and now takes as an argument a vector of note IDs to be excluded from consideration.WalletRead::select_spendable_notes
has been renamed toselect_spendable_sapling_notes
, and now takes as an argument a vector of note IDs to be excluded from consideration.- The
WalletRead::NoteRef
andWalletRead::TxRef
associated types are now required to implementEq
andOrd
WalletWrite::store_received_tx
has been renamed tostore_decrypted_tx
.wallet::decrypt_and_store_transaction
now always stores the transaction by callingWalletWrite::store_decrypted_tx
, even if no outputs could be decrypted. The error type produced by the providedWalletWrite
instance is also now returned directly.- The
SentTransaction
type has been substantially modified to accommodate handling of transparent inputs. Per-output data has been split out into a new structSentTransactionOutput
, andSentTransaction
can now contain multiple outputs, and tracks the fee paid. ReceivedTransaction
has been renamed toDecryptedTransaction
, and itsoutputs
field has been renamed tosapling_outputs
.BlockSource
has been moved to thechain
module.- The types of the
with_row
callback argument toBlockSource::with_blocks
and the return type of this method have been modified to returnchain::error::Error
. testing::MockBlockSource
has been moved tochain::testing::MockBlockSource
module.chain::{validate_chain, scan_cached_blocks}
have altered parameters and result types. The latter have been modified to returnchain::error::Error
instead of abstract error types. This new error type now wraps the errors of the block source and wallet database to which these methods delegate IO operations directly, which simplifies error handling in cases where callback functions are involved.error::ChainInvalid
has been moved tochain::error
.error::Error
has been substantially modified. It now wraps database, note selection, builder, and other errors.- Added new error cases:
Error::DataSource
Error::NoteSelection
Error::BalanceError
Error::MemoForbidden
Error::AddressNotRecognized
Error::ChildIndexOutOfRange
Error::NoteMismatch
Error::InsufficientBalance
has been renamed toInsufficientFunds
and restructured to have named fields.Error::Protobuf
has been removed; these decoding errors are now produced as data source and/or block-source implementation-specific errors.Error::InvalidChain
has been removed; its former purpose is now served bychain::ChainError
.Error::InvalidNewWitnessAnchor
andError::InvalidWitnessAnchor
have been moved tochain::error::ContinuityError
.Error::InvalidExtSk
(now unused) has been removed.Error::KeyNotFound
(now unused) has been removed.Error::KeyDerivationError
(now unused) has been removed.Error::SaplingNotActive
(now unused) has been removed.
- Added new error cases:
- Renamed the following to use lower-case abbreviations (matching Rust naming
conventions):
zcash_client_backend::decrypt
:decrypt_transaction
now takes aHashMap<_, UnifiedFullViewingKey>
instead ofHashMap<_, ExtendedFullViewingKey>
.
- If no memo is provided when sending to a shielded recipient, the empty memo will be used.
zcash_client_backend::keys::spending_key
has been moved to thezcash_client_backend::keys::sapling
module.zcash_client_backend::zip321::MemoError
has been renamed and expanded into a more comprehensiveZip321Error
type, and functions in thezip321
module have been updated to use this unified error type. The following error cases have been added:Zip321Error::TooManyPayments(usize)
Zip321Error::DuplicateParameter(parse::Param, usize)
Zip321Error::TransparentMemo(usize)
Zip321Error::RecipientMissing(usize)
Zip321Error::ParseError(String)
zcash_client_backend::welding_rig
:- The API of
ScanningKey
has changed to accommodate batch decryption and to correctly handle scanning with the internal (change) keys derived from ZIP 316 UFVKs and UIVKs. scan_block
now uses batching for trial-decryption of transaction outputs.
- The API of
- The return type of the following methods in
zcash_client_backend::encoding
have been changed to improve error reporting:decode_extended_spending_key
decode_extended_full_viewing_key
decode_payment_address
zcash_client_backend::wallet::SpendableNote
is now parameterized by a note identifier type and has an additionalnote_id
field that is used to hold the identifier used to refer to the note in the wallet database.
Deprecated
zcash_client_backend::data_api::wallet::create_spend_to_address
has been deprecated. Usezcash_client_backend::data_api::wallet::spend
instead. If you wish to continue usingcreate_spend_to_address
, note that the arguments to the function has been modified to take a unified spending key instead of a Sapling extended spending key, and now also requires amin_confirmations
argument that the caller can provide to specify a minimum number of confirmations required for notes being selected. A minimum of 10 confirmations is recommended.
Removed
zcash_client_backend::data_api
:wallet::ANCHOR_OFFSET
WalletRead::get_extended_full_viewing_keys
(useWalletRead::get_unified_full_viewing_keys
instead).WalletRead::get_address
(useWalletRead::get_current_address
orWalletWrite::get_next_available_address
instead.)impl From<protobuf::ProtobufError> for error::Error
zcash_client_backend::proto::compact_formats
:Compact*::new
methods (useDefault::default
or struct instantiation instead).- Getters (use dedicated typed methods or direct field access instead).
- Setters (use direct field access instead).
zcash_client_backend::wallet::AccountId
(moved tozcash_primitives::zip32::AccountId
).impl zcash_client_backend::welding_rig::ScanningKey for ExtendedFullViewingKey
(useDiversifiableFullViewingKey
instead).
[0.5.0] - 2021-03-26
Added
zcash_client_backend::address::RecipientAddress
zcash_client_backend::data_api
module, containing the Data Access API.zcash_client_backend::wallet
:AccountId
SpendableNote
OvkPolicy
zcash_client_backend::welding_rig::ScanningKey
trait, representing a key which can be used for trial decryption of outputs, and optionally nullifier computation. This trait is implemented forzcash_primitives::zip32:ExtendedFullViewingKey
andzcash_primitives::primitives::SaplingIvk
.- First alpha of TZE support, behind the
zfuture
feature flag.
Changed
- MSRV is now 1.47.0.
epk
fields and return values were changed from ajubjub::SubgroupPoint
to ajubjub::ExtendedPoint
, to match the change to thezcash_primitives
decryption APIs:zcash_client_backend::proto::compact_formats::CompactOutput::epk()
- The
epk
field ofzcash_client_backend::wallet::WalletShieldedOutput
.
zcash_client_backend::decrypt
:decrypt_transaction
now takes a variable with typeP: zcash_primitives::consensus::Parameters
.- The
memo
field ofDecryptedOutput
now has typeMemoBytes
.
zcash_client_backend::wallet
:- The
nf
property ofWalletShieldedSpend
now has the typeNullifier
. - The
account
property ofWalletShieldedSpend
andWalletShieldedOutput
now has the typeAccountId
.
- The
zcash_client_backend::welding_rig
:scan_block
now takes&[(AccountId, K: ScanningKey)]
, instead of a slice of extended full viewing keys with implicit account IDs.- The
nullifiers
argument toscan_block
now has the type&[(AccountId, Nullifier)]
.
Removed
zcash_client_backend::constants
module (its sub-modules have been moved intozcash_primitives::constants
, and more generally replaced by the new methods on thezcash_primitives::consensus::Parameters
trait).
[0.4.0] - 2020-09-09
Changed
- MSRV is now 1.44.1.
- Bumped dependencies to
ff 0.8
,group 0.8
,bls12_381 0.3.1
,jubjub 0.5.1
,protobuf 2.15
.
[0.3.0] - 2020-08-24
TBD
[0.2.0] - 2020-03-13
TBD
[0.1.0] - 2019-10-08
Initial release.