Skip to content

debug_traceBlockByHash

Replays all transactions in a block identified by its hash and returns an execution trace for each.

Debug methods replay every transaction in the block and are computationally expensive. Availability varies by node provider.

NameTypeRequiredDescription
blockHashstringYesThe 32-byte block hash.
traceOptionsobjectNoOptional trace configuration. Accepts the same fields as debug_traceTransaction.

result is an array of trace result objects, one per transaction in the block.

FieldTypeDescription
txHashstringThe transaction hash.
resultobjectThe execution trace for this transaction. Same format as debug_traceTransaction.
{
"jsonrpc": "2.0",
"method": "debug_traceBlockByHash",
"params": [
"0x3a4e8c5d7f2b1a6e9d0c4f8b3e7a2d5c8f1b4e7a0d3c6f9b2e5a8d1c4f7b0e3",
{ "tracer": "callTracer" }
],
"id": 1
}
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"txHash": "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238",
"result": {
"type": "CALL",
"from": "0xd3cda913deb6f4967b2ef66ae97de114a83bcc01",
"to": "0x4200000000000000000000000000000000000006",
"value": "0x2c68af0bb14000",
"gas": "0x5208",
"gasUsed": "0x5208",
"input": "0x",
"output": "0x",
"calls": []
}
}
]
}