Remove buffer gas added in the gas consumption of EVM.dryRun
#6844
+12
−74
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes: #6843
Relevant issue: #6301
The buffer gas added in
EVM.dryRun
, was a best-effort solution, to find the minimum required gas, that would make a transaction succeed. The calculation was based on top of the actual gas used for a given transaction. However, this did have some issues, and it would fail for certain cases.With the implementation of the local state index on EVM Gateway, we have completely reworked the
eth_estimateGas
endpoint, and it uses the same logic asGeth
, to calculate the minimum required gas needed for a transaction to succeed.With that change deployed, we no longer need to add any buffer gas to the result of
EVM.dryRun
. And this can in fact cause confusion to developers, as it is always a bit higher that the gas usage they would get from tracing the same transaction / contract call.