Commit Graph

37 Commits

Author SHA1 Message Date
Kris Nuttycombe d982d7826a zip321: Replace dependencies on `zcash_keys` types with `zcash_address` 2024-04-05 16:10:22 -06:00
Kris Nuttycombe fdf86ad740 Move `zcash_client_backend::zip321` to the `zip321` crate. 2024-04-03 12:14:20 -06:00
Jack Grigg 24277a6ba4 zcash_client_backend: Implement async wallet synchronization function
This implements the necessary state machine for taking a wallet in some
arbitrary synchronization status, and fully scanning (the remainder of)
the chain.

Closes zcash/librustzcash#1169.
2024-04-02 00:26:08 +00:00
Jack Grigg b189fe7a36 Remove `orchard` feature flag from behind `zcash_unstable` cfg flag 2024-03-19 18:24:39 +00:00
Kris Nuttycombe 64454100c5 zcash_client_backend: Move the `ShieldedProtocol` and `PoolType` types to `zcash_protocol` 2024-03-05 09:46:03 -07:00
Kris Nuttycombe 4e3d99f1d0 zcash_client_backend: Allow proposer to specify fallback change pool.
In the event that the pool to which change should be sent cannot
automatically be determined based upon the inputs and outputs of a
transaction, it is up to the caller to specify where change should
be sent.
2024-02-15 21:44:59 -07:00
Kris Nuttycombe 74b487e4c9 Apply suggestions from code review
Co-authored-by: str4d <thestr4d@gmail.com>
2024-02-15 20:51:24 -07:00
Kris Nuttycombe 6aabe60d21 zcash_client_backend: Add validation to the `Proposal::multi_step` constructor. 2024-02-15 13:09:52 -07:00
Kris Nuttycombe 1db3109cb4 zcash_client_backend: Move the `Proposal` types to a `proposal` module.
This separation is in preparation for modifying the `Proposal` type
to wrap a vector of proposal steps.
2024-02-14 19:04:47 -07:00
str4d dca890adcd
Merge pull request #1102 from zcash/doc-improvements
Various documentation improvements
2024-01-25 21:02:01 +00:00
Kris Nuttycombe 184e3c741f Add `zcash_unstable` compiler flag to fully gate `orchard` functionality 2024-01-24 17:48:10 -07:00
Jack Grigg 72c427487b zcash_client_backend: Add diagram of wallet sync flow 2024-01-23 16:18:28 +00:00
Kris Nuttycombe 0ca955336d Split `zcash_keys` crate out from `zcash_client_backend`
This change makes it easier for third parties to make use of the Unified
key infrastructure without incurring a dependency upon the rest of the
`zcash_client_backend` interfaces.
2024-01-16 13:49:42 -07:00
Kris Nuttycombe 5126fd6b5f
Merge pull request #1086 from zcash/docs-rs-feature-flags
Show feature flags in documentation
2024-01-04 14:34:40 -07:00
Jack Grigg 3989ee9926 Show feature flags in documentation
This can be rendered locally with:
    RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --no-deps --workspace --all-features
2024-01-04 19:07:22 +00:00
Kris Nuttycombe f18d082aa3 zcash_client_backend: Introduce an "orchard-client" feature flag.
We plan to also introduce a similar flag to gate access to Sapling
functionality. Since introduction of Orchard functionality is still
nascent, it's the correct time to introduce this isolation, before
there's more functionality that needs to be isolated in this fashion.
2024-01-03 17:05:20 -07:00
Jack Grigg 2ea83243a7 Document the feature flags 2024-01-03 20:15:21 +00:00
Kris Nuttycombe 6b10a6dc86 zcash_client_backend: Move essential wallet types into the `wallet` module. 2023-12-05 10:55:04 -07:00
Kris Nuttycombe 771e4013c3 Move shardtree serialization to the `zcash_client_backend` crate 2023-09-11 18:18:08 -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 847ba49761 Add dust note detection to change selection.
The change selection algorithm has the most useful information for
determining whether or not a note is dust, so this adds a new error case
to `ChangeError` that allows the change selection to report the presence
of input notes without economic value back to its caller.
2022-11-10 12:18:30 -07:00
Kris Nuttycombe 9496fc6118 Add fee calculator to the transaction builder.
This adds a fee calculation strategy abstraction that can be used to
dynamically compute fees so that the total fees required may be taken
taken into account during note selection, and also removes automatic
change creation from the transaction builder.

Change outputs must now be directly created by the caller by the caller.
This is a necessary prerequisite for permitting fees to adjust based
upon the contents of the transaction being constructed.

The initial implementation of the fee strategy simply uses the current
default fee.
2022-11-02 08:28:16 -06:00
Kris Nuttycombe 06e43a572a Track inputs sent to wallet-internal recipients.
Ensure that we're attempting trial-decryption with the internal IVK
and correctly track internal vs. external recipients in the wallet
database.
2022-10-11 08:56:22 -06:00
Kris Nuttycombe 6156215d4c Add parallelized batched trial decryption to wallet scanning.
Co-authored-by: str4d <jack@electriccoin.co>
2022-08-18 16:48:22 -06:00
Kris Nuttycombe 199c49760b Use the new name rustdoc::broken_intra_doc_links 2022-07-29 15:56:44 -06:00
Jack Grigg 63db2729e9 Temporarily allow clippy::result_unit_err lint
Fixing these lints is deferred to zcash/librustzcash#367.
2021-03-27 19:01:03 +13:00
Jack Grigg 9d9c0579f8 Use new name for broken_intra_doc_links lint
We also add the lint to crates in the workspace that didn't have it.

Closes zcash/librustzcash#279.
2021-03-27 08:27:17 +13:00
Kris Nuttycombe a437df191e Initial skeleton of low-level database access API. 2020-12-02 09:46:17 -07:00
Kris Nuttycombe b1c3f9d3f0
ZIP 321 Reference Implementation (#294)
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
Co-authored-by: Jack Grigg <jack@electriccoin.co>
2020-10-15 14:03:40 +01:00
Kris Nuttycombe 1ad9294933 Remove static determination of network state.
In the interest of making the library usable for both
testnet and mainnet without recompilation, static resolution
of network parameters has been replaced with a parameter passed
to the relevant functions. This also moves addres prefix constants
into the network parameters.
2020-09-17 10:34:42 -06:00
Jack Grigg d5ed684701
zcash_client_backend::decrypt_transaction 2019-11-27 15:45:13 +00:00
Jack Grigg 591b1fc28f
Parse compact blocks to find wallet transactions 2019-10-09 14:11:12 +13:00
Jack Grigg af7e263bcc
Build protobufs for compact formats 2019-10-09 14:09:41 +13:00
Jack Grigg d9a0b9c83f
CI: Check intra-doc links
Credit: https://twitter.com/tomaka17/status/1176017851410526208
2019-09-24 10:35:12 +01:00
Jack Grigg 17f60a0354
Implement PaymentAddress encoding and decoding 2019-06-27 16:21:00 +01:00
Jack Grigg 81b2b1b554
Wallet spending key derivation path 2019-06-27 16:19:33 +01:00
Jack Grigg fae919ec1c
Rename zcash_wallet to zcash_client_backend, set to 2018 edition 2019-06-27 16:02:12 +01:00