Commit Graph

108 Commits

Author SHA1 Message Date
Kris Nuttycombe 42ed6ba2a1 Rename `zcash_client_backend::welding_rig` to `zcash_client_backend::scanning` 2023-07-03 10:49:03 -06:00
Kris Nuttycombe e3aafdad19 Move chain continuity checks into `scan_block_with_runner`
In preparation for out-of-order range-based scanning, it is necessary
to ensure that the size of the Sapling note commitment tree is carried
along through the scan process and that stored blocks are always
persisted with the updated note commitment tree size.
2023-07-03 10:49:03 -06:00
Kris Nuttycombe 77b638012b Remove `zcash_client_backend::data_api::chain::validate_chain`
Local chain validation will be performed internal to
`scan_cached_blocks`, and as handling of chain reorgs will need to
change to support out-of-order scanning, the `validate_chain` method
will be superfluous. It is removed in advance of other changes in order
to avoid updating it to reflect the forthcoming changes.
2023-07-01 17:58:01 -06:00
Kris Nuttycombe e225a54d2e Use `NonZeroU32` for all `min_confirmations` values. 2023-06-30 12:37:41 -06:00
Kris Nuttycombe d65b129b43 Apply changelog, documentation & style suggestions from code review
Co-authored-by: str4d <thestr4d@gmail.com>
2023-06-30 09:30:24 -06:00
Kris Nuttycombe c42cffeb1d zcash_client_backend: Replace `WalletWrite::advance_by_block` with `WalletWrite::put_block`
Also, add assertions to prevent attempting the creation of zero-conf
shielded spends.
2023-06-29 15:35:18 -06:00
Kris Nuttycombe f9cacc5b21 Release zcash_primitives 0.12.0 2023-06-06 15:56:28 -06:00
Kris Nuttycombe 75e529eea6 Upgrade to `bs58 0.5` 2023-06-06 15:53:14 -06:00
Kris Nuttycombe 3dd0c63095 Update to `incrementalmerkletree 0.4`, `orchard 0.5` 2023-06-06 14:27:39 -06:00
Kris Nuttycombe b341903ae2
Merge pull request #842 from zcash/msrv-1.65
Bump MSRV for `zcash_primitives` and dependents to 1.65
2023-05-19 09:28:43 -06:00
Kris Nuttycombe ea84243e0f Add `get_memo` change to the zcash_client_backend CHANGELOG 2023-05-17 08:56:24 -06:00
Jack Grigg a092da8d5d Fix clippy lints for 1.65 2023-05-16 15:59:58 +00:00
Jack Grigg 8681b56d52 Bump MSRV for `zcash_primitives` and dependents to 1.65 2023-05-16 15:37:07 +00:00
str4d 579ab92b93
Merge branch 'main' into 823-secp256k1-0.26 2023-05-08 18:53:33 +01:00
Jack Grigg 8b53d4a0c4 zcash_client_backend 0.9.0 2023-04-28 01:46:28 +00:00
Kris Nuttycombe f3745c0cb5 Make the internal state of `SentTransactionOutput` private. 2023-04-27 13:07:34 -06:00
Kris Nuttycombe ac3439e65e Rename *rewind* to *truncate* in data_api methods.
This better reflects the semantics of wallet behavior. Also, this
adds a `zcash_client_backend::WalletRead::get_min_unspent_height`
method that replaces the deprecated & removed (and misleadingly
named) `get_rewind_height` method.
2023-04-27 09:12:07 -06:00
Kris Nuttycombe 7405d0cd69 Make internals of `WalletSaplingSpend` and `WalletSaplingOutput` private. 2023-04-26 14:47:10 -06:00
Kris Nuttycombe bfc5b9a5b3 Parameterize `DecryptedOutput` by note type. 2023-04-26 14:47:10 -06:00
Kris Nuttycombe 55c2de0066 Remove the redundant `WalletSaplingOutput::to` and `DecryptedOutput::to` fields. 2023-04-26 14:47:10 -06:00
Kris Nuttycombe c15a185454 Remove deprecated APIs & rename Sapling-specific data structures to include "Sapling"
This helps to clarify the Sapling-specific nature of a number of
operations in wallet code.
2023-04-26 14:47:10 -06:00
Jack Grigg ec1c1bcf21 Migrate to `secp256k1 0.26`, `hdwallet 0.4`
Closes zcash/librustzcash#823.
2023-04-19 19:33:34 +00:00
Jack Grigg 4dbb9c01e5 zcash_client_backend 0.8.0 2023-04-15 00:00:40 +00:00
Jack Grigg a419b56e80 zcash_primitives 0.11.0 2023-04-14 23:56:16 +00:00
Jack Grigg 7be5d1bf7d Update changelogs 2023-04-14 23:49:13 +00:00
Jack Grigg f82866dbb9 Migrate to `bech32 0.9` 2023-04-11 16:01:19 +00:00
Jack Grigg 6b7c62eb22 zcash_client_backend: Migrate to `base64 0.21` 2023-04-11 15:57:16 +00:00
Jack Grigg 3fb66a8aa1 zcash_client_backend: Migrate to `tonic 0.9` 2023-04-11 15:48:44 +00:00
Jack Grigg 2fcde5e047 Migrate to `orchard 0.4.0`
Closes zcash/librustzcash#766.
2023-04-11 13:25:17 +00:00
Kris Nuttycombe cb1be45f22 Update CHANGELOGs to reflect the addition of the zcash_primitives/multicore feature. 2023-03-20 15:11:05 -06:00
Kris Nuttycombe 77fbd8cb4f Update dependencies to reflect changes in ff 0.13 2023-03-20 14:35:45 -06:00
Jack Grigg d8cb20e091 zcash_client_backend 0.7.0 2023-02-01 02:11:56 +00:00
Jack Grigg 9852c31970 zcash_primitives 0.10.0 2023-02-01 02:10:42 +00:00
Jack Grigg 5b00699d66 Update changelogs 2023-02-01 01:58:45 +00:00
str4d b6f7ff06ed
Merge pull request #761 from nuttycom/wallet/expose_transaction_propose
Factor out a transaction proposal API from `spend`.
2023-02-01 00:51:31 +00:00
Kris Nuttycombe 4fafd14d17 Factor out a transaction proposal API from `spend`.
This change makes it possible for wallets using the
`zcash_client_backend::data_api::wallet` module to perform transaction
preparation, including input selection and fee calculation, as an
independent step prior to creating proofs and signatures. This can be
used to improve user experience by making it possible to report the
proposed effects of the transaction to the wallet user (including
privacy implications) prior to authorizing the transaction.
2023-02-01 00:15:33 +00:00
Francisco Gindre 444591705c Rephrase documentation for `validate_chain()` at data_api/chain.rs
Delete documentation no longer being accurate for `validate_chain()`
2023-01-31 13:14:07 -07:00
Francisco Gindre bf73ed3a00 Adds `limit` parameter to `validate_chain()`
This allows callers to validate smaller intervals of the given
`BlockSourceT` shortening processing times of the function call at the
expense of obtaining a partial result on a given section of interest of
the block source.

`params: &ParamsT` has been removed from the arguments since they were
only needed to fall back to `sapling_activation_height` when `None` as
passed as the `validate_from` argument. Passing `None` as validation
start point on a pre-populated `block_source` would result in an error
`ChainError::block_height_discontinuity(sapling_activation_height - 1, current_height)`

With this new API callers must specify a concrete `validate_from`
argument and assume that `validate_chain` will not take any default
fallbacks to chain `ParamsT`.

The addition of a `limit` to the chain validation function changes the
meaning of its successful output, being now a `BlockHeight, BlockHash)`
tuple indicating the block height and block hash up to which the chain
as been validated on its continuity of heights and hashes. Callers
providing a `limit` aregument are responsible of subsequent calls to
`validate_chain()` to complete validating the remaining blocks stored on
the `block_source`.

Closes zcash/librustzcash#705
2023-01-31 13:14:04 -07:00
Francisco Gindre e9eb5f8c0f Remove unstable function `WalletWrite::remove_unmined_tx`
Closes #622

Used PR https://github.com/zcash/librustzcash/pull/621 as reference to
know what had been added and remove it.
2023-01-31 15:21:46 -03:00
Jack Grigg 42c332a7a8 Use `sapling::note::ExtractedNoteCommitment` type in APIs 2023-01-24 14:37:11 +00:00
Jack Grigg 49b1cb3e69 Bump MSRV for `zcash_primitives` and dependents to 1.60
The MSRVs of the component crates are left as-is, partly because our
dependencies don't require us to bump them, and partly because those
crates have no pending changes and are relatively stable. We also plan
to split the component crates out into a separate repository, where it
will be easier to have a separate MSRV.

Closes zcash/librustzcash#759.
2023-01-19 23:48:24 +00:00
Kris Nuttycombe 76f0f0510e
Update zcash_client_backend/CHANGELOG.md
Co-authored-by: str4d <thestr4d@gmail.com>
2022-12-15 11:10:32 -07:00
Kris Nuttycombe 0f56f095c2 Add `shielding_threshold` argument to `shield_transparent_funds`.
Previously, the shielding threshold was fixed to 100000 zatoshis.

Fixes #726
2022-12-08 17:15:48 -07:00
Jack Grigg 1ea585fee9 zcash_client_backend 0.6.1 2022-12-06 08:18:34 +00:00
Jack Grigg 7e71cc5353 Add `tracing` spans to light client chain scanning
This enables downstream users to profile how much time is spent in each
of the main subcomponents of the current chain scanner.
2022-12-06 08:17:49 +00:00
Jack Grigg a583255d45 Document that `decrypt_and_store_transaction` always stores the tx
Closes zcash/librustzcash#497.
2022-11-11 22:11:59 +00:00
Jack Grigg 98dd130f3a zcash_client_backend 0.6.0 2022-11-11 20:47:21 +00:00
Jack Grigg c3b6e5a72a zcash_primitives 0.9.0 2022-11-11 20:37:55 +00:00
Jack Grigg 318d1b7522 Clean up changelogs 2022-11-11 20:29:26 +00:00
Kris Nuttycombe 73ab884073 Implement ZIP 317 fee estimation, calculation, & change selection 2022-11-10 15:30:13 -07:00