Skip to content
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

new(tests): EOF - EIP-4750: Stack validation in CALLF #889

Merged
merged 5 commits into from
Oct 16, 2024

Conversation

shemnon
Copy link
Collaborator

@shemnon shemnon commented Oct 10, 2024

πŸ—’οΈ Description

Add a test to cover cases where stack would not overflow but CALLF stack
reservation rules would cause a revert.

πŸ”— 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.

Add a test to cover cases where stack would not overflow but CALLF stack
reservation rules would cause a revert.

Signed-off-by: Danno Ferrin <[email protected]>
@shemnon shemnon marked this pull request as ready for review October 10, 2024 01:20
Signed-off-by: Danno Ferrin <[email protected]>
Copy link
Collaborator

@pdobacz pdobacz left a comment

Choose a reason for hiding this comment

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

LGTM, minor comments. Do we need to also update eof_tracker.md? I'm not sure but maybe Max stack size (1024) in CALLF-ed function was covering this case, please double check though, I didn't analyze it

@shemnon
Copy link
Collaborator Author

shemnon commented Oct 10, 2024

Added another tests to check CALLF when stack is at max ("rule #4") - by EIP this should revert, but there are ways it would succeed without the check, so we need to do one of those ways and then test it.

Signed-off-by: Danno Ferrin <[email protected]>
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.

LGTM, thanks!

@marioevz marioevz changed the title new(test) Stack validation in CALLF new(tests): EOF - EIP-4750: Stack validation in CALLF Oct 14, 2024
@danceratopz danceratopz added scope:tests Scope: Test cases type:feat type: Feature labels Oct 15, 2024
@danceratopz danceratopz merged commit 6fb195b into ethereum:main Oct 16, 2024
3 checks passed
@shemnon shemnon deleted the eof/callf-stack branch October 16, 2024 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope:tests Scope: Test cases type:feat type: Feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants