-
Notifications
You must be signed in to change notification settings - Fork 191
feat(tests): add test for CLZ opcode with varying gas costs #1859
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
Conversation
spencer-tb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Just some small changes. I wondered if it was worth combining this test with test_clz_gas initially, but happy to have this as its own case.
Could we also rename test_clz_gas to test_clz_gas_cost?
tests/osaka/eip7939_count_leading_zeros/test_count_leading_zeros.py
Outdated
Show resolved
Hide resolved
tests/osaka/eip7939_count_leading_zeros/test_count_leading_zeros.py
Outdated
Show resolved
Hide resolved
tests/osaka/eip7939_count_leading_zeros/test_count_leading_zeros.py
Outdated
Show resolved
Hide resolved
tests/osaka/eip7939_count_leading_zeros/test_count_leading_zeros.py
Outdated
Show resolved
Hide resolved
tests/osaka/eip7939_count_leading_zeros/test_count_leading_zeros.py
Outdated
Show resolved
Hide resolved
tests/osaka/eip7939_count_leading_zeros/test_count_leading_zeros.py
Outdated
Show resolved
Hide resolved
tests/osaka/eip7939_count_leading_zeros/test_count_leading_zeros.py
Outdated
Show resolved
Hide resolved
I explored this idea before implementation, but based on my understanding, the |
spencer-tb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! LGTM :)
b9ca764 to
1313b65
Compare
1313b65 to
b0433ff
Compare
|
Thanks for updating and the comment @jochem-brouwer! |
…#1859) * feat(tests): add test for CLZ opcode with varying gas costs * refactor(tests): rename and update CLZ gas cost test to handle boundary conditions * refactor(tests): rename CLZ gas cost test for clarity * refactor(tests): parameterize for varying leading zero lengths * refactor(tests): update contract deployment to include storage
🗒️ Description
Add different gas cost test cases for CLZ opcode
🔗 Related Issues or PRs
Issue #1795
✅ Checklist
toxchecks to avoid unnecessary CI fails, see also Code Standards and Enabling Pre-commit Checks:uvx --with=tox-uv tox -e lint,typecheck,spellcheck,markdownlinttype(scope):.