Skip to content

feat(tests): add worst case tests for PUSH opcodes #1762

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 19, 2025

Conversation

LouisTsai-Csie
Copy link
Collaborator

@LouisTsai-Csie LouisTsai-Csie commented Jun 17, 2025

🗒️ Description

This test case is designed to simulate the worst-case scenario for the PUSH operation in the EVM. It includes two approaches:

  1. Repeatedly execute a PUSH-POP pattern to fill the contract code up to the maximum allowed size.
  2. Deploy a contract that performs consecutive PUSH operations until the EVM stack reaches its maximum depth, then, deploy another contract that repeatedly performs STATICCALL to the first contract.

Based on the discussion in Berlinterop, and the analysis in PR #1737, we would only try the second approach

🔗 Related Issues

Issue #1687

✅ Checklist

  • All: Set appropriate labels for the changes.
  • All: Added an entry to CHANGELOG.md.
    with removal of converted JSON/YML blockchain 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.

Copy link
Member

@marioevz marioevz left a comment

Choose a reason for hiding this comment

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

Just two minor comments and we can merge, thanks!

@LouisTsai-Csie
Copy link
Collaborator Author

@marioevz thanks for review, I would prefer this PR #1768 to be merged first before the second review. I want to replace the hardcoded stack limit with the fork configuration.

@marioevz
Copy link
Member

#1768 is merged now, could you try rebasing and fix conflicts so we can merge pls?

@marioevz
Copy link
Member

Needs a rebase since git merge seems to be confusing the PUSH and SWAP tests.

@LouisTsai-Csie
Copy link
Collaborator Author

I will wait for the PR #1767 to be merged, or I will need to rebase again.

@marioevz
Copy link
Member

#1767 is now merged, we can rebase 👍

@marioevz marioevz merged commit 0988892 into ethereum:main Jun 19, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants