Commit Graph

968 Commits

Author SHA1 Message Date
Jack Grigg ebd849f3e1 Fix `cargo test -p zcash_client_backend` 2024-09-23 16:15:36 +00:00
Jack Grigg e67e7abc52 zcash_client_backend: Remove default impls for `WalletTest` methods
Now that these are in a separate trait, we can just require them for all
downstreams, in order to make them usable in all tests.
2024-09-20 23:52:58 +00:00
Jack Grigg 1f23bc1d4c Move remaining pool tests from `zcash_client_sqlite` to `zcash_client_backend`
Co-authored-by: Willem Olding <willemolding@gmail.com>
2024-09-20 23:52:58 +00:00
Willem Olding ceaa9e80c7 zcash_client_backend: New `WalletTest` methods to abstract SQL queries
Co-authored-by: Jack Grigg <jack@electriccoin.co>
2024-09-20 23:52:58 +00:00
Kris Nuttycombe 8b5236a45a
Merge pull request #1541 from zcash/1070-zcb-wallet-summary-progress
Improve progress representation in `WalletSummary`
2024-09-20 12:13:01 -06:00
Jack Grigg 4b3bc8fc9d
Merge pull request #1539 from zcash/zcb-test-cleanups
zcash_client_backend: Post-merge cleanups to test framework extraction
2024-09-20 19:11:33 +01:00
Jack Grigg 7b57390595 Split out `WalletSummary::recover_progress` from `WalletSummary::scan_progress` 2024-09-20 16:39:48 +00:00
Jack Grigg f7228a5c01
Merge pull request #1528 from nuttycom/fix/zip321-test-dependencies
zip321: Add missing `test-dependencies` feature configuration.
2024-09-16 21:12:57 +01:00
Kris Nuttycombe 2ce78bef95 Remove dead code and/or suppress dead code warnings. 2024-09-16 19:16:12 +00:00
Jack Grigg 63c1de3ad0 zcash_client_backend: Add missing documentation to `data_api::testing`
Addresses review comments from zcash/librustzcash#1530.
2024-09-16 17:28:50 +00:00
Jack Grigg 45b106345b zcash_client_backend: Rename `TransactionSummary::new` for clarity 2024-09-16 15:01:05 +00:00
Jack Grigg bf73a02f45 zcash_client_backend: Move test-only methods to new `WalletTest` trait
This reduces the feature-flag-related `WalletRead` breakage for crate
users, and gives us a place to expose even more internal Data Access API
implementation details for general testing purposes.
2024-09-12 13:08:34 +00:00
Jack Grigg 7026aeb28a zcb::sync: Refresh UTXOs at the start of each scanning cycle 2024-09-11 03:15:50 +00:00
Jack Grigg ee7cb69599 zcash_client_backend: Fix `tor::grpc` module feature flag
We already depend on `rustls` and `webpki-roots` for `tor::http`, but
`tonic` has its own feature flag that needs to be enabled for equivalent
support in `tor::grpc`. We didn't need that feature flag enabled for the
`proto::service::compact_tx_streamer_client` module because those
constructors take a `D: TryInto<tonic::transport::Endpoint>`, which
abstracts over TLS and leaves it up to the caller. By constrast, in
`tor::grpc` we need to construct the `Endpoint` manually from a `Uri`
and then configure TLS ourselves.
2024-09-10 16:40:58 +00:00
Jack Grigg c97e9a192b
Merge pull request #1530 from nuttycom/generalized_test_framework
Generalize the `zcash_client_sqlite` test framework and extract it to `zcash_client_backend`
2024-09-10 16:45:47 +01:00
Jack Grigg cd71c30857 Address non-documentation review comments 2024-09-10 15:14:23 +00:00
Kris Nuttycombe d4e26d5e4b zcash_client_backend: Migrate `send_single_step_proposed_transfer` test from `zcash_client_sqlite` 2024-09-06 17:56:20 -06:00
Kris Nuttycombe 33b8f89a6a zcash_client_backend: Move `OrchardPoolTester` here from `zcash_client_sqlite` 2024-09-06 15:33:44 -06:00
Kris Nuttycombe 7e36561de8 zcash_client_backend: Move `SaplingPoolTester` here from `zcash_client_sqlite` 2024-09-06 15:07:34 -06:00
Kris Nuttycombe 4f5b3efe09 zcash_client_backend: Move the `ShieldedPoolTester` trait from `zcash_client_sqlite` 2024-09-06 14:51:29 -06:00
Kris Nuttycombe 49dffbf6ee zcash_client_sqlite: Remove unused `OutputRecoveryError` type. 2024-09-06 14:00:39 -06:00
Kris Nuttycombe f2654f5bf1 zcash_client_backend: Fix broken intra-doc links and other doc warnings. 2024-09-06 13:33:23 -06:00
Kris Nuttycombe e55df6c493 zcash_client_sqlite: Move `TestState` to `zcash_client_backend` 2024-09-06 13:33:19 -06:00
Kris Nuttycombe 58b464d102 zcash_client_sqlite: Generalize more `TestState` operations. 2024-09-06 13:30:10 -06:00
Kris Nuttycombe acd26d5d53 zcash_client_sqlite: Move `TransactionSummary` to `zcash_client_backend` 2024-09-06 13:30:10 -06:00
Kris Nuttycombe b43f3bf43d zcash_client_backend: Move data_api::testing module into its own file. 2024-09-06 13:29:26 -06:00
Kris Nuttycombe db6b9708eb zcash_client_sqlite: Generalize the test framework to enable it to be moved to `zcash_client_backend` 2024-09-06 13:29:26 -06:00
Kris Nuttycombe 0ae5ac1a99 zcash_client_backend: Make `data_api` traits delegatable via `ambassador` for testing. 2024-09-05 14:04:13 -06:00
Kris Nuttycombe 69953ccd88 zcash_client_backend: Make `AccountId` an associated type of the `Account` trait. 2024-09-04 15:51:08 -06:00
Kris Nuttycombe 026f5f6de6 zcash_client_backend: Fix broken --all-features build. 2024-09-04 15:38:41 -06:00
Daira-Emma Hopwood 0348af63dc Make `zcash_client_backend::fees::{fixed,standard,zip317}::SingleOutputChangeStrategy`
doc comments more accurate concerning the choice of output pool.

Signed-off-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-08-22 15:11:04 +01:00
Kris Nuttycombe d9fa772665 release zcash_client_backend version 0.13.0 2024-08-20 08:00:05 -06:00
Kris Nuttycombe c1532093b4
Merge pull request #1472 from zcash/zcb-tor-grpc
zcash_client_backend: Add `tor::Client::connect_to_lightwalletd`
2024-08-20 07:59:22 -06:00
Kris Nuttycombe 7a00ff0c2a zcash_client_backend: Add `Ord` and `Hash` impls for `TransactionDataRequest` 2024-08-16 11:06:14 -06:00
Daira-Emma Hopwood a021b9f277 Ensure that `zcash_client_sqlite` only enables "orchard" for `zcash_keys` when
its own "orchard" feature is enabled.

fixes #1488

Signed-off-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-08-11 18:34:52 +01:00
Daira-Emma Hopwood bd38645da5 When adding an account, check whether any component of its UFVK
(if available) collides with an existing imported or derived FVK.

This does not check for collisions on IVK for `Incoming` accounts.

Signed-off-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-08-11 00:24:05 +01:00
Daira-Emma Hopwood 130b23c92f Address review comments on `WalletWrite` documentation for colliding accounts.
Signed-off-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-08-10 20:39:13 +01:00
Jack Grigg 15bc35cd32 Make `WalletWrite` documentation for colliding accounts more precise 2024-08-10 20:39:13 +01:00
Kris Nuttycombe ac7cbf9a41 zcash_client_backend: Add a `purpose` modifier for imported accounts.
This moves the tracking of whether or not a spending key is expected to
be available for an imported account into the `AccountSource::Imported`
variant.
2024-08-09 18:38:39 -06:00
Jack Grigg 52abb1f057
Merge pull request #1473 from nuttycom/wallet/enrichment_queue
Add queues to track the need for transaction enhancement and/or verification of mined status.
2024-08-10 00:37:23 +01:00
Kris Nuttycombe 5a1645ac76 zcash_client_sqlite: Make transaction retrieval depend upon presence of raw tx data. 2024-08-09 16:55:35 -06:00
Kris Nuttycombe 8752ad7e19 zcash_client_backend: Add `target_height` to `SentTransaction` 2024-08-09 14:09:51 -06:00
Kris Nuttycombe 52f7a77cae Apply suggestions from code review
Co-authored-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-08-07 12:25:06 -06:00
Kris Nuttycombe a3109cfb78 zcash_client_sqlite: Add queue for transparent spend detection by address/outpoint. 2024-08-06 12:25:44 -06:00
Kris Nuttycombe 3da29d2506 zcash_client_backend: Add transaction data requests.
This adds a mechanism that can be used by the backend to request
additional transaction data or status information from the client,
for the purpose of being to explore transparent transaction history
that is otherwise currently unavailable.
2024-08-06 12:25:44 -06:00
Kris Nuttycombe 18207883ea zcash_client_backend: Add `block_height` argument to `decrypt_and_store_transaction`
In the case that `decrypt_and_store_transaction` is being used to add
data for fully-transparent transactions to the database, it may be the
case that there is no existing relationship between a transaction and
the block height at which it was mined (unlike for transactions being
enhanced after discovery via block scanning.) This change makes it
possible to set the mined height for transactions that do not have any
shielded components that involve the wallet.
2024-08-06 12:25:44 -06:00
zancas 694f884a9d
apply derivative change as well 2024-08-02 08:24:00 -06:00
zancas 44e36a365e
fix incorrect doc-comment 2024-08-02 08:23:15 -06:00
zancas a05741f103
copied during build of .proto bindings 2024-08-01 18:58:33 -06:00
zancas cc9ec1de72
update CompactBlock doc-comment, to cover non-Sapling shielded notes, and addresses 2024-08-01 18:57:01 -06:00