Appearance
debug_traceBlockByHash
served · same as reth
Runs all transactions of a block again, by block hash, and returns a trace for each one.
When to use
Use it as debug_traceBlockByNumber when you have the block hash.
Example
bash
curl -s -X POST -H 'Content-Type: application/json' \
--data '{"jsonrpc": "2.0", "id": 1, "method": "debug_traceBlockByHash", "params": ["0x5ae7b3bea1d0773e6f124069319201fa7963401336f072a58f68bc3fee920047", {"tracer": "callTracer"}]}' \
http://127.0.0.1:8547json
{
"jsonrpc": "2.0",
"id": 1,
"method": "debug_traceBlockByHash",
"params": [
"0x5ae7b3bea1d0773e6f124069319201fa7963401336f072a58f68bc3fee920047",
{
"tracer": "callTracer"
}
]
}Response
Live mainnet, block 26193066, 2026-10-14. Checked against reth 2.7: equal.
json
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"result": {
"from": "0x8d8d7ea4761e3c0a78652331a844a121a63ac2b3",
"gas": "0x5208",
"gasUsed": "0x5208",
"to": "0x351101b6341abb86b68bd5d18d26d8ddfe13fee1",
"input": "0x",
"value": "0x1db0508fb65ee",
"type": "CALL"
},
"txHash": "0x6aab65ac3b5c83ca28846ab031e5f75d853aa8f496c8f4b83760f35423a0b950"
},
"... 54 more items"
]
}Parameters
| Name | Type | Required | Meaning |
|---|---|---|---|
blockHash | 32-byte hash | yes | The hash of the block to trace. |
options | object, see Tracer options | no | The tracer and its options. |
The main fields of options. The Tracer options page has all of them.
| Field | Type | Meaning |
|---|---|---|
tracer | string | callTracer, flatCallTracer, prestateTracer, 4byteTracer, noopTracer, muxTracer or erc7562Tracer. Default: the struct logger. |
tracerConfig | object | The options of the chosen tracer. The rows below list them. |
Returns
A list with one item per transaction, in block order. Each item has txHash and result.
Notes and limits
- Tracing works for the head and the 127 blocks before it.
Errors
| Code | Message | When |
|---|---|---|
| -32000 | block 0x... not found | The hash is unknown or not on the canonical chain. |
| -32603 | failed to apply blockhash contract call: database error: Database error: insufficient changesets to revert to block #N. Available changeset range: A..=B | The 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. |
| -32008 | Response is too big | The answer is larger than 160 MiB. |
Compared with reth
The live example above gives the same answer on Cinder and on reth 2.7.
Related methods
debug_traceBlockByNumber, debug_traceTransaction.
Schema (OpenRPC)
Parameter blockHash: 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: TxTraceResult[]
json
{
"type": "array",
"items": {
"title": "Trace of one transaction in a block",
"type": "object",
"properties": {
"txHash": {
"title": "32 byte hex value",
"type": "string",
"pattern": "^0x[0-9a-f]{64}$"
},
"result": {
"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"
}
]
},
"error": {
"type": "string"
}
}
}
}