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
At this point this PR only partially migrates
foundry-evm-core
crate. The most impactful change is thatEvm
type is not longer present. Instead block. cfg and tx envs are stored along with transactions on a largetContext
type which also holds db and journal and thus not very nice to pass around.This PR addresses this by re-introducing
Env
type internally, and the mutable borrowing ofEnv
is 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 changed
JournaledState
structure which we don't have decision on yet. I've partially updated code to useJournalInit
but this approach is likely not sound for some cases.PR Checklist