Skip to content

debug_traceTransaction ​

served · same as reth

Runs a transaction of a block again and returns a trace of its execution.

When to use ​

Use it to see why a transaction failed, which contracts it called, or which state it read and changed. Use callTracer for the call tree and prestateTracer for the state.

Example ​

bash
curl -s -X POST -H 'Content-Type: application/json' \
  --data '{"jsonrpc": "2.0", "id": 1, "method": "debug_traceTransaction", "params": ["0xa457d1d714f7c63b99f3846b390c13ae45d5f41952cc657d369b439b8fc8fa16", {"tracer": "callTracer"}]}' \
  http://127.0.0.1:8547
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "debug_traceTransaction",
  "params": [
    "0xa457d1d714f7c63b99f3846b390c13ae45d5f41952cc657d369b439b8fc8fa16",
    {
      "tracer": "callTracer"
    }
  ]
}

Response ​

Live mainnet, block 26193069, 2026-10-14. Checked against reth 2.7: equal.

json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "from": "0xc917c3fa468f2c4b9c84c72caa46420eb9825249",
    "gas": "0x711a4",
    "gasUsed": "0x3e067",
    "to": "0x0000000aa232009084bd71a5797d089aa4edfad4",
    "input": "0x09c5eabe000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000002bd0000cca0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000000000000000000000000000000000082bedcbe00000000000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000aa059a20000000000000000000003bd97020d200000000000000000... 1146 more characters",
    "calls": [
      {
        "from": "0x0000000aa232009084bd71a5797d089aa4edfad4",
        "gas": "0x65d17",
        "gasUsed": "0x34ed0",
        "to": "0x000000000004444c5dc75cb358380d2e3de08a90",
        "input": "0x48c89491000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000002bd0000cca0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000000000000000000000000000000000082bedcbe00000000000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000aa059a20000000000000000000003bd97020d200000000000000000... 1146 more characters",
        "output": "0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000",
        "calls": [
          {
            "from": "0x000000000004444c5dc75cb358380d2e3de08a90",
            "gas": "0x63ef8",
            "gasUsed": "0x346b6",
            "to": "0x0000000aa232009084bd71a5797d089aa4edfad4",
            "input": "0x91dd7346000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000002bd0000cca0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000000000000000000000000000000000082bedcbe00000000000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000aa059a20000000000000000000003bd97020d200000000000000000... 1146 more characters",
            "output": "0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000",
            "calls": [
              {
                "from": "0x0000000aa232009084bd71a5797d089aa4edfad4",
                "gas": "0x60ac5",
                "gasUsed": "0x6bf8",
                "to": "0x000000000004444c5dc75cb358380d2e3de08a90",
                "input": "0x0b0d9c09000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000000000aa232009084bd71a5797d089aa4edfad40000000000000000000000000000000000000000000000000000000082bedcbe",
                "calls": [
                  {
                    "from": "0x000000000004444c5dc75cb358380d2e3de08a90",
                    "gas": "0x5e33f",
                    "gasUsed": "0x5c00",
                    "to": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
                    "input": "0xa9059cbb0000000000000000000000000000000aa232009084bd71a5797d089aa4edfad40000000000000000000000000000000000000000000000000000000082bedcbe",
                    "output": "0x0000000000000000000000000000000000000000000000000000000000000001",
                    "calls": [
                      {
                        "from": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
                        "gas": "0x5afd7",
                        "gasUsed": "0x3f87",
                        "to": "0x43506849d7c04f9138d1a2050bbf3a0c054402dd",
                        "input": "0xa9059cbb0000000000000000000000000000000aa232009084bd71a5797d089aa4edfad40000000000000000000000000000000000000000000000000000000082bedcbe",
                        "output": "0x0000000000000000000000000000000000000000000000000000000000000001",
                        "value": "0x0",
                        "type": "DELEGATECALL"
                      }
                    ],
                    "value": "0x0",
                    "type": "CALL"
                  }
                ],
                "value": "0x0",
                "type": "CALL"
              },
              {
                "from": "0x0000000aa232009084bd71a5797d089aa4edfad4",
                "gas": "0x59c94",
                "gasUsed": "0x4236",
                "to": "0x000000000004444c5dc75cb358380d2e3de08a90",
                "input": "0x0b0d9c09000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000aa232009084bd71a5797d089aa4edfad4000000000000000000000000000000000000000000000000000003bd97020d20",
                "calls": [
                  {
                    "from": "0x000000000004444c5dc75cb358380d2e3de08a90",
                    "gas": "0x576c7",
                    "gasUsed": "0x323e",
                    "to": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
                    "input": "0xa9059cbb0000000000000000000000000000000aa232009084bd71a5797d089aa4edfad4000000000000000000000000000000000000000000000000000003bd97020d20",
                    "output": "0x0000000000000000000000000000000000000000000000000000000000000001",
                    "value": "0x0",
                    "type": "CALL"
                  }
                ],
                "value": "0x0",
                "type": "CALL"
              },
              {
                "from": "0x0000000aa232009084bd71a5797d089aa4edfad4",
                "gas": "0x5577e",
                "gasUsed": "0x6fad",
                "to": "0x000000000004444c5dc75cb358380d2e3de08a90",
                "input": "0x0b0d9c09000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec70000000000000000000000000000000aa232009084bd71a5797d089aa4edfad4000000000000000000000000000000000000000000000000000000006c61807b",
                "calls": [
                  {
                    "from": "0x000000000004444c5dc75cb358380d2e3de08a90",
                    "gas": "0x532c5",
                    "gasUsed": "0x5fb5",
                    "to": "0xdac17f958d2ee523a2206206994597c13d831ec7",
                    "input": "0xa9059cbb0000000000000000000000000000000aa232009084bd71a5797d089aa4edfad4000000000000000000000000000000000000000000000000000000006c61807b",
                    "value": "0x0",
                    "type": "CALL"
                  }
                ],
                "value": "0x0",
                "type": "CALL"
              },
              "... 17 more items"
            ],
            "value": "0x0",
            "type": "CALL"
          }
        ],
        "value": "0x0",
        "type": "CALL"
      }
    ],
    "value": "0x0",
    "type": "CALL"
  }
}

Full response

Parameters ​

NameTypeRequiredMeaning
transactionHash32-byte hashyesThe transaction to trace.
optionsobject, see Tracer optionsnoThe tracer and its options. Without a tracer, the node uses the struct logger.

The main fields of options. The Tracer options page has all of them.

FieldTypeMeaning
tracerstringcallTracer, flatCallTracer, prestateTracer, 4byteTracer, noopTracer, muxTracer or erc7562Tracer. Default: the struct logger.
tracerConfigobjectThe options of the chosen tracer. The rows below list them.
disableStackbooleanStruct logger: leave out the stack. Default: false.
enableMemorybooleanStruct logger: add the memory. Default: false.
enableReturnDatabooleanStruct logger: add returnData to each step, the data that the last inner call of the frame returned. A create that succeeds gives no data. Default: false.
disableStoragebooleanStruct logger: leave out the storage. Default: false.

Returns ​

The trace. Its form depends on the tracer. The struct logger gives failed, gas, returnValue and structLogs (one entry per EVM step). callTracer gives the top call with type, from, to, value, gas, gasUsed, input, output, error, revertReason and the inner calls. erc7562Tracer gives the calls as callTracer does. Each call also has the storage slots that it read and wrote (accessedSlots), the addresses of its EXTCODE* opcodes and their code sizes, the count of each opcode, the KECCAK256 inputs and outOfGas.

Notes and limits ​

  • The node runs the block again on the state of its parent block, up to the transaction. So tracing works for the head and the 127 blocks before it.
  • An answer larger than 160 MiB gives an error. The struct logger stops when it reaches this size.
  • Each step of the struct logger has refund, also when it is 0. In a frame that takes back a refund of its caller, the counter is below 0. The node writes it as a u64 (for example 18446744073709549616), as reth does. The counter does not include the refund of EIP-7702 authorizations, as reth. Memory words and storage slots start with 0x.
  • A tracer that is not the name of a built-in tracer is JavaScript code, as in reth. The code gives an object with result(ctx, db) and fault(log, db). The object can also have setup(config), step(log, db), enter(frame) and exit(result). See Tracer options.
  • The error texts of the JavaScript engine can be different from reth, and the node stops a JavaScript tracer after the timeout option. See Differences from reth.

Errors ​

CodeMessageWhen
-32000transaction not foundThe node does not know the transaction, or it is not in a block.
-32603failed to apply blockhash contract call: database error: Database error: insufficient changesets to revert to block #N. Available changeset range: A..=BThe state of the parent block is gone: it is more than 128 blocks below the head. Below the first block of the node, the error is 4444.
-32008Response is too bigThe answer is larger than 160 MiB.
-32602this tracer is not supported yetThe tracer name is not one of the supported tracers.
-32602failed to evaluate JS code: ...The JavaScript tracer code is not valid, or it does not give an object with result and fault.
-32603execution timeoutThe JavaScript tracer ran longer than the timeout option (default 60 s).
-32603RuntimeLimit: Maximum loop iteration limit 200000 exceededA function of the JavaScript tracer ran more than 200001 loop iterations, as reth.

Compared with reth ​

The tracers, their options and their output follow reth. The error texts and revert reasons are those of geth and revm, as reth gives them.

The live example above gives the same answer on Cinder and on reth 2.7.

Speed against reth ​

callTracer1.3x faster
Cinder35 ms
reth46 ms
Median, reth 2.7, 2026-10-17. Shorter is better.

debug_traceCall, debug_traceBlockByNumber, trace_transaction.

Schema (OpenRPC) ​

Parameter hash: Hash32
json
{
  "title": "32 byte hex value",
  "type": "string",
  "pattern": "^0x[0-9a-f]{64}$"
}
Parameter options: TraceConfig
json
{
  "title": "Trace config",
  "description": "Options of debug_trace methods. The struct logger reads disableStack, enableMemory and disableStorage. The tracers read tracerConfig. callTracer reads onlyTopCall and withLog. prestateTracer reads diffMode, disableCode and disableStorage. muxTracer reads one key for each tracer to run.",
  "type": "object",
  "properties": {
    "tracer": {
      "title": "Tracer name",
      "type": "string",
      "description": "No tracer gives the struct logger. Cinder runs these built-in tracers. A JavaScript tracer is not supported.",
      "enum": [
        "callTracer",
        "flatCallTracer",
        "prestateTracer",
        "4byteTracer",
        "muxTracer",
        "noopTracer"
      ]
    },
    "tracerConfig": {
      "type": "object"
    },
    "disableStack": {
      "type": "boolean"
    },
    "enableMemory": {
      "type": "boolean"
    },
    "disableStorage": {
      "type": "boolean"
    }
  }
}
Result: TracerResult
json
{
  "title": "Tracer result",
  "description": "The shape depends on the tracer. No tracer: a struct logger result. callTracer: a call frame. flatCallTracer: an array of Parity-style flat frames. prestateTracer: an object that maps an address to its state, or an object with pre and post in diff mode. 4byteTracer: an object that maps a selector and call data size to a count. muxTracer: an object with one result for each tracer. noopTracer: an empty object.",
  "oneOf": [
    {
      "title": "Struct logger result",
      "type": "object",
      "properties": {
        "gas": {
          "type": "integer"
        },
        "failed": {
          "type": "boolean"
        },
        "returnValue": {
          "type": "string"
        },
        "structLogs": {
          "type": "array",
          "items": {
            "title": "Struct log step",
            "type": "object",
            "properties": {
              "pc": {
                "type": "integer"
              },
              "op": {
                "type": "string"
              },
              "gas": {
                "type": "integer"
              },
              "gasCost": {
                "type": "integer"
              },
              "depth": {
                "type": "integer"
              },
              "error": {
                "type": "string"
              },
              "stack": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "memory": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "storage": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    {
      "title": "Call frame",
      "description": "The result of callTracer: one frame, with its sub-calls in calls.",
      "type": "object",
      "properties": {
        "type": {
          "type": "string"
        },
        "from": {
          "title": "hex encoded address",
          "type": "string",
          "pattern": "^0x[0-9a-fA-F]{40}$"
        },
        "to": {
          "title": "hex encoded address",
          "type": "string",
          "pattern": "^0x[0-9a-fA-F]{40}$"
        },
        "value": {
          "title": "hex encoded unsigned integer",
          "type": "string",
          "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
        },
        "gas": {
          "title": "hex encoded unsigned integer",
          "type": "string",
          "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
        },
        "gasUsed": {
          "title": "hex encoded unsigned integer",
          "type": "string",
          "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
        },
        "input": {
          "title": "hex encoded bytes",
          "type": "string",
          "pattern": "^0x[0-9a-f]*$"
        },
        "output": {
          "title": "hex encoded bytes",
          "type": "string",
          "pattern": "^0x[0-9a-f]*$"
        },
        "error": {
          "type": "string"
        },
        "revertReason": {
          "type": "string"
        },
        "calls": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/CallFrame"
          }
        },
        "logs": {
          "type": "array",
          "items": {
            "type": "object"
          }
        }
      }
    },
    {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    {
      "type": "object"
    }
  ]
}