From 31f6b47b259aae3bedc22b6510c125ca6bf37be2 Mon Sep 17 00:00:00 2001 From: Haythem Sellami <17862704+haythemsellami@users.noreply.github.com> Date: Fri, 13 Mar 2026 23:50:50 +0800 Subject: [PATCH] fix(monad): disable blob support on MONAD_EIGHT --- .../execution_testing/forks/forks/forks.py | 74 +++++++++++++++++++ .../forks/tests/test_forks.py | 13 ++++ 2 files changed, 87 insertions(+) diff --git a/packages/testing/src/execution_testing/forks/forks/forks.py b/packages/testing/src/execution_testing/forks/forks/forks.py index 8c3bec9a0fd..08f943304d1 100644 --- a/packages/testing/src/execution_testing/forks/forks/forks.py +++ b/packages/testing/src/execution_testing/forks/forks/forks.py @@ -3272,6 +3272,80 @@ def blob_base_cost( class MONAD_EIGHT(Prague, solc_name="cancun"): # noqa: N801 """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 5967b49e64b..8d6a564be28 100644 --- a/packages/testing/src/execution_testing/forks/tests/test_forks.py +++ b/packages/testing/src/execution_testing/forks/tests/test_forks.py @@ -19,6 +19,7 @@ Homestead, Istanbul, London, + MONAD_EIGHT, Osaka, Paris, Prague, @@ -395,6 +396,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", [