execution-spec-tests icon indicating copy to clipboard operation
execution-spec-tests copied to clipboard

fix(static_tests): adjusted gasLimit to only allow gasLimit of up to 30mil as enforced in eip-7825

Open felix314159 opened this issue 9 months ago • 7 comments

🗒️ Description

For now this is only for static_tests we have. Currently filling and executing to see if it all still works. Please thoroughly review this PR. These changes were done via a Python script that has no notion of what any of this means, next thing we should do is within our framework at fill check whether gasLimit is in allowed range

🔗 Related Issues

✅ Checklist

  • [ ] All: Set appropriate labels for the changes.
  • [ ] All: Considered squashing commits to improve commit history.
  • [ ] All: Added an entry to CHANGELOG.md.
  • [ ] All: Considered updating the online docs in the ./docs/ directory.
  • [ ] Tests: All converted JSON/YML tests from ethereum/tests have been added to converted-ethereum-tests.txt.
  • [ ] Tests: A PR with removal of converted JSON/YML tests from ethereum/tests have been opened.
  • [ ] Tests: Included the type and version of evm t8n tool used to locally execute test cases: e.g., ref with commit hash or geth 1.13.1-stable-3f40e65.
  • [ ] Tests: Ran mkdocs serve locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.

felix314159 avatar May 12 '25 10:05 felix314159

does test filling work without errors?

winsvega avatar May 12 '25 10:05 winsvega

Shouldn't this just mark the tests which have a gas limit higher than 30M invalid/not available from the fork which includes EIP-7825? Merging this would also require explicit checks that the test itself does not depend on having more than 30M gas (one use case for this "huge" gas limit would be benchmarks/stress tests, especially for precompiles)

jochem-brouwer avatar May 12 '25 10:05 jochem-brouwer

I think most of the test have high gas limit just in case and copied from template. if the test filling works we can cap it.

winsvega avatar May 12 '25 10:05 winsvega

@winsvega @felix314159 #808 is merged, please rebase and stBadOpcode/opcDiffPlaces changes can now be removed.

marioevz avatar May 12 '25 22:05 marioevz

After rebase I filled again with uv run fill ./tests/static --fill-static-tests --evm-bin=/home/$USER/Documents/evmone/build/bin/evmone-t8n -n auto -vv and now we are down to 36 failed tests:

* stCreateTest/createLargeResultFiller.yml
* stCreateTest/CREATE_FirstByte_loopFiller.yml
* stCreateTest/CreateOOGafterMaxCodesizeFiller.yml
* stShift/shiftCombinationsFiller.yml
* stSelfBalance/diffPlacesFiller.yml

felix314159 avatar May 13 '25 09:05 felix314159

I optimised 1 more test: https://github.com/felix314159/execution-spec-tests/pull/2

Review: stShift/shiftCombinationsFiller.yml
has too many combinations better to rewrite in .py

stCreateTest/CREATE_FirstByte_loopFiller.yml
this test eats too much gas. it can be optimized when converted .py

stCreateTest/CreateOOGafterMaxCodesizeFiller have large count contract interactions, need to rewrite it for prague limiting number of contract interactions

stSelfBalance/diffPlacesFiller.yml seems to be already covered by test scenarios (recently merged) the only scenario missing is rerun. need to implement a scenario batch for test scenarios. where. call operation. call somthing elese and [oog, revert, selfdestruct, return] call opeartion again. make sure operation is not affected. (call1 = call2)

here I open a tracker issue: https://github.com/ethereum/execution-spec-tests/issues/1594

winsvega avatar May 14 '25 10:05 winsvega

As these are yml files, I'm wondering if we could set the gas limit as an env var that is set during fill time. That way it can be dynamic and we don't need to change it again if the gas limit changes etc. Something like:

gasLimit: ${GAS_LIMIT}

spencer-tb avatar May 14 '25 12:05 spencer-tb

Superseded by #1924, please reopen if that's not the case.

marioevz avatar Jul 18 '25 15:07 marioevz