Commit Graph

1051 Commits

Author SHA1 Message Date
str4d c19423766b
Merge pull request #415 from ChihChengLiang/hint-on-meta-enable-equality
improve error message on ColumnNotInPermutation
2021-12-15 16:52:22 +00:00
str4d 18e13b1d09
Merge pull request #422 from zcash/ci-benchmark-tweaks
CI: Benchmark tweaks
2021-12-09 20:35:40 +00:00
Jack Grigg 55364f0d99 CI: Fix benchmark collection
The benchmark action's "cargo" tooling assumes the standard bencher
output format, and can't parse criterion's output. Fortunately,
criterion can also provide bencher output for compatibility.

In order to pass criterion flags via `cargo bench`, we need to ensure
that all benchmarks use it (otherwise the flags are rejected by the
built-in benchmark harness as unknown). Since we don't actually have any
benchmarks inside the library itself, we simply disable its benchmark
harness.
2021-12-08 22:25:40 +00:00
Jack Grigg 858838bcf8 bench: Tidy up PLONK benchmark
- Added keygen benchmark.
- Refactored to extract common prover and verifier logic.
- Benchmarks are now grouped.
- Prover (and keygen) benchmarks now only take 10 samples instead of 100
  (to make them feasible to collect in CI).
2021-12-08 22:25:40 +00:00
str4d e1b3c79c2c
Merge pull request #421 from zcash/ci-benchmarks
CI: Add benchmarks workflow
2021-12-08 20:29:39 +00:00
Jack Grigg 001494b4fe CI: Add benchmarks workflow
The workflow will comment on commits that cause a performance regression
of at least 200% (e.g. proving taking twice as long); we'll tune this as
we figure out how well benchmarking works on standard GitHub builders.
2021-12-08 20:24:30 +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
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 afd7bc5469
Merge pull request #383 from zcash/allocated-cell
circuit.rs: Introduce `AssignedCell` struct.
2021-11-30 23:42:34 +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
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
str4d bb1f7b83e4
Merge pull request #410 from zcash/update-changelog
Add missing CHANGELOG entry
2021-11-30 05:00:20 +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 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 90e5715bf7 multiopen: Replace test_coherence with proptest. 2021-11-23 09:45:00 -05:00
str4d 069aa1dd17
Merge pull request #376 from zcash/364-mockprover-constraint-values
dev: Collect values of queried cells for unsatisfied constraints
2021-11-18 19:23:42 +00:00
therealyingtong ee595bfabb Introduce plonk::Error::ColumnNotInPermutation error.
This is raised when a copy constraint involves a column that has
not been included in the permutation.
2021-11-17 15:46:34 +01:00
ying tong 9dc5002d55
Merge pull request #403 from zcash/402-improve-k-too-small-errors
Improve error message when `k` is too small
2021-11-17 15:27:39 +01:00
Jack Grigg 72a731cba1 Remove `minimum_k` from `Error::NotEnoughRowsAvailable`
Due to this error being detected and returned early, in practice
`minimum_k` would always be `current_k + 1`, and the error would be
returned repeatedly (as more of the circuit could be processed) until
`k` was set large enough. We now simply suggest that the user try a
larger value of `k`.
2021-11-17 08:07:42 +00:00
Jack Grigg 64680a1a2d dev: Handle too-small `k` error in `CircuitLayout::render`
In most places within `CircuitLayout`, we are flexible on `k`. However,
for tracking selectors we need to know the number of rows. We could
change this, but given that we also want the number of rows to be
accurate for rendering unusable rows, we can instead use this as an
opportunity to inform the user that they will need to bump `k`.
2021-11-16 14:20:57 +00:00
Jack Grigg eb88a2ebef Replace `Error::BoundsFailure` uses with `Error::NotEnoughRowsAvailable`
The remaining uses of `Error::BoundsFailure` that are exposed to the
user, are for invalid column indices.
2021-11-15 22:50:35 +00:00
Jack Grigg d055acda31 Augment `Error::NotEnoughRowsAvailable` with current and min-required k
This makes the error message more useful, by informing the user of a
possible solution.
2021-11-15 21:44:51 +00:00
Daira Hopwood f358f72899
Merge pull request #401 from zcash/book-plonkish-terms
book: Rename remaining UPA references to PLONKish
2021-11-15 15:09:26 -05:00
Jack Grigg fa61746526 book: Rename remaining UPA references to PLONKish
These were missed in zcash/halo2#320.
2021-11-15 15:53:38 +00:00
str4d cd5522496a
Merge pull request #338 from zcash/errors
Improved error handling
2021-11-12 12:13:11 +13:00
Jack Grigg a222cdc6d4 book: Document Debian packages required for `dev-graph` feature flag 2021-11-10 16:22:20 +00:00
Jack Grigg 99fac53618 Fix broken doc link 2021-11-10 16:19:36 +00:00
Jack Grigg d66b5c42a0 `impl std::error::Error for Error` 2021-11-10 16:19:36 +00:00