Skip to content

Conversation

@Praniti1594
Copy link
Contributor

🗒️ Description

This PR explicitly annotates the FORK_CRITERIA variable with the ForkCriteria supertype across all fork definition files (src/ethereum/forks/*/init.py). This addresses a type-checking issue where the narrower type (e.g., ByBlockNumber) was being inferred, which could lead to API breakage when transitioning to a broader type (e.g., ByTimestamp).

🔗 Related Issues or PRs

Fixes #1753

✅ 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).
  • Tests: Ran mkdocs serve locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.
  • Tests: For PRs implementing a missed test case, update the post-mortem document to add an entry the list.
  • Ported Tests: All converted JSON/YML tests from ethereum/tests or tests/static have been assigned @ported_from marker.

Cute Animal Picture

download (4)

chetna-mittal pushed a commit to gnosischain/execution-specs that referenced this pull request Nov 8, 2025
… pre-allocation group terminology (ethereum#1760)

* refactor(docs): move `engine_reorg` -> `engine_x`

* refactor(all): rename 'engine reorg' to 'engine x'

* refactor(all): update lang from 'shared pre-alloc' to 'pre-allocation groups' 1/2

Terminology:
- 'shared pre-allocation' → 'pre-allocation groups'
- 'shared pre-state' → 'pre-allocation groups'

Flags:
-  `--generate-shared-pre` -> `--generate-grouped-pre-allocs`
-  `--use-shared-pre` -> `--use-grouped-pre-allocs`

Method names updated:
- `update_shared_pre_state` → `update_pre_alloc_groups`
- `compute_shared_pre_alloc_hash` → `compute_pre_alloc_group_hash`
- `shared_pre_alloc_folder_path` → `grouped_pre_allocs_folder_path`

* refactor(all): update lang from 'shared pre-alloc' to 'pre-allocation groups' 2/2

* docs: update changelog

* refactor(filler): rename flags for consistency with class names

Rename command-line flags to align with function and class naming:
- --generate-grouped-pre-allocs → --generate-pre-alloc-groups
- --use-grouped-pre-allocs → --use-pre-alloc-groups

This improves consistency with PreAllocGroups class and related
method names throughout the codebase. Updated all flag definitions,
config.getoption() calls, property names, and documentation.
Copy link
Contributor

@SamWilsn SamWilsn left a comment

Choose a reason for hiding this comment

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

Please run uvx tox -e static before opening a pull request. It's right in the pull request template; you can't miss it.

In london and the dao fork, it looks like you'll need to add an assert isinstance(..., ByBlockNumber) to fork.py to make the type checker happy.

@Praniti1594
Copy link
Contributor Author

Please run uvx tox -e static before opening a pull request. It's right in the pull request template; you can't miss it.

In london and the dao fork, it looks like you'll need to add an assert isinstance(..., ByBlockNumber) to fork.py to make the type checker happy.

Hi Sam, i have applied the requested changes for type checker by adding assert isinstance(..., ByBlockNumber) to fork.py of london and dao_fork, and i have verified it locally using tox command and all checks passed, sorry for the inconvenience

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Annotate FORK_CRITERIA with ForkCriteria

2 participants