Skip to main content

Module cpi_tree

Module cpi_tree 

Source
Expand description

Reconstructs the CPI call tree from a lexed event stream.

The builder is tolerant: mismatched or missing success/failure lines never panic; nodes simply close on a best-effort basis and the resulting tree is still well-formed.

Structs§

CallNode
A node in the CPI call tree.

Enums§

NodeStatus
Outcome of a single program invocation.

Constants§

MAX_DEPTH
Maximum CPI nesting the tree will represent. Real Solana caps CPI depth at a handful of levels; this generous bound prevents adversarial logs (tens of thousands of unclosed invoke lines) from building a tree so deep that serializing or traversing it overflows the stack. Invocations beyond it are flattened (attached at the cap, not nested deeper).

Functions§

build
Build a call tree from a lexed event stream.