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
2d8a7dc4af
zcash_client_sqlite: Remove `SqliteClientError::InvalidNoteId`
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
Jack Grigg
85d79fbb8a
zcash_client_sqlite: Distinguish "seed not relevant" in migration errors
2024-03-19 00:32:35 +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
273712bad0
Merge pull request #1245 from AArnott/uivk
...
Add `UnifiedIncomingViewingKey` struct
2024-03-18 08:57:04 -06:00
Kris Nuttycombe
e0227ed175
Merge pull request #1279 from zcash/zcs-fix-view-migrations
...
zcash_client_sqlite: Fix ambiguities in transaction views
2024-03-15 14:20:05 -06:00
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
ab3e790bfc
zcash_client_backend: Rename `AccountKind` to `AccountSource`
2024-03-15 09:28:35 -06:00
Willem Olding
1775f6525b
Add WASM support to `lightwalletd-tonic` feature flag ( #1270 )
...
The transport-specific code is moved behind a new `lightwalletd-tonic-transport` feature flag.
2024-03-15 11:58:13 +00:00
Kris Nuttycombe
6102e83b07
Merge remote-tracking branch 'upstream/main' into uivk
2024-03-14 18:21:34 -06:00
Kris Nuttycombe
50a4ce3f04
Merge pull request #1275 from nuttycom/get_transaction_option
...
zcash_client_backend: Make `WalletRead::get_transaction` return `Result<Option<Transaction>, _>`
2024-03-14 18:18:27 -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
c3d82b2cce
Merge pull request #1274 from nuttycom/use_zip32_seed_fingerprint
...
zcash_keys: Remove HdSeedFingerprint as it duplicates `zip32::fingerprint::SeedFingerprint`'
2024-03-14 17:37:13 -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
b4171caaf4
zcash_keys: Fix no-default-features compilation.
2024-03-14 11:59:58 -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
be312f8655
Merge pull request #1271 from nuttycom/sqlite_wallet/cross_pool_selection_refactor
...
zcash_client_backend: Pure refactoring for note selection ergonomics.
2024-03-14 07:35:22 -06:00
Kris Nuttycombe
9d6a8b6941
zcash_keys: Use `DecodingError` instead of `DerivationError` for key parsing.
2024-03-13 20:14:43 -06:00
Kris Nuttycombe
0bae47b05b
zcash_client_backend: Improve API ergonomics for input selection.
2024-03-13 19:33:06 -06:00
Kris Nuttycombe
22f341888f
zcash_client_backend: Add `SpendableNotes` type and `NoteRetention` trait.
2024-03-13 19:32:16 -06:00
Andrew Arnott
1770c2ec5f
Merge remote-tracking branch 'upstream/main' into uivk
2024-03-13 19:28:50 -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
Andrew Arnott
c99338a7a1
Merge new error type into existing one
2024-03-13 18:59:41 -06:00
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