240 Commits

Author SHA1 Message Date
Daniel Lubarov
d9e828811f Typo 2021-05-24 15:10:45 -07:00
Daniel Lubarov
e98593aa7e Little circuit optimization 2021-05-24 15:09:43 -07:00
wborgeaud
5a261332d9
Merge pull request #48 from mir-protocol/target_field_extension
Clean extension code + Recursive interpolation gate
2021-05-24 22:04:25 +02:00
wborgeaud
a11d2ed36b Fixes based on PR comments 2021-05-24 22:04:06 +02:00
wborgeaud
c9309eb27b Minor 2021-05-24 17:40:26 +02:00
wborgeaud
4f6e9fb2e0 Recursive evaluation for interpolation gate. 2021-05-24 17:31:55 +02:00
wborgeaud
b64a5fab46 Addition and multiplication for ExtensionTarget 2021-05-24 16:36:21 +02:00
wborgeaud
655bcd8eac Minor 2021-05-24 15:31:52 +02:00
wborgeaud
66d6f3c338 Remove useless Qua(d)r(a)ticFieldExtension traits 2021-05-24 14:12:08 +02:00
Daniel Lubarov
84e9573c84
Merge pull request #47 from mir-protocol/par_quotient
Compute the three quotient polys in parallel
2021-05-23 22:43:35 -07:00
Daniel Lubarov
26845c5910 Compute the three quotient polys in parallel
Reduces that step from ~0.19s to ~0.09s on my laptop.
2021-05-23 22:21:27 -07:00
Daniel Lubarov
c108dc6d81 Default degree 2^14 2021-05-22 09:46:02 -07:00
Daniel Lubarov
83ef3d1da7 Tweak log 2021-05-22 09:44:34 -07:00
Daniel Lubarov
fb6d0d2f34
Merge pull request #46 from mir-protocol/bench_ldes_tweaks
Tweaks to bench_ldes
2021-05-22 09:39:22 -07:00
Daniel Lubarov
741dc4c94c Tweaks to bench_ldes 2021-05-22 09:38:07 -07:00
Daniel Lubarov
0b75c9f1bc Tweak readme 2021-05-20 19:49:20 -07:00
Daniel Lubarov
a035a9ca83 Tweak readme 2021-05-20 19:42:10 -07:00
Daniel Lubarov
3619c2dd1a
Merge pull request #42 from mir-protocol/interpolation_gate
Interpolation gate
2021-05-20 05:36:17 -07:00
Daniel Lubarov
a4be58557e Fix GMiMCGate 2021-05-20 05:35:16 -07:00
Daniel Lubarov
747974558f Add test_low_degree for other gates 2021-05-20 05:27:56 -07:00
Daniel Lubarov
229784e574 Delete old FRI gate 2021-05-20 05:27:47 -07:00
Daniel Lubarov
621b097a70 Address most feedback 2021-05-20 05:15:25 -07:00
Daniel Lubarov
d05513475c Not just quartic 2021-05-19 23:07:24 -07:00
Daniel Lubarov
6e83d956e9 Finish up 2021-05-19 23:03:52 -07:00
Daniel Lubarov
3311981fc4 Minor 2021-05-19 15:57:28 -07:00
Daniel Lubarov
0ce1a4c5eb Minor 2021-05-19 15:13:33 -07:00
Daniel Lubarov
110763fa79 Minor 2021-05-19 15:00:35 -07:00
Daniel Lubarov
b535bf239a Minor 2021-05-19 12:24:19 -07:00
Daniel Lubarov
227c80c82e fmt 2021-05-19 12:10:41 -07:00
Daniel Lubarov
c6fa7eb18e Minor 2021-05-19 12:10:41 -07:00
Daniel Lubarov
0c91739b3b [DRAFT] Interpolation gate
Over quartic field extension (for now). This would be used in our FRI recursive verifier later, for the consistency check.

To summarize the wires,
- `n` inputs for the `n` points to interpolate (don't need `4n` since they'll be in the subgroup of the base field)
- `4n` inputs for the `n` (extension field) values to interpolate
- `4` inputs for the point to evaluate the interpolant at (beta, which will be drawn from the extension field right?)
- `4` outputs for the interpolated value
- `4n` internal wires for the interpolant's coefficients

This definitely isn't the most optimal approach, e.g. we could route in a single "base" point and derive its neighboring points, but just wanted to keep it simple for now.
2021-05-19 12:10:41 -07:00
wborgeaud
965c4e4da5
Merge pull request #45 from mir-protocol/remove-exp-self
Change `Field::exp` to using a `u64` power.
2021-05-19 20:28:47 +02:00
wborgeaud
b438760f72 Use bits_u64 2021-05-19 20:22:20 +02:00
wborgeaud
78f71672a3 Change Field::exp to using a u64 power. 2021-05-19 12:17:43 +02:00
wborgeaud
7d302aac34 Merge pull request #44 from mir-protocol/fri-extension-field
FRI with extension fields
2021-05-19 09:46:09 +02:00
wborgeaud
e806d86f86 Remove custom primitive_root_of_unity in extension fields by modifying the generators. 2021-05-19 09:35:39 +02:00
wborgeaud
1cbd12edbd Fixes based on PR comments 2021-05-18 22:22:15 +02:00
wborgeaud
8737c8d5b9 revert extension field order 2021-05-18 16:37:21 +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
cb4c420dcf Merge pull request #43 from mir-protocol/poly_inv_fix
Fix intermittent inv_mod_xn failure
2021-05-17 12:31:43 -07: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
BGluth
ecce373b2a Merge pull request #41 from mir-protocol/os_rng_to_thread_rng
Switched over from OsRng --> thread_rng
2021-05-17 09:15:54 -06:00
Daniel Lubarov
bd20ffa52d cargo fmt 2021-05-16 17:24:45 -07:00
BGluth
949fb879cc Switched over from OsRng --> thread_rng
- At least on my Linux machine, a signiciant amount of time (> 50%) was spent inside
  OsRng.
- Likely due to blocking behaviour of the rng devices on Linux.
- thread_rng should not block, but at the same time should provide good
  enough rng.
2021-05-14 20:15:03 -06:00
Daniel Lubarov
de0b382fb6 Merge pull request #39 from mir-protocol/three_zeta
Use num_checks zetas
2021-05-14 08:07:34 -07:00