Skip to content
This repository was archived by the owner on Jul 2, 2026. It is now read-only.

new(tests): Backfill tests for OOGing on constant gas - #2311

Closed
pdobacz wants to merge 3 commits into
ethereum:mainfrom
ipsilon:tests/constant-gas-oog
Closed

new(tests): Backfill tests for OOGing on constant gas#2311
pdobacz wants to merge 3 commits into
ethereum:mainfrom
ipsilon:tests/constant-gas-oog

Conversation

@pdobacz

@pdobacz pdobacz commented Oct 20, 2025

Copy link
Copy Markdown
Contributor

Opening here as draft to collect early feedback. I'll migrate the PR over to EELS once the Weld is complete.

This responds to a gap in coverage uncovered by evmone coverage report in lib/evmone/baseline_execution.cpp - it seems there was not test to cause opcodes to go out-of-gas on the very basic constant amount of gas.

  • no such test in ethereum/tests
  • no such test in ethereum/legacytests
  • no such test in evmone's unittests
  • new tests pass on hive for a bunch of non-evmone clients.

from ethereum_test_vm import Opcode, UndefinedOpcodes
from ethereum_test_vm import Opcodes as Op
from tests.unscheduled.eip7692_eof_v1.eip3540_eof_v1.opcodes import V1_EOF_ONLY_OPCODES
from tests.unscheduled.eip7692_eof_v1.gas_test import gas_test

@pdobacz pdobacz Oct 20, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my main point I'm not 100% sold on, but gas_test handles a ton of issues out-of-the-box for us. Once EOF tests are maybe removed it could be simplified and moved out of that EOF specific directory.

The bits that gas_tests handles:

  • setting the exact amount of gas needed to oog
  • warm and cold call
  • sanity check, i.e. add one gas and no more oog
  • (not) having to deal with intrinsic gas etc.
  • in general - recognizing when the oog happened and when not - just by manipulating tx gas_limit is quite difficult

@pdobacz
pdobacz force-pushed the tests/constant-gas-oog branch from 613cffe to a862e9c Compare October 20, 2025 21:31
Comment thread tests/frontier/opcodes/test_all_opcodes.py
@LouisTsai-Csie

Copy link
Copy Markdown
Collaborator

Thanks for this, i think this is necessary for upcoming gas-repricing refactor for us

@pdobacz
pdobacz force-pushed the tests/constant-gas-oog branch from a7fcd0e to bcdb497 Compare October 27, 2025 09:55
@pdobacz

pdobacz commented Oct 27, 2025

Copy link
Copy Markdown
Contributor Author

closing in favor of ethereum/execution-specs#1686

@pdobacz pdobacz closed this Oct 27, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants