1380 Commits

Author SHA1 Message Date
wborgeaud
0f90e4fbf2
Merge pull request #300 from mir-protocol/clean_get_challenges
Clean `get_challenges`
2021-10-13 18:37:29 +02:00
Jakub Nabaglo
5d099c5d45
x86 ASM tricks for scalar Goldilocks multiplication (#299)
* ASM tricks for scalar Goldilocks multiplication

* Minor style

* Provide generic versions of `add/sub_with_wraparound`

* Minor bugfix
2021-10-13 09:16:45 -07:00
wborgeaud
710959f077 Comments 2021-10-13 15:45:43 +02:00
wborgeaud
7f6d90ee42 Clean get_challenges 2021-10-13 15:39:12 +02:00
wborgeaud
164aa0947e Use cap_height: 0 in size-optimized proof 2021-10-12 21:36:20 +02:00
wborgeaud
d43850e580
Merge pull request #298 from mir-protocol/remove_inferred_elmt
Remove inferred element in compressed proof
2021-10-12 20:22:05 +02:00
wborgeaud
839110b794 coset_index in other places 2021-10-12 20:21:29 +02:00
wborgeaud
1ced853f33 Add coset_index var 2021-10-12 08:40:56 +02:00
wborgeaud
cdb2892969 Move inferred elements to a new struct 2021-10-12 08:38:43 +02:00
Hamish Ivey-Law
ad30f4aca6
WIP: Remove old benchmarks (#297)
* Remove old benchmarkmarking binaries now that we use Criterion.

* Benchmark CrandallField alongside Goldilocks.
2021-10-12 09:46:38 +11:00
wborgeaud
62f3b558ad Typos 2021-10-11 18:45:55 +02:00
wborgeaud
288a8e1155 Minor comments 2021-10-11 18:44:17 +02:00
wborgeaud
ddac8026f2 Comments 2021-10-11 17:24:06 +02:00
wborgeaud
acadd64371 Clippy 2021-10-11 16:51:30 +02:00
wborgeaud
ea69a87338 Working 2021-10-11 16:40:31 +02:00
Hamish Ivey-Law
41b26e1f56
Precompute the Dth root of unity. (#296) 2021-10-10 20:42:10 +11:00
Hamish Ivey-Law
8f59381c87
Faster modular inverse (#292)
* Working "faster" inverse algo, using u128s.

* Faster inverse_2exp for large exp.

* More inverse tests.

* Make f, g u64.

* Comments.

* Unroll first two iterations.

* Fix bug and re-unroll first two iterations.

* Simplify loop.

* Refactoring and documentation.

* Clean up testing.

* Move inverse code to inversion.rs; use in GoldilocksField.

* Bench quartic Goldilocks extension too.

* cargo fmt

* Add more documentation.

* Address Jakub's comments.
2021-10-10 10:39:02 +11:00
Daniel Lubarov
dc600d5abf
Hash benchmarks (#295) 2021-10-09 14:07:49 -07:00
Jakub Nabaglo
c55181a4ea
Fix logging in tests (#293)
* Fix logging in tests

* lint
2021-10-08 17:07:03 -07:00
wborgeaud
011429da01
Merge pull request #291 from mir-protocol/fix_path_compression
Fix path compression
2021-10-08 08:25:41 +02:00
wborgeaud
bc95563f43 PR feedback 2021-10-08 08:15:55 +02:00
wborgeaud
64d386051b More cleaning 2021-10-07 22:41:30 +02:00
wborgeaud
e531eda576 Cleaning 2021-10-07 22:32:58 +02:00
wborgeaud
64ad8783eb Fix path compression 2021-10-07 22:19:26 +02:00
wborgeaud
d2a5e67980 Somewhat working 2021-10-07 19:30:39 +02:00
wborgeaud
145ee8cb18
Merge pull request #290 from mir-protocol/trivial_random_access
Add check for trivial random access
2021-10-07 08:37:42 +02:00
Nicholas Ward
7f18b21ace minor fix 2021-10-06 12:35:37 -07:00
Nicholas Ward
0f82f41b64
Merge pull request #289 from mir-protocol/secp256k1
Secp256K1Base field
2021-10-06 11:44:17 -07:00
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
wborgeaud
9b098a9fbe Trivial random access 2021-10-06 16:37:27 +02:00
wborgeaud
ea3e31504a First pass 2021-10-06 15:50:56 +02:00
Daniel Lubarov
5098c2a386
Have ArithmeticExtensionGate adapt based on available wires (#287) 2021-10-05 23:28:29 -07:00
Daniel Lubarov
b922def48e
Better errors for insufficient (routed) wires for FRI (#288)
For examlpe, if I change a test to use `ConstantArityBits(4, 5)`, I get

    To efficiently perform FRI checks with an arity of 16, at least 152 wires are needed. Consider reducing arity.
2021-10-05 23:28:04 -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
a407e5e1a0 Fix 2021-10-05 16:33:08 -07:00
Daniel Lubarov
2148085725
Give MinSize a max arity option (#284)
* Give MinSize a max arity option

* Add Fixed option

* Fix
2021-10-05 16:18:00 -07:00
wborgeaud
a0c12266f6
Merge pull request #286 from mir-protocol/fix_buggy_split_le
Small overflow-related fixes
2021-10-05 17:51:16 +02:00
wborgeaud
242ee26b6f Generalize to fields with less than 64 bits 2021-10-05 17:50:38 +02:00
Daniel Lubarov
cb129fb095
Refactor recursion tests (#285)
* Refactor recursion tests

E.g. the main part of `test_recursive_recursive_verifier` is now

```rust
let (proof, vd, cd) = dummy_proof::<F, D>(&config, 8_000)?;
let (proof, vd, cd) = recursive_proof(proof, vd, cd, &config, &config, false)?;
let (proof, _vd, cd) = recursive_proof(proof, vd, cd, &config, &config, true)?;
```

Also adds a new `test_size_optimized_recursion` to see how small we can make the final proof in a recursion chain. The final proof is ~74kb (depending on compression luck) and takes ~20s to prove on my M1 (depending on PoW luck).

* Refactor serialization

* Don't log timestamps
2021-10-05 08:36:24 -07:00