Kris Nuttycombe
2f2b9e5891
Merge pull request #92 from zcash/fix-lints
...
Fix lints
2021-05-28 14:26:18 -06:00
Jack Grigg
7f47949b09
Take `self` directly in to_bytes methods where Self: Copy
2021-05-28 12:11:22 +01:00
Jack Grigg
cdfd2ab0f9
Remove clones from types that now impl Copy
2021-05-28 12:10:54 +01:00
str4d
f82d00e40d
Merge pull request #77 from zcash/remove-rand-0.7
...
Remove rand 0.7 usage
2021-05-21 21:25:34 +01:00
str4d
97710e04d6
Merge pull request #80 from zcash/spec-updates
...
Update implementation to match protocol spec version 2021.2.0
2021-05-21 21:24:39 +01:00
str4d
2bbbc3ec94
Update comments
...
Co-authored-by: ying tong <yingtong@z.cash>
2021-05-21 21:24:08 +01:00
str4d
9585c67ed2
book: Refine types on Commitments page
...
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2021-05-21 21:23:08 +01:00
str4d
7109153e88
Merge pull request #43 from zcash/constants
...
Add Orchard constants
2021-05-18 20:44:59 +01:00
str4d
38f1c9e14f
Merge pull request #75 from zcash/ecc-gadget
...
Modify ECC gadget to work with chip refactor
2021-05-18 20:34:28 +01:00
therealyingtong
ff504c1a3f
Address review comments.
...
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2021-05-18 17:14:13 +08:00
therealyingtong
2962115aef
Reintroduce point doubling API
2021-05-18 16:54:52 +08:00
therealyingtong
af30f4b141
Add Eq to the EccChip trait
2021-05-18 16:12:06 +08:00
therealyingtong
caa3791562
Documentation fixes.
...
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2021-05-18 16:07:40 +08:00
therealyingtong
edea9bde73
Document incomplete point addition error handling
2021-05-18 13:28:17 +08:00
therealyingtong
c8076c2864
Add FixedPointsShort associated type
2021-05-18 13:28:17 +08:00
therealyingtong
74c797165f
Add range check for short scalar
2021-05-18 13:28:16 +08:00
therealyingtong
fb9da0b1b3
Address review comments.
...
Co-authored-by: Jack Grigg <jack@electriccoin.co>
2021-05-18 09:45:03 +08:00
Kris Nuttycombe
1a761cb03f
Merge pull request #81 from nuttycom/bundle_clone
...
Make the `Bundle` type implement `Clone`
2021-05-13 16:18:37 -06:00
Kris Nuttycombe
800e540875
Make the `Bundle` type implement `Clone`
...
This is required for proptest generation that handles shrinking
correctly in librustzcash.
2021-05-13 15:35:44 -06:00
therealyingtong
81d751d1b6
Add proptest for decompose_scalar_fixed()
2021-05-13 12:52:03 +08:00
therealyingtong
077f809df7
Cleanups from code review
...
Co-authored-by: Jack Grigg <jack@electriccoin.co>
2021-05-13 10:48:10 +08:00
Jack Grigg
4423b50788
Include ρ as an input to the derivation of ψ, esk, and rcm
...
This brings the implementation in line with spec version 2021.2.0 and
the Orchard book.
2021-05-11 18:51:57 +08:00
Jack Grigg
736de1156b
Ensure that Notes always have valid commitments
...
Implements the change from spec version 2021.1.23 to sample a new rseed
if a note is generated without a valid commitment.
2021-05-11 18:51:57 +08:00
Jack Grigg
d8cc596bbe
Create separate types for protocol-level and user-level ivk
...
Spec version 2021.1.24 added the diversifier key to the encoding of an
incoming viewing key (to make them more usable). As a result, we now
have two separate types:
- `KeyAgreementPrivateKey`: what was previously `IncomingViewingKey`,
corresponding to the `ivk` type in the protocol spec. It is now
crate-internal.
- `IncomingViewingKey`: the user-facing type that encompasses `dk` and
`ivk`.
2021-05-11 18:51:57 +08:00
Jack Grigg
76a39d29c1
Change diversify_hash and ka_orchard to use non-zero types
...
This matches the changes to KA^Orchard in spec version 2021.1.23.
2021-05-11 18:51:57 +08:00
Jack Grigg
9a828febd7
Change `commit_ivk` to return a non-zero Pallas base field element
...
The type system now enforces that `ivk != 0`.
2021-05-11 18:51:57 +08:00
Jack Grigg
d0c16910d6
book: Document why ivk != 0
2021-05-11 19:14:52 +12:00
Jack Grigg
012d14073d
Remove rand 0.7 usage
...
Upstream redjubjub (on which our reddsa dependency is based) has
migrated to rand 0.8.
2021-05-09 07:51:55 +12:00
Kris Nuttycombe
3117187280
Merge pull request #65 from nuttycom/zip_225_updates
...
Update Orchard data structures to support ZIP 225 serialization & property testing.
Fixes #34
2021-05-06 11:46:27 -06:00
therealyingtong
db60fd2262
Add FixedPointShort associated type
2021-05-06 15:55:15 +08:00
therealyingtong
6a64bc1c37
Expose Point.add_incomplete()
2021-05-06 12:54:21 +08:00
therealyingtong
e82a76da2a
Remove unused OrchardFixedBases trait
2021-05-06 12:52:52 +08:00
Kris Nuttycombe
c9f1060bb9
Minor correction to type signature (naming)
2021-05-05 17:44:15 -06:00
Kris Nuttycombe
bf4532fd7d
Properly condition generators on flags.
2021-05-05 17:36:05 -06:00
Kris Nuttycombe
71736433d0
Rename arb_nonnegative_note_value -> arb_note_value_bounded
2021-05-05 17:23:21 -06:00
Kris Nuttycombe
3170096134
Publicly expose `MAX_NOTE_VALUE`
2021-05-05 17:19:42 -06:00
Kris Nuttycombe
6373d3d422
Fix incorrect generation for bsk/bvk consistency test.
2021-05-05 17:12:31 -06:00
Kris Nuttycombe
8f3f4a8479
Make note module public.
2021-05-05 14:05:17 -06:00
Kris Nuttycombe
6c681d0539
Generate uniformly distributed nullifiers.
2021-05-05 13:39:41 -06:00
Kris Nuttycombe
aa11eb1372
Derive the full range of ValueCommitment values.
...
Co-authored-by: str4d <jack@electriccoin.co>
2021-05-05 12:02:50 -06:00
Kris Nuttycombe
e72d74ccd6
Remove extraneous pub exports from the root.
2021-05-05 11:46:24 -06:00
Kris Nuttycombe
7ea8900a58
Implement AsRef for Proof
2021-05-05 11:39:07 -06:00
Kris Nuttycombe
a08d060725
Remove unneeded pub(crate)
2021-05-05 11:23:30 -06:00
Kris Nuttycombe
226673938a
Pass flags to arbitrary action generators.
2021-05-05 11:21:45 -06:00
Kris Nuttycombe
88b8265165
Generate both spend and output values for actions.
2021-05-05 11:14:38 -06:00
therealyingtong
4f2b4d2935
Address review comments
...
Co-authored-by: Jack Grigg <jack@electriccoin.co>
2021-05-05 20:23:29 +08:00
Kris Nuttycombe
a789b89135
Check both u64 max and min in ValueSum arithemetic.
2021-05-04 16:35:49 -06:00
therealyingtong
4bf6202c35
Modify ECC gadget to work with chip refactor
2021-05-04 12:11:28 +08:00
str4d
27b95d3405
Merge pull request #74 from zcash/ci-lints
...
CI: Reduce noise of clippy lints
2021-05-03 23:47:53 +01:00
Jack Grigg
8dbc5125c5
CI: Reduce noise of clippy lints
...
We move Clippy lints into separate workflows that only run either
directly on branches, or on trial-merges of PRs, to deduplicate the
lint annotations. We will still see stable lints duplicated in nightly,
but that's fine.
2021-05-04 09:18:30 +12:00