Open quickchase opened 7 months ago
Found the issue: see https://github.com/ethereum-optimism/op-geth/blob/9e50b7db766762138a0db913fe85e7a2cb82c832/core/state_transition.go#L442
When the tracer reports gasUsed, it reports it based on the gasUsed that was determined based on remaining gas in CaptureTxEnd
. For deposits we don't have refunds, hence 0 remaining gas. But that doesn't mean all gas was used. Hence the incorrect tracer value.
In the implementation the gas-price is 0, and so a 0 refund is given to deposits, without skipping the refund code-path.
I think we can reduce the diff, and just report the actual remainingGas
to the tracer.
Would like some feedback here from @trianglesphere and/or @axelKingsley.
@smartcontracts actually added the CaptureTxEnd(0)
pretty recently to handle the case of failed deposit transactions.
Bump 🙇♂️
System information
Geth version:
Geth/v1.101311.0-stable-e9a306ba/linux-amd64/go1.21.9
CL client & version:op-node v1.7.3
OS & Version:LinuxIssue
Given the following call:
op-geth is returning:
However, the
gasUsed
is incorrect, if you look at the receipt:This is how much gas is used:
"cumulativeGasUsed": "0xab4b",
NOT0xf4240
Both
op-erigon
and the explorer say that the output of the debug_traceTransaction should be"gasUsed": "0xab4b",