Skip to content

Commit eda8cc6

Browse files
authored
feat(checklists,tests): complete eip7934 checklist + update checklist template + add missing test cases (#2282)
* feat(checklists): Create checklist for eip7934 adding block validation - Add `BlockLevelConstraint` checks to `eip_checklist.py` checklist_template for block-level constraint checks. - Set up checklist for eip7934 and mark completed tasks. * feat(tests): Add transition tests for eip7934 block rlp limit * chore: Add changelog entry for #2282; minor tweaks * feat(tests): Add block rlp limit test with non-empty withdrawals * chore(tests): Update latest ref spec versions
1 parent baaa5bc commit eda8cc6

File tree

10 files changed

+394
-18
lines changed

10 files changed

+394
-18
lines changed

docs/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Test fixtures for use by clients are available for each release on the [Github r
3434
- 🐞 Tighten up validation for empty lists on Block-Level Access List tests ([#2118](https://github.com/ethereum/execution-spec-tests/pull/2118)).
3535
- ✨ Added the `MemoryVariable` EVM abstraction to generate more readable bytecode when there's heavy use of variables that are stored in memory ([#1609](https://github.com/ethereum/execution-spec-tests/pull/1609)).
3636
- 🐞 Fix an issue with `test_bal_block_rewards` where the block base fee was wrongfully overridden ([#2262](https://github.com/ethereum/execution-spec-tests/pull/2262)).
37+
- ✨ Complete EIP checklist for EIP-7934 and update the checklist template to include block-level constraint checks ([#2282](https://github.com/ethereum/execution-spec-tests/pull/2282)).
3738

3839
### 🧪 Test Cases
3940

@@ -44,6 +45,7 @@ Test fixtures for use by clients are available for each release on the [Github r
4445
- ✨ Add EIP-7928 tests for EIP-2930 interactions ([#2167](https://github.com/ethereum/execution-spec-tests/pull/2167)).
4546
- ✨ Add EIP-7928 tests for NOOP operations ([#2178](https://github.com/ethereum/execution-spec-tests/pull/2178)).
4647
- ✨ Add EIP-7928 tests for net-zero balance transfers ([#2280](https://github.com/ethereum/execution-spec-tests/pull/2280)).
48+
- ✨ Add fork transition test cases for EIP-7934 ([#2282](https://github.com/ethereum/execution-spec-tests/pull/2282)).
4749

4850
## [v5.0.0](https://github.com/ethereum/execution-spec-tests/releases/tag/v5.0.0) - 2025-09-05
4951

docs/writing_tests/checklist_templates/eip_testing_checklist_template.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1216,3 +1216,46 @@ Note: All test cases must use off-by-one values to ensure proper boundary condit
12161216
### Framework Changes
12171217

12181218
- Update the validity constraint as a fork method that returns the updated value starting from the fork where the constraint changes.
1219+
1220+
## Block-Level Validation Constraint
1221+
1222+
The EIP introduces a new constraint that applies at the block level (e.g., block RLP size limits, block validation rules).
1223+
1224+
### Test Vectors
1225+
1226+
#### Boundary Conditions
1227+
1228+
Verify block acceptance/rejection at constraint boundaries using off-by-one values.
1229+
1230+
| ID | Description | Status | Tests |
1231+
| ----------------------------------------- |---------------------------------------------------------------------------------------------| ------ | ----- |
1232+
| `block_level_constraint/test/boundary/under` | Verify that a block with constraint value at limit minus one is accepted (expect success). | | |
1233+
| `block_level_constraint/test/boundary/exact` | Verify that a block with constraint value exactly at limit is accepted (expect success). | | |
1234+
| `block_level_constraint/test/boundary/over` | Verify that a block with constraint value at limit plus one is rejected (expect exception). | | |
1235+
1236+
#### Content Variations
1237+
1238+
Verify the constraint behaves correctly with different block contents that may affect the constraint calculation.
1239+
1240+
| ID | Description | Status | Tests |
1241+
| ----------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ------ | ----- |
1242+
| `block_level_constraint/test/content/transaction_types` | Verify constraint behavior with all supported transaction types in the block. | | |
1243+
| `block_level_constraint/test/content/logs` | Verify constraint behavior when transactions emit logs. | | |
1244+
| `block_level_constraint/test/content/receipts` | Verify constraint behavior with varying receipt sizes. | | |
1245+
| `block_level_constraint/test/content/withdrawals` | Verify constraint behavior with non-empty withdrawals list. | | |
1246+
1247+
#### Fork Transition
1248+
1249+
| ID | Description | Status | Tests |
1250+
| ----------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ------ | ----- |
1251+
| `block_level_constraint/test/fork_transition/accepted_before_fork` | Verify that a block before the activation fork is accepted even when the new constraint is not met. | | |
1252+
| `block_level_constraint/test/fork_transition/accepted_after_fork` | Verify that a block after the activation fork is accepted when the new constraint is met. | | |
1253+
| `block_level_constraint/test/fork_transition/rejected_after_fork` | Verify that a block after the activation fork is rejected when the new constraint is not met. | | |
1254+
1255+
Note: All test cases must use off-by-one values to ensure proper boundary condition verification.
1256+
1257+
### Framework Changes
1258+
1259+
- Introduce the constraint as a fork method that returns:
1260+
- `None` for forks before its activation.
1261+
- A non-`None` value starting from the fork where the constraint becomes active.

src/cli/generate_checklist_stubs.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ def generate_checklist_stubs(output: str | None, dry_run: bool) -> None:
110110
stub_content = '''"""
111111
Type stubs for EIP checklist - auto-generated.
112112
113-
DO NOT EDIT MANUALLY - This file is generated by `uv run generate_checklist_stubs`
113+
DO NOT EDIT MANUALLY - This file is generated by running
114+
`uv run generate_checklist_stubs`
114115
"""
115116
116117
from typing import Any, Callable, TypeVar, overload

src/ethereum_test_checklists/eip_checklist.py

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1766,3 +1766,98 @@ class RejectedAfterFork(ChecklistItem):
17661766
"""
17671767

17681768
pass
1769+
1770+
class BlockLevelConstraint(ChecklistItem):
1771+
"""Block-level validation constraint checklist items."""
1772+
1773+
class Test(ChecklistItem):
1774+
"""Test vectors for block-level constraint."""
1775+
1776+
class Boundary(ChecklistItem):
1777+
"""Boundary condition tests."""
1778+
1779+
class Under(ChecklistItem):
1780+
"""
1781+
Verify that a block with constraint value at limit minus
1782+
one is accepted.
1783+
"""
1784+
1785+
pass
1786+
1787+
class Exact(ChecklistItem):
1788+
"""
1789+
Verify that a block with constraint value exactly at
1790+
limit is accepted.
1791+
"""
1792+
1793+
pass
1794+
1795+
class Over(ChecklistItem):
1796+
"""
1797+
Verify that a block with constraint value at limit plus
1798+
one is rejected.
1799+
"""
1800+
1801+
pass
1802+
1803+
class Content(ChecklistItem):
1804+
"""Content variation tests."""
1805+
1806+
class TransactionTypes(ChecklistItem):
1807+
"""
1808+
Verify constraint behavior with all supported
1809+
transaction types.
1810+
"""
1811+
1812+
pass
1813+
1814+
class Logs(ChecklistItem):
1815+
"""
1816+
Verify constraint behavior when transactions emit
1817+
logs.
1818+
"""
1819+
1820+
pass
1821+
1822+
class Receipts(ChecklistItem):
1823+
"""
1824+
Verify constraint behavior with varying receipt
1825+
sizes.
1826+
"""
1827+
1828+
pass
1829+
1830+
class Withdrawals(ChecklistItem):
1831+
"""
1832+
Verify constraint behavior with non-empty withdrawals
1833+
list.
1834+
"""
1835+
1836+
pass
1837+
1838+
class ForkTransition(ChecklistItem):
1839+
"""Fork transition tests."""
1840+
1841+
class AcceptedBeforeFork(ChecklistItem):
1842+
"""
1843+
Verify that a block before the activation fork is
1844+
accepted even when the new constraint is not met.
1845+
"""
1846+
1847+
pass
1848+
1849+
class AcceptedAfterFork(ChecklistItem):
1850+
"""
1851+
Verify that a block after the activation fork is
1852+
accepted when the new constraint is met.
1853+
"""
1854+
1855+
pass
1856+
1857+
class RejectedAfterFork(ChecklistItem):
1858+
"""
1859+
Verify that a block after the activation fork is
1860+
rejected when the new constraint is not met.
1861+
"""
1862+
1863+
pass

src/ethereum_test_checklists/eip_checklist.pyi

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
"""
22
Type stubs for EIP checklist - auto-generated.
33
4-
DO NOT EDIT MANUALLY -
5-
This file is generated by `uv run generate_checklist_stubs`
4+
DO NOT EDIT MANUALLY - This file is generated by running
5+
`uv run generate_checklist_stubs`
66
"""
77

88
from typing import Any, Callable, TypeVar, overload
@@ -48,6 +48,24 @@ class EIPChecklist:
4848
Accept: _CallableChecklistItem
4949
Reject: _CallableChecklistItem
5050

51+
class BlockLevelConstraint(_CallableChecklistItem):
52+
class Test(_CallableChecklistItem):
53+
class Boundary(_CallableChecklistItem):
54+
Exact: _CallableChecklistItem
55+
Over: _CallableChecklistItem
56+
Under: _CallableChecklistItem
57+
58+
class Content(_CallableChecklistItem):
59+
Logs: _CallableChecklistItem
60+
Receipts: _CallableChecklistItem
61+
TransactionTypes: _CallableChecklistItem
62+
Withdrawals: _CallableChecklistItem
63+
64+
class ForkTransition(_CallableChecklistItem):
65+
AcceptedAfterFork: _CallableChecklistItem
66+
AcceptedBeforeFork: _CallableChecklistItem
67+
RejectedAfterFork: _CallableChecklistItem
68+
5169
class ExecutionLayerRequest(_CallableChecklistItem):
5270
class Test(_CallableChecklistItem):
5371
class CrossRequestType(_CallableChecklistItem):

tests/amsterdam/eip7928_block_level_access_lists/spec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class ReferenceSpec:
1313

1414
ref_spec_7928 = ReferenceSpec(
1515
git_path="EIPS/eip-7928.md",
16-
version="35732baa14cfea785d9c58d5f18033392b7ed886",
16+
version="e7f0963a024b3d0dedc4488a7553bf7c70dedb3e",
1717
)
1818

1919

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
general/code_coverage/eels = Test coverage should be verified in EELS implementation
2+
general/code_coverage/test_coverage = Run tests with --cov flag to verify test coverage
3+
general/code_coverage/second_client = Tests marked with verify_sync marker verify block syncing to other clients
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
opcode = EIP-7934 does not introduce a new opcode
2+
precompile = EIP-7934 does not introduce a new precompile
3+
removed_precompile = EIP-7934 does not remove a precompile
4+
system_contract = EIP-7934 does not introduce a new system contract
5+
transaction_type = EIP-7934 does not introduce a new transaction type
6+
block_header_field = EIP-7934 does not add any new block header fields
7+
block_body_field = EIP-7934 does not add any new block body fields
8+
gas_cost_changes = EIP-7934 does not modify existing gas costs
9+
gas_refunds_changes = EIP-7934 does not introduce any gas refund changes
10+
blob_count_changes = EIP-7934 does not introduce any blob count changes
11+
execution_layer_request = EIP-7934 does not introduce an execution layer request
12+
new_transaction_validity_constraint = EIP-7934 introduces a block-level constraint, not a transaction-level constraint
13+
modified_transaction_validity_constraint = EIP-7934 introduces a block-level constraint, not a transaction-level constraint
14+
block_level_constraint/test/content/receipts = Receipts are not part of the block RLP encoding - only the receipts root hash is included in the block header. Therefore, varying receipt sizes do not affect the block RLP size limit.

tests/osaka/eip7934_block_rlp_limit/spec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class ReferenceSpec:
1111
version: str
1212

1313

14-
ref_spec_7934 = ReferenceSpec("EIPS/eip-7934.md", "028e8657abdf9fa3f2159e639bccd2f66f88be1c")
14+
ref_spec_7934 = ReferenceSpec("EIPS/eip-7934.md", "2e5cc824089bab8d04aee598708e21c0e06857ef")
1515

1616

1717
@dataclass(frozen=True)

0 commit comments

Comments
 (0)