Commit Graph

1045 Commits

Author SHA1 Message Date
Kris Nuttycombe fad7f38b9a Migrate to `nonempty 0.11` 2024-12-17 09:05:11 -07:00
Kris Nuttycombe ebd2d3abec Release zcash_client_backend version 0.16.0 2024-12-16 21:55:14 -07:00
Kris Nuttycombe 8c42a69bb5 Release zcash_proofs version 0.21.0 2024-12-16 21:55:14 -07:00
Kris Nuttycombe 0f78b4f9c4 Release zcash_primitives version 0.21.0 2024-12-16 21:55:14 -07:00
Kris Nuttycombe f23e478b99 Release `zcash_keys` version `0.6.0` 2024-12-16 21:55:14 -07:00
Kris Nuttycombe d83076dcfc Migrate to sapling-crypto version 0.4 2024-12-16 21:23:24 -07:00
Jack Grigg b61652e6fe zcash_address: Remove serde implementation for `ZcashAddress`
We only needed it for `zcash_client_backend` to encode recipient
addresses inside proprietary fields of PCZTs, but now that we are
explicitly encoding them as strings, it is not necessary.

Co-authored-by: Kris Nuttycombe <kris@nutty.land>
2024-12-13 20:22:50 +00:00
Jack Grigg 3d1e32211d pczt: Add output field for storing the user-facing address
This is necessary in order for Signers to display the address encoding
that a user is expecting to confirm.

Co-authored-by: Kris Nuttycombe <kris@nutty.land>
2024-12-13 18:29:45 +00:00
Kris Nuttycombe 702acff155 Do not add key derivation metadata for dummy spends. 2024-12-11 12:01:51 -07:00
Kris Nuttycombe fd76997417 Apply suggestions from code review
Co-authored-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-12-09 10:11:19 -07:00
Jack Grigg 5073f87af0 zcash_client_backend: Add shielded-only PCZT test 2024-12-09 10:11:19 -07:00
Kris Nuttycombe 00af032b12 zcash_client_backend: Add support for PCZT construction from a Proposal Step.
Proving and signing don't require specific wallet methods; the
`Prover` and `Signer` roles provide the necessary functionality.

Co-authored by: Jack Grigg <jack@electriccoin.co>
2024-12-09 10:11:19 -07:00
Kris Nuttycombe 61e21cdbd7 zcash_client_backend: Make `build_proposed_transaction` take a UFVK instead of a USK 2024-12-09 10:11:19 -07:00
Jack Grigg 713c96bff4 zcash_primitives: Provide Sapling extsks at build instead of spend add 2024-12-09 10:11:19 -07:00
Jack Grigg b209e4bc4d zcash_primitives: Move transparent keys into a separate signing set 2024-12-09 10:11:19 -07:00
Jack Grigg 9a02e45bba zcash_primitives: Provide Orchard saks at build instead of spend add 2024-12-09 10:11:19 -07:00
Kris Nuttycombe dce62eba21 zcash_client_backend: Split `create_proposed_transaction` into two parts.
This refactors `create_proposed_transaction` to allow the internal
builder state and per-output metadata to be exposed after all inputs and
outputs for a proposal step have been added, in order to make it
possible to generate a PCZT from this data.
2024-12-09 10:11:19 -07:00
Kris Nuttycombe bf69a2a3f1 zcash_keys: Make address generation use all items of the source key by default. 2024-12-09 10:07:43 -07:00
Daira-Emma Hopwood 37253132fd
Merge pull request #1570 from pacu/feature/transparent-balance
[#1411] Refactor AccountBalance to use Balance for transparent funds
2024-12-07 17:42:40 +00:00
Daira-Emma Hopwood bd45812d42 Fix intra-doc links.
Signed-off-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-12-07 16:10:42 +00:00
Daira-Emma Hopwood 3f802121e7 CHANGELOG fixes and a minor comment change.
Signed-off-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-12-07 15:54:42 +00:00
Kris Nuttycombe cc2dfbf7bf zcash_client_backend: Add AccountSource::key_derivation 2024-12-05 19:35:11 -07:00
Kris Nuttycombe 2da2b3e9fe zcash_client_backend: Add optional derivation metadata when importing UFVKs with spending purpose. 2024-12-05 19:35:11 -07:00
Francisco Gindre bc637678ec
[#1411] Refactor AccountBalance to use Balance for transparent funds
closes #1411

- Adds min_confirmations to transparent account balances
- Adds a new `transparent_balance_spendability` test to verify
transparent funds spendability.
- cargo clippy + cargo fmt

Refactor: Extract Method on lambda `check_balance`

Fix transparent_balance_spendability tests and `check_balance` to
properly verify `min_confirmations` assumptions

Fix comment typo

Improve test documentation

PR Suggestions

cargo fmt and cargo clippy
2024-12-04 20:06:59 -03:00
Kris Nuttycombe 9bef4ee9ac zcash_client_backend: Add name and key source metadata to accounts. 2024-12-02 18:02:49 -07:00
Kris Nuttycombe 62fb4e4cf8 zcash_client_sqlite: Change `WalletDb::AccountId` associated type to `AccountUuid`
This requires a few annoying changes to migrations in order to avoid
hitting cases where account UUIDs are expected before they exist in the
database schema.
2024-12-02 15:46:36 -07:00
Kris Nuttycombe 941392813f Release zcash_client_backend version 0.15.0 2024-11-14 16:33:36 -07:00
Kris Nuttycombe 00cafa3b9e Apply suggestions from code review & Clippy fixes.
Co-authored by: Jack Grig <jack@electriccoin.co>
Co-authored-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-11-13 14:19:15 -07:00
Kris Nuttycombe 3352671e1f zcash_client_backend: Generalize & extend account metadata query API
This generalizes the previous account metadata query API to be able to
represent more complex queries, and also to return note totals in
addition to note counts.
2024-11-13 13:21:56 -07:00
Daira-Emma Hopwood d5a17f0bd6 Minor documentation fix and clarification for the data API:
* Fix the documentation for `find_account_for_ephemeral_address` which
  included a use of `get_known_ephemeral_addresses` with incorrect types.
* Clarify that passing `None` for the `index_range` parameter of
  `get_known_ephemeral_addresses` is equivalent to passing `0..(1u32 << 31)`.

Signed-off-by: Daira-Emma Hopwood <daira@katava.local>
2024-11-04 11:54:20 +00:00
Jack Grigg f347dc52b3 zcash_client_backend: Switch from `async-trait` to RPIT
RPIT (return-position `impl Trait`) was stabilized in Rust 1.75, and the
`dynosaur` crate providing dynamic dispatch support was published two
weeks ago. Now that our MSRV is 1.77, we can use both of these.
2024-10-26 05:12:08 +00:00
Kris Nuttycombe ae58d3eb49 Apply suggestions from code review & zcash/librustzcash#1579
Co-authored-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-10-25 09:34:27 -06:00
Kris Nuttycombe a12b75e532 zcash_primitives: Move `StandardFeeRule` to `zcash_client_backend` 2024-10-25 07:57:15 -06:00
Kris Nuttycombe d47bf59eca zcash_client_backend: Make standard change strategies aliases to zip317 strategies. 2024-10-25 07:57:15 -06:00
Kris Nuttycombe 161f7da4b0 Remove superfluous #[allow(deprecated)] directives. 2024-10-25 07:48:38 -06:00
Kris Nuttycombe 3a08a1584b Move non-standard-fee functionality behind a feature flag. 2024-10-25 07:46:44 -06:00
Kris Nuttycombe b8ca26bf6e zcash_primitives: Remove `StandardFeeRule::{PreZip313, Zip313}`
Co-authored-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-10-24 21:33:36 -06:00
Daira-Emma Hopwood 57fc8095fd Remove `fixed::FeeRule::standard` (which was misleadingly named because
fixed fees are not standard), and deprecate `fixed::FeeRule::non_standard`.

Signed-off-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-10-24 21:33:36 -06:00
Kris Nuttycombe 2dc7c5df66 zcash_client_backend: Remove deprecated `spend` and `create_spend_to_address` methods. 2024-10-24 21:33:34 -06:00
Kris Nuttycombe bcd8617721 zcash_client_sqlite: Add a test demonstrating the bug described in #1571
The update to a shielding transaction causes the information that the
output is considered change to be lost. This happens because the
scanning process does not have access to any information about the
inputs to the transaction, and so it does not recognize the output as
change.
2024-10-24 16:36:29 -06:00
Kris Nuttycombe 47b1065db9 zcash_client_backend: Require wallet metadata for balance calculation 2024-10-23 11:23:58 -06:00
Kris Nuttycombe fde0fc9730 Apply suggestions from code review
Co-authored-by: Jack Grigg <thestr4d@gmail.com>
Co-authored-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-10-23 11:23:58 -06:00
Kris Nuttycombe 5bf0f16dd7 zcash_client_backend: Add `fees::zip317::MultiOutputChangeStrategy`. 2024-10-23 11:23:56 -06:00
Kris Nuttycombe 9a58a1dafe zcash_client_backend: Clean up arguments to `single_change_output_balance` 2024-10-23 11:22:53 -06:00
Kris Nuttycombe 6d5a6ac7ac zcash_client_backend: Make it possible for change strategies to use wallet metadata.
In the process this modifies input selection to take the change strategy
as an explicit argument, rather than being wrapped as part of the input
selector.
2024-10-23 11:22:53 -06:00
Kris Nuttycombe e21fce4411 zcash_client_backend: Add `WalletMeta` type & retrieval method. 2024-10-23 11:22:53 -06:00
Kris Nuttycombe 6d1f78a066 zcash_client_backend: Use an explicit struct for change output counts instead of a tuple. 2024-10-23 11:22:53 -06:00
Jack Grigg 9bf153d002 Use `impl Iterator` in trait return position now we have MSRV >= 1.75 2024-10-18 23:10:59 +00:00
Jack Grigg 9cdaed7062 `which 6` 2024-10-18 22:54:10 +00:00
Jack Grigg 2ecf7ab2d8 Migrate to `rusqlite 0.32` 2024-10-18 22:41:52 +00:00