Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(levm): implement EIP7702 - Set EOA account code #1672

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

fborello-lambda
Copy link
Contributor

@fborello-lambda fborello-lambda commented Jan 9, 2025

Motivation

Description

EIP7702 - docs

To run the ef-tests for prague:

cd crates/vm/levm
make clean-evm-ef-tests download-evm-ef-tests
make run-evm-ef-tests flags="--tests set_code_txs" 

Closes #1642

@fborello-lambda fborello-lambda added the levm Lambda EVM implementation label Jan 9, 2025
@fborello-lambda fborello-lambda self-assigned this Jan 9, 2025
Copy link

github-actions bot commented Jan 9, 2025

+--------------------------------------------------------------------------------+-------+------+
| File                                                                           | Lines | Diff |
+--------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/cmd/ef_tests/levm/deserialize.rs               | 371   | +14  |
+--------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/cmd/ef_tests/levm/report.rs                    | 835   | -13  |
+--------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/cmd/ef_tests/levm/runner/levm_runner.rs        | 394   | +18  |
+--------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/cmd/ef_tests/levm/types.rs                     | 333   | +20  |
+--------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/cmd/ethrex/ethrex.rs                           | 327   | -12  |
+--------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/cmd/loc/src/main.rs                            | 83    | -19  |
+--------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/cmd/loc/src/report.rs                          | 176   | -76  |
+--------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/p2p/bootnode.rs              | 40    | -8   |
+--------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/p2p/kademlia.rs              | 431   | -41  |
+--------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/p2p/rlpx/connection.rs       | 727   | -26  |
+--------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/p2p/rlpx/eth/transactions.rs | 285   | +5   |
+--------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/p2p/rlpx/frame.rs            | 127   | -4   |
+--------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/p2p/rlpx/p2p.rs              | 190   | -2   |
+--------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/p2p/sync.rs                  | 586   | -11  |
+--------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/rpc/eth/gas_price.rs         | 346   | +222 |
+--------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/rpc/eth/mod.rs               | 8     | -154 |
+--------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/rpc/rpc.rs                   | 433   | -1   |
+--------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/vm/levm/src/constants.rs                | 41    | +6   |
+--------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/vm/levm/src/environment.rs              | 37    | -14  |
+--------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/vm/levm/src/errors.rs                   | 237   | +4   |
+--------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/vm/levm/src/gas_cost.rs                 | 793   | -88  |
+--------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/vm/levm/src/opcode_handlers/system.rs   | 581   | -1   |
+--------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/vm/levm/src/precompiles.rs              | 814   | -126 |
+--------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/vm/levm/src/utils.rs                    | 96    | +1   |
+--------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/vm/levm/src/vm.rs                       | 1105  | +84  |
+--------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/vm/vm.rs                                | 767   | +1   |
+--------------------------------------------------------------------------------+-------+------+

Total lines changed: +971

@fborello-lambda fborello-lambda force-pushed the levm/eip7702 branch 2 times, most recently from 88c1330 to 56cff3a Compare January 9, 2025 18:09
Copy link

github-actions bot commented Jan 9, 2025

Benchmark Results Comparison

PR Results

Benchmark Results: Factorial

Command Mean [s] Min [s] Max [s] Relative
revm_factorial 8.037 ± 1.249 7.407 10.412 1.00
levm_factorial 26.152 ± 0.161 25.894 26.329 3.25 ± 0.51

Benchmark Results: Fibonacci

Command Mean [s] Min [s] Max [s] Relative
revm_fibonacci 7.806 ± 1.354 7.078 10.498 1.00
levm_fibonacci 23.897 ± 0.135 23.723 24.206 3.06 ± 0.53

Main Results

Benchmark Results: Factorial

Command Mean [s] Min [s] Max [s] Relative
revm_factorial 9.231 ± 2.244 7.182 12.989 1.00
levm_factorial 26.596 ± 0.234 26.294 26.978 2.88 ± 0.70

Benchmark Results: Fibonacci

Command Mean [s] Min [s] Max [s] Relative
revm_fibonacci 7.006 ± 0.028 6.966 7.054 1.00
levm_fibonacci 24.350 ± 0.060 24.221 24.404 3.48 ± 0.02

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
levm Lambda EVM implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LEVM: Add support for the EIP-7702
1 participant