Skip to content

trace_replayTransaction ​

served · same as reth

Runs a transaction again and returns the trace types that you ask for. The types are calls, EVM steps and state changes.

When to use ​

Use it to get the state changes of a transaction (stateDiff), or its EVM steps (vmTrace), with or without the calls.

Example ​

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

Response ​

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

json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "output": "0x",
    "stateDiff": null,
    "trace": [
      {
        "type": "call",
        "action": {
          "from": "0xc917c3fa468f2c4b9c84c72caa46420eb9825249",
          "callType": "call",
          "gas": "0x6a1c8",
          "input": "0x09c5eabe000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000002bd0000cca0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000000000000000000000000000000000082bedcbe00000000000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000aa059a20000000000000000000003bd97020d200000000000000000... 1146 more characters",
          "to": "0x0000000aa232009084bd71a5797d089aa4edfad4",
          "value": "0x0"
        },
        "result": {
          "gasUsed": "0x37b7b",
          "output": "0x"
        },
        "subtraces": 1,
        "traceAddress": []
      },
      {
        "type": "call",
        "action": {
          "from": "0x0000000aa232009084bd71a5797d089aa4edfad4",
          "callType": "call",
          "gas": "0x65d17",
          "input": "0x48c89491000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000002bd0000cca0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000000000000000000000000000000000082bedcbe00000000000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000aa059a20000000000000000000003bd97020d200000000000000000... 1146 more characters",
          "to": "0x000000000004444c5dc75cb358380d2e3de08a90",
          "value": "0x0"
        },
        "result": {
          "gasUsed": "0x34ed0",
          "output": "0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000"
        },
        "subtraces": 1,
        "traceAddress": [
          0
        ]
      },
      {
        "type": "call",
        "action": {
          "from": "0x000000000004444c5dc75cb358380d2e3de08a90",
          "callType": "call",
          "gas": "0x63ef8",
          "input": "0x91dd7346000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000002bd0000cca0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000000000000000000000000000000000082bedcbe00000000000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000aa059a20000000000000000000003bd97020d200000000000000000... 1146 more characters",
          "to": "0x0000000aa232009084bd71a5797d089aa4edfad4",
          "value": "0x0"
        },
        "result": {
          "gasUsed": "0x346b6",
          "output": "0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000"
        },
        "subtraces": 18,
        "traceAddress": [
          0,
          0
        ]
      },
      "... 25 more items"
    ],
    "vmTrace": null,
    "transactionHash": "0xa457d1d714f7c63b99f3846b390c13ae45d5f41952cc657d369b439b8fc8fa16"
  }
}

Full response

Parameters ​

NameTypeRequiredMeaning
transactionHash32-byte hashyesThe transaction.
traceTypeslist of strings, see Trace (trace_*)yesAny of trace, vmTrace and stateDiff.

Returns ​

An object with output (the return data), trace, vmTrace, stateDiff and transactionHash. A type that you did not ask for is empty or null. null when the node does not know the transaction. See Trace (trace_*).

Notes and limits ​

  • Tracing works for the head and the 127 blocks before it.
  • vmTrace is large: one entry for each EVM step.

Errors ​

CodeMessageWhen
-32602Invalid paramsA trace type is unknown. data names the valid types.
-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.

Compared with reth ​

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

Speed against reth ​

vmTrace1.4x faster
Cinder176 ms
reth239 ms
Median, reth 2.7, 2026-10-17. Shorter is better.

trace_transaction, trace_call, debug_traceTransaction.

Schema (OpenRPC) ​

More: trace_replayTransaction.

Parameter hash: Hash32
json
{
  "title": "32 byte hex value",
  "type": "string",
  "pattern": "^0x[0-9a-f]{64}$"
}
Parameter traceTypes: ParityTraceTypes
json
{
  "title": "Trace types",
  "description": "Which parts of the result to return.",
  "type": "array",
  "items": {
    "type": "string",
    "enum": [
      "trace",
      "stateDiff",
      "vmTrace"
    ]
  }
}
Result: ParityReplay or null
json
{
  "oneOf": [
    {
      "title": "Parity replay result",
      "description": "The parts that the trace types asked for. A part not asked for is null.",
      "type": "object",
      "properties": {
        "output": {
          "title": "hex encoded bytes",
          "type": "string",
          "pattern": "^0x[0-9a-f]*$"
        },
        "trace": {
          "oneOf": [
            {
              "type": "array",
              "items": {
                "title": "Parity call trace",
                "type": "object",
                "properties": {
                  "action": {
                    "title": "Parity trace action",
                    "type": "object",
                    "description": "A call, create or self-destruct action. The fields depend on the type.",
                    "properties": {
                      "callType": {
                        "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}$"
                      },
                      "gas": {
                        "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]*$"
                      },
                      "value": {
                        "title": "hex encoded unsigned integer",
                        "type": "string",
                        "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
                      },
                      "init": {
                        "title": "hex encoded bytes",
                        "type": "string",
                        "pattern": "^0x[0-9a-f]*$"
                      },
                      "address": {
                        "title": "hex encoded address",
                        "type": "string",
                        "pattern": "^0x[0-9a-fA-F]{40}$"
                      },
                      "balance": {
                        "title": "hex encoded unsigned integer",
                        "type": "string",
                        "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
                      },
                      "refundAddress": {
                        "title": "hex encoded address",
                        "type": "string",
                        "pattern": "^0x[0-9a-fA-F]{40}$"
                      }
                    }
                  },
                  "result": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "gasUsed": {
                            "title": "hex encoded unsigned integer",
                            "type": "string",
                            "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
                          },
                          "output": {
                            "title": "hex encoded bytes",
                            "type": "string",
                            "pattern": "^0x[0-9a-f]*$"
                          },
                          "address": {
                            "title": "hex encoded address",
                            "type": "string",
                            "pattern": "^0x[0-9a-fA-F]{40}$"
                          },
                          "code": {
                            "title": "hex encoded bytes",
                            "type": "string",
                            "pattern": "^0x[0-9a-f]*$"
                          }
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "error": {
                    "type": "string"
                  },
                  "subtraces": {
                    "type": "integer"
                  },
                  "traceAddress": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    }
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "call",
                      "create",
                      "suicide",
                      "reward"
                    ]
                  }
                }
              }
            },
            {
              "type": "null"
            }
          ]
        },
        "stateDiff": {
          "oneOf": [
            {
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "description": "An object that maps an address to the change of its balance, nonce, code and storage."
        },
        "vmTrace": {
          "oneOf": [
            {
              "type": "object"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    },
    {
      "type": "null"
    }
  ]
}