1127 Commits

Author SHA1 Message Date
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
Daniel Lubarov
3f22663296
Split up PartitionWitness data (#273)
* Split up `PartitionWitness` data

This addresses two minor inefficiencies:
- Some preprocessed forest data was being cloned during proving.
- Some of the `ForestNode` data (like node sizes) is only needed in preprocessing, not proving. It was taking up cache space during proving because it was interleaved with data that is used during proving (parents, values).

Now `Forest` contains the disjoint-set forest. `PartitionWitness` is now mainly a Vec of target values; it also holds a reference to the (preprocessed) representative map.

On my laptop, this speeds up witness generation ~12%, resulting in an overall ~0.5% speedup.

* Feedback

* No size data (#278)

* No size data

* feedback
2021-09-28 22:31:20 -07:00
Nicholas Ward
932cc812ab U32ArithmeticGate 2021-09-28 17:03:35 -07:00
Daniel Lubarov
3d39925973
Couple tweaks for Goldilocks (#274)
- impl `RichField`
- Fix missing imports (easy to miss since they're conditionally compiled)
- Have the benchmarks use Goldilocks
2021-09-28 10:03:19 -07:00
Daniel Lubarov
bd38ada0d1 Change case to get rid of warning 2021-09-27 22:39:42 -07:00
Hamish Ivey-Law
a0de564806
Implement Poseidon width 8 and 12 for Goldilocks field. (#268)
* Implement Poseidon width 8 and 12 for Goldilocks field.

* Comment on generating Poseidon implementations.

* Update Goldilocks 8 constants with corrected MDS matrix.

* Add Goldilocks test vectors and refactor tests.

* Add test vectors of all -1's.

* cargo fmt pedantry.
2021-09-28 10:51:03 +10:00
Daniel Lubarov
31b1a0a9da
Less use of ZK configs in tests (#272)
ZK circuit tests are quite slow, so I think we should use them very sparingly, and not in any tests with loops
2021-09-27 11:42:53 -07:00
Daniel Lubarov
76fcc4ee2c
Very explicit path compression (#271)
* Very explicit path compression

* fmt

* Remove `t` -- no longer needed

* Move comment

* Also remove index field
2021-09-27 10:00:44 -07:00
wborgeaud
1a508d0c19
Merge pull request #270 from mir-protocol/poseidon_8
Use `SPONGE_WIDTH` instead of hardcoded values in various places
2021-09-27 12:55:46 +02:00
wborgeaud
df9a211475 PR comments 2021-09-27 12:29:27 +02:00
Daniel Lubarov
541ad5d755 Minor 2021-09-26 16:37:35 -07:00
Daniel Lubarov
7bf257546e Minor 2021-09-26 16:28:09 -07:00
wborgeaud
747c9f894b Back to width 12 2021-09-26 20:09:26 +02:00
Daniel Lubarov
f382289896
Derive challenges from other proof fields (#262)
* Derive challenges from other proof fields

* Delete failing test

Seems really hard to get the challenges right with the new model.

* Move PoW check

* Other feedback
2021-09-25 19:41:48 -07:00
wborgeaud
1a55538e23 8->SPONGE_WIDTH in most places 2021-09-24 15:50:48 +02:00
wborgeaud
42a7ff9cc2 Working 2021-09-24 13:06:07 +02:00