Commit Graph

199 Commits

Author SHA1 Message Date
Kris Nuttycombe 184286c430 Apply suggestions from code review
Co-authored-by: str4d <thestr4d@gmail.com>
2024-02-21 17:36:08 -07:00
Kris Nuttycombe 050a124cb6 Address comments from code review. 2024-02-21 11:55:00 -07:00
Kris Nuttycombe 4e3d99f1d0 zcash_client_backend: Allow proposer to specify fallback change pool.
In the event that the pool to which change should be sent cannot
automatically be determined based upon the inputs and outputs of a
transaction, it is up to the caller to specify where change should
be sent.
2024-02-15 21:44:59 -07:00
Kris Nuttycombe daf88a12e5 zcash_client_backend: Add support for creation of Orchard outputs. 2024-02-15 21:30:07 -07:00
Kris Nuttycombe f27f601b7d zcash_client_backend: Add Orchard spends to `create_proposed_transaction` 2024-02-15 21:29:15 -07:00
Kris Nuttycombe 74b487e4c9 Apply suggestions from code review
Co-authored-by: str4d <thestr4d@gmail.com>
2024-02-15 20:51:24 -07:00
Kris Nuttycombe dd6711aec1 zcash_client_backend: Address comments from code review & fix incorrect `data_api::wallet` documentation. 2024-02-14 20:24:12 -07:00
Kris Nuttycombe beeea7b44e zcash_client_backend: Modify `Proposal` to make multi-step transactions representable. 2024-02-14 19:30:52 -07:00
Kris Nuttycombe 1db3109cb4 zcash_client_backend: Move the `Proposal` types to a `proposal` module.
This separation is in preparation for modifying the `Proposal` type
to wrap a vector of proposal steps.
2024-02-14 19:04:47 -07:00
Kris Nuttycombe 6e0d9a9420 zcash_client_backend: Add selected output pools to transaction proposals.
Fixes #1174
2024-02-14 18:58:48 -07:00
Kris Nuttycombe 7a5852598e zcash_keys, zcash_client_backend: feature-flag off transparent-input WalletRead methods.
This also moves the `TransparentAddressMetadata` type behind the
`transparent-inputs` feature flag and performs associated cleanup.
2024-02-14 17:38:52 -07:00
Andrew Arnott f1b6dd0636
Switch out `AddressMetadata` for new struct 2024-02-13 18:34:33 -07:00
Andrew Arnott 8f6afb2182
Update changelogs 2024-02-13 18:02:24 -07:00
Andrew Arnott 918f5cc812
Change `WalletRead::get_transparent_receivers` signature
It needn't return the account id that was given as an input, and it shouldn't return an 11-byte diversifier index when a 31-bit child index is more appropriate.
2024-02-13 11:39:06 -07:00
Kris Nuttycombe 11f5589595 zcash_client_backend: Allow serialization of empty transaction requests. 2024-01-30 16:42:31 -08:00
str4d 610b19bcd2
Merge pull request #1129 from zcash/wallet/orchard_compiler_flag
Add `zcash_unstable` compiler flag to fully gate `orchard` functionality
2024-01-25 19:15:53 +00:00
Kris Nuttycombe 0ae986cad0 zcash_client_backend: Move features guarded by the `orchard` flag to a separate Unreleased section of the CHANGELOG 2024-01-24 20:19:14 -07:00
Kris Nuttycombe ea4d00a12d Add CHANGELOG entries. 2024-01-24 18:00:55 -07:00
Jack Grigg db071f2e1f zcash_client_backend: Add desired Sapling shard index to `WalletSummary`
Closes zcash/librustzcash#1124.
2024-01-24 18:06:31 +00:00
Kris Nuttycombe 0ca955336d Split `zcash_keys` crate out from `zcash_client_backend`
This change makes it easier for third parties to make use of the Unified
key infrastructure without incurring a dependency upon the rest of the
`zcash_client_backend` interfaces.
2024-01-16 13:49:42 -07:00
Andrew Arnott 28ed048c7e
Add punctuation to changelog
Co-authored-by: Daira Emma Hopwood <daira@jacaranda.org>
2024-01-11 12:02:24 -07:00
Andrew Arnott 69d92808f3
Add `WalletRead::get_account_ids` function 2024-01-10 13:01:01 -07:00
Kris Nuttycombe 6cbdd494cf zcash_client_backend: Add receiver type selection to unified address derivation. 2024-01-09 10:48:13 -07:00
Kris Nuttycombe 24ebe4c643 Address comments from code review.
Co-authored-by: Jack Grigg <jack@electriccoin.co>
2024-01-05 17:00:46 -07:00
Kris Nuttycombe adc75566a0 zcash_client_backend: Add Orchard support to transaction proposals. 2024-01-05 16:59:54 -07:00
Kris Nuttycombe 56f2ac573c zcash_client_backend: Add Orchard support to change strategies.
This modifies the `compute_balance` method to operate in a
bundle-oriented fashion, which simplifies the API and makes it easier to
elide Orchard functionality in the case that the `orchard` feature is
not enabled.
2024-01-05 16:59:54 -07:00
Kris Nuttycombe 1b036f1e0d zcash_client_backend: rename `WalletNote` to `Note` 2024-01-05 09:13:53 -07:00
Kris Nuttycombe d4aa2d6f06 Replace SaplingInputSource and TransparentInputSource with InputSource
This unification allows us to better isolate transparent-input dependent
functionality. Previously, `TransparentInputSource` could not be placed
under a feature flag because the interface was needed for proposal
deserialization; by instead making the transparent input source methods
flag-dependent, we can correctly produce an error when proposal
deserializaiton attempts to select transparent inputs and the feature
flag is off.
2024-01-04 14:00:20 -07:00
Kris Nuttycombe 967fd36d39
Apply suggestions from code review
Co-authored-by: str4d <thestr4d@gmail.com>
2024-01-04 11:56:59 -07:00
Kris Nuttycombe 857e44a11c zcash_client_backend: Use a polymorphic type for `ScannedBlock` note commitment and nullifier data. 2024-01-04 11:19:22 -07:00
Kris Nuttycombe f18d082aa3 zcash_client_backend: Introduce an "orchard-client" feature flag.
We plan to also introduce a similar flag to gate access to Sapling
functionality. Since introduction of Orchard functionality is still
nascent, it's the correct time to introduce this isolation, before
there's more functionality that needs to be isolated in this fashion.
2024-01-03 17:05:20 -07:00
Kris Nuttycombe 9ac3594bbb zcash_client_backend: Rename RecipientAddress to Address 2023-12-08 11:34:27 -07:00
Kris Nuttycombe aab9938b53 zcash_client_backend: Rename `RecipientAddress::Shielded` to `RecipientAddress::Sapling` 2023-12-07 15:24:47 -07:00
Kris Nuttycombe 4eaa41affa zcash_primitives: Remove and relocate `InputView` traits. 2023-12-06 20:17:43 -07:00
Kris Nuttycombe ca54b3489d Apply suggestions from code review
Co-authored-by: Daira Emma Hopwood <daira@jacaranda.org>
Co-authored-by: Jack Grigg <jack@electriccoin.co>
2023-12-05 15:55:52 -07:00
Kris Nuttycombe cad4f25b75 zcash_client_backend: Replace `ReceivedSaplingNote` with `ReceivedNote`
`ReceivedNote` now allows Orchard notes to be represented as received
notes. As part of this change, received notes now track whether they
were received using internally- or externally-scoped viewing keys.
This eliminates the need to trial-regenerate notes using the wallet's
IVKs to determine scope at spend time.
2023-12-05 10:55:06 -07:00
Kris Nuttycombe 6b10a6dc86 zcash_client_backend: Move essential wallet types into the `wallet` module. 2023-12-05 10:55:04 -07:00
Kris Nuttycombe 214a3750c5 zcash_client_backend: Make `Balance` and `AccountBalance` fields private.
Public methods for mutation of these fields have been provided that
perform checking for overflow of the valid monetary range as part
of their operation.
2023-12-04 13:53:27 -07:00
Kris Nuttycombe 9aec53eec9 zcash_client_backend: Add Orchard components to `ScannedBlock` 2023-11-30 13:08:17 -07:00
Kris Nuttycombe c5f48f50e1 Apply suggestions from code review
Co-authored-by: Daira Emma Hopwood <daira@jacaranda.org>
Co-authored-by: str4d <thestr4d@gmail.com>
2023-11-15 10:53:23 -07:00
Kris Nuttycombe aeb405ef5d Apply suggestions from code review
Co-authored-by: str4d <thestr4d@gmail.com>
Co-authored-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-11-14 12:58:22 -07:00
Kris Nuttycombe 33169719ce zcash_client_backend: Add serialization & parsing for protobuf Proposal representation. 2023-11-09 20:07:16 -07:00
Kris Nuttycombe b9ac7c5eda zcash_client_backend: Fix off-by-one in tree heights at NU activation. 2023-11-09 09:44:57 -07:00
Kris Nuttycombe 27f78d1894 zcash_client_backend: Add Orchard note commitment tree size to block metadata. 2023-11-08 16:46:44 -07:00
Kris Nuttycombe aa063ae3fd zcash_client_backend: Factor out input source traits from `WalletRead`
Prior to this change, it's necessary to implement the entirety of the
`WalletRead` trait in order to be able to use the input selection
functionality provided by `zcash_client_backend::data_api::input_selection`.
This change factors out the minimal operations required for transaction
proposal construction to better reflect the principle of least authority
and make the input selection code reusable in more contexts.

In order to minimize the operations of the newly-created `InputSource`
and `ShieldingSource` traits, this change also removes the
`min_confirmations` field from transaction proposals, in favor of
storing explicit target and anchor heights. This has the effect of
limiting the lifetime of transaction proposals to `PRUNING_DEPTH -
min_confirmations` blocks.
2023-11-08 12:41:49 -07:00
Jack Grigg a77b6c631c Add missing unreleased changelog entries 2023-11-03 00:56:56 +00:00
Jack Grigg bed5bc6cf6 Clean up unreleased changelog entries 2023-11-03 00:56:26 +00:00
Kris Nuttycombe 13fb0a4819
Merge pull request #1019 from nuttycom/wallet/proposals_with_minconf
zcash_client_backend: Move `min_confirmations` into `Proposal`
2023-10-31 12:59:40 -06:00
Kris Nuttycombe 4cd26b7ea9 zcash_client_backend: Move `min_confirmations` into `Proposal`
This fixes an API issue whereby it was possible to execute a `Proposal`
with a different value of `min_confirmations` than that with which the
`Proposal` was constructed.
2023-10-31 10:38:52 -06:00
Kris Nuttycombe a0935b5ecd zcash_client_backend: remove `WalletRead::is_valid_account_extfvk` 2023-10-27 15:01:26 -06:00