Commit Graph

3455 Commits

Author SHA1 Message Date
Kris Nuttycombe 880c24c45d zcash_client_backend: Generalize key source metadata. 2024-02-29 11:55:44 -07:00
Kris Nuttycombe 802c01002a zcash_client_backend: Rework scanning key identifiers.
In the process of making the internals of `scan_block_with_runner`
reusable across Sapling and Orchard, it became evident that key
identifier abstraction along the lines of #1175 is needed more
generally. This commit refactors the use of ZIP 32 account identifiers
and key scopes to better separate scanning concerns from ZIP 32 key
derivation. In the process, this removes a fair amount of unnecessary
polymorphism from `zcash_client_backend::wallet::WalletTx` and related
types.
2024-02-29 11:55:25 -07:00
Kris Nuttycombe c7df76f7d1 zcash_client_backend: Factor out common note decryption from `scan_block_with_runner` 2024-02-29 11:55:23 -07:00
Kris Nuttycombe ba568f47ad zcash_client_backend: Factor out nullifier checks from `scan_block_with_runner` 2024-02-29 11:54:20 -07:00
Kris Nuttycombe dd8c6dee12 zcash_client_backend: Generalize `ScanningKey`
This change allows the `ScanningKey` type to represent Orchard
keys as well as Sapling keys.

No CHANGELOG entry is added for this, as the `ScanningKey` type
is further reworked in a later commit.
2024-02-29 11:54:02 -07:00
Kris Nuttycombe e2331dbd6f
Merge pull request #1202 from nuttycom/generic_account_id
zcash_client_backend: Make `AccountId` an associated type of `WalletRead`
2024-02-29 11:53:26 -07:00
Kris Nuttycombe 5174f7e339
Merge pull request #1206 from nuttycom/orchard_tree_deser
zcash_client_backend: Implement `TreeState::orchard_tree`
2024-02-29 11:41:48 -07:00
Kris Nuttycombe 688c36166a Address comments from code review. 2024-02-29 07:50:31 -07:00
Kris Nuttycombe 9c3467e941 zcash_client_backend: Implement `TreeState::orchard_tree` 2024-02-29 07:21:51 -07:00
Kris Nuttycombe 41b050f1e9 zcash_client_backend: Make `AccountId` an associated type of `WalletRead`
This PR was extracted from https://github.com/zcash/librustzcash/pull/1175
in order to make the changes to `zcash_client_backend` usable without
the additional generalizations to `zcash_client_sqlite` made by that PR.

Co-authored-by: Andrew Arnott <andrewarnott@live.com>
2024-02-28 21:06:14 -07:00
Kris Nuttycombe 5ed788dc79
Merge pull request #1168 from nuttycom/zcash_keys_sapling_feature
zcash_keys: Add `sapling` and `transparent` feature flags.
2024-02-26 19:16:07 -07:00
Kris Nuttycombe 635bc3158b
Fix an error in decoding tests.
Co-authored-by: str4d <thestr4d@gmail.com>
2024-02-26 18:33:19 -07:00
Kris Nuttycombe f50deb47a0
Merge pull request #1194 from zcash/changelog-cleanups
Changelog cleanups
2024-02-26 12:52:35 -07:00
Kris Nuttycombe de2d4e71af
Merge pull request #1196 from nuttycom/fix/zip321_test_deps
zcash_client_backend: Fix incorrect handling of zip321 test dependencies.
2024-02-26 08:06:44 -07:00
Kris Nuttycombe 1892e0cc39 zcash_client_backend: Fix incorrect handling of zip321 test dependencies. 2024-02-23 22:09:22 -07:00
Kris Nuttycombe 2a6330f2ea Apply suggestions from code review
Co-authored-by: str4d <thestr4d@gmail.com>
2024-02-23 09:16:26 -07:00
Kris Nuttycombe 9b98f46bf6 zcash_keys: Add `sapling` and `transparent-inputs` feature flags.
Fixes #1160
2024-02-23 09:16:25 -07:00
Jack Grigg b6ab9b5311 Clean up zcash_client_backend changelog 2024-02-22 23:38:15 +00:00
Jack Grigg 25b682728b Clean up zcash_keys changelog 2024-02-22 23:38:15 +00:00
Jack Grigg 92e54ddce2 Clean up zcash_primitives changelog 2024-02-22 23:38:15 +00:00
Jack Grigg e85c631dd3 Add missing entries to changelogs 2024-02-22 23:38:05 +00:00
str4d 04343e16f1
Merge pull request #1105 from nuttycom/wallet/orchard_spends_and_outputs
zcash_client_backend: add Orchard spends and outputs to transaction construction
2024-02-22 01:12:18 +00:00
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 8c78d7f2a0 Fix incorrect documentation link. 2024-02-19 10:34:07 -07:00
Kris Nuttycombe 27defb8711 Address comments from code review. 2024-02-16 10:59:29 -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 c6656c108b
Merge pull request #1187 from nuttycom/proposal_resolved_receivers
`zcash_client_backend`: Updates to the `Proposal` data structure
2024-02-15 21:28:20 -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 6aabe60d21 zcash_client_backend: Add validation to the `Proposal::multi_step` constructor. 2024-02-15 13:09:52 -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 4f206e415a zcash_client_backend: Implement multi-step transparent transaction support 2024-02-14 19:33:18 -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 0ef5cad2ff zcash_client_backend: Ensure we use the correct scope for transparent secret key derivation. 2024-02-14 17:38:55 -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
Kris Nuttycombe 0477ec0dc5
Merge pull request #1185 from nerdcash/nonhardenedchildindex
Declare and use NonHardenedChildIndex for transparent
2024-02-14 12:22:37 -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 9f221f869d
Fail instead of swallow on database corruption 2024-02-13 11:39:06 -07:00
Andrew Arnott 8003a39e1b
Add test coverage 2024-02-13 11:39:06 -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
Andrew Arnott 1733af8718
Declare `NonHardenedChildIndex` struct 2024-02-10 12:46:46 -07:00
str4d 3cbc4815b6
Merge pull request #1183 from nuttycom/fix_backend_test_deps
zcash_client_backend: Fix missing `test-dependencies` feature dependency.
2024-02-09 17:29:51 +00:00
Kris Nuttycombe cd12efd123 zcash_client_backend: Fix missing `test-dependencies` feature dependency. 2024-02-08 16:50:47 -07:00
str4d 121438eaef
Merge pull request #1173 from zcash/1171-generalise-batch-runner
zcash_client_backend: Extend `BatchRunner` to support full outputs
2024-02-08 23:14:02 +00:00
Jack Grigg f6224e7e80 zcash_client_backend: Fix documentation for `BatchRunner::add_outputs` 2024-02-08 19:19:05 +00:00