102 Commits

Author SHA1 Message Date
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
ccc9c024a2 Change some fn to take iterators instead of slices 2022-06-03 19:20:19 +02:00
wborgeaud
6f5c8e46f6 s/right/next 2022-06-02 23:55:56 +02:00
wborgeaud
b3f873c66a Finish test 2022-05-19 11:10:10 +02:00
wborgeaud
2bc5b24c52 Start 2022-05-19 10:22:57 +02:00
wborgeaud
17dfa8d713
Merge pull request #541 from mir-protocol/starky_multitables
Start of Starky multitable implementation
2022-05-18 14:35:00 +02:00
wborgeaud
7676f907bf Missed some 2022-05-17 11:15:53 +02:00
wborgeaud
b606d99e07 Use *_circuit suffix for gadgets 2022-05-17 11:04:35 +02:00
wborgeaud
e40276ef19 Compiles somehow 2022-05-05 17:14:21 +02:00
wborgeaud
90f6d07f72
Merge pull request #539 from proxima-one/make_recover_degree_bits_public
Make `recover_degree_bits` public
2022-04-30 10:30:36 +02:00
Sebastien La Duca
737e237ee5 make recover_degree_bits public for StarkProofTarget 2022-04-29 22:27:03 +02:00
Sebastien La Duca
b17e2c8db5 fmt 2022-04-29 15:47:00 +02:00
Sebastien La Duca
5b90d91235 add doc explaining ordering in 2022-04-29 15:39:54 +02:00
Sebastien La Duca
aad56c6603 make recover_degree_bits_public 2022-04-29 10:50:02 +02:00
Daniel Lubarov
0d118d0f49
STARK recursion timing info (#537)
* STARK recursion timing info

* clippy
2022-04-24 15:35:28 +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
8c5cbbc7c6 Add first row Z check 2022-02-22 17:40:48 +01:00
wborgeaud
17bbc6f3e4 Minor 2022-02-22 17:30:08 +01:00
wborgeaud
a31c58b69d Use ReducingFactor 2022-02-22 17:23:55 +01:00
wborgeaud
150d764440 Simplification 2022-02-22 17:00:08 +01:00
wborgeaud
4ea418a486 Clippy 2022-02-22 16:35:20 +01:00
wborgeaud
064b3c07a8 Forgot to set permutation cap 2022-02-22 16:18:41 +01:00
wborgeaud
6cd2fc62b5 Should work (does not) 2022-02-22 11:44:24 +01:00
wborgeaud
ed4aef0fa0 Fill permutation todos 2022-02-22 10:46:51 +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
79ba85eb08 Compiles 2022-02-21 10:52:04 +01:00
wborgeaud
f4a29a0249 Merge branch 'main' into stark_permutation_checks 2022-02-21 10:19:12 +01:00
wborgeaud
d52fabaf26 First pass 2022-02-21 10:18:05 +01:00
Daniel Lubarov
bc3685587c
Rename constraint methods (#497)
Most of our constraints apply to all rows, and it seems safest to make that the "default".
2022-02-20 16:48:31 -08:00
wborgeaud
9516e14c3e
Merge pull request #491 from mir-protocol/fix_reduction_strategy
Fix reduction strategy
2022-02-18 17:07:03 +01:00
wborgeaud
67cb5dfd58 PR feedback 2022-02-17 08:26:23 +01:00
Daniel Lubarov
431faccbdb
Change compute_permutation_z_polys to batch permutation checks (#492)
* Change `compute_permutation_z_polys` to batch permutation checks

* feedback
2022-02-16 23:37:20 -07: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
42d6532120 PR feedback 2022-02-15 08:35:57 +01:00
wborgeaud
acd62f1221 Changes after #481 2022-02-15 08:17:07 +01:00
wborgeaud
14d8cf2ceb Merge branch 'main' into recursive_starks 2022-02-15 08:13:50 +01:00
wborgeaud
7820ba965c Minor 2022-02-14 10:23:26 +01:00
wborgeaud
1686cb021f verify_stark_proof -> recursively_verify_stark_proof 2022-02-14 10:20:59 +01:00
wborgeaud
6dca4e26af Unused 2022-02-14 10:16:02 +01:00