Commit Graph

3683 Commits

Author SHA1 Message Date
Kris Nuttycombe a81e7ff306 zcash_client_backend: Fix note selection & add more cross-pool tests. 2024-03-13 18:44:36 -06:00
str4d 1c72b0bfab
Merge pull request #1267 from zcash/account-apis
Account APIs needed for the mobile SDKs
2024-03-13 21:26:55 +00:00
Jack Grigg b161472cc0 zcash_client_sqlite: Rename `account_type` column to `account_kind` 2024-03-13 21:06:30 +00:00
Jack Grigg bbb7f36e55 zcash_client_backend: Add `WalletRead::get_account` 2024-03-13 21:00:59 +00:00
Jack Grigg 64aabdc54a Rename `WalletRead::get_seed_account` to `WalletRead::get_derived_account` 2024-03-13 21:00:59 +00:00
Jack Grigg 5f3d5e9f4a zcash_client_sqlite: Use `wallet::Account` for `WalletRead::Account` 2024-03-13 21:00:59 +00:00
Jack Grigg 65093487c3 zcash_client_backend: Expose the kind of an `Account` 2024-03-13 21:00:59 +00:00
Jack Grigg bc6aa955ff zcash_client_sqlite: Refactor `wallet::Account` to be a struct 2024-03-13 21:00:59 +00:00
str4d 05259eff75
Merge pull request #1266 from zcash/apis-for-mobile-sdks
APIs for mobile SDKs
2024-03-13 20:57:07 +00:00
Kris Nuttycombe dd63a6e3dd zcash_client_backend: Remove unnecessary `ReceivedNote::traverse_opt` 2024-03-13 14:19:26 -06:00
Kris Nuttycombe b2597aa952 zcash_client_backend: Add a test for ZIP 317 cross-pool payments. 2024-03-13 13:54:53 -06:00
Jack Grigg 634ebf51ef Reorder `WalletRead` and `WalletWrite` trait methods for clarity 2024-03-13 16:00:32 +00:00
Andrew Arnott 27eba4e578
Merge remote-tracking branch 'upstream/main' into uivk 2024-03-13 09:43:09 -06:00
Jack Grigg 7d603b8c59 zcash_client_backend: Add `proto::service::TreeState::to_chain_state` 2024-03-13 12:54:58 +00:00
Kris Nuttycombe b3d06ba419
Merge pull request #1262 from nuttycom/sqlite_wallet/fix_multi_pool_checkpointing
zcash_client_sqlite: Ensure that Orchard and Sapling checkpoints are always available for the same block heights.
2024-03-12 19:01:17 -06:00
Kris Nuttycombe a0460886f4 Fix stray clippy complaint. 2024-03-12 18:27:02 -06:00
Kris Nuttycombe 2ba89a6d16 zcash_client_backend: Fix `scan_cached_blocks` example doc compilation errors. 2024-03-12 18:27:02 -06:00
Kris Nuttycombe d80782a739 zcash_client_sqlite: Move tests that require fixes to the test framework behind the `orchard` flag. 2024-03-12 18:27:02 -06:00
Kris Nuttycombe c4b2108685 zcash_client_sqlite: Fix `block_fully_scanned` test. 2024-03-12 18:14:16 -06:00
Kris Nuttycombe f58263e211 zcash_client_backend: Require the tree state for the start of each scanned range.
In order to support constructing the anchor for multiple pools with a
common anchor height, we must be able to checkpoint each note commitment
tree (and consequently compute the root) at that height. Since we may
not have the information in the tree needed to do so, we require that it
be provided.

As a bonus, this change makes it possible to improve the UX around
spendability, because we will no longer require subtree ranges below
received notes to be fully scanned; the inserted frontier provides
sufficient information to make them spendable.
2024-03-12 18:14:11 -06:00
Kris Nuttycombe c967bb8b39 Remove stray dbg! calls 2024-03-12 18:08:58 -06:00
Kris Nuttycombe a788fc9318
Merge pull request #1264 from nuttycom/orchard_rho
zcash_client_sqlite: Update to make use of `orchard::note::Rho`
2024-03-12 18:00:46 -06:00
Kris Nuttycombe 0c5a365c60 zcash_client_sqlite: Update to make use of `orchard::note::Rho` 2024-03-12 17:28:10 -06:00
Kris Nuttycombe 3dcac7a5ff
Merge pull request #1259 from nuttycom/sqlite_wallet/get_seed_account
Add `WalletRead::get_seed_account`
2024-03-12 12:29:27 -06:00
Kris Nuttycombe 79f5bb411c zcash_client_sqlite: Add index verification to `verify_schema` 2024-03-12 11:50:01 -06:00
Kris Nuttycombe 328e854202 zcash_client_sqlite: Ensure uniqueness of (hd_seed_fingerprinte, hd_account_index) pairs. 2024-03-12 11:45:35 -06:00
Kris Nuttycombe 33e943d14a zcash_client_backend: Add `WalletRead::get_seed_account` 2024-03-12 11:21:04 -06:00
Kris Nuttycombe 5e810d3689
Merge pull request #1258 from nuttycom/sqlite_wallet/fuzzy_key_matching
Return partial matches when using `WalletRead::get_account_for_ufvk`.
2024-03-12 11:12:34 -06:00
Kris Nuttycombe bb466de379
Merge pull request #1182 from nuttycom/sqlite_wallet/orchard_support
`zcash_client_sqlite`: Add Orchard wallet support
2024-03-12 11:10:31 -06:00
Kris Nuttycombe 5a2897061c Apply suggestions from code review
Co-authored-by: str4d <thestr4d@gmail.com>
2024-03-12 10:34:00 -06:00
Kris Nuttycombe 2eb5061eb1 zcash_client_sqlite: Ensure that truncation is applied to the Orchard note commitment tree. 2024-03-12 10:34:00 -06:00
Kris Nuttycombe 7cfaa422bc
Apply error message suggestion from code review.
Co-authored-by: str4d <thestr4d@gmail.com>
2024-03-12 10:04:27 -06:00
Kris Nuttycombe 09181f458c zcash_client_sqlite: Return a backend-specific `Account` type from get_account_by_ufvk. 2024-03-12 08:59:53 -06:00
Kris Nuttycombe a0bd257124 zcash_client_sqlite: Return partial matches when using `WalletRead::get_account_for_ufvk` 2024-03-12 08:59:53 -06:00
Andrew Arnott 2b3060d138
Apply updated style for key discovery
Co-authored-by: Kris Nuttycombe <kris@nutty.land>
2024-03-12 06:37:20 -06:00
Andrew Arnott 071d7c51d7
Add `UnifiedIncomingViewingKey` struct
Also update sqlite to utilize the new struct
2024-03-12 06:37:20 -06:00
Jack Grigg d68a01a221 Fix typos 2024-03-11 19:00:26 +00:00
Jack Grigg 5a6057b8fb zcash_client_backend: Detect Orchard dust in `zip317::SingleOutputChangeStrategy` 2024-03-11 18:58:09 +00:00
Jack Grigg 8e09b78ca1 zcash_client_sqlite: Call `mark_orchard_note_spent` in `WalletDb::store_sent_tx` 2024-03-11 18:58:09 +00:00
Kris Nuttycombe 1028894324 zcash_client_sqlite: Minor refactoring for improved debuggability & future Sapling flagging. 2024-03-11 18:58:09 +00:00
Jack Grigg 6601820a2a zcash_client_sqlite: Add Orchard support to `truncate_to_height` 2024-03-11 18:58:09 +00:00
Kris Nuttycombe 820b1f9c2d zcash_client_sqlite: Factor out common note selection code. 2024-03-11 18:58:09 +00:00
Kris Nuttycombe cad174c1d7 zcash_client_sqlite: Make note selection queries consistent between Sapling and Orchard. 2024-03-11 18:58:09 +00:00
Kris Nuttycombe 6086774b9b zcash_client_sqlite: Ensure that we only exclude the correct notes from selection. 2024-03-11 18:58:09 +00:00
Jack Grigg 44f5a55b92 zcash_client_sqlite: Add Orchard support to `get_received_memo` 2024-03-11 18:58:09 +00:00
Jack Grigg a1a8af01d3 zcash_client_sqlite: Add Orchard support to `get_wallet_summary` 2024-03-11 18:58:09 +00:00
Kris Nuttycombe ac7113c721 zcash_client_sqlite: Get the minimum of Sapling and Orchard anchor heights for the anchor. 2024-03-11 18:58:09 +00:00
Kris Nuttycombe 021128b106 zcash_client_sqlite: Add Orchard note selection. 2024-03-11 18:58:09 +00:00
str4d a9aabb2aa0
Merge pull request #1255 from zcash/orchard-scanning
zcash_client_sqlite: Implement Orchard scanning
2024-03-11 18:54:20 +00:00
str4d 33be548f08
zcash_client_sqlite: Use preference order for z->t account matching
Co-authored-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-03-11 18:41:05 +00:00