Skip to content

Commit 68cdfa4

Browse files
committed
fix(tests): Remove BAL checks in osaka; opt for eip7928 branch
- Remove BAL-specific checks in Osaka so we have a cleaner implementation of Amsterdam when re-creating. This was a remnant of working on tests and specs separately but then merging the repos together implementation ``forks/osaka`` as the base branch.
1 parent 9563a51 commit 68cdfa4

File tree

5 files changed

+2
-108
lines changed

5 files changed

+2
-108
lines changed

docs/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Test fixtures for use by clients are available for each release on the [Github r
1313
#### `fill`
1414

1515
- 🐞 Allow `evmone` to fill Prague and Osaka blockchain tests (mainly modified deposit contract tests) ([#1689](https://github.com/ethereum/execution-specs/pull/1689))
16+
- 🐞 Turn off Block-Level Access List related checks when filling tests for Amsterdam ([#1737](https://github.com/ethereum/execution-specs/pull/1737))
1617

1718
#### `consume`
1819

packages/testing/src/execution_testing/fixtures/blockchain.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,6 @@ class FixtureHeader(CamelModel):
199199
requests_hash: (
200200
Annotated[Hash, HeaderForkRequirement("requests")] | None
201201
) = Field(None)
202-
block_access_list_hash: (
203-
Annotated[Hash, HeaderForkRequirement("bal_hash")] | None
204-
) = Field(None, alias="blockAccessListHash")
205202

206203
fork: Fork | None = Field(None, exclude=True)
207204

@@ -286,11 +283,6 @@ def genesis(cls, fork: Fork, env: Environment, state_root: Hash) -> Self:
286283
"requests_hash": Requests()
287284
if fork.header_requests_required(block_number=0, timestamp=0)
288285
else None,
289-
"block_access_list_hash": (
290-
BlockAccessList().rlp_hash
291-
if fork.header_bal_hash_required(block_number=0, timestamp=0)
292-
else None
293-
),
294286
"fork": fork,
295287
}
296288
return cls(**environment_values, **extras)
@@ -416,14 +408,6 @@ def from_fixture_header(
416408
"Invalid header for engine_newPayload"
417409
)
418410

419-
if fork.engine_execution_payload_block_access_list(
420-
block_number=header.number, timestamp=header.timestamp
421-
):
422-
if block_access_list is None:
423-
raise ValueError(
424-
f"`block_access_list` is required in engine `ExecutionPayload` for >={fork}."
425-
)
426-
427411
execution_payload = FixtureExecutionPayload.from_fixture_header(
428412
header=header,
429413
transactions=transactions,

packages/testing/src/execution_testing/forks/base_fork.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -345,14 +345,6 @@ def header_requests_required(
345345
"""Return true if the header must contain beacon chain requests."""
346346
pass
347347

348-
@classmethod
349-
@abstractmethod
350-
def header_bal_hash_required(
351-
cls, *, block_number: int = 0, timestamp: int = 0
352-
) -> bool:
353-
"""Return true if the header must contain block access list hash."""
354-
pass
355-
356348
# Gas related abstract methods
357349

358350
@classmethod
@@ -718,17 +710,6 @@ def engine_new_payload_target_blobs_per_block(
718710
"""
719711
pass
720712

721-
@classmethod
722-
@abstractmethod
723-
def engine_execution_payload_block_access_list(
724-
cls, *, block_number: int = 0, timestamp: int = 0
725-
) -> bool:
726-
"""
727-
Return `True` if the engine api version requires execution payload to
728-
include a `block_access_list`.
729-
"""
730-
pass
731-
732713
@classmethod
733714
@abstractmethod
734715
def engine_payload_attribute_target_blobs_per_block(

packages/testing/src/execution_testing/forks/forks/forks.py

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -443,14 +443,6 @@ def header_requests_required(
443443
del block_number, timestamp
444444
return False
445445

446-
@classmethod
447-
def header_bal_hash_required(
448-
cls, *, block_number: int = 0, timestamp: int = 0
449-
) -> bool:
450-
"""At genesis, header must not contain block access list hash."""
451-
del block_number, timestamp
452-
return False
453-
454446
@classmethod
455447
def engine_new_payload_version(
456448
cls, *, block_number: int = 0, timestamp: int = 0
@@ -491,14 +483,6 @@ def engine_new_payload_requests(
491483
del block_number, timestamp
492484
return False
493485

494-
@classmethod
495-
def engine_execution_payload_block_access_list(
496-
cls, *, block_number: int = 0, timestamp: int = 0
497-
) -> bool:
498-
"""At genesis, payloads do not have block access list."""
499-
del block_number, timestamp
500-
return False
501-
502486
@classmethod
503487
def engine_new_payload_target_blobs_per_block(
504488
cls,
@@ -2456,16 +2440,6 @@ class BPO5(BPO4, bpo_fork=True):
24562440
class Amsterdam(Osaka):
24572441
"""Amsterdam fork."""
24582442

2459-
@classmethod
2460-
def header_bal_hash_required(
2461-
cls, *, block_number: int = 0, timestamp: int = 0
2462-
) -> bool:
2463-
"""
2464-
From Amsterdam, header must contain block access list hash (EIP-7928).
2465-
"""
2466-
del block_number, timestamp
2467-
return True
2468-
24692443
@classmethod
24702444
def is_deployed(cls) -> bool:
24712445
"""Return True if this fork is deployed."""
@@ -2479,17 +2453,6 @@ def engine_new_payload_version(
24792453
del block_number, timestamp
24802454
return 5
24812455

2482-
@classmethod
2483-
def engine_execution_payload_block_access_list(
2484-
cls, *, block_number: int = 0, timestamp: int = 0
2485-
) -> bool:
2486-
"""
2487-
From Amsterdam, engine execution payload includes `block_access_list`
2488-
as a parameter.
2489-
"""
2490-
del block_number, timestamp
2491-
return True
2492-
24932456

24942457
class EOFv1(Prague, solc_name="cancun"):
24952458
"""EOF fork."""

packages/testing/src/execution_testing/specs/blockchain.py

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -685,24 +685,6 @@ def generate_block_data(
685685
)
686686
requests_list = block.requests
687687

688-
if self.fork.header_bal_hash_required(
689-
block_number=header.number, timestamp=header.timestamp
690-
):
691-
assert (
692-
transition_tool_output.result.block_access_list is not None
693-
), (
694-
"Block access list is required for this block but was not provided "
695-
"by the transition tool"
696-
)
697-
698-
rlp = transition_tool_output.result.block_access_list.rlp
699-
computed_bal_hash = Hash(rlp.keccak256())
700-
assert computed_bal_hash == header.block_access_list_hash, (
701-
"Block access list hash in header does not match the "
702-
f"computed hash from BAL: {header.block_access_list_hash} "
703-
f"!= {computed_bal_hash}"
704-
)
705-
706688
if block.rlp_modifier is not None:
707689
# Modify any parameter specified in the `rlp_modifier` after
708690
# transition tool processing.
@@ -711,23 +693,6 @@ def generate_block_data(
711693
self.fork
712694
) # Deleted during `apply` because `exclude=True`
713695

714-
# Process block access list - apply transformer if present for invalid
715-
# tests
716-
t8n_bal = transition_tool_output.result.block_access_list
717-
bal = t8n_bal
718-
if (
719-
block.expected_block_access_list is not None
720-
and t8n_bal is not None
721-
):
722-
block.expected_block_access_list.verify_against(t8n_bal)
723-
724-
bal = block.expected_block_access_list.modify_if_invalid_test(
725-
t8n_bal
726-
)
727-
if bal != t8n_bal:
728-
# If the BAL was modified, update the header hash
729-
header.block_access_list_hash = Hash(bal.rlp.keccak256())
730-
731696
built_block = BuiltBlock(
732697
header=header,
733698
alloc=transition_tool_output.alloc,
@@ -740,7 +705,7 @@ def generate_block_data(
740705
expected_exception=block.exception,
741706
engine_api_error_code=block.engine_api_error_code,
742707
fork=self.fork,
743-
block_access_list=bal,
708+
block_access_list=None,
744709
)
745710

746711
try:

0 commit comments

Comments
 (0)