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
@@ -1,11 +1,11 @@
monad:
evm-type: eels
fill-params: -m blockchain_test --from=MONAD_EIGHT --until=MONAD_ELEVEN --chain-id=143 -k "not invalid_header"
fill-params: -m blockchain_test --from=MONAD_EIGHT --until=MONAD_NEXT_AMSTERDAM --chain-id=143 -k "not invalid_header"

monad_runloop:
evm-type: eels
# Like `monad`, but `--monad-runloop` and eestnet chain id `30143`
fill-params: -m blockchain_test --from=MONAD_EIGHT --until=MONAD_ELEVEN --chain-id=30143 --monad-runloop -k "not invalid_header"
fill-params: -m blockchain_test --from=MONAD_EIGHT --until=MONAD_NEXT_AMSTERDAM --chain-id=30143 --monad-runloop -k "not invalid_header"

monad_benchmark:
evm-type: eels
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/generate_build_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"MONAD_EIGHT",
"MONAD_NINE",
"MONAD_TEN",
"MONAD_ELEVEN",
"MONAD_NEXT_AMSTERDAM",
]

FORK_INDEX = {name: i for i, name in enumerate(FORK_ORDER)}
Expand Down
2 changes: 1 addition & 1 deletion monad-runloop/rust-harness/eest-runner/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ fn main() {
}

// The canonical state root is the page-encoded secondary timeline's
// from MONAD_ELEVEN (MIP-8, revision 10) on, the slot-encoded
// from MONAD_TEN (MIP-8, revision 10) on, the slot-encoded
// primary's before. The schedule is ascending, so the last entry is
// the revision the run ends in.
let final_revision = input
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@
"MONAD_EIGHT": [(8, 0)],
"MONAD_NINE": [(9, 0)],
"MONAD_TEN": [(10, 0)],
"MONAD_ELEVEN": [(11, 0)],
"MONAD_NEXT_AMSTERDAM": [(12, 0)],
"MONAD_EIGHTToMONAD_NINEAtTime15k": [(8, 0), (9, 15_000)],
"MONAD_NINEToMONAD_TENAtTime15k": [(9, 0), (10, 15_000)],
"MONAD_TENToMONAD_ELEVENAtTime15k": [(10, 0), (11, 15_000)],
"MONAD_TENToMONAD_NEXT_AMSTERDAMAtTime15k": [(10, 0), (12, 15_000)],
}


Expand Down
8 changes: 4 additions & 4 deletions packages/testing/src/execution_testing/forks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
BPO4,
BPO5,
MONAD_EIGHT,
MONAD_ELEVEN,
MONAD_NEXT_AMSTERDAM,
MONAD_NINE,
MONAD_TEN,
Amsterdam,
Expand Down Expand Up @@ -52,7 +52,7 @@
CancunToPragueAtTime15k,
MONAD_EIGHTToMONAD_NINEAtTime15k,
MONAD_NINEToMONAD_TENAtTime15k,
MONAD_TENToMONAD_ELEVENAtTime15k,
MONAD_TENToMONAD_NEXT_AMSTERDAMAtTime15k,
OsakaToBPO1AtTime15k,
ParisToShanghaiAtTime15k,
PragueToOsakaAtTime15k,
Expand Down Expand Up @@ -161,8 +161,8 @@
"MONAD_NINE",
"MONAD_NINEToMONAD_TENAtTime15k",
"MONAD_TEN",
"MONAD_TENToMONAD_ELEVENAtTime15k",
"MONAD_ELEVEN",
"MONAD_TENToMONAD_NEXT_AMSTERDAMAtTime15k",
"MONAD_NEXT_AMSTERDAM",
"BPO1",
"BPO1ToBPO2AtTime15k",
"BPO2",
Expand Down
12 changes: 6 additions & 6 deletions packages/testing/src/execution_testing/forks/forks/forks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1943,7 +1943,7 @@ class Bogota(
pass


class MONAD_ELEVEN( # noqa: N801
class MONAD_NEXT_AMSTERDAM( # noqa: N801
eips.EIP7708,
eips.EIP7843,
eips.EIP7981,
Expand All @@ -1954,24 +1954,24 @@ class MONAD_ELEVEN( # noqa: N801
deployed=False,
):
"""
MONAD_ELEVEN fork.
MONAD_NEXT_AMSTERDAM fork.

Amsterdam-based successor to MONAD_TEN, adopting the EIP-7708,
EIP-7843, EIP-7981, EIP-7997, EIP-8024 and EIP-8246 changes. The
Amsterdam changes it does not adopt stay out of the fork by not
being inherited at all; the fork order still places MONAD_ELEVEN
being inherited at all; the fork order still places MONAD_NEXT_AMSTERDAM
after Amsterdam through `follows`.
"""

@classmethod
def follows(cls) -> type[BaseFork] | None:
"""MONAD_ELEVEN comes after Amsterdam without inheriting it."""
"""MONAD_NEXT_AMSTERDAM comes after Amsterdam without inheriting it."""
return Amsterdam

@classmethod
def header_bal_hash_required(cls) -> bool:
"""
MONAD_ELEVEN headers carry the block access list hash field, fixed
at zero, without building block access lists (EIP-7928).
MONAD_NEXT_AMSTERDAM headers carry the block access list hash field,
fixed at zero, without building block access lists (EIP-7928).
"""
return True
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
BPO3,
BPO4,
MONAD_EIGHT,
MONAD_ELEVEN,
MONAD_NEXT_AMSTERDAM,
MONAD_NINE,
MONAD_TEN,
Amsterdam,
Expand Down Expand Up @@ -75,10 +75,10 @@ class MONAD_NINEToMONAD_TENAtTime15k(TransitionBaseClass): # noqa: N801


@transition_fork(
to_fork=MONAD_ELEVEN, from_fork=MONAD_TEN, at_timestamp=15_000
to_fork=MONAD_NEXT_AMSTERDAM, from_fork=MONAD_TEN, at_timestamp=15_000
)
class MONAD_TENToMONAD_ELEVENAtTime15k(TransitionBaseClass): # noqa: N801
"""MONAD_TEN to MONAD_ELEVEN transition at Timestamp 15k."""
class MONAD_TENToMONAD_NEXT_AMSTERDAMAtTime15k(TransitionBaseClass): # noqa: N801
"""MONAD_TEN to MONAD_NEXT_AMSTERDAM transition at Timestamp 15k."""

pass

Expand Down
36 changes: 18 additions & 18 deletions packages/testing/src/execution_testing/forks/tests/test_forks.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
BPO4,
BPO5,
MONAD_EIGHT,
MONAD_ELEVEN,
MONAD_NEXT_AMSTERDAM,
MONAD_TEN,
Amsterdam,
Berlin,
Expand Down Expand Up @@ -311,19 +311,19 @@ def test_succession_does_not_imply_eip_membership() -> None:
"""
A fork placed after another by `follows` does not gain its EIPs.

Succession orders MONAD_ELEVEN after Amsterdam so the Amsterdam
suites can select it, while the EIPs it declines must still compare
as absent. An adopted EIP is reached through inheritance instead, so
it keeps comparing as present.
Succession orders MONAD_NEXT_AMSTERDAM after Amsterdam so the
Amsterdam suites can select it, while the EIPs it declines must still
compare as absent. An adopted EIP is reached through inheritance
instead, so it keeps comparing as present.
"""
assert MONAD_ELEVEN > Amsterdam
assert MONAD_ELEVEN > MONAD_TEN
assert MONAD_NEXT_AMSTERDAM > Amsterdam
assert MONAD_NEXT_AMSTERDAM > MONAD_TEN

assert MONAD_ELEVEN >= EIP7708
assert MONAD_ELEVEN.is_eip_enabled(7708)
assert MONAD_NEXT_AMSTERDAM >= EIP7708
assert MONAD_NEXT_AMSTERDAM.is_eip_enabled(7708)

assert not MONAD_ELEVEN >= EIP2780
assert not MONAD_ELEVEN.is_eip_enabled(2780)
assert not MONAD_NEXT_AMSTERDAM >= EIP2780
assert not MONAD_NEXT_AMSTERDAM.is_eip_enabled(2780)


def test_transition_fork_comparison() -> None:
Expand Down Expand Up @@ -412,13 +412,13 @@ class PreAllocTransitionFork(TransitionBaseClass):
pass


def test_monad_eleven_is_not_deployed() -> None:
def test_monad_next_amsterdam_is_not_deployed() -> None:
"""
A fork under development must stay out of the deployed fork range.
"""
deployed_forks = get_deployed_forks()
assert MONAD_TEN in deployed_forks
assert MONAD_ELEVEN not in deployed_forks
assert MONAD_NEXT_AMSTERDAM not in deployed_forks


def opcode_names(fork: Type[BaseFork]) -> set[str]:
Expand All @@ -428,15 +428,15 @@ def opcode_names(fork: Type[BaseFork]) -> set[str]:

def test_adopted_opcodes_depend_on_mixin_order() -> None:
"""
The adopted opcodes reach MONAD_ELEVEN through its mixin order.
The adopted opcodes reach MONAD_NEXT_AMSTERDAM through its mixin order.

MONAD_NINE returning Osaka's list directly is what ends the chain
there, which is what lets a mixin placed ahead of the Monad forks
contribute on the way out. Making that call cooperative, or
reordering MONAD_ELEVEN's bases, drops these opcodes silently.
there, which is what lets a mixin placed ahead of the Monad forks
contribute on the way out. Making that call cooperative, or reordering
MONAD_NEXT_AMSTERDAM's bases, drops these opcodes silently.
"""
adopted = {"DUPN", "SWAPN", "EXCHANGE"}
assert adopted <= opcode_names(MONAD_ELEVEN)
assert adopted <= opcode_names(MONAD_NEXT_AMSTERDAM)
assert not adopted & opcode_names(MONAD_TEN)

class MixinAfterFork(MONAD_TEN, EIP8024): # noqa: N801
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
MONAD_ELEVEN fork builds on MONAD_TEN, adopting part of Amsterdam.
MONAD_NEXT_AMSTERDAM fork builds on MONAD_TEN, adopting part of Amsterdam.

The Amsterdam changes it does not adopt stay out of the fork entirely.
The [EIP-7928] block access list hash header slot is carried but always
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,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_eleven.blocks.Block.withdrawals
[`block`]: ref:ethereum.forks.monad_next_amsterdam.blocks.Block.withdrawals
"""

index: U64
Expand Down Expand Up @@ -90,7 +90,8 @@ 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_eleven.fork.EMPTY_OMMER_HASH
[`EMPTY_OMMER_HASH`]:
ref:ethereum.forks.monad_next_amsterdam.fork.EMPTY_OMMER_HASH
"""

coinbase: Address
Expand Down Expand Up @@ -146,7 +147,7 @@ class Header:
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_eleven.bloom.logs_bloom
[logs bloom]: ref:ethereum.forks.monad_next_amsterdam.bloom.logs_bloom
"""

difficulty: Uint
Expand Down Expand Up @@ -244,7 +245,8 @@ 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_eleven.requests.compute_requests_hash
[crh]:
ref:ethereum.forks.monad_next_amsterdam.requests.compute_requests_hash
[SHA2-256]: https://en.wikipedia.org/wiki/SHA-2
"""

Expand All @@ -255,7 +257,7 @@ class Header:
zero. See [`validate_header`][vh].

[EIP-7928]: https://eips.ethereum.org/EIPS/eip-7928
[vh]: ref:ethereum.forks.monad_eleven.fork.validate_header
[vh]: ref:ethereum.forks.monad_next_amsterdam.fork.validate_header
"""

slot_number: U64
Expand Down Expand Up @@ -290,16 +292,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_eleven.blocks.Header
[withdrawals]: ref:ethereum.forks.monad_eleven.blocks.Withdrawal
[`header`]: ref:ethereum.forks.monad_next_amsterdam.blocks.Header
[withdrawals]: ref:ethereum.forks.monad_next_amsterdam.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_eleven.blocks.Header
[headers]: ref:ethereum.forks.monad_next_amsterdam.blocks.Header
"""

transactions: Tuple[Bytes | LegacyTransaction, ...]
Expand Down Expand Up @@ -331,11 +333,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_eleven.vm.instructions.log.log0
[`LOG1`]: ref:ethereum.forks.monad_eleven.vm.instructions.log.log1
[`LOG2`]: ref:ethereum.forks.monad_eleven.vm.instructions.log.log2
[`LOG3`]: ref:ethereum.forks.monad_eleven.vm.instructions.log.log3
[`LOG4`]: ref:ethereum.forks.monad_eleven.vm.instructions.log.log4
[`LOG0`]: ref:ethereum.forks.monad_next_amsterdam.vm.instructions.log.log0
[`LOG1`]: ref:ethereum.forks.monad_next_amsterdam.vm.instructions.log.log1
[`LOG2`]: ref:ethereum.forks.monad_next_amsterdam.vm.instructions.log.log2
[`LOG3`]: ref:ethereum.forks.monad_next_amsterdam.vm.instructions.log.log3
[`LOG4`]: ref:ethereum.forks.monad_next_amsterdam.vm.instructions.log.log4
"""

address: Address
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@

[EIP-4895]: https://eips.ethereum.org/EIPS/eip-4895
[EIP-7685]: https://eips.ethereum.org/EIPS/eip-7685
[rh]: ref:ethereum.forks.monad_eleven.blocks.Header.requests_hash
[dt]: ref:ethereum.forks.monad_eleven.requests.DEPOSIT_REQUEST_TYPE
[wt]: ref:ethereum.forks.monad_eleven.requests.WITHDRAWAL_REQUEST_TYPE
[ct]: ref:ethereum.forks.monad_eleven.requests.CONSOLIDATION_REQUEST_TYPE
[pd]: ref:ethereum.forks.monad_eleven.requests.parse_deposit_requests
[crh]: ref:ethereum.forks.monad_eleven.requests.compute_requests_hash
[pgpr]: ref:ethereum.forks.monad_eleven.fork.process_general_purpose_requests
[rh]: ref:ethereum.forks.monad_next_amsterdam.blocks.Header.requests_hash
[dt]: ref:ethereum.forks.monad_next_amsterdam.requests.DEPOSIT_REQUEST_TYPE
[wt]: ref:ethereum.forks.monad_next_amsterdam.requests.WITHDRAWAL_REQUEST_TYPE
[ct]:
ref:ethereum.forks.monad_next_amsterdam.requests.CONSOLIDATION_REQUEST_TYPE
[pd]: ref:ethereum.forks.monad_next_amsterdam.requests.parse_deposit_requests
[crh]: ref:ethereum.forks.monad_next_amsterdam.requests.compute_requests_hash
[pgpr]:
ref:ethereum.forks.monad_next_amsterdam.fork.process_general_purpose_requests
"""

from hashlib import sha256
Expand Down Expand Up @@ -265,10 +267,11 @@ def parse_deposit_requests(block_output: BlockOutput) -> Bytes:
prefixed with [`DEPOSIT_REQUEST_TYPE`][dt] before being appended to
the block's request list.

[addr]: ref:ethereum.forks.monad_eleven.requests.DEPOSIT_CONTRACT_ADDRESS
[addr]:
ref:ethereum.forks.monad_next_amsterdam.requests.DEPOSIT_CONTRACT_ADDRESS
[sig]:
ref:ethereum.forks.monad_eleven.requests.DEPOSIT_EVENT_SIGNATURE_HASH
[dt]: ref:ethereum.forks.monad_eleven.requests.DEPOSIT_REQUEST_TYPE
ref:ethereum.forks.monad_next_amsterdam.requests.DEPOSIT_EVENT_SIGNATURE_HASH
[dt]: ref:ethereum.forks.monad_next_amsterdam.requests.DEPOSIT_REQUEST_TYPE
"""
deposit_requests: Bytes = b""
for key in block_output.receipt_keys:
Expand Down Expand Up @@ -300,7 +303,7 @@ def compute_requests_hash(requests: List[Bytes]) -> Bytes:

[EIP-7685]: https://eips.ethereum.org/EIPS/eip-7685
[SHA2-256]: https://en.wikipedia.org/wiki/SHA-2
[rh]: ref:ethereum.forks.monad_eleven.blocks.Header.requests_hash
[rh]: ref:ethereum.forks.monad_next_amsterdam.blocks.Header.requests_hash
"""
m = sha256()
for request in requests:
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_ELEVEN version of
Address specific functions used in this MONAD_NEXT_AMSTERDAM version of
specification.
"""

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

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

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

Hexadecimal utility functions used in this specification, specific to
Monad Eleven types.
Monad Next Amsterdam types.
"""

from ethereum_types.bytes import Bytes
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_ELEVEN version of
Message specific functions used in this MONAD_NEXT_AMSTERDAM version of
specification.
"""

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

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

"""
Expand Down
Loading
Loading