534 Commits

Author SHA1 Message Date
wborgeaud
1915ef9b27 Minor improvements 2021-07-02 10:58:59 +02:00
wborgeaud
d456efbc3f Minor addition to partial product test 2021-07-02 10:20:44 +02:00
wborgeaud
525db6c461 Merge branch 'main' into fix_z_check
# Conflicts:
#	src/circuit_builder.rs
2021-07-02 10:15:23 +02:00
wborgeaud
a3f473a073 Comments and minor refactor in eval_vanish* 2021-07-02 10:12:13 +02:00
wborgeaud
90bdb5796c Fix product bug 2021-07-02 09:55:28 +02:00
Nicholas Ward
50ffb1c48f Merge branch 'insertion_gate' of github.com:mir-protocol/plonky2 into insertion_gate 2021-07-01 18:00:56 -07:00
Nicholas Ward
dcde599377
Merge pull request #85 from mir-protocol/efficient_insert
Efficient insert
2021-07-01 17:43:44 -07:00
Nicholas Ward
3d53201538 save a gate with arithmetic 2021-07-01 17:43:22 -07:00
Nicholas Ward
6751f920c8 Merge branch 'main' into insertion_gate 2021-07-01 13:12:45 -07:00
Nicholas Ward
bdb6cfe927 skeleton 2021-07-01 13:11:34 -07:00
wborgeaud
ba06dc8897 Make changes in eval_vanish_poly 2021-07-01 21:21:28 +02:00
Nicholas Ward
39b22a6cab addressed nits 2021-07-01 12:00:56 -07:00
Nicholas Ward
efe39f2d63 fixed naming (zero --> nonzero), and other fixes 2021-07-01 11:21:33 -07:00
Daniel Lubarov
519533d4b7
Benchmark tweaks (#83)
- Configure FRI with a list of arities that's more appropriate for a 2^14 instance. The previous config resulted in a huge final polynomial.
- Log the blinding factors, and other logging tweaks.
2021-07-01 10:53:42 -07:00
Nicholas Ward
d84b9ec8cb is_zero function 2021-07-01 10:47:13 -07:00
Nicholas Ward
515373653d fix 2021-07-01 10:38:11 -07:00
Nicholas Ward
702a098054 cargo fmt 2021-07-01 10:36:31 -07:00
Nicholas Ward
8f33f8e2be Merge branch 'main' into efficient_insert 2021-07-01 10:36:22 -07:00
Nicholas Ward
f4ca0df85d comments and renaming 2021-07-01 10:35:41 -07:00
wborgeaud
b86e60a397 Open the partial products polynomials only at zeta 2021-07-01 18:24:49 +02:00
wborgeaud
cc3c278a92 Some renaming 2021-07-01 17:34:00 +02:00
wborgeaud
20e6d6540f Add comments 2021-07-01 17:28:30 +02:00
Daniel Lubarov
95a875e28d
Allow virtual targets to be routed (#84)
As in plonky1. The semantics of virtual targets in plonky1 were rather weird, but I think it's somewhat better here, since we already separate `generate_copy` and `assert_equal` methods. Users now make more of an explicit choice -- they can use a `VirtualTarget` for the witness generation only using `generate_copy`, or they can involve it in copy constraints.
2021-07-01 08:12:12 -07:00
wborgeaud
1858a869a7 Optimize products of 1 element 2021-07-01 15:57:55 +02:00
wborgeaud
59410447bf Add lengths to CommonData 2021-07-01 15:41:01 +02:00
wborgeaud
c83382aaaa Working partial products 2021-07-01 15:20:16 +02:00
Nicholas Ward
8de59c2a84 cargo fmt 2021-06-30 21:59:18 -07:00
Nicholas Ward
3959cec180 mutable borrow fix 2021-06-30 21:59:10 -07:00
Nicholas Ward
9bacaa8860 Merge branch 'main' into efficient_insert 2021-06-30 21:58:31 -07:00
Hamish Ivey-Law
574a3d4847
FFT improvements (#81)
* Use built-in `reverse_bits`; remove duplicate `reverse_index_bits`.

* Reduce precomputation time/space complexity from quadratic to linear.

* Several working cache-friendly FFTs.

* Fix to allow FFT of constant polynomial.

* Simplify FFT strategy choice.

* Add PrimeField and CHARACTERISTIC properties to Fields.

* Add faster method for inverse of 2^m.

* Pre-compute some of the roots; tidy up loop iteration.

* Precomputation for both FFT variants.

* Refactor precomputation; add optional parameters; rename some things.

* Unrolled version with zero tail.

* Iterative version of Unrolled precomputation.

* Test zero tail algo.

* Restore default degree.

* Address comments from @dlubarov and @wborgeaud.
2021-07-01 14:55:41 +10:00
Nicholas Ward
cad7dc6904 some progress 2021-06-30 21:31:17 -07:00
Nicholas Ward
80758da0f4 removed duplicate functions 2021-06-30 16:58:13 -07:00
Nicholas Ward
77d942f0e9 cleanup 2021-06-30 16:58:06 -07:00
Nicholas Ward
647568fc7a added EqualityGenerator 2021-06-30 16:57:37 -07:00
Nicholas Ward
6cc06b408f small change 2021-06-30 16:34:19 -07:00
Nicholas Ward
0c9d675ecc fixes 2021-06-30 16:34:17 -07:00
Nicholas Ward
af9a2c055c some fixes 2021-06-30 16:33:50 -07:00
Nicholas Ward
6c598ddcfd very initial attempt 2021-06-30 16:33:50 -07:00
Nicholas Ward
6ec99d0b58
Merge pull request #82 from mir-protocol/blinding_related_fixes
Couple fixes related to blinding
2021-06-30 13:12:32 -07:00
Daniel Lubarov
03179e5674 Couple fixes related to blinding
- `self.gates` -> `self.gate_instances`
- Some tests were using a single binary FRI reduction, which doesn't provide enough succinctness for our blinding scheme to work. This caused `blinding_counts` to continue until it overflowed.
2021-06-30 12:54:45 -07:00
wborgeaud
f7c4a463fc Progress 2021-06-30 18:54:28 +02:00
wborgeaud
b8e764bb90 Allow for degree^2 < num_routed_wires 2021-06-30 16:48:41 +02:00
wborgeaud
a0298a61f4 Added partial products 2021-06-30 15:05:40 +02:00
wborgeaud
69fff573fe
Merge pull request #76 from mir-protocol/add_routed_wires
Increase number of routed wires to 28 and add a new `ArithmeticExtensionGate`
2021-06-30 08:32:25 +02:00
wborgeaud
a017e79f65 Merge branch 'main' into add_routed_wires
# Conflicts:
#	src/gadgets/arithmetic.rs
2021-06-30 08:30:10 +02:00
wborgeaud
b7f0352cd8 Update comment on reduce 2021-06-30 08:25:36 +02:00
Nicholas Ward
46ff079674
Merge pull request #80 from mir-protocol/blinding_factors
Blinding factors
2021-06-29 23:20:07 -07:00
wborgeaud
e44c4ff679
Merge pull request #79 from mir-protocol/lower_max_constraint_degree
Optimize max constraint degree when searching for gate trees
2021-06-30 08:16:45 +02:00
wborgeaud
eee3026eee Move shorten in find_tree 2021-06-30 08:15:56 +02:00
Daniel Lubarov
f1e3474fcb
Simple reduce (#78)
* Simple reduce

* Fix bug causing test failure
2021-06-29 12:33:11 -07:00