Kris Nuttycombe
214a3750c5
zcash_client_backend: Make `Balance` and `AccountBalance` fields private.
...
Public methods for mutation of these fields have been provided that
perform checking for overflow of the valid monetary range as part
of their operation.
2023-12-04 13:53:27 -07:00
Jack Grigg
906e203663
zcash_primitives: Move Sapling `HashSer` impl into `merkle_tree` module
...
The `HashSer` trait will remain in `zcash_primitives` while the Sapling
type it is implemented for moves to `sapling-crypto`.
Part of zcash/librustzcash#1044 .
2023-12-04 20:26:00 +00:00
Jack Grigg
8acc03783e
zcash_primitives: Refactor `sapling::tree::Node` around `jubjub::Base`
2023-12-04 20:24:24 +00:00
Daira Emma Hopwood
acf146248e
Merge pull request #1056 from zcash/581-use-redjubjub-crate
...
zcash_primitives: Replace `sapling::redjubjub` with `redjubjub` crate
2023-12-04 18:27:32 +00:00
Tomek Piotrowski
22ad737267
zcash_primitives: Add Network Upgrade 6 to `consensus::NetworkUpgrade` ( #1048 )
...
Co-authored-by: Jack Grigg <jack@electriccoin.co>
2023-12-04 14:41:41 +00:00
Jack Grigg
ded09f99b5
zcash_primitives: Add RedJubjub test vectors
2023-12-01 14:22:49 +00:00
Jack Grigg
5ccba3e1af
zcash_primitives: Introduce newtypes for `ask` and `ak`
...
The Sapling key components specification places more constraints on the
values of `ask` and `ak` than general RedJubjub signing and verification
keys.
2023-12-01 11:19:31 +00:00
Kris Nuttycombe
9aec53eec9
zcash_client_backend: Add Orchard components to `ScannedBlock`
2023-11-30 13:08:17 -07:00
Kris Nuttycombe
c0babd54cd
zcash_client_backend: Expose Orchard value in balance API
2023-11-30 12:17:19 -07:00
Jack Grigg
de1ed21051
zcash_primitives: Replace `sapling::redjubjub` with `redjubjub` crate
...
As a side-effect, we remove the ability to verify individual
transactions with pre-ZIP 216 rules (which we already removed from
`zcashd` consensus nodes in zcash/zcash#6000 and zcash/zcash#6399 , as
all pre-ZIP 216 transactions on mainnet are also valid under ZIP 216).
2023-11-30 17:52:31 +00:00
Daira Emma Hopwood
764127f952
Merge pull request #1053 from nuttycom/fix_subproject_builds
...
Fix dependencies to repair `cargo -p` subproject builds.
2023-11-29 21:32:28 +00:00
Kris Nuttycombe
1e5d253c9c
Fix dependencies to repair `cargo -p` subproject builds.
2023-11-29 12:37:18 -07:00
Kris Nuttycombe
79e499ea41
Merge pull request #1050 from nuttycom/sapling/use_note_diversifier
...
Avoid passing duplicate diversifier information to Sapling builder.
2023-11-28 12:02:06 -07:00
Kris Nuttycombe
28174e1ba3
zcash_client_backend: refactor select_key_for_note to avoid needing the extsk
...
This is in preparation for generalizing how we choose the spending key
for a note to serve `Orchard`.
2023-11-28 10:54:06 -07:00
Kris Nuttycombe
7f3d057a1b
zcash_primitives: Avoid passing duplicate diversifier information to Sapling builder.
...
The note provided to `add_sapling_spend` contains the recipient address,
and we can extract the diversifier from this address, so we should not
pass it separately.
2023-11-28 10:54:06 -07:00
Kris Nuttycombe
ed761d5da1
Merge pull request #1049 from zcash/1044-sapling-cleanups
...
More Sapling cleanups
2023-11-27 21:35:19 -07:00
Jack Grigg
0d06e561bb
Update Sapling imports to migrate off re-exports at old paths
2023-11-28 03:40:41 +00:00
Jack Grigg
54fa31e00c
zcash_primitives: Separate `GROTH_PROOF_SIZE` constant for `sapling` module
2023-11-28 03:25:14 +00:00
Jack Grigg
106f5a353a
Remove `MemoBytes` usage from `zcash_primitives::sapling`
2023-11-28 03:25:14 +00:00
str4d
2f2401d144
Merge pull request #1043 from zcash/zip32-refactor
...
Refactor ZIP 32 code
2023-11-28 03:18:36 +00:00
Jack Grigg
7064efe697
zcash_primitives: Improve ZIP 32 comments
2023-11-28 01:38:53 +00:00
Jack Grigg
f7726141c3
zcash_primitives: Reject non-canonical ZIP 32 Sapling master key encodings
2023-11-28 01:38:53 +00:00
Jack Grigg
7badba29ea
zcash_primitives: Move `zip32::sapling` to `sapling::zip32`
2023-11-28 01:38:53 +00:00
Jack Grigg
45ef8b1604
zcash_primitives: Add constructor and getter to `zip32::ChainCode`
2023-11-28 01:38:53 +00:00
Jack Grigg
61bb18d97f
zcash_primitives: Refactor `zip32::ChildIndex` to be an opaque struct
2023-11-28 01:38:53 +00:00
Jack Grigg
a9310e3969
zcash_primitives: Remove non-hardened Sapling ZIP 32 derivation
2023-11-28 01:34:31 +00:00
str4d
1607d013d1
Merge pull request #1047 from zcash/1044-sapling-bundle-generic-valuebalance
...
zcash_primitives: Make `value_balance` generic in `sapling::Bundle`
2023-11-28 01:31:34 +00:00
str4d
7e45a5f134
Merge pull request #1045 from zcash/1044-sapling-params-removal
...
zcash_primitives: Remove `consensus::Parameters` from `sapling` module
2023-11-28 01:22:56 +00:00
Jack Grigg
cdd20e8583
zcash_primitives: Make `value_balance` generic in `sapling::Bundle`
...
This removes the dependency on `Amount`, and matches how we handle this
in the `orchard` crate.
Part of zcash/librustzcash#1044 .
2023-11-23 07:08:13 +00:00
Jack Grigg
eb0b5a1b24
zcash_primitives: Remove `consensus::Parameters` from `sapling` module
...
Part of zcash/librustzcash#1044 .
2023-11-22 04:29:36 +00:00
Kris Nuttycombe
2c7c7b85e3
Merge pull request #1042 from zcash/fix-generated-proto
...
Fix generated protobuf file to match source
2023-11-20 19:18:10 -07:00
Jack Grigg
c6263d2470
Fix generated protobuf file to match source
...
A comment change to the source file was made in zcash/librustzcash#891
before merging, but the generated file was not updated to match.
2023-11-21 02:15:12 +00:00
str4d
95e092b9dc
Merge pull request #1041 from nuttycom/extract_zcash_note_encryption
...
Move `zcash_note_encryption` component to https://github.com/zcash/zcash_note_encryption
2023-11-18 04:31:25 +00:00
Kris Nuttycombe
374882b7bc
Move `zcash_note_encryption` component to https://github.com/zcash/zcash_note_encryption
...
The `zcash_note_encryption` component crate has been factored out to
its own repository, to avoid circular crate dependencies involving
https://github.com/zcash/librustzcash and the
https://github.com/zcash/orchard and
https://github.com/zcash/sapling-crypto repositories.
2023-11-17 20:39:14 -07:00
Kris Nuttycombe
236cd569ee
Merge pull request #891 from nuttycom/proposal-ffi
...
Add protobuf representation for transaction proposals
2023-11-15 15:47:46 -07:00
Kris Nuttycombe
c5f48f50e1
Apply suggestions from code review
...
Co-authored-by: Daira Emma Hopwood <daira@jacaranda.org>
Co-authored-by: str4d <thestr4d@gmail.com>
2023-11-15 10:53:23 -07:00
Kris Nuttycombe
7aab6fd7a7
zcash_client_backend: add `Display` and `Error` impls for proposal parsing errors.
2023-11-14 12:59:40 -07:00
Kris Nuttycombe
aeb405ef5d
Apply suggestions from code review
...
Co-authored-by: str4d <thestr4d@gmail.com>
Co-authored-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-11-14 12:58:22 -07:00
str4d
199dbacc66
Merge pull request #1040 from daira/use-ctsize-constants
...
Use `{ENC,OUT}_CIPHERTEXT_SIZE` constants in `zcash_primitives::sapling::bundle` and `zcash_primitives::transaction::components::sapling`
2023-11-12 20:26:35 +00:00
Daira Emma Hopwood
e32cf8b5ac
Use `{ENC,OUT}_CIPHERTEXT_SIZE` constants in `zcash_primitives::transaction::components::sapling`.
...
Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-11-10 20:38:50 +00:00
Daira Emma Hopwood
e5bdc72b52
Use `{ENC,OUT}_CIPHERTEXT_SIZE` constants in `zcash_primitives::sapling::bundle`.
...
Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-11-10 20:30:31 +00:00
Kris Nuttycombe
33169719ce
zcash_client_backend: Add serialization & parsing for protobuf Proposal representation.
2023-11-09 20:07:16 -07:00
sasha
572563338b
Add a protobuf representation for transaction proposals.
...
Co-authored-by: Kris Nuttycombe <kris@nutty.land>
2023-11-09 20:02:36 -07:00
Kris Nuttycombe
2d6a02eb2d
Merge pull request #1039 from zcash/736-refactor-sapling-components
...
Refactor Sapling components and builder into `zcash_primitives::sapling`
2023-11-09 20:00:32 -07:00
Jack Grigg
c6dd9ad858
zcash_primitives: Expose Sapling bundle component parsers needed by zcashd
...
These can be removed after future zcashd refactors.
2023-11-10 02:09:22 +00:00
Jack Grigg
68ae453e5d
zcash_primitives: Move Sapling bundle parsing into `transaction::components::sapling`
2023-11-10 02:09:22 +00:00
Jack Grigg
e1a5539094
zcash_primitives: Rework Sapling parsers to be plain functions
...
Once `zcash_primitives::sapling` is extracted to `sapling-crypto`, these
would have become orphan impls.
2023-11-10 01:06:18 +00:00
Kris Nuttycombe
6077a712e4
Merge pull request #1024 from nuttycom/wallet/orchard_block_metadata
...
zcash_client_backend: Add Orchard note commitment tree size to block metadata.
2023-11-09 15:44:56 -07:00
Kris Nuttycombe
7720a4fc58
zcash_client_backend::scanning: Use `checked_sub` instead of manual check.
...
Co-authored-by: str4d <thestr4d@gmail.com>
2023-11-09 15:09:54 -07:00
Kris Nuttycombe
09e37bcc8d
Fix comment in zcash_client_backend::scanning
...
Co-authored-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-11-09 14:00:50 -07:00