Commit Graph

2101 Commits

Author SHA1 Message Date
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
therealyingtong b805f85f9f sha256: Update Error::SynthesisError -> Error::Synthesis 2021-11-27 10:22:52 -05:00
therealyingtong be1c0c080f Introduce AssignedBits<LEN> type. 2021-11-27 10:22:52 -05:00
therealyingtong b9230861f7 Introduce RoundIdx enum instead of using i32.
This is a more secure way to distinguish the initial round from
the main rounds.
2021-11-27 10:22:52 -05:00
therealyingtong 78e6e9f695 Use AssignedCell for CellValue{16,32}. 2021-11-27 10:22:52 -05:00
therealyingtong 0443740895 sha256: Replace fixed columns with selectors. 2021-11-27 10:22:52 -05:00
therealyingtong e1c132d664 sha256: Use assign_table() API for lookup table. 2021-11-27 10:22:52 -05:00
therealyingtong ee5bc8184a Remove unwrap()s in synthesis. 2021-11-27 10:22:52 -05:00
therealyingtong 66268cf192 Update sha256 example to work with new API 2021-11-27 10:22:52 -05:00
therealyingtong 61c431edc7 Update examples to use AssignedCell. 2021-11-27 10:08:01 -05:00
therealyingtong 36183bd01a Return AssignedCell from circuit::Region::assign_* APIs. 2021-11-27 10:07:39 -05:00
therealyingtong 4aabf7c1ca circuit.rs: Introduce AssignedCell struct. 2021-11-27 08:49:12 -05:00
Jack Grigg 99d03e0d25 Migrate to latest halo2 revision 2021-11-26 16:24:26 +00:00
str4d 01ec8dca1d
Merge pull request #220 from zcash/bench-poseidon
Generalise Poseidon gadget over `WIDTH`, `RATE`
2021-11-26 16:22:52 +00:00
Kris Nuttycombe 14c4b40dfc Add construction of DiversifierIndex directly from bytes. 2021-11-24 18:09:25 -07:00
Jack Grigg 0c36d69748 Add missing CHANGELOG entry 2021-11-23 23:42:26 +00:00
str4d 8bfc58b7c7
Merge pull request #385 from zcash/perm-not-enabled
Introduce plonk::Error::ColumnNotInPermutation error.
2021-11-23 22:23:00 +00:00
therealyingtong 9bb29018ac poseidon::pow5: Undo circuit change.
Co-authored-by: str4d <jack@electriccoin.co>
2021-11-23 15:38:55 -05:00
ying tong 79123629da
Docfixes and minor refactors.
Co-authored-by: str4d <jack@electriccoin.co>
2021-11-23 15:29:56 -05:00
therealyingtong 90e5715bf7 multiopen: Replace test_coherence with proptest. 2021-11-23 09:45:00 -05:00
str4d 067e26822d
Merge pull request #238 from zcash/reddsa-0.1.0
Use reddsa 0.1 instead of the git dependency
2021-11-23 14:12:19 +00:00
Jack Grigg 1cd9e7d4d4 Use reddsa 0.1 instead of the git dependency 2021-11-19 23:10:46 +00:00
str4d faae7ac2ea
Merge pull request #224 from zcash/poseidon-api
Allow passing `CellValue` as input to Poseidon gadget.
2021-11-19 17:25:25 +00:00