Skip to content

chore(tests|forks): add max blobs per tx limit #1884

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

Merged
merged 1 commit into from
Jul 30, 2025

Conversation

spencer-tb
Copy link
Contributor

@spencer-tb spencer-tb commented Jul 9, 2025

🗒️ Description

Following the changes to EIP-7594: ethereum/EIPs#9981

Adds some more execute_blobs tests for PeerDAS, including tests for the new max blobs per tx limit.

Updates fork logic and EIP-4844 tests to use a new max_blobs_per_tx function.

Adds specific tests for the new change (including transition tests) within the PeerDAS EIP testing folder.

Fill with the latest EELS forks/osaka.

Requires

🔗 Related Issues or PRs

#1798

Requires: #1784

✅ Checklist

  • All: Ran fast tox checks to avoid unnecessary CI fails, see also Code Standards and Enabling Pre-commit Checks:
    uvx --with=tox-uv tox -e lint,typecheck,spellcheck,markdownlint
  • 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).

@spencer-tb spencer-tb added scope:forks Scope: Changes ethereum_test_forks package scope:tests Scope: Changes EL client test cases in `./tests` type:chore Type: Chore fork:osaka Osaka hardfork labels Jul 9, 2025
@spencer-tb
Copy link
Contributor Author

spencer-tb commented Jul 10, 2025

I tried to fix the coverage for this line below, in the following commit:

// Ensure the total blob gas spent is at most equal to the limit
if (*test_block.block_info.blob_gas_used > state::max_blob_gas_per_block(rev))
    return false;

@spencer-tb spencer-tb marked this pull request as ready for review July 10, 2025 18:43
Copy link
Collaborator

@kclowes kclowes left a comment

Choose a reason for hiding this comment

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

Nothing obvious stands out to me here! 🚀

Copy link
Member

@marioevz marioevz left a comment

Choose a reason for hiding this comment

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

Looks great! Just a couple of comments, thanks!

@spencer-tb spencer-tb force-pushed the eip-7594-max-blobs-per-tx branch from 3571174 to 193ea5e Compare July 18, 2025 15:30
@spencer-tb spencer-tb force-pushed the eip-7594-max-blobs-per-tx branch 3 times, most recently from cf09141 to 7e0c5c7 Compare July 25, 2025 23:15
@spencer-tb
Copy link
Contributor Author

Just commenting on the fixture diffs for the changes to the 4844 tests - Cancun/Prague:

  • test_excess_blob_gas_fork_transition.py: Expected change for some tests as we no longer use 1 big transaction per block but multiple smaller transactions per block.
  • test_excess_blob_gas.py: Root hash changed as additional test cases added for blocks with multiple transactions per block. All existing tests have the same hash.
  • test_blob_txs_full.py: No root hash change.
  • test_blob_txs.py: No root hash change.
  • test_blobhash_opcode_contexts.py: No root hash change.
  • test_blobhash_opcode.py: Only the blob hash gas cost test changes because of this. Expected and safe.

Copy link
Member

@marioevz marioevz left a comment

Choose a reason for hiding this comment

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

Some comments which I feel would bring down the number of lines changed and also simplify code readabilit IMO, unless I'm missing something.

@spencer-tb spencer-tb force-pushed the eip-7594-max-blobs-per-tx branch from 6287172 to e03bfcd Compare July 29, 2025 09:52
Copy link
Member

@marioevz marioevz left a comment

Choose a reason for hiding this comment

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

Awesome work, thanks for the refactor I think changes look much simpler now.
Thanks!

@spencer-tb spencer-tb force-pushed the eip-7594-max-blobs-per-tx branch from 57b729e to 6018bb9 Compare July 29, 2025 14:30
@spencer-tb spencer-tb force-pushed the eip-7594-max-blobs-per-tx branch from 51cb578 to 97399d4 Compare July 30, 2025 12:58
@spencer-tb spencer-tb merged commit def3348 into main Jul 30, 2025
16 checks passed
@spencer-tb spencer-tb deleted the eip-7594-max-blobs-per-tx branch July 30, 2025 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fork:osaka Osaka hardfork scope:forks Scope: Changes ethereum_test_forks package scope:tests Scope: Changes EL client test cases in `./tests` type:chore Type: Chore
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants