Repository navigation
refactor(l1, l2, levm): remove l2 feature flag from crates ethrex-vm and ethrex-levm - #3367
Merged
Merged
Conversation
added 24 commits
June 25, 2025 23:20
TODO: Reject blob transactions in L2
…eature_flag_from_levm
|
No significant difference was registered for any benchmark run. Detailed ResultsBenchmark Results: BubbleSort
Benchmark Results: ERC20Approval
Benchmark Results: ERC20Mint
Benchmark Results: ERC20Transfer
Benchmark Results: Factorial
Benchmark Results: FactorialRecursive
Benchmark Results: Fibonacci
Benchmark Results: ManyHashes
Benchmark Results: Push
|
|
No significant difference was registered for any benchmark run. Detailed ResultsBenchmark Results: BubbleSort
Benchmark Results: ERC20Approval
Benchmark Results: ERC20Mint
Benchmark Results: ERC20Transfer
Benchmark Results: Factorial
Benchmark Results: FactorialRecursive
Benchmark Results: Fibonacci
Benchmark Results: ManyHashes
Benchmark Results: Push
|
MegaRedHand
approved these changes
Jun 30, 2025
|
|
||
| pub type Storage = HashMap<U256, H256>; | ||
|
|
||
| #[derive(Debug, Clone, Default)] |
Collaborator
There was a problem hiding this comment.
I think we should avoid marking one of these as default.
added 2 commits
June 30, 2025 16:51
…eature_flag_from_levm
|
No significant difference was registered for any benchmark run. Detailed ResultsBenchmark Results: BubbleSort
Benchmark Results: ERC20Approval
Benchmark Results: ERC20Mint
Benchmark Results: ERC20Transfer
Benchmark Results: Factorial
Benchmark Results: FactorialRecursive
Benchmark Results: Fibonacci
Benchmark Results: ManyHashes
Benchmark Results: Push
|
JereSalo
approved these changes
Jun 30, 2025
ilitteri
enabled auto-merge
June 30, 2025 20:16
ilitteri
disabled auto-merge
June 30, 2025 20:16
Co-authored-by: Jeremías Salomón <[email protected]>
|
No significant difference was registered for any benchmark run. Detailed ResultsBenchmark Results: BubbleSort
Benchmark Results: ERC20Approval
Benchmark Results: ERC20Mint
Benchmark Results: ERC20Transfer
Benchmark Results: Factorial
Benchmark Results: FactorialRecursive
Benchmark Results: Fibonacci
Benchmark Results: ManyHashes
Benchmark Results: Push
|
|
No significant difference was registered for any benchmark run. Detailed ResultsBenchmark Results: BubbleSort
Benchmark Results: ERC20Approval
Benchmark Results: ERC20Mint
Benchmark Results: ERC20Transfer
Benchmark Results: Factorial
Benchmark Results: FactorialRecursive
Benchmark Results: Fibonacci
Benchmark Results: ManyHashes
Benchmark Results: Push
|
SDartayet
pushed a commit
that referenced
this pull request
Jul 1, 2025
…vm` and `ethrex-levm` (#3367) **Motivation** My primary goal was to remove the `l2` feature flag from `cmd/ethrex` but to do this, we first need to remove it from: - `ethrex-vm`. - `ethrex-levm`. - `ethrex-blockchain`. **Description** This PR removes the feature flag `l2` from crates `ethrex-vm` and `ethrex-levm`. > *TL;DR:* > - In `ethrex-vm` the l2 precompiles logic was moved to a separate module, `l2_precompiles`. > - A new `VMType` enum was introduced in `ethrex-levm` as a field of `VM` (main LEVM's struct). It is used by LEVM to behave differently where needed (this is specifically, when executing precompiles, and when executing hooks). > - A new `BlockchainType` enum was introduced in `ethrex-blockchain` as a field of the struct `Blockchain` to differentiate when nodes are started as L1 or L2 nodes (this is later used in the code to instantiate the VM properly, matching the `BlockchainType` variants with `VMType` ones). The `l2` feature flag exists in `ethrex-vm` only because of `ethrex-levm`, so to remove it I needed to remove it from `ethrex-levm` first. The following commits do that: - [Move l2 precompiles logic to new module](28843a6) - [Remove feature flag from hooks public API](39a509f) - [Use the correct functions](3023b88) - [Replace get_hooks](88bc9a2) - [Remove l2 feature flag from levm](8b09883) After that, it was almost safe to remove it from `ethrex-vm`: - [Remove l2 feature flag from vm crate](fd971be) This brought some compilation errors that were solved in: - [Implement BlockchainType and fix compilation](32557eb) **Next Steps** - Remove feature flag `l2` from `ethrex-blockchain` crate. - Remove feature flag `l2` from `cmd/ethrex`. --------- Co-authored-by: Jeremías Salomón <[email protected]>
ElFantasma
pushed a commit
that referenced
this pull request
Jul 1, 2025
…vm` and `ethrex-levm` (#3367) **Motivation** My primary goal was to remove the `l2` feature flag from `cmd/ethrex` but to do this, we first need to remove it from: - `ethrex-vm`. - `ethrex-levm`. - `ethrex-blockchain`. **Description** This PR removes the feature flag `l2` from crates `ethrex-vm` and `ethrex-levm`. > *TL;DR:* > - In `ethrex-vm` the l2 precompiles logic was moved to a separate module, `l2_precompiles`. > - A new `VMType` enum was introduced in `ethrex-levm` as a field of `VM` (main LEVM's struct). It is used by LEVM to behave differently where needed (this is specifically, when executing precompiles, and when executing hooks). > - A new `BlockchainType` enum was introduced in `ethrex-blockchain` as a field of the struct `Blockchain` to differentiate when nodes are started as L1 or L2 nodes (this is later used in the code to instantiate the VM properly, matching the `BlockchainType` variants with `VMType` ones). The `l2` feature flag exists in `ethrex-vm` only because of `ethrex-levm`, so to remove it I needed to remove it from `ethrex-levm` first. The following commits do that: - [Move l2 precompiles logic to new module](28843a6) - [Remove feature flag from hooks public API](39a509f) - [Use the correct functions](3023b88) - [Replace get_hooks](88bc9a2) - [Remove l2 feature flag from levm](8b09883) After that, it was almost safe to remove it from `ethrex-vm`: - [Remove l2 feature flag from vm crate](fd971be) This brought some compilation errors that were solved in: - [Implement BlockchainType and fix compilation](32557eb) **Next Steps** - Remove feature flag `l2` from `ethrex-blockchain` crate. - Remove feature flag `l2` from `cmd/ethrex`. --------- Co-authored-by: Jeremías Salomón <[email protected]>
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Jul 2, 2025
…ture flag from `ethrex-blockchain` (#3371) > [!WARNING] > Merge after #3367 **Motivation** To completely remove the `l2` feature flag from `cmd/ethrex` in favor of having a single binary for running ethrex (L1 and L2), there are some local dependencies from which to remove this feature first. These are: 1. `ethrex-vm`. 2. `ethrex-levm`. 3. `ethrex-blockchain`. 1 and 2 are removed in #3367, and 3 is meant to be removed in this PR. **Description** Decouples the L2 metrics logic from the L1's, allowing to remove the use of the `l2` feature flag from the crate `ethrex-blockchain`. - Creates a `crates/blockchain/metrics/l2` module with `metrics.rs` and `api.rs` submodules. - Makes use of this new module in `cmd/ethrex`. - Removes `l2` feature flag from `ethrex-blockchain` crate. - Removes the import of `ethrex-blockchain/l2` where needed.
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Jul 4, 2025
…e binary for both L1 and L2 (#3381) > [!WARNING] > Merge after #3371 **Motivation** We want `ethrex` to be a single binary for both running L1 and L2. For this, we need to remove the `l2` feature flag from `cmd/ethrex`, a work that includes removing the same feature flag from the following crates: 1. `ethrex-vm`. 2. `ethrex-levm`. 3. `ethrex-blockchain`. 1 and 2 are removed in #3367, and 3 is removed in #3371. **Description** Removes `l2` feature flag from `cmd/ethrex`
d-roak
pushed a commit
to 1sixtech/ethrex
that referenced
this pull request
Jul 17, 2025
…vm` and `ethrex-levm` (lambdaclass#3367) **Motivation** My primary goal was to remove the `l2` feature flag from `cmd/ethrex` but to do this, we first need to remove it from: - `ethrex-vm`. - `ethrex-levm`. - `ethrex-blockchain`. **Description** This PR removes the feature flag `l2` from crates `ethrex-vm` and `ethrex-levm`. > *TL;DR:* > - In `ethrex-vm` the l2 precompiles logic was moved to a separate module, `l2_precompiles`. > - A new `VMType` enum was introduced in `ethrex-levm` as a field of `VM` (main LEVM's struct). It is used by LEVM to behave differently where needed (this is specifically, when executing precompiles, and when executing hooks). > - A new `BlockchainType` enum was introduced in `ethrex-blockchain` as a field of the struct `Blockchain` to differentiate when nodes are started as L1 or L2 nodes (this is later used in the code to instantiate the VM properly, matching the `BlockchainType` variants with `VMType` ones). The `l2` feature flag exists in `ethrex-vm` only because of `ethrex-levm`, so to remove it I needed to remove it from `ethrex-levm` first. The following commits do that: - [Move l2 precompiles logic to new module](lambdaclass@28843a6) - [Remove feature flag from hooks public API](lambdaclass@39a509f) - [Use the correct functions](lambdaclass@3023b88) - [Replace get_hooks](lambdaclass@88bc9a2) - [Remove l2 feature flag from levm](lambdaclass@8b09883) After that, it was almost safe to remove it from `ethrex-vm`: - [Remove l2 feature flag from vm crate](lambdaclass@fd971be) This brought some compilation errors that were solved in: - [Implement BlockchainType and fix compilation](lambdaclass@32557eb) **Next Steps** - Remove feature flag `l2` from `ethrex-blockchain` crate. - Remove feature flag `l2` from `cmd/ethrex`. --------- Co-authored-by: Jeremías Salomón <[email protected]>
d-roak
pushed a commit
to 1sixtech/ethrex
that referenced
this pull request
Jul 17, 2025
…ture flag from `ethrex-blockchain` (lambdaclass#3371) > [!WARNING] > Merge after lambdaclass#3367 **Motivation** To completely remove the `l2` feature flag from `cmd/ethrex` in favor of having a single binary for running ethrex (L1 and L2), there are some local dependencies from which to remove this feature first. These are: 1. `ethrex-vm`. 2. `ethrex-levm`. 3. `ethrex-blockchain`. 1 and 2 are removed in lambdaclass#3367, and 3 is meant to be removed in this PR. **Description** Decouples the L2 metrics logic from the L1's, allowing to remove the use of the `l2` feature flag from the crate `ethrex-blockchain`. - Creates a `crates/blockchain/metrics/l2` module with `metrics.rs` and `api.rs` submodules. - Makes use of this new module in `cmd/ethrex`. - Removes `l2` feature flag from `ethrex-blockchain` crate. - Removes the import of `ethrex-blockchain/l2` where needed.
d-roak
pushed a commit
to 1sixtech/ethrex
that referenced
this pull request
Jul 17, 2025
…e binary for both L1 and L2 (lambdaclass#3381) > [!WARNING] > Merge after lambdaclass#3371 **Motivation** We want `ethrex` to be a single binary for both running L1 and L2. For this, we need to remove the `l2` feature flag from `cmd/ethrex`, a work that includes removing the same feature flag from the following crates: 1. `ethrex-vm`. 2. `ethrex-levm`. 3. `ethrex-blockchain`. 1 and 2 are removed in lambdaclass#3367, and 3 is removed in lambdaclass#3371. **Description** Removes `l2` feature flag from `cmd/ethrex`
pedrobergamini
pushed a commit
to pedrobergamini/ethrex
that referenced
this pull request
Aug 24, 2025
…vm` and `ethrex-levm` (lambdaclass#3367) **Motivation** My primary goal was to remove the `l2` feature flag from `cmd/ethrex` but to do this, we first need to remove it from: - `ethrex-vm`. - `ethrex-levm`. - `ethrex-blockchain`. **Description** This PR removes the feature flag `l2` from crates `ethrex-vm` and `ethrex-levm`. > *TL;DR:* > - In `ethrex-vm` the l2 precompiles logic was moved to a separate module, `l2_precompiles`. > - A new `VMType` enum was introduced in `ethrex-levm` as a field of `VM` (main LEVM's struct). It is used by LEVM to behave differently where needed (this is specifically, when executing precompiles, and when executing hooks). > - A new `BlockchainType` enum was introduced in `ethrex-blockchain` as a field of the struct `Blockchain` to differentiate when nodes are started as L1 or L2 nodes (this is later used in the code to instantiate the VM properly, matching the `BlockchainType` variants with `VMType` ones). The `l2` feature flag exists in `ethrex-vm` only because of `ethrex-levm`, so to remove it I needed to remove it from `ethrex-levm` first. The following commits do that: - [Move l2 precompiles logic to new module](lambdaclass@28843a6) - [Remove feature flag from hooks public API](lambdaclass@39a509f) - [Use the correct functions](lambdaclass@3023b88) - [Replace get_hooks](lambdaclass@88bc9a2) - [Remove l2 feature flag from levm](lambdaclass@8b09883) After that, it was almost safe to remove it from `ethrex-vm`: - [Remove l2 feature flag from vm crate](lambdaclass@fd971be) This brought some compilation errors that were solved in: - [Implement BlockchainType and fix compilation](lambdaclass@32557eb) **Next Steps** - Remove feature flag `l2` from `ethrex-blockchain` crate. - Remove feature flag `l2` from `cmd/ethrex`. --------- Co-authored-by: Jeremías Salomón <[email protected]>
pedrobergamini
pushed a commit
to pedrobergamini/ethrex
that referenced
this pull request
Aug 24, 2025
…ture flag from `ethrex-blockchain` (lambdaclass#3371) > [!WARNING] > Merge after lambdaclass#3367 **Motivation** To completely remove the `l2` feature flag from `cmd/ethrex` in favor of having a single binary for running ethrex (L1 and L2), there are some local dependencies from which to remove this feature first. These are: 1. `ethrex-vm`. 2. `ethrex-levm`. 3. `ethrex-blockchain`. 1 and 2 are removed in lambdaclass#3367, and 3 is meant to be removed in this PR. **Description** Decouples the L2 metrics logic from the L1's, allowing to remove the use of the `l2` feature flag from the crate `ethrex-blockchain`. - Creates a `crates/blockchain/metrics/l2` module with `metrics.rs` and `api.rs` submodules. - Makes use of this new module in `cmd/ethrex`. - Removes `l2` feature flag from `ethrex-blockchain` crate. - Removes the import of `ethrex-blockchain/l2` where needed.
pedrobergamini
pushed a commit
to pedrobergamini/ethrex
that referenced
this pull request
Aug 24, 2025
…e binary for both L1 and L2 (lambdaclass#3381) > [!WARNING] > Merge after lambdaclass#3371 **Motivation** We want `ethrex` to be a single binary for both running L1 and L2. For this, we need to remove the `l2` feature flag from `cmd/ethrex`, a work that includes removing the same feature flag from the following crates: 1. `ethrex-vm`. 2. `ethrex-levm`. 3. `ethrex-blockchain`. 1 and 2 are removed in lambdaclass#3367, and 3 is removed in lambdaclass#3371. **Description** Removes `l2` feature flag from `cmd/ethrex`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
My primary goal was to remove the
l2feature flag fromcmd/ethrexbut to do this, we first need to remove it from:ethrex-vm.ethrex-levm.ethrex-blockchain.Description
This PR removes the feature flag
l2from cratesethrex-vmandethrex-levm.The
l2feature flag exists inethrex-vmonly because ofethrex-levm, so to remove it I needed to remove it fromethrex-levmfirst. The following commits do that:After that, it was almost safe to remove it from
ethrex-vm:This brought some compilation errors that were solved in:
Next Steps
l2fromethrex-blockchaincrate.l2fromcmd/ethrex.