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

fix(fw): max stack height calculation in __add__ #810

Merged
merged 2 commits into from
Sep 18, 2024

Conversation

pdobacz
Copy link
Collaborator

@pdobacz pdobacz commented Sep 16, 2024

🗒️ Description

Split out of #785 with a unit test added.

I've noticed that the algorithm might not handle all cases well, and I am proposing an alternative. I've left all my overly verbose comments in the code to illustrate the train of thought, as this has been quite hard to grasp the original code intentions (maybe there has been an easier fix hidden from my sight there).

🔗 Related Issues

n/a

✅ 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.

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.

This is great, thanks so much for implementing this. I think the concept I was missing is the stack-bottom, it makes it easier to follow this implementation.

I verified the resulting fixtures and they are exactly the same, so it's safe to merge.

@marioevz marioevz added type:bug Something isn't working type:refactor Type: Refactor scope:fw Scope: Framework (evm|tools|forks|pytest) labels Sep 18, 2024
@marioevz marioevz merged commit fb958b8 into ethereum:main Sep 18, 2024
4 checks passed
@marioevz marioevz deleted the fix-stack branch September 18, 2024 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope:fw Scope: Framework (evm|tools|forks|pytest) type:bug Something isn't working type:refactor Type: Refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants