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

refactor(l1,l2,levm): add evm cli arg instead of flag #1861

Merged
merged 38 commits into from
Feb 7, 2025

Conversation

fborello-lambda
Copy link
Contributor

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

Starts from scratch PR #1706
Motivation

The feature flag is somewhat cumbersome, it's easier to build a single binary and then choose the EVM implementation via the CLI.

Description

@fborello-lambda fborello-lambda added levm Lambda EVM implementation L1 labels Jan 31, 2025
@fborello-lambda fborello-lambda self-assigned this Jan 31, 2025
Copy link

github-actions bot commented Jan 31, 2025

| File                                                                    | Lines | Diff |
+-------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/cmd/ef_tests/levm/runner/revm_runner.rs | 516   | +3   |
+-------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/cmd/ethrex/cli.rs                       | 142   | +2   |
+-------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/cmd/ethrex/ethrex.rs                    | 408   | +11  |
+-------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/blockchain/payload.rs            | 642   | -21  |
+-------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/vm/backends/levm.rs              | 255   | +255 |
+-------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/vm/backends/mod.rs               | 20    | +20  |
+-------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/vm/backends/revm.rs              | 431   | +431 |
+-------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/vm/db.rs                         | 175   | +33  |
+-------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/vm/errors.rs                     | 117   | -2   |
+-------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/vm/execution_db.rs               | 229   | +2   |
+-------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/vm/vm.rs                         | 229   | -660 |
+-------------------------------------------------------------------------+-------+------+

Total lines added: +757
Total lines removed: 683
Total lines changed: 1440

Copy link

github-actions bot commented Feb 5, 2025

Benchmark Results Comparison

PR Results

Benchmark Results: Factorial

Command Mean [ms] Min [ms] Max [ms] Relative
revm_Factorial 234.5 ± 1.1 233.1 236.6 1.00
levm_Factorial 903.9 ± 7.2 894.7 916.4 3.85 ± 0.04

Benchmark Results: Factorial - Recursive

Command Mean [s] Min [s] Max [s] Relative
revm_FactorialRecursive 1.371 ± 0.058 1.322 1.457 1.00
levm_FactorialRecursive 15.744 ± 0.029 15.702 15.797 11.48 ± 0.49

Benchmark Results: Fibonacci

Command Mean [ms] Min [ms] Max [ms] Relative
revm_Fibonacci 207.9 ± 4.6 204.4 220.3 1.00
levm_Fibonacci 908.2 ± 12.3 892.5 929.4 4.37 ± 0.11

Benchmark Results: ManyHashes

Command Mean [ms] Min [ms] Max [ms] Relative
revm_ManyHashes 8.7 ± 0.1 8.5 9.0 1.00
levm_ManyHashes 18.5 ± 0.3 18.1 19.0 2.12 ± 0.05

Benchmark Results: BubbleSort

Command Mean [s] Min [s] Max [s] Relative
revm_BubbleSort 3.189 ± 0.021 3.173 3.237 1.00
levm_BubbleSort 6.167 ± 0.034 6.124 6.207 1.93 ± 0.02

Benchmark Results: ERC20 - Transfer

Command Mean [ms] Min [ms] Max [ms] Relative
revm_ERC20Transfer 250.2 ± 3.2 247.5 257.3 1.00
levm_ERC20Transfer 545.8 ± 11.4 537.7 576.7 2.18 ± 0.05

Benchmark Results: ERC20 - Mint

Command Mean [ms] Min [ms] Max [ms] Relative
revm_ERC20Mint 142.6 ± 0.6 141.8 143.8 1.00
levm_ERC20Mint 354.6 ± 2.0 352.1 357.1 2.49 ± 0.02

Benchmark Results: ERC20 - Approval

Command Mean [s] Min [s] Max [s] Relative
revm_ERC20Approval 1.047 ± 0.008 1.037 1.062 1.00
levm_ERC20Approval 2.033 ± 0.013 2.012 2.060 1.94 ± 0.02

Main Results

Benchmark Results: Factorial

Command Mean [ms] Min [ms] Max [ms] Relative
revm_Factorial 233.2 ± 0.7 231.8 234.4 1.00
levm_Factorial 908.2 ± 10.4 895.7 925.5 3.89 ± 0.05

Benchmark Results: Factorial - Recursive

Command Mean [s] Min [s] Max [s] Relative
revm_FactorialRecursive 1.438 ± 0.090 1.326 1.555 1.00
levm_FactorialRecursive 15.710 ± 0.038 15.662 15.788 10.92 ± 0.68

Benchmark Results: Fibonacci

Command Mean [ms] Min [ms] Max [ms] Relative
revm_Fibonacci 206.2 ± 0.9 204.8 207.9 1.00
levm_Fibonacci 911.9 ± 15.4 893.3 935.1 4.42 ± 0.08

Benchmark Results: ManyHashes

Command Mean [ms] Min [ms] Max [ms] Relative
revm_ManyHashes 8.6 ± 0.1 8.6 8.8 1.00
levm_ManyHashes 18.4 ± 0.4 18.1 19.6 2.13 ± 0.05

Benchmark Results: BubbleSort

Command Mean [s] Min [s] Max [s] Relative
revm_BubbleSort 3.209 ± 0.014 3.194 3.225 1.00
levm_BubbleSort 6.193 ± 0.048 6.145 6.265 1.93 ± 0.02

Benchmark Results: ERC20 - Transfer

Command Mean [ms] Min [ms] Max [ms] Relative
revm_ERC20Transfer 250.7 ± 2.7 248.2 257.6 1.00
levm_ERC20Transfer 547.3 ± 3.1 543.8 553.4 2.18 ± 0.03

Benchmark Results: ERC20 - Mint

Command Mean [ms] Min [ms] Max [ms] Relative
revm_ERC20Mint 144.1 ± 2.2 142.0 149.7 1.00
levm_ERC20Mint 360.5 ± 4.9 354.8 371.8 2.50 ± 0.05

Benchmark Results: ERC20 - Approval

Command Mean [s] Min [s] Max [s] Relative
revm_ERC20Approval 1.049 ± 0.009 1.040 1.070 1.00
levm_ERC20Approval 2.061 ± 0.022 2.036 2.103 1.96 ± 0.03

Makefile Show resolved Hide resolved
Makefile Show resolved Hide resolved
github-merge-queue bot pushed a commit that referenced this pull request Feb 6, 2025
**Motivation**

We are adding some changes related to features flags in PR
#1861 . The `ci_levm.yaml`
performs a comparison between the PR's commit and main. To fully test
this JOB and based on this
[comment](#1861 (comment)),
we should add the cli argument and do nothing for now, just to run the
tests with the latest commit from Hive.


**Description**

- Add the `evm` cli argument to avoid errors.
- Bump up Hive's commit.

Linked to: #1861
Copy link
Contributor

@lima-limon-inc lima-limon-inc left a comment

Choose a reason for hiding this comment

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

Very nice! ( ゚▽゚)/

.github/workflows/ci_levm.yaml Show resolved Hide resolved
.github/workflows/common_hive_reports.yaml Show resolved Hide resolved
Makefile Show resolved Hide resolved
Makefile Show resolved Hide resolved
cmd/ethrex/ethrex.rs Show resolved Hide resolved
crates/vm/backends/levm.rs Show resolved Hide resolved
Copy link

github-actions bot commented Feb 7, 2025

Summary: 9449/14408 (65.58%)

Prague: 2373/2373 (100.00%)
Cancun: 3579/3579 (100.00%)
Shanghai: 221/221 (100.00%)
Paris: 62/62 (100.00%)
London: 39/39 (100.00%)
Berlin: 35/35 (100.00%)
Istanbul: 34/35 (97.14%)
Constantinople: 1040/2439 (42.64%)
Byzantium: 1000/2330 (42.92%)
Homestead: 585/1324 (44.18%)
Frontier: 141/742 (19.00%)

@lambdaclass lambdaclass deleted a comment from github-actions bot Feb 7, 2025
@lambdaclass lambdaclass deleted a comment from github-actions bot Feb 7, 2025
@fkrause98 fkrause98 added this pull request to the merge queue Feb 7, 2025
Merged via the queue into main with commit 3f0f124 Feb 7, 2025
41 checks passed
@fkrause98 fkrause98 deleted the levm/cli_arg_not_flag branch February 7, 2025 20:55
@xqft xqft mentioned this pull request Feb 10, 2025
github-merge-queue bot pushed a commit that referenced this pull request Feb 10, 2025
**Motivation**

<!-- Why does this pull request exist? What are its goals? -->

zkVM programs fail to compile after #1861 was merged to main. This PR
fixes the problem and bumps provers' versions.

L2 breaking changes keep being merged because the prover compilation job
isn't run in pushes that don't modify the L2 code, but the L2 is
strongly dependent on L1 code. This PR enables the job for all pushes.
The job takes ~13 minutes to complete, which is comparable to other jobs
which run on all pushes.

<!-- A clear and concise general description of the changes this PR
introduces -->

- fixes `ethrex-levm` adding c-kzg into the zkVMs programs dependency
tree
- bumps SP1 and Risc0 versions
- enables prover CI job for all pushes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L1 levm Lambda EVM implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants