fix(tests) fix ported quadratic complexity tests#2784
Open
danceratopz wants to merge 2 commits intoethereum:forks/amsterdamfrom
Open
fix(tests) fix ported quadratic complexity tests#2784danceratopz wants to merge 2 commits intoethereum:forks/amsterdamfrom
danceratopz wants to merge 2 commits intoethereum:forks/amsterdamfrom
Conversation
Three of these tests embed the runtime caller address directly in their target contract's bytecode. The expected post hashed in a literal hex string of the bytecode that hardcoded the pre-dynamic EOA address (e.g. \`0xd9b97c712eb…\`), so once \`pre.fund_eoa()\` started picking addresses dynamically the deployed code no longer matched the expected hex. Hoist the bytecode into a \`target_code\` variable used both at deploy time and as the expected \`code\`, so the address baked in via \`Op.CALL(address=addr, …)\` is whatever \`addr\` resolves to at fill time: - \`test_call50000\` - \`test_callcode50000\` - \`test_call20_kbytes_contract50_2\` \`test_quadratic_complexity_solidity_call_data_copy\` had a different drift: its post asserted empty storage on \`contract_0\`, but the success path (\`g=1\`, 250M gas) commits \`SSTORE(0, 50000)\` before entering the loop. Make the expected storage \`g\`-conditional so \`g=0\` (OOG) keeps an empty \`storage\` and \`g=1\` records slot 0.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## forks/amsterdam #2784 +/- ##
================================================
Coverage 88.17% 88.17%
================================================
Files 577 577
Lines 35659 35659
Branches 3490 3490
================================================
Hits 31442 31442
Misses 3654 3654
Partials 563 563
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Member
|
@danceratopz we need to add the @manually-enhanced in the docstring at the top level of the file, to avoid the script overwritting these fixes. I am also going to apply these changes to #2783 |
Member
|
Like here: |
7 tasks
leolara
approved these changes
Apr 30, 2026
leolara
added a commit
to leolara/execution-specs
that referenced
this pull request
Apr 30, 2026
…ly-enhanced The four post-state corrections cherry-picked from PR ethereum#2784 should not be overwritten the next time `tests/ported_static/` is regenerated by `scripts/filler_to_python`. Add the `@manually-enhanced` marker to each docstring so the regenerator skips them.
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.
🗒️ Description
These tests were failing to fill; they are marked as
slow, so not tested in CI.This was discovered while trying to release from https://github.com/ethereum/execution-specs/tree/devnets/snobal/5 - cherry-picked from fd56c5d
🔗 Related Issues or PRs
N/A.
✅ Checklist
just statictype(scope):.Cute Animal Picture