1321 Commits

Author SHA1 Message Date
Dmitry Vagner
37ad340774 frob format 2023-01-18 12:56:30 +07:00
Dmitry Vagner
ecde3d13b1 frob tests 2023-01-18 11:10:26 +07:00
Dmitry Vagner
9cd1f8a1b2 Merge branch 'main' of github.com:mir-protocol/plonky2 into non-inv 2023-01-18 00:41:18 +07:00
Dmitry Vagner
be19cb81e3 struct impl style arithmetic 2023-01-17 23:58:36 +07:00
Dmitry Vagner
31c5db91a5 rename module 2023-01-17 16:11:15 +07:00
Dmitry Vagner
ccd4a38ab4 remove make_stack 2023-01-17 15:57:46 +07:00
Daniel Lubarov
b6f6c21018 Block circuit 2023-01-15 00:06:08 -08:00
Daniel Lubarov
3a6d693f3f
Merge pull request #863 from mir-protocol/smart_contract_test
Basic smart contract test
2023-01-14 21:42:20 -08:00
Daniel Lubarov
a2f4a58d9a log 2023-01-14 21:21:47 -08:00
Daniel Lubarov
df2ba7a384 Basic smart contract test 2023-01-14 21:18:58 -08:00
wborgeaud
a158effe4d Use error instead of panicking in FromStr 2023-01-13 15:26:53 +01:00
Dmitry Vagner
3fbc8bff3e move comment 2023-01-13 09:09:27 +04:00
Dmitry Vagner
ea8cfc95b0 name 2023-01-13 09:06:51 +04:00
Dmitry Vagner
2a2880b7ea name 2023-01-13 09:06:23 +04:00
Dmitry Vagner
800ceb6000 zero name 2023-01-13 09:02:39 +04:00
Dmitry Vagner
e6bcad6c65 Merge branch 'non-inv' of github.com:mir-protocol/plonky2 into non-inv 2023-01-13 08:58:31 +04:00
Dmitry Vagner
446a0d3f56 name 2023-01-13 08:58:17 +04:00
Dima V
81861095d3
Update evm/src/cpu/kernel/asm/curve/bn254/field_arithmetic/inverse.asm
Co-authored-by: Jacqueline Nabaglo <jakub@mirprotocol.org>
2023-01-12 20:57:54 -08:00
Dmitry Vagner
4f38c3a731 name 2023-01-13 08:48:51 +04:00
Dmitry Vagner
70d7fb1352 cleaner inv 2023-01-13 08:47:15 +04:00
Dima V
32f24819dd
Update evm/src/cpu/kernel/asm/curve/bn254/curve_arithmetic/curve_add.asm
Co-authored-by: Jacqueline Nabaglo <jakub@mirprotocol.org>
2023-01-12 20:36:47 -08:00
Dmitry Vagner
49db35d35e Merge branch 'non-inv' of github.com:mir-protocol/plonky2 into non-inv 2023-01-11 18:20:55 +04:00
Dima V
42f98a09ae
Update evm/src/bn254.rs
Co-authored-by: Jacqueline Nabaglo <jakub@mirprotocol.org>
2023-01-11 05:58:26 -08:00
Dmitry Vagner
82ce8153cc \n 2023-01-11 17:54:43 +04:00
Dmitry Vagner
93a363c100 Merge branch 'main' of github.com:mir-protocol/plonky2 into non-inv 2023-01-11 17:54:22 +04:00
Dima V
068f74854a
Update evm/src/witness/util.rs
Co-authored-by: Jacqueline Nabaglo <jakub@mirprotocol.org>
2023-01-11 05:45:08 -08:00
Dima V
698ab6e749
Update evm/src/bn254.rs
Co-authored-by: Jacqueline Nabaglo <jakub@mirprotocol.org>
2023-01-11 05:43:56 -08:00
Daniel Lubarov
be7a489c6e Fix stack overflow 2023-01-10 21:03:46 -08:00
Daniel Lubarov
8ba8bb62f2
Merge pull request #860 from mir-protocol/agg_circuit_2
Add aggregation circuit
2023-01-04 14:57:56 -08:00
Daniel Lubarov
87be6097a1 Feedback 2023-01-04 14:50:15 -08:00
Daniel Lubarov
ae212cfbbd
Merge pull request #859 from mir-protocol/remove_older_evm_recursion_logic
Remove some older EVM recursion logic
2023-01-04 00:07:15 -08:00
Daniel Lubarov
f4ac2d4f9c Fix vk 2023-01-03 17:45:47 -08:00
Daniel Lubarov
5df784416a Add aggregation circuit
Which can be used to compress two proofs into one. Each inner proof can be either
- an "EVM root" proof (which typically proves one transaction, though it could be 0 or more)
- another aggregation proof
2023-01-03 15:46:59 -08:00
Daniel Lubarov
76b3eb304c more 2023-01-03 12:43:05 -08:00
Daniel Lubarov
fbb72e16bb warning 2023-01-03 12:29:14 -08:00
Daniel Lubarov
e12c6ad5b9 Remove some older EVM recursion logic
Some logic was replaced by the constant-degree logic in `fixed_recursive_verifier`.
2023-01-03 11:53:21 -08:00
Daniel Lubarov
6655e776a8 Remove CTL defaults
We ended up not needing the feature.
2023-01-03 11:36:42 -08:00
Daniel Lubarov
5719c0b70b feedback 2023-01-03 11:23:28 -08:00
Daniel Lubarov
18ce7ea547 Disable slow test on CI 2023-01-01 23:42:05 -08:00
Daniel Lubarov
595e751ac1 Shrink STARK proofs to a constant degree
The goal here is to end up with a single "root" circuit representing any EVM proof. I.e. it must verify each STARK, but be general enough to work with any combination of STARK sizes (within some range of sizes that we chose to support). This root circuit can then be plugged into our aggregation circuit.

In particular, for each STARK, and for each initial `degree_bits` (within a range that we choose to support), this adds a "shrinking chain" of circuits. Such a chain shrinks a STARK proof from that initial `degree_bits` down to a constant, `THRESHOLD_DEGREE_BITS`.

The root circuit then combines these shrunk-to-constant proofs for each table. It's similar to `RecursiveAllProof::verify_circuit`; I adapted the code from there and I think we can remove it after. The main difference is that now instead of having one verification key per STARK, we have several possible VKs, one per initial `degree_bits`. We bake the list of possible VKs into the root circuit, and have the prover indicate the index of the VK they're actually using.

This also partially removes the default feature of CTLs. So far we've used filters instead of defaults. Until now it was easy to keep supporting defaults just in case, but here maintaining support would require some more work. E.g. we couldn't use `exp_u64` any more, since the size delta is now dynamic, it can't be hardcoded. If there are no concerns, I'll fully remove the feature after.
2023-01-01 23:11:39 -08:00
Dmitry Vagner
5cd86b6652 names and format 2022-12-30 20:58:04 -08:00
Dmitry Vagner
2b91a1a664 simplify miller loop 2022-12-30 20:08:22 -08:00
Dmitry Vagner
de494dcf3b remove prints 2022-12-29 14:12:36 -08:00
Dmitry Vagner
77798f889e remove loop endpoint 2022-12-29 14:12:03 -08:00
Dmitry Vagner
de8637ce8c name 2022-12-29 14:03:52 -08:00
Dmitry Vagner
cca75c7713 remove redundant definition 2022-12-27 18:42:34 -08:00
Dmitry Vagner
c0744d76b9 TATE TEST PASSES 2022-12-27 18:38:20 -08:00
Dmitry Vagner
1f17673457 better vec to fp12 2022-12-27 16:28:20 -08:00
Dmitry Vagner
9beca707e5 clean 2022-12-27 16:21:56 -08:00
Dmitry Vagner
84fab8d6be clean 2022-12-27 16:19:08 -08:00