Commit Graph

28 Commits

Author SHA1 Message Date
Jack Grigg 6b495f711a Extract InProgress type from Unauthorized and PartiallyAuthorized
This enables bundle proofs and signatures to be handled separately
outside the builder.
2021-07-28 13:48:03 +01:00
therealyingtong 8cf7a6872c Minor refactors, text fixes, and docfixes.
Co-authored-by: Jack Grigg <jack@electriccoin.co>
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2021-07-23 00:15:54 +08:00
therealyingtong 07770a0be0 builder.rs: Update ActionInfo::build() to fill in Circuit fields. 2021-07-21 20:35:43 +08:00
therealyingtong bdf2d6d9f8 circuit.rs: Define Circuit fields, impl Default for Circuit
The Default Circuit sets all fields to None. This is used as a
placeholder in src/builder.rs.

The circuit in the Circuit::round_trip() test has been filled in.
2021-07-21 20:35:43 +08:00
Kris Nuttycombe 78adc9c810 Anchor computation is partial. 2021-06-24 09:43:10 -06:00
Daira Hopwood 1c19bea842 Fix clippy lints.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-06-16 19:13:40 +01:00
Jack Grigg de78186503 Store anchors as pallas::Base instead of [u8; 32]
This matches what we store in `MerklePath`, and better enforces the
required type.
2021-06-12 21:35:37 +01:00
Jack Grigg 57f84c3eea builder: Encrypt output notes 2021-06-11 23:55:17 +01:00
str4d 0ead91a88c
Merge pull request #110 from zcash/tree-logic
Implement tree logic in Builder
2021-06-11 21:39:40 +01:00
therealyingtong b3daeb0861 tree::testing: Fix and test arb_tree(). 2021-06-10 13:54:42 +08:00
therealyingtong 8f8eff23d8 Update proptests to generate Merkle paths 2021-06-08 22:38:11 +08:00
therealyingtong b33248bdb0 src::tree.rs: Implement MerklePath.root() method.
Co-authored-by: Kris Nuttycombe <kris@electriccoin.co>
2021-06-08 22:31:24 +08:00
Jack Grigg e0e082d265 test: Remove stray dbg!() 2021-06-05 22:39:57 +01:00
Jack Grigg cbf7c3825f builder: Store alpha and use it to derive rsk for signing spends
This was missed from zcash/orchard#49, but could not have caused a
consensus failure or loss-of-funds because `alpha` _was_ being sampled
and used to derive `rk`, meaning that the signatures would fail to
validate.
2021-06-05 22:35:52 +01:00
Jack Grigg cdfd2ab0f9 Remove clones from types that now impl Copy 2021-05-28 12:10:54 +01: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 3170096134 Publicly expose `MAX_NOTE_VALUE` 2021-05-05 17:19:42 -06:00
Kris Nuttycombe e72d74ccd6 Remove extraneous pub exports from the root. 2021-05-05 11:46:24 -06:00
Kris Nuttycombe 88b8265165 Generate both spend and output values for actions. 2021-05-05 11:14:38 -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 fc0f55d82b Make ValueSum correctly respect the proper specified range. 2021-04-28 18:03:50 -06:00
Kris Nuttycombe e743198a50 Expose constructors required for ZIP-225 parsing. 2021-04-28 18:02:36 -06: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 186914166a Use `zero` instead of `default` for empty values 2021-04-28 09:06:33 +12:00
Jack Grigg 30f01d122c Bundle builder 2021-04-27 14:31:21 +12:00