Commit Graph

937 Commits

Author SHA1 Message Date
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
Oscar Pepper 2929273ef1
corrected pool type for scan error 2024-07-31 12:07:30 +01:00
Jack Grigg 68b883dad4 zcash_client_backend: Add `tor::Client::isolated_client`
This enables a single Tor client to create independent connections to
multiple `lightwalletd` instances (or the same instance several times).
2024-07-29 23:37:22 +00:00
Jack Grigg 6449e5c54f zcash_client_backend: Add `tor::Client::connect_to_lightwalletd`
Closes zcash/librustzcash#1471.
2024-07-29 23:32:06 +00:00
Kris Nuttycombe 7f7b685b99
Merge pull request #1465 from zcash/post-1425-fixes
Post #1425 fixes
2024-07-29 14:42:13 -06:00
Jack Grigg 5b3c87db46 zcash_client_backend: Rewrite `WalletWrite` documentation 2024-07-29 19:53:06 +00:00
Jack Grigg 5d5768b65a zcash_client_backend: Revert redefinition of `WalletWrite::create_account` 2024-07-29 19:53:06 +00:00
Jack Grigg 4b3a8cf5d1 zcash_client_backend: Doc comment fixes left over from zcash/librustzcash#1425 2024-07-29 19:53:06 +00:00
Jack Grigg ed688138a7 zcash_client_backend: Remove extra spaces added by auto-wrapping 2024-07-29 19:53:06 +00:00
Daira-Emma Hopwood f54ecbd285 Use a single database transaction when storing transactions to be sent.
Signed-off-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-07-29 18:57:31 +01:00
Daira-Emma Hopwood 163425add6 In `create_proposed_transactions`, store the transactions only after
creating all of them. This avoids undesired retransmissions in case a
transaction is stored and the creation of a subsequent transaction fails.

Signed-off-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-07-27 05:32:48 +01:00
Daira-Emma Hopwood 40358f4b69 Refactor `create_proposed_transaction` to return the information needed
to construct a `SentTransaction`, and then call `wallet_db.store_sent_tx`
outside the `create_proposed_transaction` call.

This should have no semantic effect by itself, but is preparation to move
where we call `store_sent_tx`.

Signed-off-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-07-27 04:50:07 +01:00
Jack Grigg 4f95bd22d4
Merge pull request #1462 from nuttycom/1434-store_decrypted_tx
zcash_client_sqlite: Store received UTXOs in `store_decrypted_tx`
2024-07-26 23:11:47 +01:00
Kris Nuttycombe 3cec9ee4a7 zcash_client_sqlite: Store received UTXOs in `store_decrypted_tx`.
This fixes an issue wherein transparent outputs of transactions added to
the wallet via `decrypt_and_store_transaction` would not be properly
recorded as UTXOs belonging to the wallet.

Part of #1434
2024-07-26 15:47:16 -06:00
Kris Nuttycombe 5ad3205e58 zcash_client_sqlite: Demonstrate the failure of store_decrypted_tx to persist transparent outputs.
Related to #1434
2024-07-26 15:46:57 -06:00
Kris Nuttycombe 2021377626 Minor documentation formatting. 2024-07-25 20:05:01 -06:00
Kris Nuttycombe e555854f87 Merge remote-tracking branch 'upstream/main' into ufvk_import_support 2024-07-25 16:31:34 -06:00
Andrew Arnott cc39084de4
Improve docs around account creation 2024-07-23 20:32:26 -06:00
Andrew Arnott 664526f74a
Fixes for nearly all PR comments 2024-07-23 19:47:37 -06:00
Jack Grigg 8a7e663343
Merge pull request #1449 from zcash/doc-fix-without-features
zcash_client_backend: Fix `cargo doc` without all features
2024-07-19 03:32:52 +01:00
Jack Grigg ac5bac9969 zcash_client_backend: Add exchanges we know how to query for USD/ZEC
Currently only unauthenticated connections are supported (i.e. no API
keys can be configured). However, AFAICT none of these exchanges provide
non-IP-based rate limits for authenticated connections to public APIs,
so authentication wouldn't help to make connections over Tor more
reliable.
2024-07-18 17:53:58 +00:00
Jack Grigg 739e878c8b zcash_client_backend: Add USD/ZEC exchange rate querying over Tor
This fetches price data from multiple exchanges over Tor, and takes the
median of the successful responses.

Closes zcash/librustzcash#1416.
2024-07-18 17:53:58 +00:00
Andrew Arnott 2ee56f77f2
Merge remote-tracking branch 'upstream/main' into ufvk_import_support 2024-07-17 23:31:08 -06:00
Jack Grigg 907d37b928 zcash_client_backend: Fix `cargo doc` without all features 2024-07-18 01:37:45 +00:00
Jack Grigg b3de2ab81b zcash_client_backend: Add internal HTTP GET support to `tor::Client` 2024-07-18 01:25:17 +00:00
Jack Grigg 1e5b62bfce zcash_client_backend: Add a Tor client using the Arti library 2024-07-18 01:25:17 +00:00
Jack Grigg eaa43b4e25
Merge pull request #1257 from daira/implement-transparent-source-only
Add support for transparent-source-only (TEX) addresses
2024-07-17 19:27:36 +01:00
Kris Nuttycombe 24b6d50d77 Apply suggestions from code review
Co-authored-by: Jack Grigg <thestr4d@gmail.com>
2024-07-17 07:51:58 -06:00
Kris Nuttycombe dbb5eeb704 Fix a potential crash related to varying behavior between change strategies.
It was possible for `GreedyInputSelector` to crash if the change
strategy being used for input selection were to place a ZIP 320
ephemeral output anywhere but as the last element in the returned change
values. This has been replaced by an error; the error will also be
returned if the change strategy returns more than one ephemeral output
in the change values.
2024-07-16 15:43:21 -06:00
Kris Nuttycombe aa4312326d Use `EphemeralBalance` instead of `EphemeralParameters`
The `EphemeralParameters` type makes too many states representable, in
particular, it represents that it is possible for a proposal step to
have both ephemeral inputs and ephemeral outputs. This change reduces
the representable state space to make it so that only one or the other
is true, and also makes clear that the change memo must be attached to
the change output of the intermediate step, and not to the ultimate
output to the final recipient (where we expect there to be no shielded
change, and therefore it is not possible to attach a memo.)
2024-07-16 13:53:31 -06:00
Jack Grigg 270eec2574 CI: Don't test `zcash_client_backend/lightwalletd-tonic` on WASM
Broken until hyperium/tonic#1783 is addressed.
2024-07-11 18:09:49 -07:00
Jack Grigg e5517b61cc zcash_client_backend: Migrate to `tonic 0.12` with `http 1` 2024-07-11 22:23:55 +00:00