Daniel Lubarov
2471f5a391
Push and arithmetic ops
2022-11-30 15:25:16 -08:00
Daniel Lubarov
afb3e4b1e1
Misc work on witness generation
2022-11-30 14:58:40 -08:00
wborgeaud
992692b04d
Merge pull request #708 from mir-protocol/per_table_recursion
...
Per table recursion
2022-10-07 10:03:07 +02:00
Daniel Lubarov
5a1cf8bff9
Move some constants
2022-10-03 12:08:29 -07: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
Daniel Lubarov
9f9143d6f6
Finish some misc storage logic
2022-10-02 11:14:19 -07:00
BGluth
09ba1b6fce
Merge pull request #740 from mir-protocol/h256_trie_roots
...
Trie roots now use `H256` instead of `U256`
2022-09-30 09:32:09 -06:00
Daniel Lubarov
c721155e23
Main function, txn processing loop
2022-09-29 23:15:33 -07: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
Daniel Lubarov
c7b03cfe9a
More MPT logic
2022-09-24 20:49:19 -07:00
Daniel Lubarov
b6d71a7008
Keccak benchmark
...
And reworking things a bit to include the timing data we want.
2022-09-23 10:54:17 -07:00
Daniel Lubarov
c27e40e7bb
Merge pull request #731 from mir-protocol/mpt
...
Basic MPT logic
2022-09-22 12:06:16 -07:00
Daniel Lubarov
37d92b55ac
Basic MPT logic
...
For now this contains most of the basic framework/structure. Logic for things like insertions will come later.
2022-09-22 11:25:37 -07:00
BGluth
8fb1e4e760
Added a mapping between code hashes and contract byte code
...
Added a mapping between an account's `codehash` field and the actual contract byte code in `GenerationInputs`.
2022-09-21 16:46:18 -06: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
e7edfdd6a3
Minor
2022-08-26 18:30:26 +02:00
wborgeaud
a1941308eb
Minor
2022-08-26 11:07:16 +02:00
wborgeaud
05c3c4d907
First pass
2022-08-26 10:12:45 +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
Daniel Lubarov
ff228c9386
Have witness generation take a partial trie instead of Merkle proofs
2022-08-24 20:43:49 -07:00
wborgeaud
ee979428f4
Start implementing context and segments in interpreter
2022-07-23 15:35:48 +02:00
Daniel Lubarov
b9b3c24cf9
PROVER_INPUT instruction
2022-07-19 06:55:23 -07:00
Daniel Lubarov
ef842b03c8
Address some feedback on #591
2022-07-17 08:23:40 -07:00
Daniel Lubarov
0802d6c021
Continue work on bootstrapping
...
The kernel is hashed using a Keccak based sponge for now. We could switch to Poseidon later if our kernel grows too large.
Note that we use simple zero-padding (pad0*) instead of the standard pad10* rule. It's simpler, and we don't care that the prover can add extra 0s at the end of the code. The program counter can never reach those bytes, and even if it could, they'd be 0 anyway given the EVM's zero-initialization rule.
In one CPU row, we can do a whole Keccak hash (via the CTL), absorbing 136 bytes. But we can't actually bootstrap that many bytes of kernel code in one row, because we're also limited by memory bandwidth. Currently we can write 4 bytes of the kernel to memory in one row.
So we treat the `keccak_input_limbs` columns as a buffer. We gradually fill up this buffer, 4 bytes (one `u32` word) at a time. Every `136 / 4 = 34` rows, the buffer will be full, so at that point we activate the Keccak CTL to absorb the buffer.
2022-07-14 11:59:01 -07:00
Daniel Lubarov
10c31b7036
feedback
2022-07-12 14:33:10 -07:00
Daniel Lubarov
5d74a19ad6
Add test (won't work for a while, but to illustrate)
2022-07-04 18:10:03 -07:00
Daniel Lubarov
e7b480deaf
Begin work on witness generation and kernel bootstrapping
2022-07-01 10:09:57 -07:00