Commit Graph

234 Commits

Author SHA1 Message Date
Jack Grigg e4915f99c4 zcash_transparent: Refactor code so it compiles in its new crate 2024-12-15 13:25:43 -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
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
Jack Grigg 318254cc5c Connect `pczt` crate to `zcash_primitives` tx builder 2024-12-07 06:56:07 +00:00
Jack Grigg ebacc0a8b8 pczt: Migrate to the protocol-specific PCZT impls 2024-12-07 06:56:07 +00:00
Jack Grigg 4a9f29d2c3 zcash_primitives: Implement transparent PCZT support 2024-12-07 06:56:07 +00:00
Jack Grigg 7f4db09781 pczt: Create structure that can be converted into a v5 transaction 2024-12-07 06:54:41 +00:00
Kris Nuttycombe df0a42ef88 Release zcash_primitives version 0.20.0 2024-11-14 16:00:56 -07: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 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
Jack Grigg ad9d202071 Bump MSRV to 1.77 2024-10-18 22:10:40 +00:00
Jack Grigg c36c408181 zcash_primitives 0.19.0 2024-10-02 21:14:25 +00:00
Jack Grigg 6ee2ddfc97 zcash_address 0.6.0 2024-10-02 21:12:45 +00:00
Jack Grigg fa73e4c04b zcash_primitives 0.18.0 2024-10-02 20:12:02 +00:00
Jack Grigg e5185e2896 zcash_protocol 0.4.0 2024-10-02 20:11:31 +00:00
Jack Grigg 830c20521c zcash_primitives: Fix release notes 2024-10-02 20:06:08 +00:00
Jack Grigg cfaab71cf1 Migrate to `sapling-crypto 0.3`, `orchard 0.10` 2024-10-02 18:52:06 +00:00
Kris Nuttycombe 70e6121841 Release zcash_primitives version 0.17.0 2024-08-26 16:22:19 -06:00
Kris Nuttycombe 68788e4f2e zcash_primitives release version 0.16.0 2024-08-19 18:44:36 -06:00
Kris Nuttycombe 12752cbcd6 zcash_primitivies: Update zcash-specific dependencies.
* sapling-crypto 0.2
* orchard 0.9
* incrementalmerketree 0.6
* shardtree 0.4
2024-08-13 16:58:58 -06:00
Kris Nuttycombe 69828bc0d0 zcash_client_sqlite: Add `target_height` column to `transactions` table. 2024-08-06 12:25:44 -06:00
Kris Nuttycombe 1057ddb516 zcash_client_sqlite: Add a table to track transaction status and enrichment requests. 2024-08-06 12:25:44 -06:00
Daira-Emma Hopwood 01ff201ffb Minor changes responding to review comments.
Signed-off-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-07-04 05:24:32 +01:00
Daira-Emma Hopwood 9c082dca3e `zcash_primitives::transaction::fees::zip317::FeeRule::non_standard` has
been deprecated, because in general it can calculate fees that violate
ZIP 317, which might cause transactions built with it to fail. Maintaining
the generality of the current implementation imposes ongoing maintenance
costs, and so it is likely to be removed in the near future.

Use `transaction::fees::zip317::FeeRule::standard()` instead to comply
with ZIP 317.

Signed-off-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-06-28 19:03:08 +01:00
Daira-Emma Hopwood 2fae4bb244 ZIP 320 implementation.
Co-authored-by: Kris Nuttycombe <kris@nutty.land>
Co-authored-by: Jack Grigg <str4d@electriccoin.co>
Signed-off-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-06-25 08:40:08 +01:00
Daira-Emma Hopwood 9881861228 Add `zcash_encoding::{CompactSize, Vector}::serialized_size` and
`zcash_primitives::legacy::Script::serialized_size`. Use the latter in
`zcash_primitives::transaction::fees::transparent::OutputView::serialized_size`.

Signed-off-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-06-18 21:06:39 +01:00
Daira-Emma Hopwood 17af8e32e8 Refactor `FeeRule::fee_required` to take the sizes of transparent
inputs and outputs.

Co-authored-by: Kris Nuttycombe <kris@nutty.land>
Signed-off-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-06-18 21:05:49 +01:00
Jack Grigg f54ee4abde Migrate from `hdwallet` to `bip32`
As part of this, we migrate to `secp256k1 0.27`. This version does not
bump `secp256k1-sys`, so remains compatible with the `libsecp256k1`
revision used in `zcashd`.

The `zcash_primitives::legacy::keys::AccountPrivKey` encoding also
changes to preserve the transparent extended key metadata. Previously
the type was documented as such, but only encoded the private key and
chain code; the new encoding now matches the documentation. As a side
effect, the unstable encoding of `zcash_keys::keys::UnifiedSpendingKey`
also changes.

Closes zcash/librustzcash#1407.
Closes zcash/librustzcash#1408.
2024-06-15 00:04:37 +00:00
Jack Grigg bffe6a4a10 Bump MSRV to 1.70 2024-06-12 10:58:17 +00:00
str4d 976a4d2d5c
Merge pull request #1392 from zcash/cargo-update-2024-05
Dependency updates
2024-05-24 16:56:53 +01:00
Jack Grigg f136535196 Merge branch 'main' into fix-sapling-flags 2024-05-23 20:41:29 +00:00
Jack Grigg 8b2188a0f3 zcash_primitives 0.15.1 2024-05-23 20:35:18 +00:00
Jack Grigg 7ca695ea3c Disable `sapling-crypto` default features by default
The only default-enabled feature flag in `sapling-crypto` is the
`multicore` feature flag, which we re-export in each crate that includes
proof creation. We need to disable it as a default feature of our
dependency in order to enable it to be correctly disabled when a user of
e.g. `zcash_primitives` disables its default features.
2024-05-23 20:32:29 +00:00
Daira-Emma Hopwood aa77be8830 Update dependencies (including to avoid a vulnerability warning for atty), bump MSRV to 1.66,
and fix new clippy lints for MSRV 1.66.

* tonic 0.10 -> 0.11
* tonic-build 0.10 -> 0.11
* cargo update
* cargo update -p home@0.5.9 --precise 0.5.5
* cargo update -p prost-build@0.12.4 --precise 0.12.3
* cargo update -p prost-types@0.12.4 --precise 0.12.3
* cargo update -p prost@0.12.4 --precise 0.12.3
* cargo update -p prost-derive@0.12.5 --precise 0.12.3
* cargo update -p half@2.4.1 --precise 2.2.1

(The precise updates avoid a further MSRV bump to 1.70.)

Remaining duplicates are currently unavoidable.

Signed-off-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-05-20 13:35:27 +01:00
Daira-Emma Hopwood 6961819576 Document the removal of `zcash_primitives::zip339` in the CHANGELOG.
Signed-off-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-05-14 10:19:59 +01:00
Kris Nuttycombe 4cf8cab6fc zcash_primitives release version 0.15.0 2024-03-25 08:45:23 -06:00
Jack Grigg 6898dbf094 Replace `unstable-nu6` and `zfuture` feature flags with cfg flags
Neither of these should have been feature flags, as they gate breaking
changes to the Zcash consensus rules (and in some ways are incompatible
with each other), while feature flags should be additive.
2024-03-10 18:42:39 +00:00
Kris Nuttycombe 5675a76f0d zcash_protocol: Use `BalanceError` instead of `()` for monetary range violations. 2024-03-05 13:59:26 -07:00
Kris Nuttycombe b8aa5132c2 Apply suggestions from code review
Co-authored-by: str4d <thestr4d@gmail.com>
Co-authored-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-03-05 13:36:15 -07:00
Kris Nuttycombe 04fdac7931 zcash_primitives: Move the `memo` module to the `zcash_protocol` crate. 2024-03-05 13:36:15 -07:00
Kris Nuttycombe 5e4d9abbce Move `Amount` and `NonNegativeAmount` types to the `zcash_protocol` crate. 2024-03-05 09:45:24 -07:00
Kris Nuttycombe bacfe3cb9d Move `zcash_primitives::{consensus, constants}` to the `zcash_protocol` crate 2024-03-05 09:45:24 -07:00
Jack Grigg 599aa45a56 zcash_primitives 0.14.0 2024-03-01 01:12:43 +00:00
Jack Grigg 92e54ddce2 Clean up zcash_primitives changelog 2024-02-22 23:38:15 +00:00
Jack Grigg e85c631dd3 Add missing entries to changelogs 2024-02-22 23:38:05 +00:00