49 Commits

Author SHA1 Message Date
Sladuca
ca35502660 fmt 2022-08-19 17:54:48 -04:00
Sladuca
ff961a34a3 fix lost evals when P::WIDTH > 0 2022-08-19 17:39:55 -04:00
Sebastien La Duca
e48bfa837f fmt 2022-07-24 18:06:03 -04:00
Sebastien La Duca
c9d610ec10 use maybe_rayon in starky and evm 2022-07-24 17:47:14 -04:00
Daniel Lubarov
e73d01a037
packed_field -> packed (#584)
* `packed_field` -> `packed`

For cleaner imports; "field" is usually clear from context

* fix
2022-06-27 15:07:52 -07:00
Daniel Lubarov
3346d3f902
field_types -> types (#583)
* `field_types` -> `types`

Here too, I think "field" is usually clear from context, e.g. in `use plonky2::field::types::Field;`.

* fixes

* fmt
2022-06-27 12:24:09 -07:00
Daniel Lubarov
410e03349c
extension_field -> extension (#581)
It seems redundant in most contexts, e.g. `use plonky2::field::extension_field::Extendable;`. One could import `extension_field`, but it's not that common in Rust, and `field::extension` is now about as short.
2022-06-27 07:18:21 -07:00
wborgeaud
918201d0f9 Fix new lints 2022-06-15 17:23:04 +02:00
wborgeaud
e40276ef19 Compiles somehow 2022-05-05 17:14:21 +02:00
Daniel Lubarov
4fc6fdadd3
Stop suppressing unused/dead warnings globally (#527)
Most of them were trivial to address; for the remaining warnings I suppressed just the relevant line and added TODOs.
2022-03-31 22:53:47 -07:00
Daniel Lubarov
482dfe559a
Vectorize constraint evaluation in Starky (#520) 2022-03-20 08:58:23 -07:00
Daniel Lubarov
7d6c0a448d
Halo2 style lookup arguments in System Zero (#513)
* Halo2 style lookup arguments in System Zero

It's a really nice and simple protocol, particularly for the verifier since the constraints are trivial (aside from the underlying batched permutation checks, which we already support). See the [Halo2 book](https://zcash.github.io/halo2/design/proving-system/lookup.html) and this [talk](https://www.youtube.com/watch?v=YlTt12s7vGE&t=5237s) by @daira.

Previously we generated the whole trace in row-wise form, but it's much more efficient to generate these "permuted" columns column-wise. So I changed our STARK framework to accept the trace in column-wise form. STARK impls now have the flexibility to do some generation row-wise and some column-wise (without extra costs; there's a single transpose as before).

* sorting

* fixes

* PR feedback

* into_iter

* timing
2022-03-16 17:37:34 -07:00
wborgeaud
dd4cc21309 PR feedback 2022-02-23 09:36:28 +01:00
wborgeaud
17bbc6f3e4 Minor 2022-02-22 17:30:08 +01:00
wborgeaud
064b3c07a8 Forgot to set permutation cap 2022-02-22 16:18:41 +01:00
wborgeaud
56e269e27a Working (not recursively) 2022-02-22 10:37:08 +01:00
wborgeaud
85c1e1d5e0 Should work (does not) 2022-02-21 18:00:03 +01:00
wborgeaud
5c1173379e Compiles 2022-02-21 16:05:24 +01:00
wborgeaud
ea9006f52e Add rate_bits 2022-02-16 13:51:10 +01:00
wborgeaud
c9185d92bb Merge branch 'main' into fix_reduction_strategy
# Conflicts:
#	starky/src/prover.rs
2022-02-16 13:38:54 +01:00
wborgeaud
b28cd55326 Fix reduction strategy 2022-02-16 13:37:01 +01:00
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
14d8cf2ceb Merge branch 'main' into recursive_starks 2022-02-15 08:13:50 +01:00
wborgeaud
7af2d05828 Save allocation and add const generic bound 2022-02-13 15:04:40 +01:00
wborgeaud
ff7a654840 Methods for virtual stark proofs 2022-02-09 17:11:13 +01:00
wborgeaud
ba63a37b7d Compiles 2022-02-08 18:16:33 +01:00
Daniel Lubarov
b40827e655
trim_to_len helper function (#472)
* trim_to_len helper function

Seems a little nicer IMO to only remove a certain number of zeros, vs removing all trailing zeros then re-adding some.

* PR feedback
2022-02-06 23:35:46 -08:00
Daniel Lubarov
8f21fddd04
Add a PolynomialValues::selector method for convenience (#470)
Also adds a test for `eval_l_1_and_l_last`.
2022-02-06 23:06:04 -08:00
wborgeaud
511cb863fc s/max_degree_bits/quotient_degree_bits 2022-02-04 20:42:49 +01:00
wborgeaud
fc502add01 Add quotient_degree_factor function 2022-02-04 20:24:58 +01:00
wborgeaud
431bde2c72 Fix number of quotient polys 2022-02-04 17:04:07 +01:00
wborgeaud
6b2b8b6e5d Use stark degree in compute_quotient 2022-02-04 16:36:22 +01:00
wborgeaud
73dde0b70d Replace observe_opening_set by observe_openings taking a FriOpenings argument. 2022-02-03 16:21:34 +01:00
wborgeaud
bc5bc8245d PR feedback 2022-02-03 11:49:44 +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
8ab4f855b2 Add fri_challenges() to Challenger. 2022-02-01 17:02:11 +01:00
wborgeaud
984f44b281 Fix lde -> coset_lde bug 2022-02-01 14:41:27 +01:00
wborgeaud
f2369f4fae Test pass 2022-02-01 10:48:53 +01:00
wborgeaud
92ea4b65d1 Constraint check working 2022-01-31 18:00:07 +01:00
wborgeaud
d24d26e5c0 Add FRI challenges 2022-01-31 16:19:30 +01:00
wborgeaud
8993270f80 Progress 2022-01-29 12:49:00 +01:00
wborgeaud
dff9a40955 Batch alphas in constraint consumer 2022-01-28 17:06:40 +01:00
wborgeaud
e78630ae81 PR feedback 2022-01-28 05:02:31 +01:00
wborgeaud
b6cb72b629 Comments 2022-01-27 13:27:06 +01:00
wborgeaud
1770e83c63 Clippy 2022-01-27 13:02:36 +01:00
wborgeaud
4a2681034e Working prover 2022-01-27 12:58:56 +01:00
wborgeaud
d54cc9a7c8 First try 2022-01-26 16:08:04 +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