Skip to content

EIP-7843 — SLOTNUM opcode

Status: Ready for the public MCP (not launched). Use the website exploration today.

What became possible

How do you read the beacon slot on-chain without hardcoding 12-second slots? EIP-7843 adds SLOTNUM (0x4b): the consensus layer writes the slot on the execution header, and the opcode pushes it for 2 gas.

Dividing the block timestamp by 12 works only while slots stay 12 seconds. The opcode abstracts that away.

The MCP server runs your bytecode in a lab block with a chosen header.slotNumber and returns the per-tx result (return data, gas) plus a header snapshot. It does not ship demo programs.

What you can ask your agent

Once the public MCP is live (Connect), try prompts like:

  • “What does SLOTNUM push if the header slot is 42?”
  • “Same SLOTNUM program on Osaka vs Amsterdam — does 0x4b succeed?”
  • “Why not TIMESTAMP ÷ 12 for the current slot?”
  • “Here’s bytecode that returns SLOTNUM — what does it return on slot 12345678?”

These are inspiration prompts — ask in plain language; your agent uses the connected server and reports results back to you.

What the server does

StepActionPurpose
1Discover supportConfirm 7843 is runnable; shapes include block; read opcode encoding
2Run block with a header slotPer-tx return data equals the slot on Amsterdam; slotNumber rejected on Osaka

Run bytecode still uses a mock header (slot 0). A chosen beacon slot needs run block.

Fork caveat

Amsterdam already bundles EIP-7843 in EthereumJS v10. Passing eips: [7843] is accepted but is not a before/after toggle on Amsterdam itself.

For 7843 off vs on, run the same program on baseline fork osaka, then on preview fork amsterdam. Opcode 0x4b is invalid on Osaka; on Amsterdam it pushes header.slotNumber (2 gas). You do not need Osaka for Amsterdam-only SLOTNUM runs.

Twins and spec

Link
Website exploration (interactive textbook)EIP-7843 on feelyourprotocol.org
Canonical specEIP-7843
Coverage indexCoverage

Changelog

EIP-7843 MCP Catalogue Changelog
  1. v0.32026-09-10Runnable catalog row — SLOTNUM via run_block header.slotNumber.
  2. v0.22026-09-10run_block ships header.slotNumber; 7843 catalog row still Planned until the module.
  3. v0.12026-09-10Planned twin — exploration live; runnable catalog after run_block / header slot.

Use = end-user reference. Internals = architecture and operations. Each section carries its own micro-changelog.