16 Commits

Author SHA1 Message Date
Daniel Lubarov
72d13d0ded
Prover code for permutation argument (#485)
* Batch multiple perm args into one Z and compute Z columnwise

It's slightly complex because we batch `constraint_degree - 1` permutation arguments into a single `Z` polynomial. This is a slight generalization of the [technique](https://zcash.github.io/halo2/design/proving-system/lookup.html) described in the Halo2 book.

Without this batching, we would simply have `num_challenges` random challenges (betas and gammas). With this batching, however, we need to use different randomness for each permutation argument within the same batch. Hence we end up generating `batch_size * num_challenges` challenges for all permutation arguments.

* Feedback + updates for recursion code
2022-02-16 01:33:59 -08:00
wborgeaud
42d6532120 PR feedback 2022-02-15 08:35:57 +01:00
Daniel Lubarov
8d699edf21
Move some methods outside impl System (#484)
I didn't really have a good reason for putting there; seems more idiomatic to make them global since they don't need `self`/`Self`.
2022-02-14 13:47:33 -08:00
wborgeaud
7c71eb6690 Fix mul_add -> mul_sub typo 2022-02-11 10:25:51 +01:00
Daniel Lubarov
645d45f227
Column definitions for addition, range checks & lookups (#477)
* Column definitions for addition, range checks & lookups

I implemented addition (unsigned for now) as an example of how the arithmetic unit can interact with the 16-bit range check unit.

Range checks and lookups aren't implemented yet.

* Missing constraints

* Tweaks to get tests passing

* Reorg registers into files

* Minor
2022-02-10 12:05:04 -08:00
Jakub Nabaglo
efb1365021
Split system_zero::column_layout into submodules (#475) 2022-02-07 14:29:31 -08:00
Jakub Nabaglo
83a572717e
Implement Poseidon in system_zero/permutation_unit (#459)
* Implement Poseidon in system_zero/permutation_unit

* Minor cleanup

* Daniel PR comments

* Update dependencies
2022-02-04 16:50:57 -08:00
wborgeaud
1c30a5a84e Typo 2022-02-04 17:16:18 +01:00
wborgeaud
1011c302ac Add test for system zero 2022-02-04 16:02:45 +01:00
wborgeaud
d99cabded9 Working 2022-02-04 15:56:59 +01:00
wborgeaud
bff763e3e7 Add distinction between (non-)wrapping constraints 2022-02-02 11:23:03 +01:00
wborgeaud
1e04f4f5a4 Comments 2022-02-01 17:34:03 +01:00
wborgeaud
92ea4b65d1 Constraint check working 2022-01-31 18:00:07 +01:00
wborgeaud
e78630ae81 PR feedback 2022-01-28 05:02:31 +01:00
wborgeaud
1770e83c63 Clippy 2022-01-27 13:02:36 +01:00
Daniel Lubarov
c0ac79e2e1
Beginning of STARK implementation (#413)
* Beginning of STARK implementation

* PR feedback

* minor

* Suppress warnings for now
2022-01-26 00:09:29 -08:00