48 Commits

Author SHA1 Message Date
Daniel Lubarov
6e83d956e9 Finish up 2021-05-19 23:03:52 -07:00
wborgeaud
78f71672a3 Change Field::exp to using a u64 power. 2021-05-19 12:17:43 +02:00
wborgeaud
4f6f2192ab Minor fixes 2021-05-18 16:23:44 +02:00
wborgeaud
96a880193c Clippy 2021-05-18 16:09:22 +02:00
wborgeaud
9cd00532ce Generic tests 2021-05-18 16:06:47 +02:00
wborgeaud
adf5c2d4ec Const generics everywhere 2021-05-18 15:44:50 +02:00
wborgeaud
37f6ee53cc Merge branch 'main' into fri-extension-field 2021-05-18 15:28:42 +02:00
wborgeaud
a2cf2c03b6 Working FRI with field extensions 2021-05-18 15:22:06 +02:00
Daniel Lubarov
1e5dfa405b Fix intermittent inv_mod_xn failure
My recent change made `padded` panic if the padded length is less than the current length. I figured that might indicate that something unexpected was going on, so might be good to fail fast.

It looks like `inv_mod_xn` was relying on the old `padded` behavior, and it seems correct AFAIK, i.e. in this case it wasn't a symptom of anything going wrong.

We could also restore the old behavior of `padded` if you prefer; let me know if you have a preferennce.
2021-05-17 10:37:43 -07:00
Daniel Lubarov
bd20ffa52d cargo fmt 2021-05-16 17:24:45 -07:00
Daniel Lubarov
13fc0c2261 Merge pull request #40 from mir-protocol/move_timed
Move timed! and call from ListPolynomialCommitment
2021-05-14 08:04:22 -07:00
Daniel Lubarov
b14328c2df Move timed! and call from ListPolynomialCommitment 2021-05-14 07:35:09 -07:00
Daniel Lubarov
7f445686ee Tweaks 2021-05-13 15:44:36 -07:00
Daniel Lubarov
6d03dd06f5 Finish merging in old_polynomial 2021-05-13 15:35:26 -07:00
Daniel Lubarov
18d59ec9de Fix minor post-merge conflicts 2021-05-12 11:26:21 -07:00
Daniel Lubarov
51114e4ef6 Missing import 2021-05-12 11:21:31 -07:00
Daniel Lubarov
b7acdb36ca Merge pull request #36 from mir-protocol/poly_port
Some cleanup related to the two polynomial APIs
2021-05-12 10:55:43 -07:00
Daniel Lubarov
22a625e86d trim b 2021-05-12 10:33:36 -07:00
wborgeaud
ce0507ba12 Blinding parameter can be set differently for each Merkle tree in a FRI proof. 2021-05-11 09:56:21 +02:00
Daniel Lubarov
4d5ea83325 polynomial_long_division -> polynomial_division 2021-05-10 14:32:17 -07:00
Daniel Lubarov
8b309fef41 Tweak 2021-05-10 14:30:18 -07:00
Daniel Lubarov
44a5e0be1b Some cleanup related to the two polynomial APIs
Porting over some code from `old_polynomial`, and changing `ListPolynomialCommitment` to use the newer API.

There's one remaining use of `old_polynomial` for long division; I think that can eventually go away when we switch to doing values-only FRI (unless another use comes up).
2021-05-10 13:10:29 -07:00
wborgeaud
d529afcdef Minor 2021-05-07 16:49:27 +02:00
wborgeaud
6ca1b28f7c Fix bug 2021-05-07 16:22:13 +02:00
wborgeaud
1bae3a02f6 Batch open for PLONK 2021-05-07 11:30:03 +02:00
wborgeaud
ea7926bd95 Update PLONK prover. 2021-05-06 23:14:37 +02:00
wborgeaud
0bae47bedb LPC batch opening 2021-05-06 17:09:55 +02:00
wborgeaud
36dda7aae1 Remove useless challenger observation. 2021-05-06 15:26:54 +02:00
wborgeaud
41008cf421 Move Merkle root out of opening proof. 2021-05-06 15:19:06 +02:00
wborgeaud
477fe1ea4a Minor fixes 2021-05-06 15:14:43 +02:00
wborgeaud
03d761ead6 Double blinding 2021-05-06 00:00:08 +02:00
wborgeaud
5706c424f4 Fixes based on PR feedback 2021-05-05 22:58:15 +02:00
wborgeaud
5e06c014c8 Cleaning 2021-05-05 18:32:24 +02:00
wborgeaud
1f3f7d5b70 FRI reorg 2021-05-05 18:23:59 +02:00
wborgeaud
6820c1849a Working blinding in LPC 2021-05-05 17:00:47 +02:00
wborgeaud
6dbd39de80 Passing test 2021-05-04 19:56:34 +02:00
wborgeaud
eb3011b02a More work on polynomial commitments 2021-05-04 17:48:26 +02:00
wborgeaud
bb8a68e198 Progress on polynomial commitment 2021-05-03 15:17:05 +02:00
wborgeaud
0fa0942981 FRI on coset 2021-04-30 15:07:54 +02:00
Daniel Lubarov
035d15bc3d Interpolants of arbitrary (point, value) lists
Closes #10. This combines Lagrange interpolation with FFTs as mentioned there.

I was previously thinking that all our polynomial encodings might as well just use power-of-two length vectors, so they'll be "FFT-ready", with no need to trim/pad. This sort of breaks that assumption though, as e.g. I think we'll want to compute interpolants with three coefficients in the batch opening argument.

I think we can still skip trimming/padding in most cases, since it the majority of our polynomials will have power-of-two-minus-1 degrees with high probability. But we'll now have one or two uses where that's not the case.
2021-04-24 19:20:18 -07:00
Daniel Lubarov
af4c8734ce Address some clippy warnings 2021-04-23 12:35:19 -07:00
Daniel Lubarov
84a71c9ca5 A few more tests, ported (with some adaptations) from plonky1 2021-04-22 21:51:40 -07:00
wborgeaud
6b407e45ef Progress on FRI 2021-04-21 22:31:45 +02:00
Daniel Lubarov
5fe8d633b6 Split main into multiple binaries
... and other minor refactoring.

`bench_recursion` will be the default bin run by `cargo run`; the otheres can be selected with the `--bin` flag.

We could probably delete some of the other binaries later. E.g. `field_search` might not be useful any more. `bench_fft` should maybe be converted to a benchmark (although there are some pros and cons, e.g. the bench framework has a minimum number of runs, and isn't helpful in testing multi-core performance).
2021-04-06 13:23:47 -07:00
Daniel Lubarov
facbe117fb Move some stuff into Field 2021-04-02 19:04:26 -07:00
Daniel Lubarov
c25c689ef0 More tests, ported from plonky1 2021-04-02 17:49:57 -07:00
Daniel Lubarov
3c262a8c49 Fix some warnings 2021-03-30 20:16:20 -07:00
Daniel Lubarov
6c8dfb97ac Refactor polynomial code 2021-03-30 13:30:31 -07:00