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
| Step | Action | Purpose |
|---|---|---|
| 1 | Discover support | Confirm 7843 is runnable; shapes include block; read opcode encoding |
| 2 | Run block with a header slot | Per-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 spec | EIP-7843 |
| Coverage index | Coverage |
Changelog
- v0.32026-09-10Runnable catalog row — SLOTNUM via run_block header.slotNumber.
- v0.22026-09-10run_block ships header.slotNumber; 7843 catalog row still Planned until the module.
- v0.12026-09-10Planned twin — exploration live; runnable catalog after run_block / header slot.