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

chore(levm): ef_tests parser for eip7702 #1749

Merged
merged 4 commits into from
Jan 20, 2025
Merged

Conversation

fborello-lambda
Copy link
Contributor

@fborello-lambda fborello-lambda commented 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

@fborello-lambda fborello-lambda added the levm Lambda EVM implementation label Jan 20, 2025
@fborello-lambda fborello-lambda self-assigned this Jan 20, 2025
@fborello-lambda fborello-lambda requested a review from a team as a code owner January 20, 2025 15:06
Copy link

github-actions bot commented Jan 20, 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  | 390   | +14  |
+--------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/cmd/ef_tests/levm/runner/revm_runner.rs  | 462   | +1   |
+--------------------------------------------------------------------------+-------+------+
| /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/vm/levm/src/environment.rs        | 36    | -15  |
+--------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/vm/levm/src/errors.rs             | 245   | +6   |
+--------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/vm/levm/src/utils.rs              | 96    | +1   |
+--------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/vm/levm/src/vm.rs                 | 1040  | +15  |
+--------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/vm/vm.rs                          | 819   | +2   |
+--------------------------------------------------------------------------+-------+------+

Total lines added: +294
Total lines removed: 89
Total lines changed: 383

Copy link

github-actions bot commented Jan 20, 2025

Summary: 5689/7878 (72.21%)

Prague: 1587/3776 (42.03%)
Cancun: 3579/3579 (100.00%)
Shanghai: 221/221 (100.00%)
Merge: 62/62 (100.00%)
London: 39/39 (100.00%)
Berlin: 35/35 (100.00%)
Istanbul: 34/34 (100.00%)
Constantinople: 66/66 (100.00%)
Byzantium: 33/33 (100.00%)
Homestead: 17/17 (100.00%)
Frontier: 16/16 (100.00%)


bls12_map_fp_to_g1: 24/24 (100.00%)
stNonZeroCallsTest: 24/24 (100.00%)
stZeroCallsRevert: 16/16 (100.00%)
stChainId: 2/2 (100.00%)
yul_example: 1/1 (100.00%)
stEIP150singleCodeGasPrices: 40/40 (100.00%)
vmPerformance: 2/2 (100.00%)
eip1153_tstore: 67/67 (100.00%)
yul: 10/10 (100.00%)
stSelfBalance: 6/6 (100.00%)
stStaticFlagEnabled: 13/13 (100.00%)
vmArithmeticTest: 19/19 (100.00%)
stAttackTest: 2/2 (100.00%)
eip3860_initcode: 108/108 (100.00%)
stSStoreTest: 27/27 (100.00%)
vmLogTest: 5/5 (100.00%)
stZeroKnowledge2: 130/130 (100.00%)
bls12_g2mul: 50/50 (100.00%)
stHomesteadSpecific: 5/5 (100.00%)
stRevertTest: 45/45 (100.00%)
eip3651_warm_coinbase: 40/40 (100.00%)
stEIP3607: 5/5 (100.00%)
bls12_g2msm: 35/35 (100.00%)
eip3855_push0: 14/14 (100.00%)
stEIP2930: 7/7 (100.00%)
bls12_g1add: 44/44 (100.00%)
stCodeCopyTest: 2/2 (100.00%)
stExtCodeHash: 35/35 (100.00%)
stEIP1559: 13/13 (100.00%)
bls12_pairing: 31/31 (100.00%)
point_evaluation_precompile: 153/153 (100.00%)
eip2930_access_list: 5/5 (100.00%)
blobhash_opcode: 28/28 (100.00%)
stPreCompiledContracts: 9/9 (100.00%)
bls12_precompiles_before_fork: 7/7 (100.00%)
point_evaluation_precompile_gas: 24/24 (100.00%)
eip6780_selfdestruct: 223/223 (100.00%)
stEIP1153-transientStorage: 8/8 (100.00%)
stCallCreateCallCodeTest: 43/43 (100.00%)
stEIP3860-limitmeterinitcode: 3/3 (100.00%)
bls12_g2add: 46/46 (100.00%)
stEIP3651-warmcoinbase: 2/2 (100.00%)
stEIP3855-push0: 3/3 (100.00%)
eip7516_blobgasfee: 5/5 (100.00%)
stSpecialTest: 15/15 (100.00%)
vmBitwiseLogicOperation: 11/11 (100.00%)
eip1344_chainid: 6/6 (100.00%)
acl: 1/1 (100.00%)
stPreCompiledContracts2: 102/102 (100.00%)
dup: 16/16 (100.00%)
stBadOpcode: 120/120 (100.00%)
stMemExpandingEIP150Calls: 9/9 (100.00%)
stSystemOperationsTest: 67/67 (100.00%)
stCreateTest: 47/47 (100.00%)
bls12_g1mul: 46/46 (100.00%)
stEIP4844-blobtransactions: 10/10 (100.00%)
chainid: 1/1 (100.00%)
stRandom: 310/310 (100.00%)
stZeroKnowledge: 134/134 (100.00%)
stCallDelegateCodesHomestead: 58/58 (100.00%)
stTimeConsuming: 14/14 (100.00%)
stExample: 12/12 (100.00%)
stDelegatecallTestHomestead: 28/28 (100.00%)
stReturnDataTest: 41/41 (100.00%)
stRandom2: 220/220 (100.00%)
stTransactionTest: 34/34 (100.00%)
stMemoryStressTest: 38/38 (100.00%)
stCallDelegateCodesCallCodeHomestead: 58/58 (100.00%)
opcodes: 188/188 (100.00%)
mcopy_memory_expansion: 58/58 (100.00%)
stStackTests: 10/10 (100.00%)
stEIP158Specific: 8/8 (100.00%)
bls12_g1msm: 32/32 (100.00%)
stMemoryTest: 71/71 (100.00%)
eip4844_blobs: 559/559 (100.00%)
stShift: 42/42 (100.00%)
stSolidityTest: 18/18 (100.00%)
stArgsZeroOneBalance: 46/46 (100.00%)
stCreate2: 49/49 (100.00%)
stWalletTest: 42/42 (100.00%)
stRecursiveCreate: 2/2 (100.00%)
tstorage: 11/11 (100.00%)
stEIP150Specific: 14/14 (100.00%)
stCodeSizeLimit: 5/5 (100.00%)
stBugs: 4/4 (100.00%)
stQuadraticComplexityTest: 17/17 (100.00%)
stCallCodes: 79/79 (100.00%)
stStaticCall: 286/286 (100.00%)
basic_tload: 5/5 (100.00%)
vmTests: 11/11 (100.00%)
stSLoadTest: 1/1 (100.00%)
eip198_modexp_precompile: 144/144 (100.00%)
stTransitionTest: 6/6 (100.00%)
stRefundTest: 22/22 (100.00%)
stInitCodeTest: 17/17 (100.00%)
stEIP5656-MCOPY: 4/4 (100.00%)
eip5656_mcopy: 93/93 (100.00%)
stLogTests: 46/46 (100.00%)
mcopy: 29/29 (100.00%)
stZeroCallsTest: 24/24 (100.00%)
bls12_variable_length_input_contracts: 21/21 (100.00%)
vmIOandFlowOperations: 15/15 (100.00%)
modexp: 1/16 (6.25%)
push0: 6/10 (60.00%)
tstorage_reentrancy_contexts: 5/10 (50.00%)
stEIP2537: 300/1403 (21.38%)
transaction_validity: 184/360 (51.11%)
tstore_reentrancy: 12/24 (50.00%)
selfdestruct: 12/94 (12.77%)
tstorage_execution_contexts: 17/30 (56.67%)
initcode: 28/54 (51.85%)
execution_gas: 25/31 (80.65%)
tload_calls: 2/3 (66.67%)
blob_txs: 315/587 (53.66%)
selfdestruct_revert: 2/6 (33.33%)
tstorage_create_contexts: 2/10 (20.00%)
mcopy_contexts: 5/6 (83.33%)
blobgasfee_opcode: 1/4 (25.00%)
tload_reentrancy: 8/24 (33.33%)
warm_coinbase: 4/16 (25.00%)
all_opcodes: 1/2 (50.00%)
set_code_txs: 1/209 (0.48%)
reentrancy_selfdestruct_revert: 0/9 (0.00%)
coverage: 0/1 (0.00%)
tstorage_selfdestruct: 0/6 (0.00%)
create_returndata: 0/24 (0.00%)
dynamic_create2_selfdestruct_collision: 0/6 (0.00%)
bls12_map_fp2_to_g2: 0/26 (0.00%)
gas: 0/146 (0.00%)
precompile_absence: 0/3 (0.00%)


Copy link

github-actions bot commented Jan 20, 2025

Benchmark Results Comparison

PR Results

Benchmark Results: Factorial

Command Mean [s] Min [s] Max [s] Relative
revm_factorial 7.302 ± 0.017 7.277 7.334 1.00
levm_factorial 26.414 ± 0.163 26.180 26.709 3.62 ± 0.02

Benchmark Results: Fibonacci

Command Mean [s] Min [s] Max [s] Relative
revm_fibonacci 8.523 ± 0.549 7.481 8.883 1.00
levm_fibonacci 24.041 ± 0.123 23.889 24.268 2.82 ± 0.18

Main Results

Benchmark Results: Factorial

Command Mean [s] Min [s] Max [s] Relative
revm_factorial 7.451 ± 0.029 7.416 7.497 1.00
levm_factorial 27.002 ± 1.861 26.360 32.295 3.62 ± 0.25

Benchmark Results: Fibonacci

Command Mean [s] Min [s] Max [s] Relative
revm_fibonacci 7.422 ± 0.202 6.890 7.561 1.00
levm_fibonacci 24.167 ± 0.102 24.073 24.375 3.26 ± 0.09

Copy link
Contributor

@ilitteri ilitteri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Left a couple of nits.

@ilitteri ilitteri added this pull request to the merge queue Jan 20, 2025
Merged via the queue into main with commit bbf6734 Jan 20, 2025
26 checks passed
@ilitteri ilitteri deleted the levm/parse_eip7702_ef_tests branch January 20, 2025 16:50
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.

2 participants