From 0187d06d4a8718a8e908547286de654f7bf79ac3 Mon Sep 17 00:00:00 2001 From: Haythem Sellami <17862704+haythemsellami@users.noreply.github.com> Date: Mon, 9 Mar 2026 18:49:32 +0800 Subject: [PATCH 1/2] fix(fill): pass sender authority history --- packages/testing/src/execution_testing/specs/blockchain.py | 4 ++++ packages/testing/src/execution_testing/specs/state.py | 2 ++ 2 files changed, 6 insertions(+) diff --git a/packages/testing/src/execution_testing/specs/blockchain.py b/packages/testing/src/execution_testing/specs/blockchain.py index 05fe8131fd4..85b1aa81bff 100644 --- a/packages/testing/src/execution_testing/specs/blockchain.py +++ b/packages/testing/src/execution_testing/specs/blockchain.py @@ -888,6 +888,7 @@ def make_hive_fixture( != BlockchainEngineXFixture, ) alloc: Alloc | LazyAlloc = pre + senders_authorities: dict[int, list[Address]] = {} state_root = genesis.header.state_root env = environment_from_parent_header(genesis.header) head_hash = genesis.header.block_hash @@ -898,6 +899,7 @@ def make_hive_fixture( block=block, previous_env=env, previous_alloc=alloc, + previous_senders_authorities=senders_authorities, last_block=i == len(self.blocks) - 1, ) fixture_payloads.append( @@ -905,6 +907,7 @@ def make_hive_fixture( ) if block.exception is None: alloc = built_block.alloc + senders_authorities = built_block.senders_authorities state_root = built_block.state_root env = apply_new_parent(built_block.env, built_block.header) head_hash = built_block.header.block_hash @@ -980,6 +983,7 @@ def make_hive_fixture( block=Block(), previous_env=env, previous_alloc=alloc, + previous_senders_authorities=senders_authorities, last_block=False, ) fixture_data.update( diff --git a/packages/testing/src/execution_testing/specs/state.py b/packages/testing/src/execution_testing/specs/state.py index b6923aae7de..d180631af50 100644 --- a/packages/testing/src/execution_testing/specs/state.py +++ b/packages/testing/src/execution_testing/specs/state.py @@ -144,6 +144,7 @@ def verify_modified_gas_limit( modified_tool_output = t8n.evaluate( transition_tool_data=TransitionTool.TransitionToolData( alloc=pre_alloc, + senders_authorities={}, txs=[new_tx], env=env, fork=fork, @@ -352,6 +353,7 @@ def make_state_test_fixture( transition_tool_output = t8n.evaluate( transition_tool_data=TransitionTool.TransitionToolData( alloc=pre_alloc, + senders_authorities={}, txs=[tx], env=env, fork=fork, From 6c3755045285482358a0d649fa6ea7419c97debb Mon Sep 17 00:00:00 2001 From: Haythem Sellami <17862704+haythemsellami@users.noreply.github.com> Date: Mon, 9 Mar 2026 18:50:27 +0800 Subject: [PATCH 2/2] fix(monad): exclude blob suites from monad eight --- .../pytest_commands/plugins/forks/forks.py | 27 +++++++ .../plugins/forks/tests/test_markers.py | 18 +++++ .../plugins/shared/execute_fill.py | 4 + .../execution_testing/forks/forks/forks.py | 74 +++++++++++++++++++ .../forks/tests/test_forks.py | 13 ++++ tests/cancun/eip4844_blobs/test_blob_txs.py | 2 + .../eip4844_blobs/test_blob_txs_full.py | 2 + .../eip4844_blobs/test_blobhash_opcode.py | 5 +- .../test_blobhash_opcode_contexts.py | 5 +- .../eip4844_blobs/test_excess_blob_gas.py | 6 +- .../test_excess_blob_gas_fork_transition.py | 2 + .../test_point_evaluation_precompile.py | 2 + .../test_point_evaluation_precompile_gas.py | 2 + 13 files changed, 158 insertions(+), 4 deletions(-) diff --git a/packages/testing/src/execution_testing/cli/pytest_commands/plugins/forks/forks.py b/packages/testing/src/execution_testing/cli/pytest_commands/plugins/forks/forks.py index 1c929709ec1..f39d3a39dbd 100644 --- a/packages/testing/src/execution_testing/cli/pytest_commands/plugins/forks/forks.py +++ b/packages/testing/src/execution_testing/cli/pytest_commands/plugins/forks/forks.py @@ -1044,6 +1044,33 @@ def _process_with_marker_args(self) -> Set[Fork]: return resulting_set +class ValidForBlobForks( + ValidityMarker, marker_name="valid_for_blob_forks", flag=True +): + """ + Marker to specify that a test is only valid for forks that support blobs. + + ```python + import pytest + + @pytest.mark.valid_for_blob_forks() + def test_blob_feature(state_test): + pass + ``` + """ + + def _process_with_marker_args(self) -> Set[Fork]: + """Exclude blobless forks when the marker is present.""" + if self.mark is None: + return set() + resulting_set: Set[Fork] = set() + for fork in ALL_FORKS: + if not fork.supports_blobs(): + resulting_set.add(fork) + resulting_set |= transition_fork_to(fork) + return resulting_set + + def pytest_generate_tests(metafunc: pytest.Metafunc) -> None: """Pytest hook used to dynamically generate test cases.""" test_name = metafunc.function.__name__ diff --git a/packages/testing/src/execution_testing/cli/pytest_commands/plugins/forks/tests/test_markers.py b/packages/testing/src/execution_testing/cli/pytest_commands/plugins/forks/tests/test_markers.py index fbbc1b31232..94b7321f398 100644 --- a/packages/testing/src/execution_testing/cli/pytest_commands/plugins/forks/tests/test_markers.py +++ b/packages/testing/src/execution_testing/cli/pytest_commands/plugins/forks/tests/test_markers.py @@ -176,6 +176,24 @@ def test_case(state_test): {"passed": 1, "failed": 0, "skipped": 0, "errors": 0}, id="valid_at_transition_to_from_fork_until_later_fork", ), + pytest.param( + generate_test( + valid_from='"Cancun"', + valid_for_blob_forks="", + ), + ["--fork=Prague"], + {"passed": 1, "failed": 0, "skipped": 0, "errors": 0}, + id="valid_for_blob_forks_prague", + ), + pytest.param( + generate_test( + valid_from='"Cancun"', + valid_for_blob_forks="", + ), + ["--fork=MONAD_EIGHT"], + {"passed": 0, "failed": 0, "skipped": 0, "errors": 0}, + id="valid_for_blob_forks_monad_eight", + ), pytest.param( generate_test( valid_at_transition_to='"BPO1"', diff --git a/packages/testing/src/execution_testing/cli/pytest_commands/plugins/shared/execute_fill.py b/packages/testing/src/execution_testing/cli/pytest_commands/plugins/shared/execute_fill.py index acfb3be9db8..4d51fddfbf3 100644 --- a/packages/testing/src/execution_testing/cli/pytest_commands/plugins/shared/execute_fill.py +++ b/packages/testing/src/execution_testing/cli/pytest_commands/plugins/shared/execute_fill.py @@ -175,6 +175,10 @@ def pytest_configure(config: pytest.Config) -> None: "markers", "valid_for_bpo_forks: Marks a test as valid for BPO forks", ) + config.addinivalue_line( + "markers", + "valid_for_blob_forks: Marks a test as valid only for forks that support blobs", + ) config.addinivalue_line( "markers", "mainnet: Specialty tests crafted for running on mainnet and sanity checking.", diff --git a/packages/testing/src/execution_testing/forks/forks/forks.py b/packages/testing/src/execution_testing/forks/forks/forks.py index bfc8effa0fc..0834f6ae3f8 100644 --- a/packages/testing/src/execution_testing/forks/forks/forks.py +++ b/packages/testing/src/execution_testing/forks/forks/forks.py @@ -2348,6 +2348,80 @@ def blob_base_cost( class MONAD_EIGHT(Prague, solc_name="cancun"): """MONAD_EIGHT fork.""" + @classmethod + def header_excess_blob_gas_required( + cls, *, block_number: int = 0, timestamp: int = 0 + ) -> bool: + """ + MONAD_EIGHT does not include blob header fields. + + Monad keeps the point-evaluation precompile but does not support blob + transactions or blob gas accounting. + """ + del block_number, timestamp + return False + + @classmethod + def header_blob_gas_used_required( + cls, *, block_number: int = 0, timestamp: int = 0 + ) -> bool: + """MONAD_EIGHT does not include blob header fields.""" + del block_number, timestamp + return False + + @classmethod + def supports_blobs( + cls, *, block_number: int = 0, timestamp: int = 0 + ) -> bool: + """MONAD_EIGHT does not support blob transactions.""" + del block_number, timestamp + return False + + @classmethod + def tx_types( + cls, *, block_number: int = 0, timestamp: int = 0 + ) -> List[int]: + """Return Prague transaction types without blob transactions.""" + return [ + tx_type + for tx_type in super(MONAD_EIGHT, cls).tx_types( + block_number=block_number, timestamp=timestamp + ) + if tx_type != 3 + ] + + @classmethod + def full_blob_tx_wrapper_version( + cls, *, block_number: int = 0, timestamp: int = 0 + ) -> int | None: + """MONAD_EIGHT does not wrap full blob transactions.""" + del block_number, timestamp + return None + + @classmethod + def blob_schedule( + cls, *, block_number: int = 0, timestamp: int = 0 + ) -> BlobSchedule | None: + """MONAD_EIGHT does not advertise a blob schedule.""" + del block_number, timestamp + return None + + @classmethod + def engine_get_blobs_version( + cls, *, block_number: int = 0, timestamp: int = 0 + ) -> Optional[int]: + """MONAD_EIGHT does not expose blob retrieval over the engine API.""" + del block_number, timestamp + return None + + @classmethod + def engine_new_payload_blob_hashes( + cls, *, block_number: int = 0, timestamp: int = 0 + ) -> bool: + """MONAD_EIGHT payloads do not include blob hashes.""" + del block_number, timestamp + return False + @classmethod def precompiles( cls, *, block_number: int = 0, timestamp: int = 0 diff --git a/packages/testing/src/execution_testing/forks/tests/test_forks.py b/packages/testing/src/execution_testing/forks/tests/test_forks.py index b5a91ef81f5..bbfe59a23f0 100644 --- a/packages/testing/src/execution_testing/forks/tests/test_forks.py +++ b/packages/testing/src/execution_testing/forks/tests/test_forks.py @@ -18,6 +18,7 @@ Homestead, Istanbul, London, + MONAD_EIGHT, Osaka, Paris, Prague, @@ -394,6 +395,18 @@ def test_tx_types() -> None: # noqa: D103 Cancun.tx_types() == list(range(4)) # noqa: B015 +def test_monad_eight_disables_blob_support() -> None: + """MONAD_EIGHT keeps the KZG precompile but does not support blob txs.""" + assert MONAD_EIGHT.supports_blobs() is False + assert MONAD_EIGHT.header_excess_blob_gas_required() is False + assert MONAD_EIGHT.header_blob_gas_used_required() is False + assert MONAD_EIGHT.blob_schedule() is None + assert MONAD_EIGHT.engine_get_blobs_version() is None + assert MONAD_EIGHT.engine_new_payload_blob_hashes() is False + assert MONAD_EIGHT.full_blob_tx_wrapper_version() is None + assert 3 not in MONAD_EIGHT.tx_types() + + @pytest.mark.parametrize( "fork", [ diff --git a/tests/cancun/eip4844_blobs/test_blob_txs.py b/tests/cancun/eip4844_blobs/test_blob_txs.py index 28d3ce77229..86126e7f069 100644 --- a/tests/cancun/eip4844_blobs/test_blob_txs.py +++ b/tests/cancun/eip4844_blobs/test_blob_txs.py @@ -46,6 +46,8 @@ REFERENCE_SPEC_GIT_PATH = ref_spec_4844.git_path REFERENCE_SPEC_VERSION = ref_spec_4844.version +pytestmark = pytest.mark.valid_for_blob_forks() + @pytest.fixture def destination_account_code() -> Bytecode | None: diff --git a/tests/cancun/eip4844_blobs/test_blob_txs_full.py b/tests/cancun/eip4844_blobs/test_blob_txs_full.py index 7adc5ac568f..1ed54b2c601 100644 --- a/tests/cancun/eip4844_blobs/test_blob_txs_full.py +++ b/tests/cancun/eip4844_blobs/test_blob_txs_full.py @@ -24,6 +24,8 @@ REFERENCE_SPEC_GIT_PATH = ref_spec_4844.git_path REFERENCE_SPEC_VERSION = ref_spec_4844.version +pytestmark = pytest.mark.valid_for_blob_forks() + @pytest.fixture def destination_account() -> Address: diff --git a/tests/cancun/eip4844_blobs/test_blobhash_opcode.py b/tests/cancun/eip4844_blobs/test_blobhash_opcode.py index 6cc1c55a113..f6f27e02bb3 100644 --- a/tests/cancun/eip4844_blobs/test_blobhash_opcode.py +++ b/tests/cancun/eip4844_blobs/test_blobhash_opcode.py @@ -43,7 +43,10 @@ REFERENCE_SPEC_GIT_PATH = ref_spec_4844.git_path REFERENCE_SPEC_VERSION = ref_spec_4844.version -pytestmark = pytest.mark.valid_from("Cancun") +pytestmark = [ + pytest.mark.valid_from("Cancun"), + pytest.mark.valid_for_blob_forks(), +] # Blobhash index values for test_blobhash_gas_cost diff --git a/tests/cancun/eip4844_blobs/test_blobhash_opcode_contexts.py b/tests/cancun/eip4844_blobs/test_blobhash_opcode_contexts.py index 02235e4edd1..2a48a7959b8 100644 --- a/tests/cancun/eip4844_blobs/test_blobhash_opcode_contexts.py +++ b/tests/cancun/eip4844_blobs/test_blobhash_opcode_contexts.py @@ -26,7 +26,10 @@ REFERENCE_SPEC_GIT_PATH = ref_spec_4844.git_path REFERENCE_SPEC_VERSION = ref_spec_4844.version -pytestmark = pytest.mark.valid_from("Cancun") +pytestmark = [ + pytest.mark.valid_from("Cancun"), + pytest.mark.valid_for_blob_forks(), +] class BlobhashContext(Enum): diff --git a/tests/cancun/eip4844_blobs/test_excess_blob_gas.py b/tests/cancun/eip4844_blobs/test_excess_blob_gas.py index ffa29e5a3ce..5be841d04a6 100644 --- a/tests/cancun/eip4844_blobs/test_excess_blob_gas.py +++ b/tests/cancun/eip4844_blobs/test_excess_blob_gas.py @@ -52,8 +52,10 @@ REFERENCE_SPEC_GIT_PATH = ref_spec_4844.git_path REFERENCE_SPEC_VERSION = ref_spec_4844.version -# All tests run from Cancun fork -pytestmark = pytest.mark.valid_from("Cancun") +pytestmark = [ + pytest.mark.valid_for_blob_forks(), + pytest.mark.valid_from("Cancun"), +] @pytest.fixture diff --git a/tests/cancun/eip4844_blobs/test_excess_blob_gas_fork_transition.py b/tests/cancun/eip4844_blobs/test_excess_blob_gas_fork_transition.py index d88207cfcea..11b4e410d74 100644 --- a/tests/cancun/eip4844_blobs/test_excess_blob_gas_fork_transition.py +++ b/tests/cancun/eip4844_blobs/test_excess_blob_gas_fork_transition.py @@ -30,6 +30,8 @@ REFERENCE_SPEC_GIT_PATH = ref_spec_4844.git_path REFERENCE_SPEC_VERSION = ref_spec_4844.version +pytestmark = pytest.mark.valid_for_blob_forks() + # Timestamp of the fork FORK_TIMESTAMP = 15_000 BASE_FEE_MAX_CHANGE_DENOMINATOR = 8 diff --git a/tests/cancun/eip4844_blobs/test_point_evaluation_precompile.py b/tests/cancun/eip4844_blobs/test_point_evaluation_precompile.py index fb7107c1d2e..dde610d6a25 100644 --- a/tests/cancun/eip4844_blobs/test_point_evaluation_precompile.py +++ b/tests/cancun/eip4844_blobs/test_point_evaluation_precompile.py @@ -60,6 +60,8 @@ REFERENCE_SPEC_GIT_PATH = ref_spec_4844.git_path REFERENCE_SPEC_VERSION = ref_spec_4844.version +pytestmark = pytest.mark.valid_for_blob_forks() + class Result(str, Enum): """Result of the point evaluation precompile.""" diff --git a/tests/cancun/eip4844_blobs/test_point_evaluation_precompile_gas.py b/tests/cancun/eip4844_blobs/test_point_evaluation_precompile_gas.py index 1ae309cda40..a40b5390fae 100644 --- a/tests/cancun/eip4844_blobs/test_point_evaluation_precompile_gas.py +++ b/tests/cancun/eip4844_blobs/test_point_evaluation_precompile_gas.py @@ -28,6 +28,8 @@ REFERENCE_SPEC_GIT_PATH = ref_spec_4844.git_path REFERENCE_SPEC_VERSION = ref_spec_4844.version +pytestmark = pytest.mark.valid_for_blob_forks() + @pytest.fixture def precompile_input(proof: Literal["correct", "incorrect"]) -> bytes: