Commit Graph

3796 Commits

Author SHA1 Message Date
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
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
str4d 078027221f
Merge pull request #1254 from zcash/orchard-tables
zcash_client_sqlite: Add database tables for Orchard
2024-03-11 17:27:49 +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 cc3f05a0d9
Merge pull request #1253 from zcash/more-orchard-tests
zcash_client_sqlite: More Orchard tests
2024-03-11 08:31:09 -06: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
Kris Nuttycombe 1003cd66ea
Merge pull request #1252 from zcash/orchard-test-fixes
Various fixes to Orchard tests
2024-03-10 16:15:02 -06:00
Jack Grigg 993102e803 zcash_client_sqlite: Fix `test_with_nu5_birthday_offset` tree setup 2024-03-10 21:47:40 +00:00
Jack Grigg 799574590e zcash_client_sqlite: Fix more test seeds to use valid lengths 2024-03-10 21:47:40 +00:00
Jack Grigg 2a81156520 zcash_client_sqlite: Fix balance APIs in `TestState` to include Orchard 2024-03-10 21:47:40 +00:00
Jack Grigg c4abcba343 zcash_client_backend: Add Orchard change output support to proposals 2024-03-10 21:47:40 +00:00
Kris Nuttycombe 654f116a0a
Merge pull request #1251 from zcash/ci-rework
CI: Rework the test states
2024-03-10 13:49:12 -06:00
Jack Grigg 6898dbf094 Replace `unstable-nu6` and `zfuture` feature flags with cfg flags
Neither of these should have been feature flags, as they gate breaking
changes to the Zcash consensus rules (and in some ways are incompatible
with each other), while feature flags should be additive.
2024-03-10 18:42:39 +00:00
Jack Grigg 98c82eb6c6 CI: Stop actively testing ZFuture and instead just check it builds 2024-03-10 18:03:50 +00:00
Jack Grigg 93048c6c46 CI: Separate test "state" from the feature flags activated by it 2024-03-10 18:01:33 +00:00
Kris Nuttycombe 0d4a730e9e
Merge pull request #1250 from zcash/zcs-orchard-testing
zcash_client_sqlite: Run single-shielded-pool tests on Orchard
2024-03-10 08:16:32 -06:00
Jack Grigg 10e1bb6001 CI: Continue tests on error if test failures are in an unstable flag 2024-03-10 01:26:06 +00:00
Jack Grigg 75c5f31ab0 zcash_client_sqlite: Use a seeded RNG in `TestState`
This makes individual instances of `TestState` deterministic, which
helps with debugging.
2024-03-10 01:10:50 +00:00
Jack Grigg 390b536950 zcash_client_sqlite: Use `LocalNetwork` for testing
This enables us to activate Sapling and NU5 at the same height, to
simplify reuse of test logic between Sapling and Orchard.

As a side-effect, `zcash_extensions` is removed from the workspace
because it enables the `zfuture` feature flag unconditionally, which
breaks workspace-level builds because this causes the `zfuture` feature
flag on `zcash_protocol` to be enabled without the corresponding feature
flag on `zcash_client_sqlite` being enabled. We will fix this by moving
from feature flags to config flags for unstable features.
2024-03-10 01:10:28 +00:00
Jack Grigg 798d9154b8 zcash_client_sqlite: Use a valid length for test seeds 2024-03-09 21:12:37 +00:00
Jack Grigg a0b517a93a zcash_client_sqlite: Add `OrchardPoolTester`, run tests with Orchard 2024-03-09 20:44:19 +00:00
str4d 58f46e4636
Merge pull request #1248 from zcash/zcs-test-state-orchard-tree
zcash_client_sqlite: Track Orchard commitment tree sizes in `TestState`
2024-03-09 19:40:39 +00:00
Jack Grigg 0891b5fd3a zcash_client_backend: Correctly handle empty frontiers in test birthdays 2024-03-09 18:21:34 +00:00
Jack Grigg f74c2304df zcash_client_sqlite: Track Orchard commitment tree sizes in `TestState` 2024-03-09 18:06:20 +00:00
Jack Grigg dd8808fd83 zcash_client_sqlite: Replace tuple with struct in `TestState` 2024-03-09 17:36:18 +00:00
Kris Nuttycombe 39c750312f
Merge pull request #1247 from zcash/zcs-pool-testing
zcash_client_sqlite: Generalise Sapling tests
2024-03-09 10:11:46 -07:00
Jack Grigg 9d40588a50 zcash_client_sqlite: Generalise `wallet::scanning` tests 2024-03-09 15:28:47 +00:00
Jack Grigg 399ae762b7 zcash_client_sqlite: Generalise `wallet::commitment_tree` tests 2024-03-09 15:20:43 +00:00
Jack Grigg d89b88126d zcash_client_sqlite: Generalise `wallet::sapling` tests
These are all "single shielded pool" tests, and should pass for any
shielded pool implemented in the wallet.
2024-03-09 15:20:40 +00:00
Kris Nuttycombe 19868af84a
Merge pull request #1246 from zcash/zcb-0.11-zcs-0.9-doc-fixes
`zcash_client_backend 0.11.1`, `zcash_client_sqlite 0.9.1` with doc fixes
2024-03-09 08:19:41 -07:00