pub const LAMPORT_GATE_DEPTH: usize = 4;Expand description
Concurrent gates per tier: Solana’s nested-CPI depth budget (the
runtime caps the instruction stack at 5 = one top-level + 4 nested
CPI levels). On-chain every CPI level runs in a fresh VM whose
writable data is re-initialized, so a single store only ever sees
the nested binds of one handler frame; on host, hopper’s CPI
syscall is a no-op (no nested handler dispatch), so concurrent
gates arise only from manually nested binds. Four slots cover both
with room to spare, and exhaustion fails closed loudly
(LAMPORT_GATE_DEPTH_EXCEEDED) rather than corrupting a live
gate.