Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 49 additions & 37 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ foundry-linking = { path = "crates/linking" }
# solc & compilation utilities
foundry-block-explorers = { version = "0.20.0", default-features = false }
foundry-compilers = { version = "0.18.2", default-features = false }
foundry-fork-db = "0.16"
foundry-fork-db = "0.17"
solang-parser = { version = "=0.3.9", package = "foundry-solang-parser" }
solar-ast = { version = "=0.1.5", default-features = false }
solar-parse = { version = "=0.1.5", default-features = false }
Expand Down Expand Up @@ -262,13 +262,13 @@ op-alloy-rpc-types = "0.18.13"
op-alloy-flz = "0.13.1"

## revm
revm = { version = "27.1.0", default-features = false }
revm-inspectors = { version = "0.27.1", features = ["serde"] }
op-revm = { version = "8.1.0", default-features = false }
revm = { version = "28.0.0", default-features = false }
revm-inspectors = { version = "0.28.0", features = ["serde"] }
op-revm = { version = "9.0.1", default-features = false }

## alloy-evm
alloy-evm = "0.16.0"
alloy-op-evm = "0.16.0"
alloy-evm = "0.18.3"
alloy-op-evm = "0.18.3"

## cli
anstream = "0.6"
Expand Down Expand Up @@ -401,14 +401,14 @@ idna_adapter = "=1.1.0"
# alloy-op-evm = { git = "https://github.com/alloy-rs/evm.git", rev = "7762adc" }

## revm
revm = { git = "https://github.com/bluealloy/revm.git", rev = "d9cda3a" }
op-revm = { git = "https://github.com/bluealloy/revm.git", rev = "d9cda3a" }
# revm = { git = "https://github.com/bluealloy/revm.git", rev = "d9cda3a" }
# op-revm = { git = "https://github.com/bluealloy/revm.git", rev = "d9cda3a" }
# revm-inspectors = { git = "https://github.com/paradigmxyz/revm-inspectors.git", rev = "956bc98" }

## foundry
# foundry-block-explorers = { git = "https://github.com/foundry-rs/block-explorers.git", rev = "e09cb89" }
# foundry-compilers = { git = "https://github.com/foundry-rs/compilers.git", rev = "e4a9b04" }
# foundry-fork-db = { git = "https://github.com/foundry-rs/foundry-fork-db", rev = "4ed9afb" }
# foundry-fork-db = { git = "https://github.com/foundry-rs/foundry-fork-db", rev = "50683eb" }

## solar
# solar-ast = { git = "https://github.com/paradigmxyz/solar.git", branch = "main" }
Expand Down
6 changes: 1 addition & 5 deletions crates/anvil/tests/it/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -669,11 +669,7 @@ async fn test_backward_compatibility_state_dump_deserialization_v1_2() {
"gas_limit": 143385,
"status": "Return",
"steps": [],
"decoded": {
"label": null,
"return_data": null,
"call_data": null
}
"decoded": null
},
"logs": [],
"ordering": []
Expand Down
2 changes: 1 addition & 1 deletion crates/cheatcodes/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ impl CheatsCtxt<'_, '_, '_, '_> {

#[inline]
pub(crate) fn is_precompile(&self, address: &Address) -> bool {
self.ecx.journaled_state.inner.precompiles.contains(address)
self.ecx.journaled_state.warm_addresses.precompiles().contains(address)
}
}

Expand Down
4 changes: 3 additions & 1 deletion crates/evm/core/src/backend/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1833,7 +1833,9 @@ impl BackendInner {
journal_inner.set_spec_id(self.spec_id);
journal_inner
};
journal.precompiles.extend(self.precompiles().addresses().copied());
journal
.warm_addresses
.set_precompile_addresses(self.precompiles().addresses().copied().collect());
journal
}
}
Expand Down
3 changes: 1 addition & 2 deletions crates/evm/coverage/src/inspector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,9 @@ impl LineCoverageCollector {
/// tx) then the hash is calculated from the bytecode.
#[inline]
fn get_or_insert_contract_hash(interpreter: &mut Interpreter) -> B256 {
// TODO: use just `get_or_calculate_hash`
interpreter
.bytecode
.hash()
.filter(|h| !h.is_zero())
.unwrap_or_else(|| interpreter.bytecode.regenerate_hash())
.unwrap_or_else(|| interpreter.bytecode.get_or_calculate_hash())
}
5 changes: 0 additions & 5 deletions crates/evm/evm/src/inspectors/revert_diagnostic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,11 +208,6 @@ where

/// Handles `REVERT` and `EXTCODESIZE` opcodes for diagnostics.
fn step(&mut self, interp: &mut Interpreter, ctx: &mut CTX) {
// Check if an action has already been set (which would null the instruction pointer)
if interp.bytecode.action.is_some() {
return;
}
Comment on lines -211 to -214
Copy link
Member Author

Choose a reason for hiding this comment

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

To double check @DaniPopes, this is no longer required in revm 28 per #11216 and we can therefore remove it?

Copy link
Member

Choose a reason for hiding this comment

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

yep


match interp.bytecode.opcode() {
opcode::REVERT => self.handle_revert(interp, ctx),
opcode::EXTCODESIZE => self.handle_extcodesize(interp, ctx),
Expand Down
6 changes: 3 additions & 3 deletions crates/evm/evm/src/inspectors/stack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ impl InspectorStackRefMut<'_> {

for (addr, acc_mut) in &mut state {
// mark all accounts cold, besides preloaded addresses
if !journal.warm_preloaded_addresses.contains(addr) {
if journal.warm_addresses.is_cold(addr) {
acc_mut.mark_cold();
}

Expand Down Expand Up @@ -958,7 +958,7 @@ impl Inspector<EthEvmContext<&mut dyn DatabaseExt>> for InspectorStackRefMut<'_>
}
// Mark accounts and storage cold before STATICCALLs
CallScheme::StaticCall => {
let JournaledState { state, warm_preloaded_addresses, .. } =
let JournaledState { state, warm_addresses, .. } =
&mut ecx.journaled_state.inner;
for (addr, acc_mut) in state {
// Do not mark accounts and storage cold accounts with arbitrary storage.
Expand All @@ -968,7 +968,7 @@ impl Inspector<EthEvmContext<&mut dyn DatabaseExt>> for InspectorStackRefMut<'_>
continue;
}

if !warm_preloaded_addresses.contains(addr) {
if warm_addresses.is_cold(addr) {
acc_mut.mark_cold();
}

Expand Down
4 changes: 2 additions & 2 deletions crates/evm/traces/src/debug/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,10 @@ impl<'a> DebugStepsWalker<'a> {
})
.unwrap_or_default();

self.node.trace.steps[start_idx].decoded = Some(DecodedTraceStep::InternalCall(
self.node.trace.steps[start_idx].decoded = Some(Box::new(DecodedTraceStep::InternalCall(
DecodedInternalCall { func_name, args: inputs, return_data: outputs },
self.current_step,
));
)));
}

fn process(&mut self) {
Expand Down
4 changes: 2 additions & 2 deletions crates/evm/traces/src/decoder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -340,9 +340,9 @@ impl CallTraceDecoder {
/// [CallTraceDecoder::decode_event] for more details.
pub async fn populate_traces(&self, traces: &mut Vec<CallTraceNode>) {
for node in traces {
node.trace.decoded = self.decode_function(&node.trace).await;
node.trace.decoded = Some(Box::new(self.decode_function(&node.trace).await));
for log in &mut node.logs {
log.decoded = self.decode_event(&log.raw_log).await;
log.decoded = Some(Box::new(self.decode_event(&log.raw_log).await));
}

if let Some(debug) = self.debug_identifier.as_ref()
Expand Down
Loading
Loading