Commit Graph

3940 Commits

Author SHA1 Message Date
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 9c82b87d1a
Merge pull request #1309 from nuttycom/fix/missing_block_end_checkpoints 2024-03-24 15:52:53 -06:00
Kris Nuttycombe 874d6b608b zcash_client_backend: Ensure checkpoint at the end of each block.
This fixes an error wherein a note commitment in the last note
commitment position in a block was not being correctly marked as a
checkpoint.

This would occur when a block contained both Sapling and Orchard note
commitments, but the final transaction in the block contained only
either Sapling or Orchard note commitments, but not both.

Fixes #1302
2024-03-24 11:50:12 -06:00
Kris Nuttycombe 2bcfa792b7
Merge pull request #1303 from nuttycom/fix/put_blocks_checkpoint_conflict
zcash_client_sqlite: Fix a problem related to checkpoint pruning.
2024-03-23 21:48:20 -06:00
Kris Nuttycombe 635057d86f zcash_client_sqlite: Avoid attempting to re-create already-pruned checkpoints. 2024-03-23 08:37:59 -06:00
Kris Nuttycombe 5d3ddabe24 zcash_client_sqlite: Add a test to attempt to simulate the checkpoint conflict bug (not failing.) 2024-03-23 08:37:59 -06:00
Kris Nuttycombe fada46e638 zcash_client_sqlite: Fix balance in expired unmined transaction history.
Fixes #1292
Fixes #1299
2024-03-22 14:46:29 -06:00
Kris Nuttycombe f3c8b58784 Minor internal variable renaming for clarity. 2024-03-22 09:14:08 -06:00
Kris Nuttycombe c45d3aed8a
Merge pull request #1301 from nuttycom/fix/orchard_ua_receiver_tests
zcash_client_sqlite: Fix tests that broke with the addition of Orchard UA receivers.
2024-03-21 22:29:22 -06:00
Kris Nuttycombe 6f1e4aff1a zcash_client_sqlite: Fix tests that broke with the addition of Orchard UA receivers. 2024-03-21 21:15:28 -06:00
Kris Nuttycombe cb218ad5ac
Merge pull request #1297 from nuttycom/sqlite_wallet/branching_chain_test_fixes
Fix update_chain_tip_unstable_max_scanned tests.
2024-03-21 12:08:37 -06:00
Kris Nuttycombe f7d2228cc9
Merge pull request #1291 from zcash/zcs-default-ua-orchard-receiver
zcash_client_sqlite: Include Orchard receiver in default UA for new accounts
2024-03-21 09:42:29 -06:00
Kris Nuttycombe 5298ae22d2 zcash_client_sqlite: Fix update_chain_tip_unstable_max_scanned tests. 2024-03-21 09:27:15 -06:00
Kris Nuttycombe dc4fccf566 zcash_client_sqlite: Modify `TestState` to allow initialization with chain state. 2024-03-20 20:43:49 -06:00
Hazel OHearn 7cbfc1f911
remove doc hidden 2024-03-20 16:23:56 -03:00
Kris Nuttycombe 978f838aae zcash_client_sqlite: Add `testing::TestAccount` struct. 2024-03-20 10:08:36 -06:00
Jack Grigg 7bcf10b44b zcash_client_sqlite: Include Orchard receiver in default UA for new accounts 2024-03-20 00:28:40 +00:00
str4d e795174809
Merge pull request #1290 from nuttycom/fix/empty_tree_deserialization
zcash_client_backend: Treat protobuf default as the empty `CommitmentTree`.
2024-03-19 23:55:02 +00:00
Kris Nuttycombe 5f1d75937b zcash_client_backend: Treat protobuf default as the empty tree.
Fixes #1280
2024-03-19 17:26:45 -06:00
str4d 97651a6d4b
Merge pull request #1289 from nuttycom/sqlite_wallet/branching_chain_test_fixes
zcash_client_sqlite: Fix `scan_complete` tests.
2024-03-19 22:47:30 +00:00
Kris Nuttycombe 4f7c5bd722 zcash_client_sqlite: Fix `scan_complete` tests. 2024-03-19 16:11:57 -06:00
Kris Nuttycombe 18e2683d1b
Merge pull request #1288 from zcash/orchard-metastability
Remove `orchard` feature flag from behind `zcash_unstable` cfg flag
2024-03-19 15:07:04 -06:00
Jack Grigg b189fe7a36 Remove `orchard` feature flag from behind `zcash_unstable` cfg flag 2024-03-19 18:24:39 +00:00
Kris Nuttycombe 35a60abc30
Merge pull request #1287 from zcash/zcs-distinguish-seed-relevance-with-no-accounts
Distinguish seed relevance when no derived accounts are present
2024-03-19 12:14:50 -06:00
Jack Grigg 3c1e82a0c8 zcash_client_sqlite: Add missing feature flags to error helper fn 2024-03-19 17:53:41 +00:00
Jack Grigg 3090aff87f Distinguish seed relevance when no derived accounts are present
During wallet migration in particular, the absence of _any_ accounts is
expected, and all seeds should be treated as relevant (because accounts
cannot be added before a wallet is initialized).
2024-03-19 17:53:41 +00:00
str4d 5b3ebca351
Merge pull request #1286 from zcash/1283-zcs-migration-seed-relevance
zcash_client_sqlite: Always check for seed relevance in `init_wallet_db`
2024-03-19 01:00:44 +00:00
Jack Grigg 4fa0547b84 zcash_client_sqlite: Always check for seed relevance in `init_wallet_db`
Closes zcash/librustzcash#1283.
2024-03-19 00:34:28 +00:00
Jack Grigg e6bc21b461 Add `WalletRead::is_seed_relevant_to_any_derived_accounts` 2024-03-19 00:34:28 +00: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 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