26 Commits

Author SHA1 Message Date
Daniel Lubarov
e4cbee2b57
Disable ZK in large_config (#180)
* Disable ZK in large_config

Speeds up the tests from ~6m to ~1m (debug mode). `large_config` is crate-private so I don't think we need to worry about real users forgetting ZK, and I don't think ZK seems important in these tests, though we should probably have ZK enabled for a couple tests.

A couple tests need ZK or they fail; I added a TODO to look later.

This led to a few other changes:
- Fixed a bug where `trim` could truncate the final poly to a non-power-of-two length. This was improbable when ZK is on due to randomization.
- Gave a few methods access to the whole `CircuitConfig` vs `FriConfig` -- sort of necessary for the above fix, and I don't think there's much downside.
- Remove `cap_height` from `FriConfig` -- didn't really need it any more after giving more methods access to `CircuitConfig`, and having a single copy of the param feels cleaner/safer to me.

* PR feedback
2021-08-14 10:01:10 -07:00
Daniel Lubarov
38505b71ae
FRI refactor (#172)
I sort of "shifted" the loop in `fri_verifier_query_round` so that `fri_combine_initial` is called before the loop, and all `compute_evaluation` calls are in the loop (rather than the final one being outside). This lines up with my mental model of FRI, and I think it's more natural as it results in a loop with no branches, no `i - 1`s, and less state stored between iterations. Also added some comments etc.

Should be functionally equivalent to the old version.
2021-08-12 07:27:33 -07:00
wborgeaud
9f004c9664 Clippy 2021-08-10 16:18:42 +02:00
wborgeaud
e73c1d7769 Cleaning / Renaming 2021-08-10 15:53:27 +02:00
wborgeaud
f2c423ee61 save 13 gates 2021-08-10 14:19:12 +02:00
wborgeaud
ce71b536bf First pass 2021-08-10 13:33:44 +02:00
Daniel Lubarov
b1633dc48d
More par_iter (#150) 2021-08-03 07:39:36 -07:00
Daniel Lubarov
f150f7ec09
More timing code for FRI prover (#146) 2021-08-02 15:49:06 -07:00
Daniel Lubarov
1229d90fae
Add a tree of scopes for proving times (#141)
* Add a tree of scopes for proving times

To replace the old `timed!` macro, which had no hierarchy.

It's similar to `ContextTree`, which tracks gate counts of circuit operations.

This gives a more organized output, with indentation levels based on scope depth, parent durations listed before child durations, etc.

* PR feedback
2021-08-02 10:38:09 -07:00
Daniel Lubarov
018fb005f8
Move stuff around (#135)
No functional changes here. The biggest change was moving certain files into new directories like `plonk` and `iop` (for things like `Challenger` that could be used in STARKs or other IOPs). I also split a few files, renames, etc, but again nothing functional, so I don't think a careful review is necessary (just a sanity check).
2021-07-29 22:00:29 -07:00
Nicholas Ward
3612b9f05e Merge branch 'main' into order_bigint 2021-07-22 13:28:48 -07:00
Nicholas Ward
1dd850b0e5 fixes 2021-07-21 13:05:32 -07:00
Daniel Lubarov
80b696a3a2
Avoid a clone (#114) 2021-07-21 08:26:56 -07:00
Daniel Lubarov
7d8bac7169
Change FFT methods to accept references (#115) 2021-07-21 08:26:41 -07:00
Nicholas Ward
b103c0774f progress 2021-07-20 15:42:27 -07:00
wborgeaud
9baea1ae26 Trim final poly and check FRI arity 2021-07-19 16:24:21 +02:00
Daniel Lubarov
573badc96f
Parallel proof-of-work search (#92) 2021-07-15 07:40:41 -07:00
wborgeaud
eaba5238a6 Change PoW to checking leading zeros 2021-06-17 09:49:41 +02:00
wborgeaud
42d5b80a7a BaseSum gate 2021-06-04 15:40:54 +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
a2cf2c03b6 Working FRI with field extensions 2021-05-18 15:22:06 +02:00
wborgeaud
0bae47bedb LPC batch opening 2021-05-06 17:09:55 +02:00
wborgeaud
5706c424f4 Fixes based on PR feedback 2021-05-05 22:58:15 +02:00
wborgeaud
1f3f7d5b70 FRI reorg 2021-05-05 18:23:59 +02:00