-
Notifications
You must be signed in to change notification settings - Fork 37
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
base: main
Are you sure you want to change the base?
Conversation
|
levm and revm modules
b48e272
to
c236a95
Compare
… into levm/cli_arg_not_flag
Benchmark Results ComparisonPR ResultsBenchmark Results: Factorial
Benchmark Results: Factorial - Recursive
Benchmark Results: Fibonacci
Benchmark Results: ManyHashes
Benchmark Results: BubbleSort
Benchmark Results: ERC20 - Transfer
Benchmark Results: ERC20 - Mint
Benchmark Results: ERC20 - Approval
Main ResultsBenchmark Results: Factorial
Benchmark Results: Factorial - Recursive
Benchmark Results: Fibonacci
Benchmark Results: ManyHashes
Benchmark Results: BubbleSort
Benchmark Results: ERC20 - Transfer
Benchmark Results: ERC20 - Mint
Benchmark Results: ERC20 - Approval
|
let receipts = execute_block(block, &mut state)?; | ||
let account_updates = ethrex_vm::get_state_transitions(&mut state); | ||
(receipts, account_updates) | ||
match EVM_BACKEND.get() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be abstracted away some some code inside vm
crate.
@@ -20,7 +20,7 @@ use ethrex_l2_sdk::{ | |||
eth_client::{eth_sender::Overrides, BlockByNumber, EthClient, WrappedTransaction}, | |||
}; | |||
use ethrex_storage::{error::StoreError, Store}; | |||
use ethrex_vm::{evm_state, execute_block, get_state_transitions}; | |||
use ethrex_vm::{db::evm_state, evm_backends::revm::execute_block, get_state_transitions}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there should be nothing referencing revm or levm outside vm
crate, besides the enum
@@ -0,0 +1,316 @@ | |||
use crate::db::StoreWrapper; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would rename the folder to backends
. Or just have vm/revm
and vm/levm
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
levm
/revm
feature flag.EVM
enum to handle the evms.Blockchain
struct in order to keep track of theEVM
selected and make use of it throughout the code.Closes #issue_number