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
4 changes: 2 additions & 2 deletions .github/configs/feature.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ monad:
# --suppress-no-test-exit-code works around a problem where multi-phase fill
# (triggered by tarball output) fails to proceed on no tests processed
# in 1st phase (exit code 5)
fill-params: --suppress-no-test-exit-code -m blockchain_test --from=MONAD_EIGHT --until=MONAD_NEXT --chain-id=143 -k "not eip4844 and not eip7002 and not eip7251 and not eip7685 and not eip6110 and not eip7594 and not eip7918 and not eip7610 and not eip7934 and not invalid_header"
fill-params: --suppress-no-test-exit-code -m blockchain_test --from=MONAD_EIGHT --until=MONAD_NINE --chain-id=143 -k "not eip4844 and not eip7002 and not eip7251 and not eip7685 and not eip6110 and not eip7594 and not eip7918 and not eip7610 and not eip7934 and not invalid_header"

mip3:
evm-type: develop
# --suppress-no-test-exit-code works around a problem where multi-phase fill
# (triggered by tarball output) fails to proceed on no tests processed
# in 1st phase (exit code 5)
fill-params: --suppress-no-test-exit-code -m blockchain_test --from=MONAD_EIGHT --until=MONAD_NEXT --chain-id=143 -k "not eip4844 and not eip7002 and not eip7251 and not eip7685 and not eip6110 and not eip7594 and not eip7918 and not eip7610 and not eip7934 and not invalid_header"
fill-params: --suppress-no-test-exit-code -m blockchain_test --from=MONAD_EIGHT --until=MONAD_NINE --chain-id=143 -k "not eip4844 and not eip7002 and not eip7251 and not eip7685 and not eip6110 and not eip7594 and not eip7918 and not eip7610 and not eip7934 and not invalid_header"
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ uv sync --all-extras
3. Fill all monadized spec tests as of writing this (see below for explanation of flags):

```bash
uv run fill --clean -m "blockchain_test or transaction_test" --from MONAD_EIGHT --until MONAD_NEXT --chain-id 143 -n auto tests
uv run fill --clean -m "blockchain_test or transaction_test" --from MONAD_EIGHT --until MONAD_NINE --chain-id 143 -n auto tests
```

4. The test fixtures to be found in `fixtures/` directory under repo root.
Expand All @@ -45,7 +45,7 @@ Filling tests is the process of running Python generators of spec tests [like on
- **`-m blockchain_test or transaction_test`**: causes these two flavors of fixtures to be generated
- `blockchain_test` is the currently supported by `monad` flavor of a spec test checking correctness of the state transition. Note this includes `blockchain_test_from_state_test`, meaning that all `state_test(...)` fillers are included
- `transaction_test` is also supported, tests only correctness of static transaction checks
- **`--from MONAD_EIGHT --until MONAD_NEXT`**: hardforks for which to generate fixtures. Must match with those defined in `monad`, inclusive
- **`--from MONAD_EIGHT --until MONAD_NINE`**: hardforks for which to generate fixtures. Must match with those defined in `monad`, inclusive
- **`--chain-id 143`**: must be specified for signatures and EIP-7702 to work correctly
- **`-n auto`**: from `pytest`, parallel execution of tests
- **`tests`**: root directory to traverse to discover tests
Expand Down
10 changes: 5 additions & 5 deletions packages/testing/src/execution_testing/forks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
BPO4,
BPO5,
MONAD_EIGHT,
MONAD_NEXT,
MONAD_NINE,
Amsterdam,
ArrowGlacier,
Berlin,
Expand Down Expand Up @@ -36,7 +36,7 @@
BPO2ToBPO3AtTime15k,
BPO3ToBPO4AtTime15k,
CancunToPragueAtTime15k,
MONAD_EIGHTToMONAD_NEXTAtTime15k,
MONAD_EIGHTToMONAD_NINEAtTime15k,
OsakaToBPO1AtTime15k,
ParisToShanghaiAtTime15k,
PragueToMONAD_EIGHTAtTime15k,
Expand Down Expand Up @@ -118,10 +118,10 @@
"PragueToOsakaAtTime15k",
"Osaka",
"OsakaToBPO1AtTime15k",
"MONAD_EIGHT",
"PragueToMONAD_EIGHTAtTime15k",
"MONAD_NEXT",
"MONAD_EIGHTToMONAD_NEXTAtTime15k",
"MONAD_EIGHT",
"MONAD_EIGHTToMONAD_NINEAtTime15k",
"MONAD_NINE",
"BPO1",
"BPO1ToBPO2AtTime15k",
"BPO2",
Expand Down
4 changes: 2 additions & 2 deletions packages/testing/src/execution_testing/forks/forks/forks.py
Original file line number Diff line number Diff line change
Expand Up @@ -3352,8 +3352,8 @@ def transaction_gas_limit_cap(
return 30_000_000


class MONAD_NEXT(MONAD_EIGHT, Osaka, solc_name="cancun"): # noqa: N801
"""MONAD_NEXT fork."""
class MONAD_NINE(MONAD_EIGHT, Osaka, solc_name="cancun"): # noqa: N801
"""MONAD_NINE fork."""

@classmethod
def valid_opcodes(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
BPO3,
BPO4,
MONAD_EIGHT,
MONAD_NEXT,
MONAD_NINE,
Amsterdam,
Berlin,
Cancun,
Expand Down Expand Up @@ -62,9 +62,9 @@ class PragueToMONAD_EIGHTAtTime15k(Prague): # noqa: N801
pass


@transition_fork(to_fork=MONAD_NEXT, at_timestamp=15_000)
class MONAD_EIGHTToMONAD_NEXTAtTime15k(MONAD_EIGHT): # noqa: N801
"""Prague to MONAD_NEXT transition at Timestamp 15k."""
@transition_fork(to_fork=MONAD_NINE, at_timestamp=15_000)
class MONAD_EIGHTToMONAD_NINEAtTime15k(MONAD_EIGHT): # noqa: N801
"""MONAD_EIGHT to MONAD_NINE transition at Timestamp 15k."""

pass

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
MONAD_NEXT fork introduces Monad specific changes to the Ethereum protocol.
MONAD_NINE fork introduces Monad specific changes to the Ethereum protocol.
"""

from ethereum.fork_criteria import ByTimestamp, ForkCriteria
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Withdrawal:
chain) to the execution layer, as validated by the consensus layer. Each
withdrawal is listed in the block's list of withdrawals. See [`block`].

[`block`]: ref:ethereum.forks.monad_next.blocks.Block.withdrawals
[`block`]: ref:ethereum.forks.monad_nine.blocks.Block.withdrawals
"""

index: U64
Expand Down Expand Up @@ -87,7 +87,7 @@ class Header:

[`keccak256`]: ref:ethereum.crypto.hash.keccak256
[RLP]: https://ethereum.github.io/ethereum-rlp/src/ethereum_rlp/rlp.py.html
[`EMPTY_OMMER_HASH`]: ref:ethereum.forks.monad_next.fork.EMPTY_OMMER_HASH
[`EMPTY_OMMER_HASH`]: ref:ethereum.forks.monad_nine.fork.EMPTY_OMMER_HASH
"""

coinbase: Address
Expand All @@ -110,8 +110,8 @@ class Header:
of the Merkle-Patricia [Trie] representing the Ethereum world state.

[`keccak256`]: ref:ethereum.crypto.hash.keccak256
[`state_root()`]: ref:ethereum.forks.monad_next.state.state_root
[Trie]: ref:ethereum.forks.monad_next.trie.Trie
[`state_root()`]: ref:ethereum.forks.monad_nine.state.state_root
[Trie]: ref:ethereum.forks.monad_nine.trie.Trie
"""

transactions_root: Root
Expand All @@ -122,8 +122,8 @@ class Header:
transactions as the parameter.

[`keccak256`]: ref:ethereum.crypto.hash.keccak256
[`root()`]: ref:ethereum.forks.monad_next.trie.root
[Trie]: ref:ethereum.forks.monad_next.trie.Trie
[`root()`]: ref:ethereum.forks.monad_nine.trie.root
[Trie]: ref:ethereum.forks.monad_nine.trie.Trie
"""

receipt_root: Root
Expand All @@ -133,16 +133,16 @@ class Header:
function over the Merkle-Patricia [trie] constructed from the receipts.

[`keccak256`]: ref:ethereum.crypto.hash.keccak256
[`root()`]: ref:ethereum.forks.monad_next.trie.root
[Trie]: ref:ethereum.forks.monad_next.trie.Trie
[`root()`]: ref:ethereum.forks.monad_nine.trie.root
[Trie]: ref:ethereum.forks.monad_nine.trie.Trie
"""

bloom: Bloom
"""
Bloom filter for logs generated by transactions in this block.
Constructed from all logs in the block using the [logs bloom] mechanism.

[logs bloom]: ref:ethereum.forks.monad_next.bloom.logs_bloom
[logs bloom]: ref:ethereum.forks.monad_nine.bloom.logs_bloom
"""

difficulty: Uint
Expand Down Expand Up @@ -238,7 +238,7 @@ class Header:
[EIP-7685]. See [`compute_requests_hash`][crh] for more details.

[EIP-7685]: https://eips.ethereum.org/EIPS/eip-7685
[crh]: ref:ethereum.forks.monad_next.requests.compute_requests_hash
[crh]: ref:ethereum.forks.monad_nine.requests.compute_requests_hash
[SHA2-256]: https://en.wikipedia.org/wiki/SHA-2
"""

Expand All @@ -265,16 +265,16 @@ class Block:
Withdrawals represent ETH transfers from validators to their recipients,
introduced by the consensus layer. Ommers remain deprecated and empty.

[`header`]: ref:ethereum.forks.monad_next.blocks.Header
[withdrawals]: ref:ethereum.forks.monad_next.blocks.Withdrawal
[`header`]: ref:ethereum.forks.monad_nine.blocks.Header
[withdrawals]: ref:ethereum.forks.monad_nine.blocks.Withdrawal
"""

header: Header
"""
The block header containing metadata and cryptographic commitments. Refer
to [headers] for more details on the fields included in the header.

[headers]: ref:ethereum.forks.monad_next.blocks.Header
[headers]: ref:ethereum.forks.monad_nine.blocks.Header
"""

transactions: Tuple[Bytes | LegacyTransaction, ...]
Expand Down Expand Up @@ -305,11 +305,11 @@ class Log:
[`LOG1`], [`LOG2`], [`LOG3`] and [`LOG4`]), which can be efficiently
searched using the bloom filter in the block header.

[`LOG0`]: ref:ethereum.forks.monad_next.vm.instructions.log.log0
[`LOG1`]: ref:ethereum.forks.monad_next.vm.instructions.log.log1
[`LOG2`]: ref:ethereum.forks.monad_next.vm.instructions.log.log2
[`LOG3`]: ref:ethereum.forks.monad_next.vm.instructions.log.log3
[`LOG4`]: ref:ethereum.forks.monad_next.vm.instructions.log.log4
[`LOG0`]: ref:ethereum.forks.monad_nine.vm.instructions.log.log0
[`LOG1`]: ref:ethereum.forks.monad_nine.vm.instructions.log.log1
[`LOG2`]: ref:ethereum.forks.monad_nine.vm.instructions.log.log2
[`LOG3`]: ref:ethereum.forks.monad_nine.vm.instructions.log.log3
[`LOG4`]: ref:ethereum.forks.monad_nine.vm.instructions.log.log4
"""

address: Address
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Introduction
------------

Address specific functions used in this MONAD_NEXT version of
Address specific functions used in this MONAD_NINE version of
specification.
"""

Expand Down Expand Up @@ -82,7 +82,7 @@ def compute_create2_contract_address(

Returns
-------
address: `ethereum.forks.monad_next.fork_types.Address`
address: `ethereum.forks.monad_nine.fork_types.Address`
The computed address of the new account.

"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Introduction
------------

Message specific functions used in this MONAD_NEXT version of
Message specific functions used in this MONAD_NINE version of
specification.
"""

Expand Down Expand Up @@ -42,7 +42,7 @@ def prepare_message(

Returns
-------
message: `ethereum.forks.monad_next.vm.Message`
message: `ethereum.forks.monad_nine.vm.Message`
Items containing contract creation or message call specific data.

"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ def block_hash(evm: Evm) -> None:

Raises
------
:py:class:`~ethereum.forks.monad_next.vm.exceptions.StackUnderflowError`
:py:class:`~ethereum.forks.monad_nine.vm.exceptions.StackUnderflowError`
If `len(stack)` is less than `1`.
:py:class:`~ethereum.forks.monad_next.vm.exceptions.OutOfGasError`
:py:class:`~ethereum.forks.monad_nine.vm.exceptions.OutOfGasError`
If `evm.gas_left` is less than `20`.

"""
Expand Down Expand Up @@ -79,9 +79,9 @@ def coinbase(evm: Evm) -> None:

Raises
------
:py:class:`~ethereum.forks.monad_next.vm.exceptions.StackOverflowError`
:py:class:`~ethereum.forks.monad_nine.vm.exceptions.StackOverflowError`
If `len(stack)` is equal to `1024`.
:py:class:`~ethereum.forks.monad_next.vm.exceptions.OutOfGasError`
:py:class:`~ethereum.forks.monad_nine.vm.exceptions.OutOfGasError`
If `evm.gas_left` is less than `2`.

"""
Expand Down Expand Up @@ -113,9 +113,9 @@ def timestamp(evm: Evm) -> None:

Raises
------
:py:class:`~ethereum.forks.monad_next.vm.exceptions.StackOverflowError`
:py:class:`~ethereum.forks.monad_nine.vm.exceptions.StackOverflowError`
If `len(stack)` is equal to `1024`.
:py:class:`~ethereum.forks.monad_next.vm.exceptions.OutOfGasError`
:py:class:`~ethereum.forks.monad_nine.vm.exceptions.OutOfGasError`
If `evm.gas_left` is less than `2`.

"""
Expand Down Expand Up @@ -146,9 +146,9 @@ def number(evm: Evm) -> None:

Raises
------
:py:class:`~ethereum.forks.monad_next.vm.exceptions.StackOverflowError`
:py:class:`~ethereum.forks.monad_nine.vm.exceptions.StackOverflowError`
If `len(stack)` is equal to `1024`.
:py:class:`~ethereum.forks.monad_next.vm.exceptions.OutOfGasError`
:py:class:`~ethereum.forks.monad_nine.vm.exceptions.OutOfGasError`
If `evm.gas_left` is less than `2`.

"""
Expand Down Expand Up @@ -179,9 +179,9 @@ def prev_randao(evm: Evm) -> None:

Raises
------
:py:class:`~ethereum.forks.monad_next.vm.exceptions.StackOverflowError`
:py:class:`~ethereum.forks.monad_nine.vm.exceptions.StackOverflowError`
If `len(stack)` is equal to `1024`.
:py:class:`~ethereum.forks.monad_next.vm.exceptions.OutOfGasError`
:py:class:`~ethereum.forks.monad_nine.vm.exceptions.OutOfGasError`
If `evm.gas_left` is less than `2`.

"""
Expand Down Expand Up @@ -212,9 +212,9 @@ def gas_limit(evm: Evm) -> None:

Raises
------
:py:class:`~ethereum.forks.monad_next.vm.exceptions.StackOverflowError`
:py:class:`~ethereum.forks.monad_nine.vm.exceptions.StackOverflowError`
If `len(stack)` is equal to `1024`.
:py:class:`~ethereum.forks.monad_next.vm.exceptions.OutOfGasError`
:py:class:`~ethereum.forks.monad_nine.vm.exceptions.OutOfGasError`
If `evm.gas_left` is less than `2`.

"""
Expand Down Expand Up @@ -242,9 +242,9 @@ def chain_id(evm: Evm) -> None:

Raises
------
:py:class:`~ethereum.forks.monad_next.vm.exceptions.StackOverflowError`
:py:class:`~ethereum.forks.monad_nine.vm.exceptions.StackOverflowError`
If `len(stack)` is equal to `1024`.
:py:class:`~ethereum.forks.monad_next.vm.exceptions.OutOfGasError`
:py:class:`~ethereum.forks.monad_nine.vm.exceptions.OutOfGasError`
If `evm.gas_left` is less than `2`.

"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def process_create_message(message: Message) -> Evm:

Returns
-------
evm: :py:class:`~ethereum.forks.monad_next.vm.Evm`
evm: :py:class:`~ethereum.forks.monad_nine.vm.Evm`
Items containing execution specific objects.

"""
Expand Down Expand Up @@ -240,7 +240,7 @@ def process_message(message: Message) -> Evm:

Returns
-------
evm: :py:class:`~ethereum.forks.monad_next.vm.Evm`
evm: :py:class:`~ethereum.forks.monad_nine.vm.Evm`
Items containing execution specific objects

"""
Expand Down
4 changes: 2 additions & 2 deletions src/ethereum_spec_tools/evm_tools/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
W = TypeVar("W", Uint, U64, U256)

EXCEPTION_MAPS = {
"MONAD_NEXT": {
"fork_blocks": [("monad_next", 0)],
"MONAD_NINE": {
"fork_blocks": [("monad_nine", 0)],
},
"MONAD_EIGHT": {
"fork_blocks": [("monad_eight", 0)],
Expand Down
8 changes: 4 additions & 4 deletions tests/frontier/opcodes/test_data_copy_oog.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
Storage,
Transaction,
)
from execution_testing.forks.forks.forks import MONAD_NEXT
from execution_testing.forks.forks.forks import MONAD_NINE
from execution_testing.forks.helpers import Fork

REFERENCE_SPEC_GIT_PATH = "EIPS/eip-211.md"
Expand Down Expand Up @@ -59,12 +59,12 @@ def test_calldatacopy_word_copy_oog(
if expect_success:
subcall_gas = 5000
else:
# MIP-3 (MONAD_NEXT) uses linear memory cost (words // 2) instead of
# MIP-3 (MONAD_NINE) uses linear memory cost (words // 2) instead of
# quadratic (3*words + words²/512), so memory expansion is cheaper.
# Pre-MIP-3: MSTORE costs 3 + 98 = 101 gas for 32 words
# MIP-3: MSTORE costs 3 + 16 = 19 gas for 32 words
# We need enough gas for setup but not for CALLDATACOPY word copy cost.
subcall_gas = 68 if fork >= MONAD_NEXT else 150
subcall_gas = 68 if fork >= MONAD_NINE else 150

storage = Storage()
storage_key = storage.store_next(1 if expect_success else 0)
Expand Down Expand Up @@ -141,7 +141,7 @@ def test_codecopy_word_copy_oog(
if expect_success:
subcall_gas = 5000
else:
subcall_gas = 68 if fork >= MONAD_NEXT else 150
subcall_gas = 68 if fork >= MONAD_NINE else 150

storage = Storage()
storage_key = storage.store_next(1 if expect_success else 0)
Expand Down
Loading