You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
System information
Geth 1.14.5
Go Version: go1.22.4
The gas returned from debug_traceCall with stateOverrides often resulting inaccuracy when trying to simulate for the next block. Over estimating in all the cases. Am I missing something?
Bitwise0x
changed the title
debug_traceCall returning inaccurate gasUsed
debug_traceCall returning inaccurate gasUsed when both blockOverrides and stateOverrides are used
Jun 16, 2024
The gas returned is how much gas was used during the simulation. It is not necessarily a good estimate for submitting the tx. For that you should rather use eth_estimateGas.
Otherwise if it is inaccurate it helps if you demonstrate what you expect and what is returned.
@s1na
Why is debug_traceCall not accurate when both stateOverrides and blockOverrides are used within the same call? I am trying to simulate my transaction beneath another transaction, and was expecting an accurate gasUsed.
debug_traceCall with just blockOverrides works perfectly. however, when combined with stateOverrides, it overestimates gas usage by approximately 5-15k.
@Bitwise0x This is a difficult question to answer. You are modifying the state, that can change the flow of execution and require a different amount of gas. When submitting on chain the state might not be the same as in your override though.
System information
Geth 1.14.5
Go Version: go1.22.4
The gas returned from debug_traceCall with stateOverrides often resulting inaccuracy when trying to simulate for the next block. Over estimating in all the cases. Am I missing something?
The text was updated successfully, but these errors were encountered: