Nicholas Ward
6d22ad6ee0
initial version of exponentiation gate
2021-07-23 15:08:54 -07:00
Nicholas Ward
907f1e9147
Merge pull request #124 from mir-protocol/order_bigint
...
Field order as BigUint
2021-07-22 14:50:14 -07:00
Nicholas Ward
0af5c3bdb8
addressed nit
2021-07-22 14:49:24 -07:00
Nicholas Ward
9c287aac79
fixed nits
2021-07-22 14:12:49 -07:00
Nicholas Ward
3612b9f05e
Merge branch 'main' into order_bigint
2021-07-22 13:28:48 -07:00
Nicholas Ward
ff055b6466
cargo fmt
2021-07-22 13:27:40 -07:00
Nicholas Ward
3425bd0078
replaced some clones with refs
2021-07-22 13:26:38 -07:00
Nicholas Ward
57da32fb82
fixes to use references
2021-07-22 13:16:12 -07:00
Nicholas Ward
ffc90e902b
exp_biguint test
2021-07-22 13:08:14 -07:00
Nicholas Ward
b6e74b8244
cargo fmt
2021-07-22 10:57:08 -07:00
Nicholas Ward
5d30124101
moved specific tests to prime_field_arithmetic
2021-07-22 10:56:20 -07:00
Daniel Lubarov
6bd197e9cf
Observe public inputs ( #119 )
...
* Observe public inputs
* Observe the hash instead
2021-07-22 10:27:10 -07:00
wborgeaud
1d5cd4430e
Merge pull request #118 from mir-protocol/avoid_rotating
...
Avoid rotating in `compute_evaluation`
2021-07-22 11:23:45 +02:00
wborgeaud
be2e870aee
PR feedback
2021-07-22 06:50:07 +02:00
Daniel Lubarov
01461ce388
Update a TODO
2021-07-21 21:25:52 -07:00
Nicholas Ward
1322b8d0d2
fixes
2021-07-21 14:59:14 -07:00
Nicholas Ward
59efe6a8fe
added test_arithmetic for extension fields
2021-07-21 14:39:39 -07:00
Nicholas Ward
292a28e6e3
fixed tests
2021-07-21 14:34:01 -07:00
Nicholas Ward
b17dabefeb
more fixes
2021-07-21 14:27:30 -07:00
Nicholas Ward
3e00a5819f
fix: endian-ness
2021-07-21 14:12:33 -07:00
Nicholas Ward
ff56486189
compiles
2021-07-21 13:28:11 -07:00
Nicholas Ward
164bb7f5ca
fixes
2021-07-21 13:23:50 -07:00
Nicholas Ward
7f92a33964
cargo fmt
2021-07-21 13:05:40 -07:00
Nicholas Ward
1dd850b0e5
fixes
2021-07-21 13:05:32 -07:00
wborgeaud
db0121d74a
Update comment
2021-07-21 20:38:23 +02:00
wborgeaud
6fff9363c6
Use mul_many
2021-07-21 20:06:29 +02:00
wborgeaud
a54a4e5830
Merge branch 'main' into avoid_rotating
2021-07-21 20:02:22 +02:00
wborgeaud
7c1c082a39
Comments
2021-07-21 19:53:32 +02:00
wborgeaud
2f46ddc4e5
Merge pull request #117 from mir-protocol/optimize_mul_many
...
Remove fixed multiplicand in `ArithmeticExtensionGate`
2021-07-21 19:24:07 +02:00
wborgeaud
6cc871d30c
PR feedback
2021-07-21 19:23:26 +02:00
Nicholas Ward
c5bbe9d503
fixes
2021-07-21 09:56:00 -07:00
Nicholas Ward
5062029d3f
fixes
2021-07-21 09:32:18 -07:00
wborgeaud
59494ff8d1
Merge branch 'main' into optimize_mul_many
...
# Conflicts:
# src/gates/arithmetic.rs
2021-07-21 17:47:38 +02:00
wborgeaud
6e305f0a3e
Change {add|mul}_many and cube
2021-07-21 17:41:22 +02:00
wborgeaud
d870a36dee
{add|mul}_three_extension
2021-07-21 17:29:05 +02:00
Daniel Lubarov
80b696a3a2
Avoid a clone ( #114 )
2021-07-21 08:26:56 -07:00
Daniel Lubarov
7d8bac7169
Change FFT methods to accept references ( #115 )
2021-07-21 08:26:41 -07:00
Daniel Lubarov
eb18c7ea33
Faster witness generation ( #116 )
...
Saves ~300ms in the test. The main change is to have generators return fixed-size `Vec`s instead of `HashMap`s, which have more overhead.
2021-07-21 08:26:34 -07:00
Daniel Lubarov
b8ce1d1967
Public inputs ( #113 )
...
With this approach, we don't need `Target::PublicInput`; any routable `Target` can be marked as a public input via `register_public_input`. The circuit itself hashes these targets, and routes the hash output to the first four wires of a `PublicInputGate`, which is placed at an arbitrary location in the circuit.
All gates have direct access to the purported hash of public inputs. We could think of them as accessing `PI_hash_i(x)` (as in Plonk), but these are now (four) constant functions, so they effectively have direct access to the hash itself.
`PublicInputGate` checks that its first four wires match this purported public input hash. The other gates ignore the hash.
Resolves #64 .
2021-07-21 08:26:19 -07:00
wborgeaud
b59d497964
Modify ArithmeticExtensionGate to support 32 wires
2021-07-21 17:20:08 +02:00
wborgeaud
8642a10fde
Start of optimization
2021-07-21 15:58:15 +02:00
Nicholas Ward
906a0c00f4
Merge branch 'main' into order_bigint
2021-07-20 15:42:51 -07:00
Nicholas Ward
b103c0774f
progress
2021-07-20 15:42:27 -07:00
Daniel Lubarov
48f5c9347f
route -> assert ( #112 )
...
Doesn't really matter except that failure messages might be different if the copy-generator runs first.
2021-07-20 13:04:34 -07:00
Daniel Lubarov
ac1872a8c8
FRI tweaks ( #111 )
...
- Call `exp_power_of_2` instead of manual squaring
- Replace `evaluations[i]` with `evals`
2021-07-20 12:49:02 -07:00
Daniel Lubarov
dff950c502
No Copy on ReducingFactor ( #110 )
...
It feels a little dangerous; would be easy to "fork" one accidentally. We already clone explicitly, this just enforces that in the future.
2021-07-20 09:27:35 -07:00
Daniel Lubarov
0a59c738ea
Add a context for each gate evaluation ( #108 )
...
To give logs like
[2021-07-20T15:29:29Z DEBUG plonky2::context_tree] | 2373 gates to evaluate the vanishing polynomial at our challenge point, zeta.
[2021-07-20T15:29:29Z DEBUG plonky2::context_tree] | | 1284 gates to evaluate gate constraints
[2021-07-20T15:29:29Z DEBUG plonky2::context_tree] | | | 79 gates to evaluate ArithmeticExtensionGate constraints
[2021-07-20T15:29:29Z DEBUG plonky2::context_tree] | | | 1073 gates to evaluate <R=101> GMiMCGate {...} constraints
[2021-07-20T15:29:29Z DEBUG plonky2::context_tree] | | | 4 gates to evaluate NoopGate constraints
[2021-07-20T15:29:29Z DEBUG plonky2::context_tree] | | | 4 gates to evaluate ConstantGate constraints
2021-07-20 09:27:18 -07:00
wborgeaud
8a6d0fe06c
Merge pull request #107 from mir-protocol/precomputed_reduced_evals
...
Precompute reduced evaluations
2021-07-20 18:26:45 +02:00
wborgeaud
925c0bcb5c
Replace rotation with exp in compute_evaluation
2021-07-20 15:25:03 +02:00
wborgeaud
0d233505d7
Merge branch 'main' into precomputed_reduced_evals
...
# Conflicts:
# src/fri/recursive_verifier.rs
2021-07-20 11:08:53 +02:00