Skip to content
Monpediaby Unity Nodes
OpenPull Request

MIP-18 (`CALLSTACKDEPTH`, `CALLERN`)

by khordadiCreated Sep 30, 2026category-labs/monad

ReferencesMIP-7MIP-18

Implements MIP-18 at MONAD_NEXT only, so no live revision changes. Stacked on #2662, the MIP-7 EXTENSION decode. EXE-221

  • CALLERN reads a per-transaction senders[depth] array in vm::Host. VM::execute and execute_bytecode write it on frame entry and never pop it: while frame d runs, slots 0..d are exactly its ancestors. The runtime reads it through Context::host.
  • The fuzzer and spec oracle can't cover MIP-18 until the spec VM does.

Extras beyond CI:

  • execute_message_test and the VM unit tests under ASAN+UBSAN.
  • Cost: frame entry is +18 instructions at MONAD_NEXT and unchanged at MONAD_TEN. Compiled CALLERN is a runtime call, about 9 ns; CALLSTACKDEPTH costs the same as CALLER.

馃 Generated with Claude Code