73 Commits

Author SHA1 Message Date
Daniel Lubarov
d5003b7cf2 Gas fees go to coinbase 2023-03-12 23:13:19 -07:00
Daniel Lubarov
e6aa62f3ab Some tooling for debugging tests where the updated tries are not correct 2023-03-06 08:26:54 -08:00
Daniel Lubarov
c558eedd65 Misc EVM fixes 2023-03-05 09:39:49 -08:00
Daniel Lubarov
1e1e75c9b9 Fix code that looks for an account's storage trie 2023-02-27 17:34:12 -08:00
Daniel Lubarov
29f0692efc Fix a few issues found by EVM tests 2023-02-24 23:37:08 -08:00
wborgeaud
a158effe4d Use error instead of panicking in FromStr 2023-01-13 15:26:53 +01:00
Daniel Lubarov
b8e97aaaf8 Fix logic and Keccak CTLs
Lots of little bugs!

- The Keccak sponge table's padding logic was wrong, it was mixing up the number of rows with the number of hashes.
- The Keccak sponge table's Keccak-looking data was wrong - input to Keccak-f should be after xor'ing in the block.
- The Keccak sponge table's logic-looking filter was wrong. We do 5 logic CTLs for any final-block row, even if some of the xors are with 0s from Keccak padding.
- The CPU was using the wrong/outdated output memory channel for its Keccak sponge and logic CTLs.
- The Keccak table just didn't have a way to filter out padding rows. I added a filter column for this.
- The Keccak table wasn't remembering the original preimage of a permutation; lookers were seeing the preimage of the final step. I added columns for the original preimage.
- `ctl_data_logic` was using the wrong memory channel
- Kernel bootloading generation was using the wrong length for its Keccak sponge CTL, and its `keccak_sponge_log` was seeing the wrong clock since it was called after adding the final bootloading row.
2022-12-19 15:42:59 -08:00
Jacqueline Nabaglo
95eeed46f0
Memory load/store constraints (#839) 2022-12-09 10:35:00 -08:00
Daniel Lubarov
f4ab65f973 Fixes to get test_simple_transfer working 2022-12-08 23:27:20 -08:00
Daniel Lubarov
c28bab1f16 fmt 2022-12-03 22:58:51 -08:00
Daniel Lubarov
bffdc553dc fixes 2022-12-03 22:44:54 -08:00
Daniel Lubarov
1303a83f7f Misc witness generation fixes 2022-12-03 21:09:57 -08:00
Daniel Lubarov
b8b2fefe52 Use Keccak sponge table for bootloading
And get rid of the deprecated Keccak memory table.
2022-12-03 11:21:31 -08:00
Daniel Lubarov
82d0f08193 clippies 2022-12-02 17:06:30 -08:00
Daniel Lubarov
7293054062 Warnings 2022-12-02 14:49:32 -08:00
Daniel Lubarov
1f92d73177 Misc fixes 2022-12-02 14:31:18 -08:00
Daniel Lubarov
a63b73a851 Misc fixes 2022-12-02 13:56:52 -08:00
Daniel Lubarov
9bf47ef8ac Fixes 2022-12-01 12:46:14 -08:00
Daniel Lubarov
027dfc14b6 Refactor to support PROVER_INPUT 2022-12-01 11:15:51 -08:00
Daniel Lubarov
b6326c56b2 stubs 2022-11-30 22:03:00 -08:00
Daniel Lubarov
97ac5c59d6 Fixes 2022-11-30 18:12:31 -08:00
Daniel Lubarov
906a47a1ef generate_push and misc other progress 2022-11-30 17:45:31 -08:00
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
Daniel Lubarov
1b4acf5917 Make load_code a bit more general
So that it can be used to load code we're going to execute into the code segment of a certain context.
2022-11-21 13:54:39 -08:00
BGluth
35e8f282e4
Merge pull request #792 from mir-protocol/eth_trie_utils_0_3_0
Bumped `eth_trie_utils` to `0.4.0`
2022-11-02 09:34:26 -06:00
BGluth
2e7da17554 Bumped eth_trie_utils to 0.3.1 2022-10-31 15:03:34 -06:00
wborgeaud
fd96d30e24 Minor 2022-10-27 14:57:17 +02:00
wborgeaud
6b4cce21d8 Start 2022-10-21 18:00:41 +02:00
Daniel Lubarov
9639ff22dc MPT storage logic 2022-10-17 22:46:48 -07:00
Daniel Lubarov
7f366cdace Treat storage tries as sub-tries of the state trie
I.e. have leaves in the state trie point to the root of a storage trie
2022-10-16 20:26:37 -07:00
Daniel Lubarov
6bb1ad94e8 MPT insert logic, part 1 2022-10-08 22:27:57 -07: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
ed2aac3af3 MPT fixes 2022-10-06 16:28:52 -07:00
Daniel Lubarov
0ccb340e40 RLP related fixes 2022-10-04 15:18:31 -07:00
Nicholas Ward
54e96a9db2 many fixes 2022-10-03 13:34:16 -07: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
7e6844963a Few small changes related to switching to H256 2022-09-29 17:24:23 -06: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