fix: gas deduction with disable_balance_check#2699
Merged
rakita merged 6 commits intobluealloy:mainfrom Jul 21, 2025
Merged
Conversation
CodSpeed Performance ReportMerging #2699 will improve performances by 3.18%Comparing Summary
Benchmarks breakdown
|
3d93167 to
710f44e
Compare
rakita
requested changes
Jul 14, 2025
Member
rakita
left a comment
There was a problem hiding this comment.
Can you do the same thing for op-revm?
9e066ce to
42d4bc7
Compare
Contributor
Author
|
I've applied the same fix to op-revm. I tried to implement a similar test but I wasn't able to get it to show the failure, I'm not sure why. |
Member
I will need to check this, but at first look PR lgtm. |
Member
|
All good, have added test for op-revm in local but couldn't push it to repo branch. Will do it in separate branch |
rakita
approved these changes
Jul 21, 2025
Closed
This was referenced Jul 21, 2025
Closed
Closed
Closed
Closed
Closed
Closed
Closed
Merged
theochap
pushed a commit
to ethereum-optimism/optimism
that referenced
this pull request
Jan 21, 2026
* add failing test * fix gas deduction * fix minimum tx.value balance * fmt * improve test to cover tx value handling * apply fix to op-revm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The merge of
validate_tx_against_stateanddeduct_callerdone in #2460 seems to have broken gas deduction whendisable_balance_checkis enabled. This PR adds a test for this error and proposes a possible fix.The result is that when balance checks are disabled the effective cost is first deducted with saturation from the caller balance, and then increased if necessary to cover the transaction value.