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(l1, levm): use levm as default #1682

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

feat(l1, levm): use levm as default #1682

wants to merge 4 commits into from

Conversation

fkrause98
Copy link
Contributor

Description
Make levm the default vm used with ethrex.

Closes #1628.

Copy link

github-actions bot commented Jan 10, 2025

Total lines added: 0
Total lines removed: 0
Total lines changed: 0

Copy link

github-actions bot commented Jan 10, 2025

Benchmark Results Comparison

PR Results

Benchmark Results: Factorial

Command Mean [s] Min [s] Max [s] Relative
revm_factorial 7.040 ± 0.011 7.017 7.052 1.00
levm_factorial 26.018 ± 0.209 25.804 26.360 3.70 ± 0.03

Benchmark Results: Fibonacci

Command Mean [s] Min [s] Max [s] Relative
revm_fibonacci 6.652 ± 0.013 6.637 6.684 1.00
levm_fibonacci 23.826 ± 0.134 23.652 24.023 3.58 ± 0.02

Main Results

Benchmark Results: Factorial

Command Mean [s] Min [s] Max [s] Relative
revm_factorial 7.061 ± 0.018 7.034 7.088 1.00
levm_factorial 26.690 ± 1.904 25.853 32.093 3.78 ± 0.27

Benchmark Results: Fibonacci

Command Mean [s] Min [s] Max [s] Relative
revm_fibonacci 7.178 ± 1.382 6.675 11.111 1.00
levm_fibonacci 23.791 ± 0.107 23.675 24.001 3.31 ± 0.64

Copy link

Summary: 5627/7878 (71.43%)

Prague: 1525/3776 (40.39%)
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%)


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


@fkrause98 fkrause98 marked this pull request as ready for review January 16, 2025 20:03
@fkrause98 fkrause98 requested a review from a team as a code owner January 16, 2025 20:03
@fkrause98 fkrause98 marked this pull request as draft January 16, 2025 20:27
docker build -t ethrex --build-arg "BUILD_FLAGS=${--features levm}" .
touch $(STAMP_FILE)

STAMP_FILE_REVM := .docker_build_stamp_revm
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can't we wait for #1706 so that we don't have to create this extra code? After 1706 this PR should be trivial

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can. I'll reduce #1706 scope to just replacing the use of feature flags with the ethrex CLI flag so it can be delivered sooner.

Copy link
Collaborator

@mpaulucci mpaulucci left a comment

Choose a reason for hiding this comment

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

Wait for #1706

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

Successfully merging this pull request may close these issues.

levm feature should be part of default
3 participants