Sean Bowe
26739bbffe
Improvement to error messages for permutation argument failures in the mock prover.
2021-07-08 15:32:56 -06:00
Sean Bowe
0766983686
Fix examples to account for public input API changes.
2021-07-08 15:32:56 -06:00
Sean Bowe
b246897a8d
Add `constrain_instance` and `assign_advice_from_instance` APIs.
2021-07-08 15:32:56 -06:00
Sean Bowe
fe215d153d
Update tests with API changes for public inputs and permutation argument.
2021-07-08 15:32:51 -06:00
Sean Bowe
1f1b705fa6
Make lookup argument perfectly zero-knowledge and complete.
2021-07-08 14:52:44 -06:00
Sean Bowe
7afe549524
clippy fixes
2021-07-02 16:33:22 -06:00
Sean Bowe
32df26d881
Make permutation argument perfectly complete and zero-knowledge.
2021-07-02 16:20:36 -06:00
Sean Bowe
2ef2f7e73c
Change create_proof API to take vectors of scalars and compute polynomials internally.
2021-07-01 13:53:54 -06:00
Sean Bowe
1c586c081c
Switch directionality of the permutation argument's constraints.
2021-07-01 13:47:03 -06:00
Sean Bowe
9118697213
Additional comment about blinding h(X)
2021-07-01 13:01:39 -06:00
Sean Bowe
7fda6f672e
Always commit to a random polynomial that is evaluated at x in order to blind the multiopen evaluation of h(X).
2021-07-01 12:59:53 -06:00
Sean Bowe
fa2d0b061e
Remove unnecessary clones of fixed columns.
2021-07-01 12:52:27 -06:00
Sean Bowe
0a6804bb30
Compute the number of blinding factors each advice polynomial needs.
2021-07-01 12:48:01 -06:00
Sean Bowe
8eb3b7313c
Add support for computing ranges of evaluations of the Lagrange basis polynomials.
2021-07-01 12:46:22 -06:00
Sean Bowe
7bf2bbb941
Clippy fixes
2021-07-01 12:45:14 -06:00
Sean Bowe
fd91b6b42c
Allow MSMs to be queried and not just raw commitments.
...
This allows us to avoid some interstitial arithmetic in the vanishing argument.
2021-07-01 12:42:24 -06:00
Sean Bowe
f7ef626858
Linearize the h(X) check.
2021-06-30 10:11:53 -06:00
str4d
93aabf26c6
Merge pull request #310 from zcash/clippy-capitalized-acronyms
...
clippy: Fix capitalized acronyms in tests and examples
2021-06-23 16:28:38 +01:00
str4d
62414a92b6
Merge pull request #309 from zcash/dev-metadata
...
dev: Refactor VerifyFailure to extract metadata structs
2021-06-23 16:28:25 +01:00
Jack Grigg
e262941b70
clippy: Fix capitalized acronyms in tests and examples
2021-06-23 13:33:04 +01:00
str4d
305ca89bab
Merge pull request #302 from daira/clippy-nightly-clean
...
Make this crate clippy clean for warnings on nightly
2021-06-23 13:30:07 +01:00
str4d
3c24e6b811
Merge pull request #306 from zcash/final-transcript-changes
...
Final transcript changes
2021-06-23 13:28:53 +01:00
Jack Grigg
32edf65efa
dev: Refactor VerifyFailure to extract metadata structs
2021-06-23 13:16:20 +01:00
str4d
b88435712f
Merge pull request #305 from zcash/integrate-layouter-with-circuit
...
Introduce a FloorPlanner trait and integrate it into the Circuit trait
2021-06-22 23:53:24 +01:00
Jack Grigg
6d0017f47c
Introduce a FloorPlanner trait and integrate it into the Circuit trait
...
This is the beginning of the process to enable full floor planning
capabilities in `halo2`. For now, all that a floor planner can do is
synthesize a circuit, which makes it no more powerful than a layouter,
but easier to use (as moving to a multi-pass layouter no longer requires
changes to `Circuit::synthesize`).
2021-06-22 23:47:17 +01:00
str4d
2474647af0
Merge pull request #304 from zcash/reduce-fieldext
...
Reduce various trait requirements from `FieldExt` to `Field`
2021-06-22 23:42:54 +01:00
str4d
be6db1f489
Merge pull request #303 from zcash/migrate-plonk-examples
...
Migrate PLONK-gate-using circuits to use SingleChipLayouter
2021-06-22 23:42:11 +01:00
Sean Bowe
6194b49dee
Make prover messages unambiguous and alter the manner in which challenges are squeezed.
2021-06-22 14:06:02 -06:00
Sean Bowe
7211d78dfe
Minor improvements to the transcript implementation.
2021-06-22 13:51:31 -06:00
Jack Grigg
f5bd3109eb
Reduce various trait requirements from `FieldExt` to `Field`
2021-06-22 00:35:57 +01:00
Jack Grigg
1b04877b3d
Migrate PLONK-gate-using circuits to use SingleChipLayouter
...
These were all early examples that used the Circuit trait without any
layouter, which is incompatible with upcoming changes.
The minimal change to the PinnedVerificationKey is because the lookup
table is being allocated at the top of its columns instead of in-place.
2021-06-22 00:22:12 +01:00
Daira Hopwood
00ca9aa6c3
Remove needless .collect()s.
...
https://rust-lang.github.io/rust-clippy/master/index.html#needless_collect
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-06-21 18:26:08 +01:00
Daira Hopwood
209144981a
Remove needless borrows that are immediately dereferenced:
...
https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-06-21 18:19:15 +01:00
ebfull
ffe87e1fef
Merge pull request #293 from zcash/assigned-batch-inversions
...
Add support for batched inversion of cell assignments
2021-06-19 09:05:21 -06:00
Jack Grigg
088f912d34
Make Assigned an enum, to remove field comparisions from batch eval
2021-06-18 22:04:31 +01:00
ebfull
ac68cee6de
Merge pull request #298 from zcash/297-per-region-gate-assignment
...
MockProver: Check cell assignment per-region instead of globally
2021-06-18 14:20:39 -06:00
Jack Grigg
5f8a61cb24
MockProver: Switch VerifyFailure::Cell to report offset within region
...
This is more useful for developers, as the absolute cell row may be
obfuscated by the layouter, whereas the offset within a row is controlled
by the developer.
2021-06-18 17:52:53 +01:00
Jack Grigg
181ade5e29
MockProver: Check cell assignment per-region instead of globally
...
Current layouters measure the shape of regions by looking at the cells
they assign. If a chip developer forgets to assign a cell in a region,
it is possible for active gates to "stick out" past the edge of a
measured region shape.
`MockProver` checks that all active gates have their cells assigned,
but this was previously checked globally. If a layouter happened to
position the buggy region such that the dangling gate overlapped an
assigned cell in in adjacent region, this check would pass.
In this commit, we extend the check to be per-region. We map enabled
selectors and assigned cells to a specific region, and then if a gate
is active within a region, we require that its cells be assigned within
that same region.
Closes zcash/halo2#297 .
2021-06-18 17:51:44 +01:00
Jack Grigg
572d74e1a0
Add an Assigned::invert method
2021-06-12 19:36:37 +01:00
Jack Grigg
1d7060af8a
Enable region assignments to defer inversions
2021-06-12 19:36:37 +01:00
Jack Grigg
cbd198fc71
Batch invert cell assignments during keygen and proving
2021-06-12 19:34:13 +01:00
Jack Grigg
d685c5c5e6
impl operators for Assigned
...
This enables chips to use this as an intermediate value while computing
witnesses.
2021-06-12 19:34:13 +01:00
Jack Grigg
251bc68c05
Introduce an Assigned struct into the Assignment trait APIs
...
Value closures can now return a `(numerator, denominator)` tuple, in
order to defer inversions until after assignment.
2021-06-12 19:34:13 +01:00
str4d
236115917d
Merge pull request #290 from zcash/v1-layouter
...
V1 layouter
2021-06-12 18:14:54 +01:00
str4d
eae5049ba2
Merge pull request #291 from zcash/circuitlayout-builder
...
dev: CircuitLayout builder
2021-06-11 23:50:08 +01:00
ying tong
d04b532368
Merge pull request #292 from zcash/expression-square
...
plonk::circuit.rs: Add Expression::square() method.
2021-06-12 06:49:36 +08:00
therealyingtong
c907ca5410
plonk::circuit.rs: Add Expression::square() method.
...
Co-authored-by: Jack Grigg <jack@electriccoin.co>
2021-06-11 12:31:27 +08:00
Jack Grigg
faac7b798b
dev: Render Selectors in a darker shade of blue
...
The regions are now rendered uniformly the same colour, by removing the
background bleed-through (which was more complex now that the fixed
columns are rendered in two colours).
2021-06-10 00:06:20 +01:00
Jack Grigg
49e18b2647
dev: Render labels last (so they are always the top layer)
2021-06-10 00:05:49 +01:00
Jack Grigg
53c43e85b2
Fix clippy lints
2021-06-08 12:40:16 +01:00