Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion crates/revm/revm-inspectors/src/tracing/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,6 @@ where
if self.config.record_steps {
self.gas_inspector.step_end(interp, data, is_static, eval);
self.fill_step_on_step_end(interp, data, eval);
return eval
}
InstructionResult::Continue
}
Expand Down
13 changes: 9 additions & 4 deletions crates/revm/revm-inspectors/src/tracing/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,12 @@ impl CallTraceNode {
opcode::CALL |
opcode::STATICCALL |
opcode::CALLCODE => {
let call_id = self.children[child_id];
item.call_child_id = Some(call_id);
child_id += 1;
// The opcode of this step is a call but it's possible that this step resulted
// in a revert or out of gas error in which case there's no actual child call executed and recorded: <https://github.com/paradigmxyz/reth/issues/3915>
if let Some(call_id) = self.children.get(child_id).copied() {
item.call_child_id = Some(call_id);
child_id += 1;
}
}
_ => {}
}
Expand Down Expand Up @@ -532,7 +535,9 @@ pub(crate) struct CallTraceStep {
pub(crate) gas_cost: u64,
/// Change of the contract state after step execution (effect of the SLOAD/SSTORE instructions)
pub(crate) storage_change: Option<StorageChange>,
/// Final status of the call
/// Final status of the step
///
/// This is set after the step was executed.
pub(crate) status: InstructionResult,
}

Expand Down