feat: bump revm - #10051
Closed
klkvr wants to merge 27 commits into
Closed
feat: bump revm#10051klkvr wants to merge 27 commits into
klkvr wants to merge 27 commits into
Conversation
Contributor
|
Created a tracking ticket here to identify dependencies / track blockers / questions: #10116 |
zerosnacks
reviewed
Mar 24, 2025
| EVMError::Database(err) => err.into(), | ||
| EVMError::Custom(err) => Self::msg(err), | ||
| EVMError::Header(err) => Self::msg(err.to_string()), | ||
| EVMError::Precompile(err) => Self::msg(err), |
6 of 8 tasks
Contributor
|
Closing in favor of #10183 |
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
Bumps revm to bluealloy/revm@9e39df5
Depends on foundry-rs/foundry-fork-db#44, paradigmxyz/revm-inspectors#246
Solution
Clone
git@github.com:alloy-rs/evm.gitinto the parent of the project rootAt this point this PR only partially migrates
foundry-evm-corecrate. The most impactful change is thatEvmtype is not longer present. Instead block. cfg and tx envs are stored along with transactions on a largetContexttype which also holds db and journal and thus not very nice to pass around.This PR addresses this by re-introducing
Envtype internally, and the mutable borrowing ofEnvis solved via a helperEnvMut:foundry/crates/evm/core/src/env.rs
Lines 7 to 33 in 664809e
The idea here is to avoid migrating entire codebase to completely new environment types and refactor this later if we see a nicer approach.
Another big blocker is changedJournaledStatestructure which we don't have decision on yet. I've partially updated code to useJournalInitbut this approach is likely not sound for some cases.JournalInithas been repaced byJournalInnerthat should offer what we needPR Checklist