Commit Graph

2073 Commits

Author SHA1 Message Date
therealyingtong 687e220c36 mul_fixed::short: Refactor short::Config.
This commit does not result in circuit changes.
2021-12-04 04:45:06 +00:00
therealyingtong 165c9b6941 mul_fixed::full_width: Refactor full_width::Config.
This commit does not result in circuit changes.
2021-12-04 04:45:06 +00:00
therealyingtong f472a16b32 chip::mul_fixed: Move running_sum_config into mul_fixed::Config. 2021-12-04 04:45:06 +00:00
therealyingtong 1a7e832ed4 chip::mul_fixed: Refactor mul_fixed::Config.
This commit does not introduce circuit changes.
2021-12-04 04:45:06 +00:00
therealyingtong a7dad1d611 chip::mul: Refactor mul::Config.
This commit does not introduce additional circuit changes.
2021-12-04 04:45:05 +00:00
therealyingtong 440cd14dbb mul::overflow: Refactor overflow::Config.
This is only used in chip::mul::Config. In a subsequent commit,
this will be configured from mul::Config instead of from
ecc::chip::Config.

This commit does not result in circuit changes.
2021-12-04 04:44:41 +00:00
therealyingtong 931d61a863 mul::complete: Refactor complete::Config.
This is only used in chip::mul::Config. In a subsequent commit,
this will be configured from mul::Config instead of from
ecc::chip::Config.

This commit does not result in circuit changes.
2021-12-04 04:41:52 +00:00
therealyingtong 22f57005a9 mul::incomplete: Refactor incomplete::Config.
This is only used in chip::mul::Config. In a subsequent commit,
this will be configured from mul::Config instead of from
ecc::chip::Config.

This commit does not result in circuit changes.
2021-12-04 04:39:41 +00:00
Jack Grigg 0ede6b2301 mul::Config: Reorder gate definitions
We are about to extract the sub-configs from mul::Config and refactor
them. Doing so would have moved their gate definitions past the one gate
that isn't created in a sub-config. Reordering the definitions here will
make the subsequent refactor diffs simpler to review.
2021-12-04 04:38:08 +00:00
ChihChengLiang 08288845fe improve error messgae on ColumnNotInPermutation 2021-12-03 23:38:57 +08:00
str4d 0295dc724b
Merge pull request #413 from zcash/sha256-assignedcell-fix
sha256: Fix `AssignedCell` `From` impls for `AssignedBits` and `Bits`
2021-12-03 04:24:50 +00:00
Jack Grigg a62f9451d1 sha256: Fix `AssignedCell` `From` impls for `AssignedBits` and `Bits`
zcash/halo2#337 had been updated to account for `AssignedCell`, before
the change to simplify its bounds was made. `AssignedCell` now requires
the `From` impls to take `&VR`.
2021-12-03 02:53:14 +00:00
str4d 2a7985014b
Merge pull request #337 from zcash/fix-sha256
Update sha256 example to work with new API
2021-12-03 02:41:53 +00:00
therealyingtong 2ec480ef6b utilities::lookup_range_check: Derive Copy for LookupRangeCheckConfig. 2021-12-02 14:55:37 -05:00
therealyingtong 4fe6fb8bf2 chip::add: Refactor add::Config.
This is also used in mul and mul_fixed.
2021-12-02 14:55:36 -05:00
therealyingtong 13faedc7cc chip::add_incomplete: Refactor add_incomplete::Config.
This is also used in mul_fixed.
2021-12-02 14:54:13 -05:00
therealyingtong 9d8fee29c7 chip::witness_point: Refactor witness_point::Config. 2021-12-02 14:51:33 -05:00
ebfull 53b68ea799
Merge pull request #249 from zcash/241-spendingkey-ct_eq
Replace `PartialEq, PartialOrd` with `ConstantTimeEq` on `{Extended}SpendingKey`
2021-12-02 11:45:44 -07:00
ebfull f89135fd1d
Merge pull request #409 from zcash/beta-lints
Fix various clippy lints from beta toolchain
2021-12-02 10:48:49 -07:00
Jack Grigg 30045d7488 multiopen: Remove unused structs
These were unified as `poly::multiopen::CommitmentData` in
55ef4ea1f7 but the original types were
not removed.
2021-12-02 15:31:36 +00:00
Jack Grigg 8bd9097e55 Remove `impl Default for Rotation`
Clippy complained that it could be derived, but what we actually want is
for developers to be explicit about what rotations they are using, for
which `Rotation::cur()` is provided.
2021-12-02 15:19:24 +00:00
Jack Grigg 1795a58871 tests: Remove redundant closure 2021-12-02 15:19:24 +00:00
Jack Grigg 061098170e Remove unnecessary mutable references
The compiler immediately dereferences these.
2021-12-02 15:19:24 +00:00
Jack Grigg 7772c87be3 Remove unused fields 2021-12-02 15:19:24 +00:00
Jack Grigg 9ab7fdab33 Allow dead code for `Pinned*` structs
These structs only exist for their Debug impls, which do use the fields.
2021-12-02 15:19:24 +00:00
ebfull 60e9ac32fa
Merge pull request #408 from zcash/multi-proptest
multiopen: Replace test_coherence with proptest.
2021-12-01 09:31:41 -07:00
str4d d8690b8985
Merge pull request #236 from zcash/bench-poseidon-2
Benchmark Poseidon gadget for rates {2, 8, 11}
2021-12-01 15:57:55 +00:00
ying tong b02628d263 Apply suggestions from code review
Co-authored-by: str4d <jack@electriccoin.co>
2021-12-01 09:31:53 -05:00
therealyingtong 76c8bb9711 utilities::cond_swap: Use ternary helper in cond_swap.
Co-authored-by: Jack Grigg <jack@electriccoin.co>
2021-11-30 20:36:13 -05:00
str4d afd7bc5469
Merge pull request #383 from zcash/allocated-cell
circuit.rs: Introduce `AssignedCell` struct.
2021-11-30 23:42:34 +00:00
Jack Grigg 37f1bba998 Remove `PartialEq, PartialOrd` impls from `{Extended}SpendingKey` 2021-11-30 23:25:35 +00:00
Jack Grigg 674ceb54c8 `impl ConstantTimeEq for {Extended}SpendingKey` 2021-11-30 23:24:50 +00:00
str4d 4b8f0f0c6b Update code comments in examples
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2021-11-30 22:35:38 +00:00
str4d 32b3eb9840
Merge pull request #235 from zcash/n_minus_x
circuit: Use `N - x` instead of `x - N`.
2021-11-30 20:39:30 +00:00
therealyingtong 1a7a1255c8 mul::complete.rs: Use ternary helper in complete addition part of variable-base scalar mul. 2021-11-30 13:02:25 -05:00
therealyingtong 9513efd6f3 ecc::chip::mul.rs: Use ternary helper in variable-base scalar mul. 2021-11-30 12:52:15 -05:00
therealyingtong 839f9ecd66 Simplify bounds on AssignedCell's V type.
We only need V: Clone and for<'v> Assigned<F>: From<&'v V> for
specific methods.

Co-authored-by: Jack Grigg <jack@electriccoin.co>
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2021-11-30 11:17:58 -05:00
therealyingtong ba75da27bb gadget::utilities: Introduce ternary expression helper. 2021-11-30 10:39:01 -05:00
therealyingtong 421891f065 Benchmark proof creation and verification for RATE = 2, 8, 11. 2021-11-30 10:03:49 -05:00
therealyingtong 9b76556503 poseidon: Make gadget tests generic over WIDTH, RATE 2021-11-30 10:03:49 -05:00
therealyingtong b63c868591 poseidon: Make Spec trait methods not take (&self) parameter. 2021-11-30 10:02:16 -05:00
therealyingtong e0a0a0d509 book: Introduce RangeCheck macro. 2021-11-30 09:30:43 -05:00
str4d bb1f7b83e4
Merge pull request #410 from zcash/update-changelog
Add missing CHANGELOG entry
2021-11-30 05:00:20 +00:00
therealyingtong 409bbf36a0 mul::complete: Replace k_minus_one with one_minus_k. 2021-11-29 21:45:49 -05:00
therealyingtong 303bdc3f65 Replace local bool_check expressions with utilities::bool_check(). 2021-11-29 21:45:48 -05:00
therealyingtong 4fb434f88d gadget::utilities: Use range_check in bool_check. 2021-11-29 20:50:31 -05:00
therealyingtong 36f1d18705 gadget::utilities: Use N - x in range_check. 2021-11-29 20:50:31 -05:00
str4d aa251befbc
Merge pull request #240 from zcash/update-halo2
Migrate to latest halo2 revision
2021-11-29 20:19:58 +00:00
str4d 68b790c7da
Merge pull request #239 from nuttycom/di_from_bytes
Add construction of DiversifierIndex directly from bytes.
2021-11-29 17:46:44 +00:00
therealyingtong 620b4a8b9c sha256: Update to use new AssignedCell API. 2021-11-28 13:42:10 -05:00