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
Kris Nuttycombe
a789b89135
Check both u64 max and min in ValueSum arithemetic.
2021-05-04 16:35:49 -06:00
Kris Nuttycombe
4afdeeeb76
Add mapping over bundle value balance.
2021-04-30 09:43:51 -06:00
Kris Nuttycombe
b1ac90b77a
Fix incorrect generator comments.
...
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2021-04-30 08:02:09 -06:00
Kris Nuttycombe
a119a27ee7
Clean up value balance generation.
2021-04-30 07:59:46 -06:00
Kris Nuttycombe
25c90dda4b
Add fast generation for not-consensus-valid authorized bundles and actions.
2021-04-29 16:14:16 -06:00
Kris Nuttycombe
3c12877f87
Use a deterministic PRNG seeded from arb data for proptests.
2021-04-29 09:55:11 -06:00
Kris Nuttycombe
f91088d35b
Use builder to generate "valid" bundles via proptest.
2021-04-28 18:21:12 -06:00
Kris Nuttycombe
4d89d45332
Add proptest generators for action and bundle types.
2021-04-28 18:04:17 -06:00
Kris Nuttycombe
75573d331a
Add canonical byte conversions for value commitments.
2021-04-28 18:03:50 -06:00
Kris Nuttycombe
fc0f55d82b
Make ValueSum correctly respect the proper specified range.
2021-04-28 18:03:50 -06:00
Kris Nuttycombe
a5c9fb953b
Add accessors necessary for zip-225 write.
2021-04-28 18:02:36 -06:00
Kris Nuttycombe
e743198a50
Expose constructors required for ZIP-225 parsing.
2021-04-28 18:02:36 -06:00
str4d
e8f65a2158
Merge pull request #49 from zcash/builder
...
Bundle builder
2021-04-29 00:03:26 +01:00
Jack Grigg
d383ff5054
Fix clippy lints
2021-04-29 10:57:53 +12:00
Jack Grigg
223b7ac533
Replace signing metadata tuple with struct
...
This enables the dummy-only first field to be properly documented.
2021-04-29 10:40:23 +12:00
Jack Grigg
374391b217
Bring in reddsa fix that re-enables tests in debug mode
2021-04-28 14:19:58 +12:00
Jack Grigg
186914166a
Use `zero` instead of `default` for empty values
2021-04-28 09:06:33 +12:00
Kris Nuttycombe
575f882b40
Merge pull request #72 from zcash/builder-prep
...
Builder preparations
2021-04-27 07:51:04 -06:00
Jack Grigg
6d4ceb989f
Fix CI to run builder tests successfully
...
Now that the tests include real prover logic, we need to run them in
release mode.
2021-04-27 14:31:21 +12:00
Jack Grigg
30f01d122c
Bundle builder
2021-04-27 14:31:21 +12:00
Jack Grigg
497f7e0b86
Remove bundle::Unauthorized type
...
It is being replaced by context-specific unauthorized or
partially-authorized types. The only general type we need is Authorized
which is used in transactions.
2021-04-27 12:30:16 +12:00
Jack Grigg
316729302d
cargo fmt
2021-04-27 12:28:42 +12:00
Jack Grigg
a60051c8a2
Add from_raw constructors to NoteValue and ValueSum
...
These might be replaced later with APIs that can provide more useful
bounds checks, but we do need some way to construct these types.
2021-04-27 12:27:23 +12:00
Jack Grigg
52d87e257c
Return SpendingKey from Note::dummy
...
We need the spending keys to create valid spendAuth signatures for
Actions containing dummy spent notes.
2021-04-27 12:26:24 +12:00
Jack Grigg
5ec65c5d2a
Add a mutable context to Bundle::{try_}authorize
...
This enables us to work around lifetime restrictions on e.g. the
randomness source at signing time, where it is needed for both
per-Action and Bundle-level signatures.
2021-04-27 12:24:33 +12:00
Steven
5f4a56dc92
Merge pull request #61 from steven-ecc/change-tgppl-to-bosl
...
Adding BOSL and changing TGPPL references to BOSL
2021-04-26 16:42:00 -07:00
Steven
43d1bac11d
Update Cargo.toml
...
Co-authored-by: ebfull <ewillbefull@gmail.com>
2021-04-26 16:41:14 -07:00
Jack Grigg
29b3071c67
Fix doc comments for bundle flags
2021-04-27 09:10:32 +12:00
Kris Nuttycombe
36529629bc
Expose Flags constructor & accessors.
2021-04-27 09:04:03 +12:00
str4d
3dbebbe08b
Merge pull request #58 from zcash/proof-placeholder
...
Proving and verifying keys, and placeholder proof logic
2021-04-26 19:11:56 +01:00
str4d
0f6794f291
Merge pull request #70 from zcash/bundle-apis
...
Bundle APIs
2021-04-22 21:23:14 +01:00
Kris Nuttycombe
7d243ae60a
Apply suggestions from code review
...
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2021-04-22 07:32:20 -06:00
Jack Grigg
4c4400cb63
Proving and verifying keys, and placeholder proof logic
2021-04-23 01:08:43 +12:00
Jack Grigg
f62bbbbb95
Small conversion helpers
2021-04-23 01:08:43 +12:00
Jack Grigg
35f65bb26a
Expose RedPallas rerandomization
2021-04-23 01:06:10 +12:00
str4d
0ccb0101df
Merge pull request #60 from zcash/dummy-notes
...
Dummy note generation
2021-04-22 14:04:50 +01:00
str4d
4db3b54c8b
Generate dummy nullifiers with the same distribution as real ones
...
The x-coordinates of Pallas points are not uniformly distributed base field elements.
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2021-04-22 13:54:17 +01:00
Jack Grigg
dbfbc66ac7
Add NoteValue::zero as an alias for NoteValue::default
2021-04-23 00:46:39 +12:00
Jack Grigg
77121facb7
Dummy note generation
2021-04-23 00:46:39 +12:00
str4d
632fa8dcf2
Merge pull request #68 from daira/daira-nullifiers
...
[Book] Update nullifier explanation to include Extract_P
2021-04-22 05:50:01 +01:00
Jack Grigg
3c2e32e156
Add some internal doc comments
2021-04-22 16:39:36 +12:00
Jack Grigg
09cca41ffb
Add getters for bundle and action internals
2021-04-22 16:39:36 +12:00
Jack Grigg
f1ad9d08de
Bundle and action constructors
2021-04-22 16:39:26 +12:00
Jack Grigg
01d241df7c
Rename some bundle and action variables to match the protocol spec
2021-04-22 16:38:17 +12:00
Jack Grigg
5dbcbf28fb
Bundle Authorization transformations
2021-04-22 16:37:31 +12:00
str4d
ea278aafcb
Merge pull request #63 from zcash/note-commitment-updates
...
Note commitment updates
2021-04-22 01:23:05 +01:00