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
74 changes: 74 additions & 0 deletions packages/testing/src/execution_testing/forks/forks/forks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
Homestead,
Istanbul,
London,
MONAD_EIGHT,
Osaka,
Paris,
Prague,
Expand Down Expand Up @@ -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",
[
Expand Down