Skip to main content

Module rpc_trace

Module rpc_trace 

Source
Expand description

Conversion from geth callTracer output into a CallTraceArena.

This lets traces fetched over RPC (via debug_traceCall / debug_traceTransaction with the callTracer) be decoded and rendered with the same machinery used for locally executed traces. callTracer does not record opcode-level steps, so CallTrace::steps is left empty; everything the call-tree view needs (calls, value, gas, logs, revert reasons) is preserved.

Also hosts the shared classification of the RPC rejections a debug_trace* request can hit, so cast call --debug-trace-call and cast run --debug-trace-transaction surface the same actionable hints.

FunctionsΒ§

call_frame_to_arena
Builds a CallTraceArena from a geth callTracer [CallFrame] tree.
call_frame_to_arena_with_root_address
Builds a CallTraceArena and overrides the root frame’s address when the tracer omitted it.
call_kind πŸ”’
Maps a geth callTracer call type string to a CallKind.
call_log πŸ”’
Maps a geth callTracer log frame to a CallLog.
is_method_not_found_error
Returns true if err is a JSON-RPC method-not-found rejection (code -32601), which is how nodes without the debug namespace reject debug_trace* requests.
is_missing_state_error
Returns true if err looks like a missing-historical-state rejection: an archive-depth error, usually with a generic code (-32000) distinguishable only by message, hit whenever a debug_trace* request targets a block whose state a full node has pruned.
push_frame πŸ”’
Pushes frame and all of its children into nodes, returning the index of the pushed node.
status_from_frame πŸ”’
Maps a callTracer frame to the InstructionResult used for the rendered [status] label.