406 Commits

Author SHA1 Message Date
Nicholas Ward
5aa5cc9c65 ignore huge tests 2021-12-01 09:28:00 -08:00
Nicholas Ward
406092f358 clippy fixes 2021-11-30 15:56:12 -08:00
Nicholas Ward
f1dc1d4446 fix 2021-11-30 15:31:06 -08:00
Nicholas Ward
b9868ec782 multiplication using projective 2021-11-30 15:31:06 -08:00
Nicholas Ward
39300bcf01 fixed Secp256K1Scalar 2021-11-30 15:31:06 -08:00
Nicholas Ward
b1bbe30dac Fixed tests -- thanks William! 2021-11-30 15:31:06 -08:00
Nicholas Ward
5029f87b80 fixes 2021-11-30 15:31:06 -08:00
Nicholas Ward
a6ddc2ed5d curve_mul testing 2021-11-30 15:31:06 -08:00
Nicholas Ward
2ec3ea8634 new curve_mul 2021-11-30 15:31:06 -08:00
Nicholas Ward
284f9a412c curve multiply; test for curve add; addressed comments 2021-11-30 15:31:06 -08:00
Nicholas Ward
70abf3e9cb addressed comments 2021-11-30 15:31:06 -08:00
Nicholas Ward
7da99ad4d4 test fixes 2021-11-30 15:31:06 -08:00
Nicholas Ward
f6954704d9 fix 2021-11-30 15:31:06 -08:00
Nicholas Ward
c7fda246ca fixes 2021-11-30 15:31:06 -08:00
Nicholas Ward
e4b894cb12 merge 2021-11-30 15:31:06 -08:00
Nicholas Ward
d6630869e1 msm (outside circuit) 2021-11-30 15:31:06 -08:00
Nicholas Ward
051b79db2c curve_add_two_affine 2021-11-30 15:31:06 -08:00
Nicholas Ward
dfad7708af merge 2021-11-30 15:31:06 -08:00
Nicholas Ward
a4b7772c34 resolve 2021-11-30 15:31:06 -08:00
Nicholas Ward
4d4605af1f merge 2021-11-30 15:31:06 -08:00
Nicholas Ward
fa480854fe updates 2021-11-30 15:31:06 -08:00
Nicholas Ward
86573fc65c resolve 2021-11-30 15:31:06 -08:00
Nicholas Ward
0e6c5bb80c curve gadget changes 2021-11-30 15:31:06 -08:00
Nicholas Ward
0e1f0c5562 merge 2021-11-30 15:31:06 -08:00
Nicholas Ward
2c2d36a6be merge 2021-11-30 15:31:06 -08:00
Nicholas Ward
f9c9cc83f4 fix: run all U32SubtractionGate generators 2021-11-30 15:31:06 -08:00
Nicholas Ward
f29b591d49 merge 2021-11-30 15:31:06 -08:00
wborgeaud
2c06309cf7 Fix all clippy lints 2021-11-30 17:12:13 +01:00
wborgeaud
e26eb5f4ab Merge branch 'main' into arity4
# Conflicts:
#	src/gates/mod.rs
2021-11-22 22:32:37 +01:00
wborgeaud
15b41ea8fb PR feedback 2021-11-22 22:13:24 +01:00
wborgeaud
172fdd3d89 Comments 2021-11-22 21:20:44 +01:00
wborgeaud
b7cb7e234f Minor 2021-11-22 17:06:40 +01:00
wborgeaud
6aaea002ed Choose between high- and low-degree interpolation gate depending on the arity 2021-11-22 16:10:14 +01:00
wborgeaud
aec88a8528 First try 2021-11-19 18:11:14 +01:00
wborgeaud
22f4c18083 Comments 2021-11-19 11:48:42 +01:00
wborgeaud
4f11713c49 Remove useless test 2021-11-19 11:29:51 +01:00
wborgeaud
90a6ffd775 Use fold1 in mul_many 2021-11-19 11:24:43 +01:00
wborgeaud
939acfed96 Fix mul_many 2021-11-19 11:14:03 +01:00
wborgeaud
0de408c40f MulExtensionGate 2021-11-19 09:31:06 +01:00
Daniel Lubarov
9b55ff9e81
edition = 2021 (#370)
* edition = 2021

Doesn't affect anything for us as far as I've noticed.

* imports
2021-11-17 14:43:54 -08:00
Daniel Lubarov
eb27a2d2b2 warnings 2021-11-16 22:52:01 -08:00
Daniel Lubarov
eb5a60bef1
Allow one BaseSumGate to handle 64 bits (#365) 2021-11-16 09:29:14 -08:00
Daniel Lubarov
1e66cb9aee
Route in constants from a ConstantGate (#367)
Rather than creating arithmetic gates with potentially unique constants.

Should be strictly cheaper, though it only seems to save one gate in practice.
2021-11-16 09:28:58 -08:00
Hamish Ivey-Law
909a5c2392
Fix all lint warnings (#353)
* Suppress warnings about use of unstable compiler features.

* Remove unused functions.

* Refactor and remove PolynomialCoeffs::new_padded(); fix degree_padded.

Note that this fixes a minor mistake in the FFT testing code, where
`degree_padded` value was log2 of what it should have been, preventing
a testing loop from executing.

* Remove divide_by_z_h() and related test functions.

* Only compile check_{consistency,test_vectors} when testing.

* Move verify() to test module.

* Remove unused functions.

NB: Changed the config in the gadgets/arithmetic_extension.rs::tests
module which may change the test's meaning?

* Remove unused import.

* Mark GMiMC option as allowed 'dead code'.

* Fix missing feature.

* Remove unused functions.

* cargo fmt

* Mark variable as unused.

* Revert "Remove unused functions."

This reverts commit 99d2357f1c967fd9fd6cac63e1216d929888be72.

* Make config functions public.

* Mark 'reduce_nonnative()' as dead code for now.

* Revert "Move verify() to test module." Refactor to `verify_compressed`.

This reverts commit b426e810d033c642f54e25ebc4a8114491df5076.

* cargo fmt

* Reinstate `verify()` fn on `CompressedProofWithPublicInputs`.
2021-11-16 21:18:27 +11:00
Daniel Lubarov
8ea6c4d392
Different implementation of RandomAccessGate (#360)
The previous code used an equality test for each index. This variant uses a "MUX tree" instead. If we imagine the items as being the leaves of a binary tree, we can compute the `i`th item by splitting `i` into bits, then performing a "select" operation for each node. The bit used in each select is based on the height of the associated node.

This uses fewer wires and is cheaper to evaluate, saving 31 wires in the recursion circuit.

A potential disadvantage is that this uses higher-degree constraints (degree 4 with our params), but I don't think this is much of a concern for us since we use a degree-9 constraint system.
2021-11-15 10:15:55 -08:00
Daniel Lubarov
efab3177ce
Have le_sum use arithmetic ops if it's cheaper (#362)
* Have le_sum use arithmetic ops if it's cheaper

* fmt
2021-11-15 09:55:06 -08:00
Nicholas Ward
4a5123de81 reduced test sizes 2021-11-12 12:12:58 -08:00
Daniel Lubarov
857b74bac5
Bring back the base field arithmetic gate (#343)
* Bring back the base field arithmetic gate

* fix
2021-11-12 09:48:27 -08:00
Nicholas Ward
f2ec2cadf4 new fmt 2021-11-10 12:14:23 -08:00
Nicholas Ward
dd945ef5b7 addressed comments 2021-11-10 11:19:06 -08:00