Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Test fixtures for use by clients are available for each release on the [Github r
#### `fill`

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

#### `consume`

Expand Down
16 changes: 0 additions & 16 deletions packages/testing/src/execution_testing/fixtures/blockchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,6 @@ class FixtureHeader(CamelModel):
requests_hash: (
Annotated[Hash, HeaderForkRequirement("requests")] | None
) = Field(None)
block_access_list_hash: (
Annotated[Hash, HeaderForkRequirement("bal_hash")] | None
) = Field(None, alias="blockAccessListHash")

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

Expand Down Expand Up @@ -286,11 +283,6 @@ def genesis(cls, fork: Fork, env: Environment, state_root: Hash) -> Self:
"requests_hash": Requests()
if fork.header_requests_required(block_number=0, timestamp=0)
else None,
"block_access_list_hash": (
BlockAccessList().rlp_hash
if fork.header_bal_hash_required(block_number=0, timestamp=0)
else None
),
"fork": fork,
}
return cls(**environment_values, **extras)
Expand Down Expand Up @@ -416,14 +408,6 @@ def from_fixture_header(
"Invalid header for engine_newPayload"
)

if fork.engine_execution_payload_block_access_list(
block_number=header.number, timestamp=header.timestamp
):
if block_access_list is None:
raise ValueError(
f"`block_access_list` is required in engine `ExecutionPayload` for >={fork}."
)

execution_payload = FixtureExecutionPayload.from_fixture_header(
header=header,
transactions=transactions,
Expand Down
19 changes: 0 additions & 19 deletions packages/testing/src/execution_testing/forks/base_fork.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,14 +345,6 @@ def header_requests_required(
"""Return true if the header must contain beacon chain requests."""
pass

@classmethod
@abstractmethod
def header_bal_hash_required(
cls, *, block_number: int = 0, timestamp: int = 0
) -> bool:
"""Return true if the header must contain block access list hash."""
pass

# Gas related abstract methods

@classmethod
Expand Down Expand Up @@ -718,17 +710,6 @@ def engine_new_payload_target_blobs_per_block(
"""
pass

@classmethod
@abstractmethod
def engine_execution_payload_block_access_list(
cls, *, block_number: int = 0, timestamp: int = 0
) -> bool:
"""
Return `True` if the engine api version requires execution payload to
include a `block_access_list`.
"""
pass

@classmethod
@abstractmethod
def engine_payload_attribute_target_blobs_per_block(
Expand Down
37 changes: 0 additions & 37 deletions packages/testing/src/execution_testing/forks/forks/forks.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,14 +443,6 @@ def header_requests_required(
del block_number, timestamp
return False

@classmethod
def header_bal_hash_required(
cls, *, block_number: int = 0, timestamp: int = 0
) -> bool:
"""At genesis, header must not contain block access list hash."""
del block_number, timestamp
return False

@classmethod
def engine_new_payload_version(
cls, *, block_number: int = 0, timestamp: int = 0
Expand Down Expand Up @@ -491,14 +483,6 @@ def engine_new_payload_requests(
del block_number, timestamp
return False

@classmethod
def engine_execution_payload_block_access_list(
cls, *, block_number: int = 0, timestamp: int = 0
) -> bool:
"""At genesis, payloads do not have block access list."""
del block_number, timestamp
return False

@classmethod
def engine_new_payload_target_blobs_per_block(
cls,
Expand Down Expand Up @@ -2456,16 +2440,6 @@ class BPO5(BPO4, bpo_fork=True):
class Amsterdam(Osaka):
"""Amsterdam fork."""

@classmethod
def header_bal_hash_required(
cls, *, block_number: int = 0, timestamp: int = 0
) -> bool:
"""
From Amsterdam, header must contain block access list hash (EIP-7928).
"""
del block_number, timestamp
return True

@classmethod
def is_deployed(cls) -> bool:
"""Return True if this fork is deployed."""
Expand All @@ -2479,17 +2453,6 @@ def engine_new_payload_version(
del block_number, timestamp
return 5

@classmethod
def engine_execution_payload_block_access_list(
cls, *, block_number: int = 0, timestamp: int = 0
) -> bool:
"""
From Amsterdam, engine execution payload includes `block_access_list`
as a parameter.
"""
del block_number, timestamp
return True


class EOFv1(Prague, solc_name="cancun"):
"""EOF fork."""
Expand Down
37 changes: 1 addition & 36 deletions packages/testing/src/execution_testing/specs/blockchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -685,24 +685,6 @@ def generate_block_data(
)
requests_list = block.requests

if self.fork.header_bal_hash_required(
block_number=header.number, timestamp=header.timestamp
):
assert (
transition_tool_output.result.block_access_list is not None
), (
"Block access list is required for this block but was not provided "
"by the transition tool"
)

rlp = transition_tool_output.result.block_access_list.rlp
computed_bal_hash = Hash(rlp.keccak256())
assert computed_bal_hash == header.block_access_list_hash, (
"Block access list hash in header does not match the "
f"computed hash from BAL: {header.block_access_list_hash} "
f"!= {computed_bal_hash}"
)

if block.rlp_modifier is not None:
# Modify any parameter specified in the `rlp_modifier` after
# transition tool processing.
Expand All @@ -711,23 +693,6 @@ def generate_block_data(
self.fork
) # Deleted during `apply` because `exclude=True`

# Process block access list - apply transformer if present for invalid
# tests
t8n_bal = transition_tool_output.result.block_access_list
bal = t8n_bal
if (
block.expected_block_access_list is not None
and t8n_bal is not None
):
block.expected_block_access_list.verify_against(t8n_bal)

bal = block.expected_block_access_list.modify_if_invalid_test(
t8n_bal
)
if bal != t8n_bal:
# If the BAL was modified, update the header hash
header.block_access_list_hash = Hash(bal.rlp.keccak256())

built_block = BuiltBlock(
header=header,
alloc=transition_tool_output.alloc,
Expand All @@ -740,7 +705,7 @@ def generate_block_data(
expected_exception=block.exception,
engine_api_error_code=block.engine_api_error_code,
fork=self.fork,
block_access_list=bal,
block_access_list=None,
)

try:
Expand Down
Loading