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 27 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/runner/levm_runner.rs           | 397   | +21  |
+-----------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/cmd/ef_tests/levm/runner/mod.rs                   | 275   | +3   |
+-----------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/cmd/ef_tests/levm/runner/revm_runner.rs           | 481   | +20  |
+-----------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/cmd/ef_tests/levm/types.rs                        | 333   | +20  |
+-----------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/p2p/rlpx/connection.rs          | 753   | +219 |
+-----------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/p2p/rlpx/error.rs               | 70    | +2   |
+-----------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/p2p/rlpx/frame.rs               | 131   | -74  |
+-----------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/rpc/engine/fork_choice.rs       | 265   | -13  |
+-----------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/rpc/engine/payload.rs           | 325   | -110 |
+-----------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/rpc/rpc.rs                      | 434   | -3   |
+-----------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/rpc/types/payload.rs            | 228   | -18  |
+-----------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/rpc/utils.rs                    | 255   | -6   |
+-----------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/vm/db.rs                                   | 101   | +11  |
+-----------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/vm/levm/src/call_frame.rs                  | 127   | +3   |
+-----------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/vm/levm/src/constants.rs                   | 40    | +5   |
+-----------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/vm/levm/src/db/mod.rs                      | 62    | +4   |
+-----------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/vm/levm/src/environment.rs                 | 37    | -14  |
+-----------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/vm/levm/src/errors.rs                      | 257   | +18  |
+-----------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/vm/levm/src/opcode_handlers/environment.rs | 344   | +15  |
+-----------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/vm/levm/src/opcode_handlers/system.rs      | 636   | +54  |
+-----------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/vm/levm/src/precompiles.rs                 | 1218  | -22  |
+-----------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/vm/levm/src/utils.rs                       | 96    | +1   |
+-----------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/vm/levm/src/vm.rs                          | 1258  | +233 |
+-----------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/vm/vm.rs                                   | 823   | +6   |
+-----------------------------------------------------------------------------------+-------+------+

Total lines added: +649
Total lines removed: 260
Total lines changed: 909

@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 7.358 ± 0.105 7.261 7.596 1.00
levm_factorial 26.991 ± 0.233 26.759 27.550 3.67 ± 0.06

Benchmark Results: Fibonacci

Command Mean [s] Min [s] Max [s] Relative
revm_fibonacci 6.763 ± 0.029 6.699 6.787 1.00
levm_fibonacci 25.167 ± 1.394 24.603 29.120 3.72 ± 0.21

Main Results

Benchmark Results: Factorial

Command Mean [s] Min [s] Max [s] Relative
revm_factorial 8.325 ± 1.345 7.469 10.278 1.00
levm_factorial 26.397 ± 0.101 26.307 26.551 3.17 ± 0.51

Benchmark Results: Fibonacci

Command Mean [s] Min [s] Max [s] Relative
revm_fibonacci 7.418 ± 0.085 7.204 7.473 1.00
levm_fibonacci 24.229 ± 0.096 24.123 24.393 3.27 ± 0.04

Copy link

Copy link

Copy link

Copy link

Copy link

Copy link

github-merge-queue bot pushed a commit that referenced this pull request Jan 20, 2025
**Motivation**

The EIP7702 introduces a new tx field, `authorization_list` 

**Description**

Parse the `authorization_list` field present in the new transactions

Linked to #1672

---------

Co-authored-by: Ivan Litteri <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
levm Lambda EVM implementation pectra
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LEVM: Add support for the EIP-7702
2 participants