Module stylus_tracer

Module stylus_tracer 

Source
Expand description

Stylus host-I/O tracer: records each WASM host function call made during Stylus program execution so debug_traceTransaction can surface them alongside EVM events.

Structs§

HostioTraceInfo
One host-I/O record captured during Stylus execution.
StylusTraceBuffer
Shared recording buffer — Stylus runtime pushes; debug handler drains.
StylusTraceOutput
Top-level tracer output attached to a debug_traceTransaction result when the transaction invoked a Stylus contract.

Functions§

cache_trace
Store the Stylus host-I/O records for a tx-hash. Called by the block producer after executing a tx with the trace buffer active.
take_cached_trace
Retrieve + remove the cached trace for a tx-hash. Matches Nitro’s one-shot retrieval semantics: the buffer is drained on first read.
with_trace_buffer
Run f with a fresh Stylus host-I/O trace buffer installed on the current thread. The buffer is drained and returned after f completes so callers can attach the records to a debug response.