1142 Commits

Author SHA1 Message Date
Nicholas Ward
88b528e3fe fix 2021-10-06 11:44:02 -07:00
Nicholas Ward
d2c589e281 addressed comments 2021-10-06 11:42:34 -07:00
Nicholas Ward
695a56c4ca addressed comments 2021-10-06 11:34:50 -07:00
Nicholas Ward
b5fea8d1bb addressed comments 2021-10-06 11:24:24 -07:00
Nicholas Ward
e8805a126a fix 2021-10-06 11:22:21 -07:00
Nicholas Ward
097059e026 switch to u64 array 2021-10-06 11:20:11 -07:00
Nicholas Ward
c625aae87b cleanup and removed tests for now 2021-10-06 11:09:51 -07:00
Nicholas Ward
f79419cca3 add check to primitive_root_order field arithmetic test 2021-10-06 09:50:02 -07:00
Nicholas Ward
69678f53fc removed prime field tests 2021-10-05 22:02:57 -07:00
Nicholas Ward
5e0d2744d7 fixes 2021-10-05 22:01:18 -07:00
Nicholas Ward
a4c89201f3 fmt 2021-10-05 21:32:23 -07:00
Nicholas Ward
1262c6afd0 fixes 2021-10-05 21:32:18 -07:00
Nicholas Ward
351b92f31f progress towards Secp256K1Base field 2021-10-05 18:02:08 -07:00
Daniel Lubarov
73f9a0be6b
Allow zero FRI reductions (#283)
In this case we're basically sending the witness. As @wborgeaud mentioned it might make sense for small circuits.
2021-10-04 14:11:53 -07:00
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
wborgeaud
d9634e075e
Merge pull request #279 from mir-protocol/duplicate_indices
Remove duplicate query indices in FRI proofs
2021-10-04 10:40:18 +02:00
wborgeaud
a0554cbb2c
Merge pull request #280 from mir-protocol/custom_serializer
Custom serializer for proofs
2021-10-04 10:32:08 +02:00
wborgeaud
84d1a1586f Merge branch 'duplicate_indices' into custom_serializer 2021-10-04 10:21:53 +02:00
wborgeaud
bce3256c96 PR feedback 2021-10-04 10:21:35 +02:00
wborgeaud
b4614991f7 Useless mut 2021-10-04 10:09:17 +02:00
wborgeaud
bbeb54c910 Remove pruning 2021-10-04 10:03:00 +02:00
Daniel Lubarov
9d8b32c355 fmt 2021-10-03 22:59:10 -07:00
Daniel Lubarov
734a5cef27 Snake case warning 2021-10-03 22:25:07 -07:00
Daniel Lubarov
01c2047a66 Outdated TODO 2021-10-03 22:22:30 -07:00
Daniel Lubarov
dadc1b2add cargo fix 2021-10-03 22:22:10 -07:00
wborgeaud
fbefaa4768 Unused import 2021-10-02 14:01:08 +02:00
wborgeaud
e3b2416025 Merge branch 'duplicate_indices' into custom_serializer 2021-10-02 13:56:46 +02:00
wborgeaud
3859ca2090 PR comments 2021-10-02 10:46:02 +02:00
wborgeaud
0839ed8793 Unused import 2021-10-02 09:55:38 +02:00
wborgeaud
76d3f488bd Fixes 2021-10-02 09:53:31 +02:00
wborgeaud
17ed6a2b04 Clippy 2021-10-01 17:12:46 +02:00
wborgeaud
c276596092 Remove useless test 2021-10-01 17:05:55 +02:00
wborgeaud
5dcb85e085 Minor 2021-10-01 16:58:55 +02:00
wborgeaud
fb585064a9 (De)Serializer for CompressedProof 2021-10-01 16:54:14 +02:00
wborgeaud
8f212d31ef Working custom (de)serializer 2021-10-01 14:59:16 +02:00
Nicholas Ward
04aaa172b2
Merge pull request #275 from mir-protocol/arithmetic_u32
U32ArithmeticGate
2021-09-30 14:44:24 -07:00
Nicholas Ward
094f29a1a7 set 0 limb targets 2021-09-30 14:37:23 -07:00
Nicholas Ward
1af224d895 Horner's method 2021-09-30 10:17:51 -07:00
Nicholas Ward
ffd069c6ce fmt 2021-09-30 10:13:33 -07:00
Nicholas Ward
6e21528ad0 constraints test, and fixes 2021-09-30 10:13:28 -07:00
wborgeaud
28eca4bfdd Clippy 2021-09-30 19:09:27 +02:00
wborgeaud
dd68971609 Cleaning 2021-09-30 18:58:36 +02:00
wborgeaud
94375cdf68 Minor 2021-09-30 08:02:01 +02:00
wborgeaud
f92ce1a80c Add CompressedProof type 2021-09-30 06:56:32 +02:00
Nicholas Ward
3d207464f5 combine halves separately 2021-09-29 20:04:42 -07:00
Nicholas Ward
862eee8e70 fix 2021-09-29 16:33:34 -07:00
Nicholas Ward
455bc4d553 only 3 copies :( 2021-09-29 15:35:36 -07:00
Nicholas Ward
0811279fb7 range check outputs, and addressed comments 2021-09-29 14:45:14 -07:00
Daniel Lubarov
ac97412667 Renaming 2021-09-29 12:07:27 -07:00
wborgeaud
a97b9a7112 Add compressed FRI proof type using a HashMap 2021-09-29 21:01:15 +02:00