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
CallTraceArenafrom a gethcallTracer[CallFrame] tree. - call_
frame_ to_ arena_ with_ root_ address - Builds a
CallTraceArenaand overrides the root frameβs address when the tracer omitted it. - call_
kind π - Maps a geth
callTracercall type string to aCallKind. - call_
log π - Maps a geth
callTracerlog frame to aCallLog. - is_
method_ not_ found_ error - Returns
trueiferris a JSON-RPC method-not-found rejection (code -32601), which is how nodes without thedebugnamespace rejectdebug_trace*requests. - is_
missing_ state_ error - Returns
trueiferrlooks like a missing-historical-state rejection: an archive-depth error, usually with a generic code (-32000) distinguishable only by message, hit whenever adebug_trace*request targets a block whose state a full node has pruned. - push_
frame π - Pushes
frameand all of its children intonodes, returning the index of the pushed node. - status_
from_ πframe - Maps a
callTracerframe to theInstructionResultused for the rendered[status]label.