Skip to content

fix(l2): fixes and cleanup of to_execution_db() #2482

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

Merged
merged 4 commits into from
Apr 21, 2025
Merged

Conversation

xqft
Copy link
Contributor

@xqft xqft commented Apr 16, 2025

Motivation

Prover's execution was failing because of wrong data in the ExecutionDB. There were also some cases where data was missing but the current tests didn't catch it.

Description

  • fixes saving final storage values instead of initial ones.
  • fixes saving only touched storage values, instead of read ones too.
  • removes unused new_store
  • simplifies code

@xqft xqft requested a review from a team as a code owner April 16, 2025 14:13
Copy link

github-actions bot commented Apr 16, 2025

Lines of code report

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

Detailed view
+---------------------------------------+-------+------+
| File                                  | Lines | Diff |
+---------------------------------------+-------+------+
| ethrex/crates/vm/backends/levm/db.rs  | 214   | -1   |
+---------------------------------------+-------+------+
| ethrex/crates/vm/backends/levm/mod.rs | 642   | -48  |
+---------------------------------------+-------+------+

@xqft
Copy link
Contributor Author

xqft commented Apr 16, 2025

I'm not sure yet if "written" values (the ones included in execution_updates) are included in the "accessed" values set, if so then the function could be simplified a lot, but that depends in the LEVM implementation (if it always calls a getter for an updated value), so for now the function chains both sets and gets every value.

Copy link
Contributor

@tomip01 tomip01 left a comment

Choose a reason for hiding this comment

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

Nice!

@jrchatruc jrchatruc added this pull request to the merge queue Apr 21, 2025
Merged via the queue into main with commit 05c0508 Apr 21, 2025
19 checks passed
@jrchatruc jrchatruc deleted the l2/fix-to-exec-db branch April 21, 2025 18:17
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.

4 participants