Skip to content
Merged
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
12 changes: 0 additions & 12 deletions tests/prague/eip7685_general_purpose_el_requests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import pytest

from ethereum_test_forks import Fork
from ethereum_test_tools import (
Alloc,
Block,
Expand Down Expand Up @@ -36,12 +35,6 @@ def block_body_override_requests(
return None


@pytest.fixture
def block_body_extra_requests() -> List[SupportsBytes]:
"""List of requests that overwrite the requests in the header. None by default."""
return []


@pytest.fixture
def correct_requests_hash_in_header() -> bool:
"""
Expand Down Expand Up @@ -80,15 +73,13 @@ def is_monotonically_increasing(requests: List[bytes]) -> bool:

@pytest.fixture
def blocks(
fork: Fork,
pre: Alloc,
requests: List[
DepositInteractionBase
| WithdrawalRequestInteractionBase
| ConsolidationRequestInteractionBase
],
block_body_override_requests: List[Bytes | SupportsBytes] | None,
block_body_extra_requests: List[SupportsBytes],
correct_requests_hash_in_header: bool,
exception: BlockException | None,
engine_api_error_code: EngineAPIError | None,
Expand All @@ -109,9 +100,6 @@ def blocks(

valid_requests = Requests(*valid_requests_list)

if block_body_override_requests is None and block_body_extra_requests is not None:
block_body_override_requests = valid_requests.requests_list + block_body_extra_requests

rlp_modifier: Header | None = None
if correct_requests_hash_in_header:
rlp_modifier = Header(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,31 @@ def invalid_requests_block_combinations(fork: Fork) -> List[Any]:
correct_order_transactions,
correct_order + [bytes([fork.max_request_type() + 1])],
BlockException.INVALID_REQUESTS,
id="extra_invalid_type_request",
id="extra_invalid_type_request_with_no_data",
),
)
combinations.append(
pytest.param(
correct_order_transactions,
correct_order + [bytes([fork.max_request_type() + 1, 0x00])],
BlockException.INVALID_REQUESTS,
id="extra_invalid_type_request_with_data_0x00",
),
)
combinations.append(
pytest.param(
correct_order_transactions,
correct_order + [bytes([fork.max_request_type() + 1, 0x01])],
BlockException.INVALID_REQUESTS,
id="extra_invalid_type_request_with_data_0x01",
),
)
combinations.append(
pytest.param(
correct_order_transactions,
correct_order + [bytes([fork.max_request_type() + 1, 0xFF])],
BlockException.INVALID_REQUESTS,
id="extra_invalid_type_request_with_data_0xff",
),
)

Expand Down Expand Up @@ -516,6 +540,12 @@ def test_invalid_deposit_withdrawal_consolidation_requests_engine(
so the block might execute properly if the client ignores the requests in the new payload
parameters.

Note that the only difference between the engine version produced by this test and
the ones produced by `test_invalid_deposit_withdrawal_consolidation_requests` is the
`blockHash` value in the new payloads, which is calculated using different request hashes
for each test, but since the request hash is not a value that is included in the payload,
it might not be immediately apparent.

Also these tests would not fail if the block is imported via RLP (syncing from a peer),
so we only generate the BlockchainTestEngine for them.
"""
Expand Down
115 changes: 0 additions & 115 deletions tests/prague/eip7685_general_purpose_el_requests/test_request_types.py

This file was deleted.