Skip to content

fix(testing): remove ignored StateTest engine_api_error_code#2740

Open
junbyjun1238 wants to merge 1 commit intoethereum:forks/amsterdamfrom
junbyjun1238:fix/remove-ignored-statetest-engine-api-error-code
Open

fix(testing): remove ignored StateTest engine_api_error_code#2740
junbyjun1238 wants to merge 1 commit intoethereum:forks/amsterdamfrom
junbyjun1238:fix/remove-ignored-statetest-engine-api-error-code

Conversation

@junbyjun1238
Copy link
Copy Markdown
Contributor

🗒️ Description

Remove engine_api_error_code from StateTest.

StateTest currently exposes engine_api_error_code, but the value is silently dropped during the StateTest -> Block conversion in state.py. The native state-fixture path does not consume it either, so the current API advertises a field that is effectively ignored.

This field no longer matches the current codebase's abstraction:

  • engine_api_error_code is modeled as block/payload metadata in blockchain.py and fixtures/blockchain.py
  • all current in-repo usages attach it to Block(...), not StateTest(...)
  • unlike block_exception, it is not wired through _generate_blockchain_blocks() and has no in-tree StateTest(...) call sites

Removing the field makes the API honest and avoids a footgun where a test author can specify an Engine API error expectation that is silently ignored. With BaseTest configured as extra="forbid", unsupported usage will fail fast at model construction rather than being silently ignored.

🔗 Related Issues or PRs

N/A.

✅ Checklist

  • All: Ran fast static checks to avoid unnecessary CI fails:
    just static
  • All: PR title adheres to the repo standard and starts with type(scope):.
  • All: Considered updating the online docs in ./docs/.
  • All: Set appropriate labels for the changes (only maintainers can apply labels).

Cute Animal Picture

Cute rabbit

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.

1 participant