Daniel Lubarov 898cac1709
Automatically select FRI reduction arities (#282)
* Automatically select FRI reduction arities

This way when a proof's degree changes, we won't need to manually update the `FriConfig`s of any recursive proofs on top of it.

For now I've added two methods of selecting arities. The first, `ConstantArityBits`, just applies a fixed reduciton arity until the degree has shrunk below a certain threshold. The second, `MinSize`, searches for the sequence of arities that minimizes proof size.

Note that this optimization is approximate -- e.g. it doesn't account for the effect of compression, and doesn't count some minor contributions to proof size, like the Merkle roots from the commit phase. It also assumes we're not using Merkle caps in serialized proofs, and that we're inferring one of the evaluations, even though we haven't made those changes yet.

I think we should generally use `ConstantArityBits` for proofs that we will recurse on, since using a single arity tends to be more recursion-friendly. We could use `MinSize` for generating final bridge proofs, since we won't do further recursion on top of those.

* Fix tests

* Feedback
2021-10-04 13:52:05 -07:00
..
2021-08-16 11:08:26 +02:00
2021-10-02 09:55:38 +02:00
2021-09-29 12:07:27 -07:00
2021-09-07 18:28:28 -07:00
2021-09-30 18:58:36 +02:00
2021-09-07 18:28:28 -07:00
2021-07-29 22:00:29 -07:00