Skip to content

core/vm,core/types,params: implement the Amsterdam EVM version #2730

Open

Description

@gzliudan

Summary

XDPoSChain implements Osaka but has no Amsterdam fork of its own, while upstream go-ethereum carries the whole Amsterdam (glamsterdam) set and activates it on mainnet at AmsterdamTime = 1791294816 (2026-10-06 13:53:36 UTC).

Solidity 0.8.36 started exposing Amsterdam and 0.8.37 added block.slotnum / slotnum() (EIP-7843), behind --evm-version amsterdam --experimental. Amsterdam is not the compiler's default target yet (osaka still is), so no artifact needs it by default today, but any user who opts in cannot run their contract here, and the chain falls behind the moment solc flips the default.

The port is small in principle because part of it already landed: EIP-8024 was implemented in #2268 and the instruction set is built, but nothing in the fork selection reached it.

Current state

The fork switch itself is in flight rather than missing:

Everything else that Amsterdam carries is unimplemented, and is now tracked as one issue per EIP:

Already implemented, and therefore not split out: EIP-8024 (the instruction table, wired by #2756) and EIP-7954 (the size limits, #2757).

Remaining work

  • Upstream test vectors: opcode vectors for SLOTNUM, and gas-table and state-transition vectors from the upstream fixtures.
  • The activation decision: every live network leaves osakaBlock unset, and Amsterdam must not be scheduled before Osaka. Activation waits for the EIPs above and for the SLOTNUM value question below.

Impact

  • A contract compiled with --evm-version amsterdam (the only way to use block.slotnum, which 0.8.37 introduced) cannot be deployed or executed here: the new target is neither activated nor implemented.
  • Low immediate severity, since Amsterdam is still an experimental, non-default target. It becomes a hard blocker on the release where solc switches its default target, exactly as Osaka did for 0.8.31.
  • No network schedules Amsterdam: every live network still leaves osakaBlock unset, and Amsterdam must not be scheduled before Osaka.

Upstream

go-ethereum master 466c37e33, checked 2026-10-09:

Open questions

  1. What SLOTNUM returns. EIP-7843 returns the beacon chain slot and this chain has no beacon chain, so like block.prevrandao the value has to be defined deterministically and documented before activation. Tracked in core/types,core/vm,miner: implement EIP-7843 SLOTNUM and the slot number header field (amsterdam) #2760.
  2. Which EIPs are adopted at all. EIP-7928 (core/types,core,eth: implement EIP-7928 block-level access lists (amsterdam) #2761), EIP-7708 (core/types,core/vm: implement EIP-7708 transfer and burn system logs (amsterdam) #2767), EIP-7997 (core/genesis,params: deploy the EIP-7997 deterministic deployment factory (amsterdam) #2768) and EIP-8282 (core,beacon,params: implement EIP-8282 builder execution requests (amsterdam) #2769) are consensus-visible or consensus-layer dependent, and their issues carry an applicability question, so the maintainer call is whether XDC follows upstream Amsterdam as it stands or deviates deliberately.
  3. Fork switch form. Resolved: XDC forks are block-number based, so Amsterdam is AmsterdamBlock, added by feat(core,params): add the amsterdam fork switch #2756.

Out of scope

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions