Expand description
Well-known cnode slot keys the v3 chain ABI exposes at genesis. Shared between jar-kernel (which populates the slots at chain init) and consumers like the JAVM transpiler (which emit chain Images referencing them).
Under the V1 single-byte ABI a slot is named by a one-byte
crate::Key; these constants are the byte values. Wrap with
Key::from(BARE_*_SLOT) at the call site — the same u8 → Key
boundary the ecall handlers use (Key::from((gpr & 0xFF) as u8)).
Constants§
- BARE_
GAS_ SLOT - Root
Cap::Instance[Gas{0}]handle. The chain reads this slot to learn its active gas meter. - BARE_
HOST_ OPEN_ SLOT Cap::Instance[HostOpen]— read-only entry handle forhost_open.- BARE_
HOST_ SAVE_ SLOT Cap::Instance[HostSave]— entry handle forhost_save.- BARE_
QUOTA_ SLOT - Root
Cap::Instance[Quota{0}]handle (symmetric toBARE_GAS_SLOT). - BARE_
YIELD_ RECEIVER_ SLOT - Slot the chain Image’s
yield_receiver_slotpoints at, holding the chain’sCap::Instance[YieldReceiver](its catch-set; per-block reset). The kernel reads it when routing a yield. - SCRATCHPAD_
SLOT - The scratchpad slot: the single cap-shaped data-flow channel between a
caller and callee. Its contents may be freely mutated and reset to empty,
but the slot itself is “mutably pinned” —
MGMT_MOVE/MGMT_SWAPof this slot trap. On CALL the caller’s scratchpad moves to the callee; on HALT/reply the callee’s moves back to the caller; so the running Instance always holds the scratchpad here, and every other frame’sslot[0]is empty (one owner — see the data-flow principle). The fuzz / kernel return path hands the top-level Instance’sslot[0]Cap::Databack as the invocation result.