63 Commits

Author SHA1 Message Date
wborgeaud
af0ea25fc8 more trials 2021-08-19 15:59:05 +02:00
wborgeaud
74c2be5090 First pass 2021-08-19 14:54:11 +02:00
Daniel Lubarov
aae2c9d16f Reduce PoW bits
The PoW search was taking significant time sometimes.
2021-08-17 23:55:16 -07:00
wborgeaud
561228103f More scalar muls 2021-08-17 10:26:31 +02:00
wborgeaud
896988ca30 Put back generator check 2021-08-17 09:12:40 +02:00
wborgeaud
9a54540116 Minor 2021-08-16 11:08:26 +02:00
wborgeaud
5a9c5b295c Minor 2021-08-16 10:41:12 +02:00
wborgeaud
3d83d9ff42 Minor 2021-08-16 10:28:08 +02:00
wborgeaud
b366482866 The mother of all arithmetic optimizations 2021-08-16 10:18:10 +02:00
wborgeaud
6ba6201b94 Merge branch 'main' into push_to_8192
# Conflicts:
#	src/fri/recursive_verifier.rs
#	src/plonk/circuit_data.rs
#	src/plonk/recursive_verifier.rs
#	src/util/reducing.rs
2021-08-16 08:49:49 +02:00
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
f3bfd66657
Add a BoolTarget (#179)
It's just a wrapper around `Target`, which signifies that the wrapped `Target` has already been range checked. Should make it easier to audit code that expects bools.
2021-08-14 08:53:39 -07:00
Daniel Lubarov
9c42fef997
Little refactor (#178) 2021-08-14 08:47:03 -07:00
wborgeaud
47e9f5461e
Merge pull request #175 from mir-protocol/some_more_arithm_opt
Some more arithmetic optimizations
2021-08-14 11:48:28 +02:00
Daniel Lubarov
08f0e0ff55 Remove unnecessary checks
They're out of date, and checked elsewhere
2021-08-13 19:36:21 -07:00
wborgeaud
630b7f2281 Smaller parameters 2021-08-13 22:42:22 +02:00
wborgeaud
ceae6b9588 Cleaning 2021-08-13 20:12:20 +02:00
wborgeaud
237ef4d0ec Change FRI params to get below 2^13 2021-08-13 18:24:46 +02:00
wborgeaud
d0aae8c2a7 clean 2021-08-13 16:39:26 +02:00
wborgeaud
611c1767b1 add reducing ext gate 2021-08-13 16:04:31 +02:00
wborgeaud
7da4412de5 working 2021-08-13 15:22:03 +02:00
wborgeaud
9547aa6382 minor 2021-08-13 14:30:48 +02:00
wborgeaud
75ad055f40 First try 2021-08-13 14:28:05 +02:00
wborgeaud
21669be246 Some arithm optims 2021-08-13 10:40:31 +02:00
wborgeaud
2bfa454476 PR feedback 2021-08-12 18:21:21 +02:00
wborgeaud
7271af823b Optimize evaluate_gate_constraints_recurively 2021-08-12 16:48:13 +02:00
wborgeaud
702eab1583 Add wide_arithmetic 2021-08-12 16:03:13 +02:00
wborgeaud
08e457458d Comments 2021-08-12 15:48:45 +02:00
wborgeaud
9061335996 Some more arithmetic optimizations 2021-08-12 15:46:18 +02:00
wborgeaud
debc0e9cb3
Merge pull request #170 from mir-protocol/merkle_cap
Replace Merkle roots with Merkle caps
2021-08-11 08:40:12 +02:00
Daniel Lubarov
090cf79787
Replace some old division code (#171)
- Delete unsafe methods
- Have related methods call the new div_add_extension method to simplify
2021-08-10 11:48:53 -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
ad8428f38f 12604 gates, 318637 bytes 2021-08-10 15:28:41 +02:00
wborgeaud
f2c423ee61 save 13 gates 2021-08-10 14:19:12 +02:00
wborgeaud
57f2b5b763 working 2021-08-10 13:52:50 +02:00
wborgeaud
ce71b536bf First pass 2021-08-10 13:33:44 +02:00
wborgeaud
4433fd8048 Merge branch 'main' into optimize_arithmetic_ops 2021-08-10 09:11:08 +02:00
wborgeaud
4118c88d70
Merge pull request #168 from mir-protocol/derive_quotient_degree_factor
Derive `quotient_degree_factor`
2021-08-09 19:40:04 +02:00
Daniel Lubarov
3eacd53b30
PolynomialBatchCommitment tweaks (#164)
Very minor things:
- A few renames
- Instead of having two constructors call a third constructor, just have one constructor call the other.
- Invoke FFT with the option that specifies the inputs are mostly zero, as a (minor) optimization
- Remove unused field
2021-08-09 10:11:35 -07:00
wborgeaud
4e86d9d7f4 Derive quotient_degree_factor 2021-08-09 19:08:52 +02:00
wborgeaud
21f90ca853 Fix some off-by-one errors in the degrees 2021-08-09 18:42:01 +02:00
wborgeaud
d27dd92af9 Some more optimization 2021-08-09 13:08:09 +02:00
wborgeaud
dd076e5c73 Auto resize partial witness 2021-08-09 09:58:09 +02:00
wborgeaud
4f4839dcbe Merge branch 'main' into partial_witness_vec 2021-08-09 09:23:17 +02:00
Daniel Lubarov
97c2b6b9a2
Bit of refactoring in FRI code (#162)
* Bit of refactoring in FRI code

- Inline `OpeningSet[Target]` and their `verify` methods, as they had become fairly trivial wrappers
- Have the challenger observe the openings and generate alpha inside `verify_fri_proof`. Conceptually I think of it as part of the batch-FRI protocol, and it minimizes redundancy.

* Fix tests
2021-08-08 09:14:07 -07:00
wborgeaud
213de80a3a Merge branch 'main' into partial_witness_vec
# Conflicts:
#	src/iop/challenger.rs
2021-08-06 18:17:31 +02:00
wborgeaud
e97b7b0737 PR feedback 2021-08-06 18:06:02 +02:00
wborgeaud
db236e4824 Fix tests 2021-08-06 15:14:38 +02:00
wborgeaud
7d11d0f8a1 Change PartialWitness to use Vecs 2021-08-06 14:58:39 +02:00