OOG if not enough gas for self-destruct#10064
Merged
Marchhill merged 1 commit intoNethermindEth:bal-devnet-1from Jan 5, 2026
Merged
OOG if not enough gas for self-destruct#10064Marchhill merged 1 commit intoNethermindEth:bal-devnet-1from
Marchhill merged 1 commit intoNethermindEth:bal-devnet-1from
Conversation
6 tasks
benaadams
approved these changes
Dec 30, 2025
Demuirgos
approved these changes
Dec 30, 2025
Author
|
I can confirm the tests all pass with this change. I'm not sure about the CI failures here, I will wait for someone merge this I suppose :). But let me know if this needs to be updated anywhere. |
Marchhill
approved these changes
Jan 5, 2026
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.
Changes
I believe this is directly related to the latest issues on devnet 1 where the BAL generated by Nethermind did not agree with all other clients by touching state unnecessarily with OOG on selfdestruct check.
I think this line is quite relevant here. Since this was a precompile, it did not charge any gas for access and moved on. This may have actually executed the selfdestruct successfully if we don't hit any other checks on
availableGasin the logic here even though there wasn't enough gas for selfdestruct (we deducted it fromavailableGasbut never performed any other "successful" check on the value where it would have triggered the OOG). On the devnet this may have happened on the parent call somewhere, not quite sure. Either way we need to OOG early to keep with consensus for BALs if there is not enough gas.Types of changes
What types of changes does your code introduce?
Testing
Requires testing
If yes, did you write tests?
Notes on testing
I saw there weren't a lot of tests for instructions that revolve around these. If one is desired I can include it here or feel free to push to my branch.
ethereum/execution-specstests: I will make sure we add new test cases for selfdestruct to precompiles as this seems like it was a unique code path that was triggered, related to precompile as beneficiary.oog_before_state_accesscases in this PR.Documentation
Requires documentation update
Requires explanation in Release Notes
Remarks
Happy to close this or update here if there is a better option. Thanks.