Skip to content

feat(test-specs): add container definitions for ssz-engine api#2

Draft
RazorClient wants to merge 6 commits into
ssz/masterfrom
ssz/containers
Draft

feat(test-specs): add container definitions for ssz-engine api#2
RazorClient wants to merge 6 commits into
ssz/masterfrom
ssz/containers

Conversation

@RazorClient

Copy link
Copy Markdown
Owner

SSZ container definitions and helpers for the REST+SSZ Engine API refactor execution-apis PR.
This is foundational plumbing for the upcoming REST+SSZ blockchain-test support;
it does not add any fillable test cases yet.

🔗 Related Issues or PRs

Tracks execution-apis PR

✅ 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).
  • 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

cute animal

@RazorClient RazorClient changed the title feat(test-specs): add execution_testing.ssz package for the REST+SSZ … feat(test-specs): add container definitions for ssz-engine api Jun 16, 2026
@RazorClient RazorClient force-pushed the ssz/containers branch 3 times, most recently from 3efbb2f to 9ea9046 Compare June 16, 2026 14:41

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

@RazorClient RazorClient force-pushed the ssz/containers branch 3 times, most recently from 2dfeb53 to aaa910b Compare June 17, 2026 06:03
Comment thread packages/testing/src/execution_testing/ssz/tests/test_containers.py Outdated
Comment thread packages/testing/src/execution_testing/ssz/tests/test_engine_containers.py Outdated
Comment on lines +51 to +56
BuiltPayloadAmsterdam,
BuiltPayloadCancun,
BuiltPayloadOsaka,
BuiltPayloadParis,
BuiltPayloadPrague,
BuiltPayloadShanghai,

@jtraglia jtraglia Jun 17, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Should the BuiltPayload containers really exist? Will clients have this?

Comment thread packages/testing/src/execution_testing/ssz/constants.py Outdated
Comment thread packages/testing/src/execution_testing/ssz/constants.py Outdated
Comment on lines +12 to +21
from .constants import (
BYTES_PER_BLOB,
BYTES_PER_CELL,
CELLS_PER_EXT_BLOB,
MAX_BAL_BYTES,
MAX_BLOB_COMMITMENTS_PER_BLOCK,
MAX_BLOBS_REQUEST,
MAX_BODIES_REQUEST,
MAX_BYTES_PER_EXECUTION_REQUEST,
MAX_BYTES_PER_TX,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Here, I would actually suggest doing from .constants import *. Maybe EELS will disagree. I expect everything from that file will always be imported/used.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

star exporting would work if we use all the exports. If not, then ruff marks every use as F405 (it can't trace names through import *)

Comment thread packages/testing/src/execution_testing/ssz/tests/test_containers.py
Comment on lines +131 to +138
def envelope_bytes(
fork: str,
*,
parent_hash: bytes,
fee_recipient: bytes,
state_root: bytes,
receipts_root: bytes,
logs_bloom: bytes,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Shouldn't these be SSZ types?

@RazorClient RazorClient Jun 17, 2026

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

envelope_bytes is intentionally a plain-values builder: callers pass ordinary bytes/int, and it wraps them into the SSZ containers internally, so plain parameter types are the arguments

Comment on lines +146 to +148
"""
The Osaka execution payload.
"""

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Docstrings like these are not useful. I would suggest removing docstrings from all containers in this file.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

The repo has pydocstyle D101 globally enabled, so every public class must have a docstring.

Comment thread packages/testing/src/execution_testing/ssz/containers.py Outdated
Comment thread packages/testing/src/execution_testing/ssz/tests/test_containers.py Outdated
Comment thread packages/testing/src/execution_testing/ssz/tests/test_containers.py Outdated
Comment thread packages/testing/src/execution_testing/ssz/tests/test_containers.py Outdated
Comment thread packages/testing/src/execution_testing/ssz/containers.py Outdated
Comment thread packages/testing/src/execution_testing/ssz/containers.py Outdated
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.

2 participants