Jack Grigg
8b8757ce65
zcash_client_sqlite: Fix ambiguities in transaction views
...
Co-authored-by: Kris Nuttycombe <kris@nutty.land>
2024-03-15 13:10:18 -06:00
Kris Nuttycombe
46fd6ab0fe
zcash_client_backend: Make `WalletRead::get_transaction` return `Result<Option<Transaction>, _>`
...
This should never have had the behavior of returning an error on a
missing txid in the first place; doing so conflates database corruption
or connectivity errors with the ordinary case where data may not be
available.
2024-03-14 17:38:51 -06:00
Kris Nuttycombe
cc990b60e0
zcash_keys: Remove HdSeedFingerprint as it duplicates `zip32::fingerprint::SeedFingerprint`
2024-03-14 17:09:03 -06:00
Kris Nuttycombe
0bae47b05b
zcash_client_backend: Improve API ergonomics for input selection.
2024-03-13 19:33:06 -06:00
str4d
2e0a3005de
Merge pull request #1268 from nuttycom/sqlite_wallet/cross_pool_note_selection
...
zcash_client_backend: Fix note selection & add more multi-pool tests.
2024-03-14 01:12:42 +00:00
Kris Nuttycombe
a81e7ff306
zcash_client_backend: Fix note selection & add more cross-pool tests.
2024-03-13 18:44:36 -06: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
Jack Grigg
634ebf51ef
Reorder `WalletRead` and `WalletWrite` trait methods for clarity
2024-03-13 16:00:32 +00: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
0c5a365c60
zcash_client_sqlite: Update to make use of `orchard::note::Rho`
2024-03-12 17:28:10 -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
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
Jack Grigg
d68a01a221
Fix typos
2024-03-11 19:00:26 +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
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
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
Kris Nuttycombe
22ed9ebd35
zcash_client_sqlite: Ensure we identify the sending account in z->t transactions.
2024-03-11 17:49:44 +00:00
Kris Nuttycombe
8dfa836a03
zcash_client_sqlite: Use correct offsets for Orchard commitment positions.
2024-03-11 17:42:23 +00:00
Kris Nuttycombe
b62763d689
zcash_client_sqlite: Add Orchard note commitments in `put_blocks` and `put_block`
2024-03-11 17:34:43 +00:00
Kris Nuttycombe
1181566401
zcash_client_sqlite: Support Orchard scanning
2024-03-11 17:31:04 +00:00
Kris Nuttycombe
50f5df4c1d
zcash_client_sqlite: Implement `WalletDb::get_orchard_nullifiers`
2024-03-11 17:31:04 +00:00
Kris Nuttycombe
af4dce9912
zcash_client_sqlite: Implement `wallet::orchard::put_received_note`
2024-03-11 17:31:04 +00:00
Kris Nuttycombe
ae9dd25525
zcash_client_sqlite: Add `orchard_received_notes` table and update related views.
2024-03-11 16:35:01 +00:00
Kris Nuttycombe
374ed8cf94
zcash_client_sqlite: Add backend impl for the Orchard note commitment tree
2024-03-11 16:35:01 +00:00
Kris Nuttycombe
de58b5a5b1
zcash_client_sqlite: Add a failing test of cross-pool transfer
2024-03-11 11:36:35 +00:00
Kris Nuttycombe
99b3d3c997
zcash_client_sqlite: Generalize chain tests.
2024-03-11 10:27:54 +00:00
Kris Nuttycombe
02562187af
zcash_client_sqlite: Make scan_cached_blocks_detects_spends_out_of_order a common single-pool test
2024-03-11 10:27:54 +00:00
Jack Grigg
993102e803
zcash_client_sqlite: Fix `test_with_nu5_birthday_offset` tree setup
2024-03-10 21:47:40 +00:00