65 Commits

Author SHA1 Message Date
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
wborgeaud
cff39c5550 Change visibility 2022-02-14 10:12:24 +01:00
wborgeaud
3db9c775b4 Add set_fri_openings 2022-02-14 10:09:08 +01:00
wborgeaud
80e3c928bb Clippy 2022-02-14 10:00:37 +01:00
wborgeaud
b0de3328c1 Working 2022-02-14 09:53:33 +01:00
wborgeaud
7af2d05828 Save allocation and add const generic bound 2022-02-13 15:04:40 +01:00
wborgeaud
d22fa8895b Fix one error to get another one 2022-02-11 10:37:17 +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
wborgeaud
24c201477c Recursive stark test (failing) 2022-02-10 16:14:18 +01:00
wborgeaud
3aa192a7f6 Add witness generation for stark proofs 2022-02-10 16:04:46 +01:00
wborgeaud
ff7a654840 Methods for virtual stark proofs 2022-02-09 17:11:13 +01:00
wborgeaud
101b3bac64 Small optimization 2022-02-08 18:24:28 +01:00
wborgeaud
ae330ff6a7 Clippy 2022-02-08 18:19:11 +01:00
wborgeaud
ba63a37b7d Compiles 2022-02-08 18:16:33 +01:00
wborgeaud
debe742c7f Progress 2022-02-07 10:41:52 +01:00
wborgeaud
fcef5a57f5 Fibonacci recursive constraints 2022-02-07 10:25:01 +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
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
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
9c6b2394f1 PR feedback 2022-02-04 20:20:12 +01:00
wborgeaud
431bde2c72 Fix number of quotient polys 2022-02-04 17:04:07 +01:00
wborgeaud
01f065b812 Minor 2022-02-04 16:46:33 +01:00
wborgeaud
f5ddf32490 Add file 2022-02-04 16:42:22 +01:00
wborgeaud
978e14030c Fix degree 2022-02-04 16:39:34 +01:00
wborgeaud
6b2b8b6e5d Use stark degree in compute_quotient 2022-02-04 16:36:22 +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
73dde0b70d Replace observe_opening_set by observe_openings taking a FriOpenings argument. 2022-02-03 16:21:34 +01:00
wborgeaud
28082e9752 Clippy 2022-02-03 11:57:24 +01:00
wborgeaud
bc5bc8245d PR feedback 2022-02-03 11:49:44 +01:00
wborgeaud
be44edcd78 Minor 2022-02-02 13:20:49 +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
9f8696ada5 Fix bug 2022-02-01 13:57:03 +01:00