-
Notifications
You must be signed in to change notification settings - Fork 58
refactor(levm): moved retdata and state backup to callframe #2666
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
Conversation
Lines of code reportTotal lines added: Detailed view
|
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
|
EF Tests Comparison
|
crates/vm/levm/src/vm.rs
Outdated
self.restore_cache_state(call_frame_backup)?; | ||
let backup = self.current_call_frame()?.state_backup.clone(); |
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.
We didn't need this clone before, let's see how we can avoid it.
@@ -48,7 +48,7 @@ pub fn main() { | |||
let mut vm = Evm::from_execution_db(db.clone()); | |||
let result = vm.execute_block(&block).expect("failed to execute block"); | |||
let receipts = result.receipts; | |||
let account_updates = vm.get_state_transitions(fork)?; | |||
let account_updates = vm.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.
Maybe this shouldn't have changed in this PR
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 know it is tedious but it would've been better if this PR was done with main as base because the other one was kind of experimental and we don't really know if it's going to be merged. But I understand the reason why it was done this way though. We have to see what to do with the other PR before tackling this one.
This reverts commit 1ea4d0b.
Motivation
Simplifying the data structures that make up the VM.
Description
Retdata and backup are always popped when callframe is, so both were made into a part of call_frame to simplify the code.
Resolves issue #2571
Depends on PR #2645