Kris Nuttycombe
29e20436d1
Merge remote-tracking branch 'upstream/main' into memory_wallet_db
2024-04-23 16:44:29 -06:00
str4d
5c6a6a4c86
Merge pull request #1143 from nuttycom/crate_zip321
...
Extract `zip321` crate from `zcash_client_backend`
2024-04-22 22:46:09 +01:00
Kris Nuttycombe
d2aa6cfc7f
Apply suggestions from code review
...
Co-authored-by: str4d <thestr4d@gmail.com>
2024-04-22 14:41:50 -06:00
Kris Nuttycombe
aeac544aed
Address comments from code review.
2024-04-22 10:55:25 -06:00
Kris Nuttycombe
21313a253f
Merge remote-tracking branch 'upstream/main' into memory_wallet_db
2024-04-18 08:56:39 -06:00
Kris Nuttycombe
f7c29f0111
zcash_client_sqlite: Fix the broken `account_birthday` query.
2024-04-05 18:21:11 -06:00
Kris Nuttycombe
20e8bca8d9
zcash_client_sqlite: Add a test demonstrating the broken `account_birthday` query.
2024-04-05 16:56:54 -06:00
Kris Nuttycombe
b60600a4c3
zcash_client_sqlite: Use `ZcashAddress` for persistence of sent note addresses
...
Prior to this change, the recipient of a sent transaction would always
be shown as the protocol-level address, instead of any unified address
intended as the recipient. Now, instead of reencoding the recipient
address, we use the original `ZcashAddress` value from the payment
request.
2024-04-05 16:48:13 -06:00
Kris Nuttycombe
9bd97814db
zcash_client_sqlite: Use named column references in `to_unspent_transparent_output`
2024-04-01 12:19:54 -06:00
Kris Nuttycombe
e618d80cde
zcash_client_sqlite: Fix sloppy named-parameter reference.
2024-04-01 12:19:49 -06:00
Kris Nuttycombe
55895b85b5
zcash_client_sqlite: Add a test for multiple-account retrieval.
2024-04-01 12:19:48 -06:00
Jack Grigg
5462f84676
zcash_client_sqlite: Fix column name in UTXO query
...
Closes zcash/librustzcash#1326 .
2024-03-27 13:49:20 +00:00
Jack Grigg
020305fd20
zcash_client_sqlite: Add tests that hit zcash/librustzcash#1326 .
2024-03-27 13:49:15 +00:00
Kris Nuttycombe
1719b0186c
zcash_client_sqlite: Don't overwrite `account_id` with nulls in `put_sent_output`.
2024-03-25 12:42:43 -06:00
Kris Nuttycombe
151e6e526e
zcash_client_backend: Track external addresses in inter-account transactions.
...
Previously, if the funding account for a received transaction output was
determined to be an account known to the wallet, the output was recorded
as though it were sent to an internal (change) address of the wallet.
2024-03-25 07:59:21 -06:00
Kris Nuttycombe
404132bce5
zcash_client_sqlite: Use `get_funding_account` to determine whether an output is recorded as sent.
2024-03-25 07:59:21 -06:00
Kris Nuttycombe
7e7dba8020
zcash_client_sqlite: Add `get_funding_accounts` method.
2024-03-25 07:59:20 -06:00
Kris Nuttycombe
81954e2a65
zcash_client_sqlite: Fix `invalid_chain_cache_disconnected` tests.
2024-03-24 17:02:23 -06:00
Kris Nuttycombe
e67a978ff9
zcash_client_sqlite: Use account birthday subtree sizes for progress.
...
This also fixes the `update_chain_tip_stable_max_scanned` tests.
2024-03-24 17:02:23 -06:00
Kris Nuttycombe
9c9bd40549
zcash_client_sqlite: Fix balance in expired unmined transaction history.
...
Fixes #1292
Fixes #1299
2024-03-24 17:02:23 -06:00
Kris Nuttycombe
dc4fccf566
zcash_client_sqlite: Modify `TestState` to allow initialization with chain state.
2024-03-20 20:43:49 -06:00
Kris Nuttycombe
d013322aa1
Merge remote-tracking branch 'upstream/main' into memory_wallet_db
2024-03-20 11:35:02 -06:00
Kris Nuttycombe
978f838aae
zcash_client_sqlite: Add `testing::TestAccount` struct.
2024-03-20 10:08:36 -06:00
Jack Grigg
8c7f8d07ba
zcash_client_sqlite: Fix bug in `WalletDb::validate_seed`
...
The previous implementation was mixing the caller-provided seed with the
wallet-provided ZIP 32 account index, and throwing an error if the USK
derivation failed. We instead need to count that as a mismatch, because
the wallet account's actual seed would derive a USK fine (because wallet
accounts are required to have a known UIVK).
2024-03-19 00:34:28 +00:00
Jack Grigg
c67b17dc96
zcash_client_sqlite: Extract `seed_matches_derived_account` helper
2024-03-19 00:34:28 +00:00
Jack Grigg
703e50ae03
Add `Account::uivk`
...
The blanket `impl Account<A> for (A, Option<UnifiedFullViewingKey>)` is
removed because we cannot know the UIVK for `(A, None)`. We instead
provide a blanket impl for `(A, UnifiedIncomingViewingKey)`. We also
move both of them behind `test-dependencies` because they are only
intended for testing purposes.
2024-03-19 00:34:28 +00:00
str4d
da64e8aa5d
Merge pull request #1272 from nuttycom/account_source
...
zcash_client_backend: Rename `AccountKind` to `AccountSource`
2024-03-18 17:59:17 +00:00
Kris Nuttycombe
ab3e790bfc
zcash_client_backend: Rename `AccountKind` to `AccountSource`
2024-03-15 09:28:35 -06:00
Kris Nuttycombe
64c7514941
WIP: Create an in-memory wallet backend.
2024-03-15 09:24:50 -06:00
Kris Nuttycombe
6102e83b07
Merge remote-tracking branch 'upstream/main' into uivk
2024-03-14 18:21:34 -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
9e1a4327c3
zcash_keys: Keep the Ufvk and Uivk encodings private.
2024-03-14 17:03:03 -06:00
Andrew Arnott
9ddbf1e3e9
Implement todo! line
2024-03-14 15:21:46 -06:00
Kris Nuttycombe
4d9927b993
zcash_keys: Verify the ability to derive addresses at USK and UFVK construction.
2024-03-14 11:26:16 -06:00
Kris Nuttycombe
9d6a8b6941
zcash_keys: Use `DecodingError` instead of `DerivationError` for key parsing.
2024-03-13 20:14:43 -06:00
Andrew Arnott
1770c2ec5f
Merge remote-tracking branch 'upstream/main' into uivk
2024-03-13 19:28:50 -06:00
Andrew Arnott
c99338a7a1
Merge new error type into existing one
2024-03-13 18:59:41 -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
Andrew Arnott
27eba4e578
Merge remote-tracking branch 'upstream/main' into uivk
2024-03-13 09:43:09 -06:00
Kris Nuttycombe
c4b2108685
zcash_client_sqlite: Fix `block_fully_scanned` test.
2024-03-12 18:14:16 -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
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