30 Commits

Author SHA1 Message Date
Robin Salen
9ee47ab745
Move HashConfig into GenericConfig associated types 2023-04-01 09:54:14 -04:00
Robin Salen
e857c020bf
Make hash functions generic 2023-03-31 18:55:06 -04:00
Daniel Lubarov
137bc78565 Prep for publishing to crates.io 2023-01-30 13:18:06 -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
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
wborgeaud
39fc219324 PR feedback 2022-10-06 16:40:03 +02:00
wborgeaud
a5a4098d7a Merge branch 'main' into per_table_recursion
# Conflicts:
#	evm/src/all_stark.rs
#	evm/src/generation/mod.rs
#	evm/src/recursive_verifier.rs
2022-10-03 11:49:26 +02:00
wborgeaud
668957176a PR feedback 2022-10-03 11:44:52 +02:00
BGluth
8e08b218d2 Trie roots now use H256 instead of U256
- `H256` preserves any leading `0`s, which could be critical in some
  situations. Also just a slightly more appropriate type for hashes.
2022-09-29 15:56:09 -06:00
wborgeaud
8c96b8d2db Comment 2022-09-23 16:36:17 +02:00
wborgeaud
0053a02119 Cleaning 2022-09-23 16:28:20 +02:00
wborgeaud
6e6c2daf29 Add challenger state 2022-09-22 11:01:27 +02:00
BGluth
d7d8803d0a Replaced PartialTrie definitions with eth-trie-utils crate
- There were enough dependencies that it made sense to move
  `PartialTrie` logic to its own crate.
2022-09-19 11:05:48 -06:00
wborgeaud
da03af2979 Minor 2022-09-05 08:38:57 +02:00
wborgeaud
c320a9e8ae Merge branch 'main' into per_table_recursion
# Conflicts:
#	evm/src/all_stark.rs
#	evm/src/proof.rs
2022-09-05 08:34:52 +02:00
wborgeaud
05c3c4d907 First pass 2022-08-26 10:12:45 +02:00
wborgeaud
8600a5a46f Merge branch 'main' into per_table_recursion
# Conflicts:
#	evm/src/proof.rs
2022-08-26 09:41:00 +02:00
Daniel Lubarov
d0be79e822 Feedback 2022-08-25 23:35:38 -07:00
Daniel Lubarov
b829b44dcf Fix test 2022-08-25 22:11:25 -07:00
Daniel Lubarov
aa87f2c3ba Public memory 2022-08-25 20:19:18 -07:00
wborgeaud
9e9ff9872b Per table recursion 2022-08-25 22:04:28 +02:00
Daniel Lubarov
d9c210b26c Remove compressed proofs in EVM crate
Not needed since EVM proofs are wrapped in recursive proofs.
2022-08-25 12:17:31 -07:00
Sebastien La Duca
e48bfa837f fmt 2022-07-24 18:06:03 -04:00
Sebastien La Duca
c9d610ec10 use maybe_rayon in starky and evm 2022-07-24 17:47:14 -04:00
Daniel Lubarov
410e03349c
extension_field -> extension (#581)
It seems redundant in most contexts, e.g. `use plonky2::field::extension_field::Extendable;`. One could import `extension_field`, but it's not that common in Rust, and `field::extension` is now about as short.
2022-06-27 07:18:21 -07:00
wborgeaud
6f5c8e46f6 s/right/next 2022-06-02 23:55:56 +02:00
wborgeaud
1fdb41755e Recursive proof isn't correct (yet) 2022-05-26 16:27:15 +02:00
wborgeaud
8e8e4daa9c Start of impl 2022-05-20 11:21:13 +02:00
wborgeaud
9f01840a57 Make evm structs more generic 2022-05-19 09:41:15 +02:00
Daniel Lubarov
c54896dcb8
Rename starky2 -> evm (#547) 2022-05-18 10:32:14 -07:00