Skip to content

trace_filter ​

served · same as reth

Returns the traces of a block range that match sender and recipient addresses.

When to use ​

Use it to find all internal calls to or from an address in a range of recent blocks.

Example ​

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

Response ​

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

json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    {
      "action": {
        "from": "0x8d8d7ea4761e3c0a78652331a844a121a63ac2b3",
        "callType": "call",
        "gas": "0x0",
        "input": "0x",
        "to": "0x351101b6341abb86b68bd5d18d26d8ddfe13fee1",
        "value": "0x1db0508fb65ee"
      },
      "blockHash": "0x5ae7b3bea1d0773e6f124069319201fa7963401336f072a58f68bc3fee920047",
      "blockNumber": 26193066,
      "result": {
        "gasUsed": "0x0",
        "output": "0x"
      },
      "subtraces": 0,
      "traceAddress": [],
      "transactionHash": "0x6aab65ac3b5c83ca28846ab031e5f75d853aa8f496c8f4b83760f35423a0b950",
      "transactionPosition": 0,
      "type": "call"
    },
    "... 302 more items"
  ]
}

Full response

Parameters ​

NameTypeRequiredMeaning
filterobject, see Trace filteryesThe block range and the addresses to match.

The main fields of filter. The Trace filter page has all of them.

FieldTypeMeaning
fromBlockblock number in hexThe first block, included. Give a range of at most 100 blocks. Tags are not accepted.
toBlockblock number in hexThe last block, included. Default: the head. Tags are not accepted.
fromAddresslist of addressesOnly traces whose sender is in the list. Default: any sender.
toAddresslist of addressesOnly traces whose recipient (or new contract) is in the list. Default: any recipient.
afternumberSkip this many matching traces first.
countnumberReturn at most this many traces.

Returns ​

A list of matching traces, in block order. See Trace (trace_*).

Notes and limits ​

  • The range is at most 101 blocks (toBlock minus fromBlock at most 100).
  • A missing fromBlock is the head, and a missing toBlock is the head, as in reth 2.7.
  • Tracing works for the head and the 127 blocks before it. The whole range must be in them.
  • fromBlock and toBlock are numbers. Tags such as latest are not accepted.

Errors ​

CodeMessageWhen
-32602Block range too large; currently limited to 100 blockstoBlock minus fromBlock is more than 100.
-32602invalid parameters: fromBlock cannot be greater than toBlockfromBlock is above toBlock.
4444pruned history unavailable: requested N, earliest available MfromBlock is below the first block of the node.
-32001block not found: 0x...fromBlock or toBlock is above the head.
-32602Invalid paramsA parameter is missing or does not parse. data has the text of reth, with the position.
-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 range limit, the after and count rules and the error texts are those of reth.

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

trace_block, trace_transaction, eth_getLogs.

Schema (OpenRPC) ​

More: trace_filter.

Parameter filter: TraceFilter
json
{
  "title": "Trace filter",
  "type": "object",
  "properties": {
    "fromBlock": {
      "title": "hex encoded unsigned integer",
      "type": "string",
      "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
    },
    "toBlock": {
      "title": "hex encoded unsigned integer",
      "type": "string",
      "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
    },
    "fromAddress": {
      "type": "array",
      "items": {
        "title": "hex encoded address",
        "type": "string",
        "pattern": "^0x[0-9a-fA-F]{40}$"
      }
    },
    "toAddress": {
      "type": "array",
      "items": {
        "title": "hex encoded address",
        "type": "string",
        "pattern": "^0x[0-9a-fA-F]{40}$"
      }
    },
    "mode": {
      "type": "string",
      "enum": [
        "union",
        "intersection"
      ]
    },
    "after": {
      "type": "integer",
      "minimum": 0
    },
    "count": {
      "type": "integer",
      "minimum": 0
    }
  }
}
Result: LocalizedParityTrace[]
json
{
  "type": "array",
  "items": {
    "title": "Parity call trace with its position",
    "allOf": [
      {
        "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": "object",
        "properties": {
          "blockHash": {
            "title": "32 byte hex value",
            "type": "string",
            "pattern": "^0x[0-9a-f]{64}$"
          },
          "blockNumber": {
            "type": "integer"
          },
          "transactionHash": {
            "title": "32 byte hex value",
            "type": "string",
            "pattern": "^0x[0-9a-f]{64}$"
          },
          "transactionPosition": {
            "type": "integer"
          }
        }
      }
    ]
  }
}