Skip to content

fix(tests): resolve transition fork blob methods in EIP-4844 conftest#2602

Merged
spencer-tb merged 2 commits intoethereum:forks/amsterdamfrom
danceratopz:fix-transition-fork-blob-methods
Mar 31, 2026
Merged

fix(tests): resolve transition fork blob methods in EIP-4844 conftest#2602
spencer-tb merged 2 commits intoethereum:forks/amsterdamfrom
danceratopz:fix-transition-fork-blob-methods

Conversation

@danceratopz
Copy link
Copy Markdown
Member

@danceratopz danceratopz commented Mar 31, 2026

🗒️ Description

Transition forks like ShanghaiToCancunAtTime15k inherit from TransitionBaseClass, not BaseFork, so they lack blob-related methods (blob_gas_per_blob, target_blobs_per_block, etc.). Calling these methods on a transition fork in the EIP-4844 conftest fixtures causes an AttributeError.

Fix: chain .transitions_to() before each blob method call — a no-op for regular forks, resolves to the target fork for transition forks. This is the established pattern used 30+ times across the codebase.

This bug is not caught in CI because test_blob_type_tx_pre_fork is marked @pytest.mark.slow and tox -e py3 runs with -m "not slow".

🔗 Related Issues or PRs

Blocks:

✅ 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 updating the online docs in the ./docs/ directory.
  • All: Set appropriate labels for the changes (only maintainers can apply labels).

Cute Animal Picture

image

Transition forks like `ShanghaiToCancunAtTime15k` inherit from
`TransitionBaseClass`, not `BaseFork`, so they lack blob-related
methods (`blob_gas_per_blob`, `target_blobs_per_block`, etc.).

Chain `.transitions_to()` before each blob method call — a no-op for
regular forks, resolves to the target fork for transition forks.
@danceratopz danceratopz added C-bug Category: this is a bug, deviation, or other problem A-tests Area: Consensus tests. labels Mar 31, 2026
@danceratopz danceratopz changed the base branch from forks/osaka to forks/amsterdam March 31, 2026 16:06
@danceratopz danceratopz requested a review from spencer-tb March 31, 2026 16:06
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 31, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.24%. Comparing base (51fc631) to head (44e1688).
⚠️ Report is 15 commits behind head on forks/amsterdam.

Additional details and impacted files
@@                 Coverage Diff                 @@
##           forks/amsterdam    #2602      +/-   ##
===================================================
- Coverage            86.35%   86.24%   -0.12%     
===================================================
  Files                  599      599              
  Lines                36904    36984      +80     
  Branches              3771     3795      +24     
===================================================
+ Hits                 31868    31895      +27     
- Misses                4485     4525      +40     
- Partials               551      564      +13     
Flag Coverage Δ
unittests 86.24% <ø> (-0.12%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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 for catching this :)

@spencer-tb spencer-tb merged commit 325eb90 into ethereum:forks/amsterdam Mar 31, 2026
18 checks passed
spencer-tb pushed a commit to spencer-tb/execution-specs that referenced this pull request Mar 31, 2026
…ethereum#2602)

* fix(tests): resolve transition fork blob methods in EIP-4844 conftest

Transition forks like `ShanghaiToCancunAtTime15k` inherit from
`TransitionBaseClass`, not `BaseFork`, so they lack blob-related
methods (`blob_gas_per_blob`, `target_blobs_per_block`, etc.).

Chain `.transitions_to()` before each blob method call — a no-op for
regular forks, resolves to the target fork for transition forks.

* ci: trigger CI
spencer-tb added a commit to spencer-tb/execution-specs that referenced this pull request Mar 31, 2026
Add .transitions_to() calls for all fork method lookups in the
EIP-7918 blob reserve price conftest and spec, matching the pattern
from the EIP-4844 conftest fix (ethereum#2602). Transition forks like
OsakaToBPO1AtTime15k don't have blob methods directly; they must
resolve to the target fork first.
spencer-tb pushed a commit to spencer-tb/execution-specs that referenced this pull request Apr 1, 2026
…ethereum#2602)

* fix(tests): resolve transition fork blob methods in EIP-4844 conftest

Transition forks like `ShanghaiToCancunAtTime15k` inherit from
`TransitionBaseClass`, not `BaseFork`, so they lack blob-related
methods (`blob_gas_per_blob`, `target_blobs_per_block`, etc.).

Chain `.transitions_to()` before each blob method call — a no-op for
regular forks, resolves to the target fork for transition forks.

* ci: trigger CI
spencer-tb added a commit to spencer-tb/execution-specs that referenced this pull request Apr 1, 2026
Add .transitions_to() calls for all fork method lookups in the
EIP-7918 blob reserve price conftest and spec, matching the pattern
from the EIP-4844 conftest fix (ethereum#2602). Transition forks like
OsakaToBPO1AtTime15k don't have blob methods directly; they must
resolve to the target fork first.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-tests Area: Consensus tests. C-bug Category: this is a bug, deviation, or other problem

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants