Skip to content

enhance(test-tests): tests for even modexp with long trailing zeros#1781

Merged
spencer-tb merged 1 commit into
ethereum:forks/osakafrom
ipsilon:tests/modexp_ctz
Nov 28, 2025
Merged

enhance(test-tests): tests for even modexp with long trailing zeros#1781
spencer-tb merged 1 commit into
ethereum:forks/osakafrom
ipsilon:tests/modexp_ctz

Conversation

@chfast
Copy link
Copy Markdown
Member

@chfast chfast commented Nov 12, 2025

🗒️ Description

Add the modexp precompile test cases increasing coverage of handling even modulus with longer than one word (8 bytes) trailing zeros.

🔗 Related Issues or PRs

N/A.

✅ Checklist

  • All: Ran fast tox checks to avoid unnecessary CI fails, see also Code Standards and Enabling Pre-commit Checks:
    uvx tox -e static
  • All: PR title adheres to the repo standard - it will be used as the squash commit message and should start type(scope):.
  • All: Considered adding an entry to CHANGELOG.md.
  • All: Considered updating the online docs in the ./docs/ directory.
  • All: Set appropriate labels for the changes (only maintainers can apply labels).

@chfast
Copy link
Copy Markdown
Member Author

chfast commented Nov 12, 2025

The uvx tox -e static is failing:

tests/fixtures/ethereum_tests/ansible/ec2.py:169: error: Missing parentheses in call to 'print'. Did you mean print(...)?  [syntax]
Found 1 error in 1 file (errors prevented further checking)

DeborahOlaboye pushed a commit to DeborahOlaboye/execution-specs that referenced this pull request Nov 13, 2025
…thereum#1781)

* feat(static): implement address tag resolution for static test fillers

Hard-coded address conversion in yml and json fillers:
  - Add convert_addresses.py script to automate tag conversion
  - The correct way to run this is with the ``CONVERT_COINBASE`` flag set to ``False``
    as this allows the same coinbase for all tests (just as python tests do). If we
    decide we want to handle the coinbase setting on the python side, we can turn this
    flag on and hard-code on the python side... but the currect approach seems correct.
  - Convert 1000+ static test YAML/JSON files to use address tags

(Python) Generate deterministic addresses from tags coming from static test fillers:
  - Resolve tags to deterministic addresses in the same way python tests do - via pytest static filler plugin
  - Add ``BlockchainEngineXFixture`` support for pre-allocation groups

This enables static tests to use symbolic address tags instead of hardcoded addresses,
minimizing muddied context across tests when running via pre alloc sharing.

----

fix(tests/static): Fine tune addr tag script, turn on more static tests for tagging.

- Wrap up stTransaction tests fine-tuning
- [fine-tuning] Replace 0 address in CALL code if in pre
- Changes from comments on PR ethereum#1781:
  - Use Prague.precompiles() for precompile addresses in convert_addresses.py
- Revamp script, simplify Claude code over-engineering.
- fine tune by not tagging some addrs, add short name tag compat for selected tests

* refactor(tests/static): Use of pydantic to resolve tags in static tests

* All pydantic simplifications
* refactor(tests/static): rename sender:key -> eoa:sender
* refactor: rename, use generics
* fix: consider empty accounts
* fix(tests): tests with empty accounts
* fix(tests): addressOpcodesFiller.yml
* feat: significantly improve test ids
* fix: bugs in tag resolution
* fix(tests): CREATE2_HighNonceDelegatecallFiller.yml
* fix: types
* Update src/ethereum_test_specs/static_state/account.py

---

Co-authored-by: felipe <fselmo2@gmail.com>

* fix: comment and generic tag regex
* fix: Code raw code tag substitution

* fix(tests/static): Resolve discrepancies with pydantic logic refactor

fix: fix when tabs are found in lines with spaces; fix shortnames
fix: Resolve issues with label: / raw: parsing
Turn off more tests, mostly related to create / `creation` addresses

* feat(tests/static): Mark tagged / untagged tests

- Add marker for tagged + untagged tests to make them easier to identify

* feat: Add `fully_tagged` marker

* fix(tests/static): Fully tag some tests

* fix(tests/static): Remove hard-coded addresses from transStorageResetFiller.yml

* fix(tests/static): Add tags to `tests/static/state_tests/stCreate2/CREATE2_HighNonceDelegatecallFiller.yml`

---------

Co-authored-by: Mario Vega <marioevz@gmail.com>
@spencer-tb spencer-tb added C-feat Category: an improvement or new feature A-test-tests Area: tests for packages/testing labels Nov 27, 2025
@spencer-tb spencer-tb changed the title feat(tests): tests for even modexp with long trailing zeros enhance(test-tests): tests for even modexp with long trailing zeros Nov 27, 2025
Copy link
Copy Markdown
Contributor

@spencer-tb spencer-tb 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.

@spencer-tb spencer-tb merged commit 51cfd90 into ethereum:forks/osaka Nov 28, 2025
11 of 12 checks passed
@chfast chfast deleted the tests/modexp_ctz branch November 28, 2025 10:08
SamWilsn pushed a commit that referenced this pull request Dec 9, 2025
…1781)

* feat(static): implement address tag resolution for static test fillers

Hard-coded address conversion in yml and json fillers:
  - Add convert_addresses.py script to automate tag conversion
  - The correct way to run this is with the ``CONVERT_COINBASE`` flag set to ``False``
    as this allows the same coinbase for all tests (just as python tests do). If we
    decide we want to handle the coinbase setting on the python side, we can turn this
    flag on and hard-code on the python side... but the currect approach seems correct.
  - Convert 1000+ static test YAML/JSON files to use address tags

(Python) Generate deterministic addresses from tags coming from static test fillers:
  - Resolve tags to deterministic addresses in the same way python tests do - via pytest static filler plugin
  - Add ``BlockchainEngineXFixture`` support for pre-allocation groups

This enables static tests to use symbolic address tags instead of hardcoded addresses,
minimizing muddied context across tests when running via pre alloc sharing.

----

fix(tests/static): Fine tune addr tag script, turn on more static tests for tagging.

- Wrap up stTransaction tests fine-tuning
- [fine-tuning] Replace 0 address in CALL code if in pre
- Changes from comments on PR #1781:
  - Use Prague.precompiles() for precompile addresses in convert_addresses.py
- Revamp script, simplify Claude code over-engineering.
- fine tune by not tagging some addrs, add short name tag compat for selected tests

* refactor(tests/static): Use of pydantic to resolve tags in static tests

* All pydantic simplifications
* refactor(tests/static): rename sender:key -> eoa:sender
* refactor: rename, use generics
* fix: consider empty accounts
* fix(tests): tests with empty accounts
* fix(tests): addressOpcodesFiller.yml
* feat: significantly improve test ids
* fix: bugs in tag resolution
* fix(tests): CREATE2_HighNonceDelegatecallFiller.yml
* fix: types
* Update src/ethereum_test_specs/static_state/account.py

---

Co-authored-by: felipe <fselmo2@gmail.com>

* fix: comment and generic tag regex
* fix: Code raw code tag substitution

* fix(tests/static): Resolve discrepancies with pydantic logic refactor

fix: fix when tabs are found in lines with spaces; fix shortnames
fix: Resolve issues with label: / raw: parsing
Turn off more tests, mostly related to create / `creation` addresses

* feat(tests/static): Mark tagged / untagged tests

- Add marker for tagged + untagged tests to make them easier to identify

* feat: Add `fully_tagged` marker

* fix(tests/static): Fully tag some tests

* fix(tests/static): Remove hard-coded addresses from transStorageResetFiller.yml

* fix(tests/static): Add tags to `tests/static/state_tests/stCreate2/CREATE2_HighNonceDelegatecallFiller.yml`

---------

Co-authored-by: Mario Vega <marioevz@gmail.com>
SamWilsn pushed a commit that referenced this pull request Dec 9, 2025
…1781)

* feat(static): implement address tag resolution for static test fillers

Hard-coded address conversion in yml and json fillers:
  - Add convert_addresses.py script to automate tag conversion
  - The correct way to run this is with the ``CONVERT_COINBASE`` flag set to ``False``
    as this allows the same coinbase for all tests (just as python tests do). If we
    decide we want to handle the coinbase setting on the python side, we can turn this
    flag on and hard-code on the python side... but the currect approach seems correct.
  - Convert 1000+ static test YAML/JSON files to use address tags

(Python) Generate deterministic addresses from tags coming from static test fillers:
  - Resolve tags to deterministic addresses in the same way python tests do - via pytest static filler plugin
  - Add ``BlockchainEngineXFixture`` support for pre-allocation groups

This enables static tests to use symbolic address tags instead of hardcoded addresses,
minimizing muddied context across tests when running via pre alloc sharing.

----

fix(tests/static): Fine tune addr tag script, turn on more static tests for tagging.

- Wrap up stTransaction tests fine-tuning
- [fine-tuning] Replace 0 address in CALL code if in pre
- Changes from comments on PR #1781:
  - Use Prague.precompiles() for precompile addresses in convert_addresses.py
- Revamp script, simplify Claude code over-engineering.
- fine tune by not tagging some addrs, add short name tag compat for selected tests

* refactor(tests/static): Use of pydantic to resolve tags in static tests

* All pydantic simplifications
* refactor(tests/static): rename sender:key -> eoa:sender
* refactor: rename, use generics
* fix: consider empty accounts
* fix(tests): tests with empty accounts
* fix(tests): addressOpcodesFiller.yml
* feat: significantly improve test ids
* fix: bugs in tag resolution
* fix(tests): CREATE2_HighNonceDelegatecallFiller.yml
* fix: types
* Update src/ethereum_test_specs/static_state/account.py

---

Co-authored-by: felipe <fselmo2@gmail.com>

* fix: comment and generic tag regex
* fix: Code raw code tag substitution

* fix(tests/static): Resolve discrepancies with pydantic logic refactor

fix: fix when tabs are found in lines with spaces; fix shortnames
fix: Resolve issues with label: / raw: parsing
Turn off more tests, mostly related to create / `creation` addresses

* feat(tests/static): Mark tagged / untagged tests

- Add marker for tagged + untagged tests to make them easier to identify

* feat: Add `fully_tagged` marker

* fix(tests/static): Fully tag some tests

* fix(tests/static): Remove hard-coded addresses from transStorageResetFiller.yml

* fix(tests/static): Add tags to `tests/static/state_tests/stCreate2/CREATE2_HighNonceDelegatecallFiller.yml`

---------

Co-authored-by: Mario Vega <marioevz@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-test-tests Area: tests for packages/testing C-feat Category: an improvement or new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants