-
Notifications
You must be signed in to change notification settings - Fork 114
Open
Description
reported: paradigmxyz/reth#10959
we use incorrect gasCost value:
revm-inspectors/src/tracing/js/mod.rs
Line 401 in 0648673
cost: interp.gas.spent(), |
this should be gas cost of the opcode:
this becomes a bit tricky for dynamic gas, because we don't know how much gas the opcode will cost if we call the tracer in the step
fn, only if we track and call it on step_end.
see also:
Line 78 in 0648673
let gas_cost = gas_remaining.saturating_sub(interp.gas().remaining()); |
so we'd need to move this call to step_end, but this messes with memory because the tracer should be called with mem before opcode I believe...
I don't think there's an easier way to get this than doing
step: gas_remaining
step_end: gas_remaining - spent
@rakita
rakita
Metadata
Metadata
Assignees
Labels
No labels