Daniel Lubarov
88a84d5be3
Merge pull request #6 from mir-protocol/bin_reorg
...
Split main into multiple binaries
2021-04-06 13:25:33 -07: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
2f54cedb5d
Merge pull request #5 from mir-protocol/validate_cosets
...
Validate that the cosets involved in Plonk's permutation argument are disjoint
2021-04-05 12:23:22 -07:00
Daniel Lubarov
74ce37250e
Avoid separate exp calls
2021-04-05 11:39:16 -07:00
Daniel Lubarov
37761a32e8
Simplify as per William's comment
2021-04-04 15:26:38 -07:00
Daniel Lubarov
cb1c69e50f
Validate that the cosets for Plonk's permutation argument are disjoint
...
When we had a large field, we could just pick random shifts, and get disjoint cosets with high probability. With a 64-bit field, I think the probability of a collision is non-negligible (something like 1 in a million), so we should probably verify that the cosets are disjoint.
If there are any concerns with this method (or if it's just confusing), I think it would also be reasonable to use the brute force approach of explicitly computing the cosets and checking that they're disjoint. I coded that as well, and it took like 80ms, so not really a big deal since it's a one-time preprocessing cost.
Also fixes some overflow bugs in the inversion code.
2021-04-04 14:34:33 -07:00
Daniel Lubarov
22f7c359af
Fix visibility
2021-04-03 15:30:33 -07:00
Daniel Lubarov
524005579d
Comments etc
2021-04-02 20:58:19 -07:00
Daniel Lubarov
9b158103d2
Rename
2021-04-02 20:34:27 -07:00
Daniel Lubarov
80e87becb8
Minor refactor
2021-04-02 19:15:39 -07:00
Daniel Lubarov
facbe117fb
Move some stuff into Field
2021-04-02 19:04:26 -07:00
Daniel Lubarov
78860cc3db
Final fixes
2021-04-02 18:29:33 -07:00
Daniel Lubarov
572a55ed29
Fix to_canonical_u64
2021-04-02 18:23:22 -07:00
Daniel Lubarov
285ec16599
Fix neg
2021-04-02 18:12:44 -07:00
Daniel Lubarov
c25c689ef0
More tests, ported from plonky1
2021-04-02 17:49:57 -07:00
Daniel Lubarov
4086b2b447
Arithmetic & permutation gadgets
2021-04-02 15:29:21 -07:00
Daniel Lubarov
aea4eeaaae
Minor
2021-04-02 14:00:26 -07:00
Daniel Lubarov
8565e5015d
Minor
2021-04-01 20:39:21 -07:00
Daniel Lubarov
524a974de3
Parallelize vanishing poly computation
2021-04-01 13:46:24 -07:00
Daniel Lubarov
8302c10f21
Multiple vanishing polys, and multiple associated quotient polys
...
With different random alphas
2021-04-01 13:22:54 -07:00
Daniel Lubarov
234fdc7c99
Bit of refactoring, comments, etc.
2021-04-01 12:49:31 -07:00
Daniel Lubarov
cca79a992c
Sponges etc
2021-03-31 21:15:24 -07:00
Daniel Lubarov
16817d1268
Minor
2021-03-30 23:47:29 -07:00
Daniel Lubarov
347206d161
Add Z terms in vanishing poly
2021-03-30 23:12:47 -07:00
Daniel Lubarov
3c262a8c49
Fix some warnings
2021-03-30 20:16:20 -07:00
Daniel Lubarov
d8ecc37547
Const generics now stable, yay!
2021-03-30 20:10:01 -07:00
Daniel Lubarov
6c8dfb97ac
Refactor polynomial code
2021-03-30 13:30:31 -07:00
Daniel Lubarov
07718397ea
Fix coset [i]fft
2021-03-30 11:46:58 -07:00
Daniel Lubarov
69b98623a1
Batch inverse (ported from plonky1)
2021-03-30 11:46:36 -07:00
Daniel Lubarov
44eeb505eb
Tweaks
2021-03-30 10:02:00 -07:00
Daniel Lubarov
f42120482a
No more polynomial programming abstraction
...
It was too expensive.
2021-03-28 19:52:01 -07:00
Daniel Lubarov
ba96ab4e99
More prover work
2021-03-26 23:51:48 -07:00
Daniel Lubarov
8c95dd11d7
Bit of prover work
2021-03-21 19:50:05 -07:00
Daniel Lubarov
5f92611df1
Bit of prover work
2021-03-21 11:57:33 -07:00
Daniel Lubarov
75b9340000
Tweak APIs
2021-03-21 11:29:47 -07:00
Daniel Lubarov
ca7f20bf45
FriConsistencyGate
2021-03-18 12:44:45 -07:00
Daniel Lubarov
ea33c5567f
GMiMC, witness generation
2021-03-01 13:40:05 -08:00
Daniel Lubarov
ec0632bf16
Degree-3 GMiMC gate
2021-03-01 12:35:02 -08:00
Daniel Lubarov
194c4864d2
Remove bad attempt at automatic degree shrinking
2021-03-01 11:17:44 -08:00
Daniel Lubarov
31a10b776f
Minor
2021-02-28 23:34:07 -08:00
Daniel Lubarov
45da024aef
Minor
2021-02-28 21:43:10 -08:00
Daniel Lubarov
58425eb548
Misc
2021-02-27 21:42:12 -08:00
Daniel Lubarov
5d6da4f94a
Degree shrinker
2021-02-26 23:30:22 -08:00
Daniel Lubarov
383812dffd
Degree map
2021-02-26 14:08:27 -08:00
Daniel Lubarov
78d7f8c6d3
Don't need ConstraintPolynomialRef
2021-02-26 13:33:05 -08:00
Daniel Lubarov
9fdff8ea08
Gate infra
2021-02-26 13:18:41 -08:00
Daniel Lubarov
33bd3edd11
Minor
2021-02-24 22:48:13 -08:00
Daniel Lubarov
2571e86ea5
Tweaks
2021-02-24 18:04:00 -08:00
Daniel Lubarov
05e98ed3e6
Minor
2021-02-24 13:15:21 -08:00
Daniel Lubarov
801563369b
Mostly finish GMiMC gate
2021-02-24 13:07:22 -08:00