Skip to main content
Debug methods require a node with debug APIs enabled. Availability and rate limits vary by node provider. These methods replay transactions and are computationally expensive — avoid calling them in hot paths.
Replays all transactions in a block identified by its number and returns an execution trace for each transaction.

Parameters

blockParameter
string
required
Block number in hexadecimal, or a block tag: latest, earliest, safe, or finalized.
traceOptions
object
Optional trace configuration. Accepts the same fields as debug_traceTransaction.

Returns

result
array
An array of trace result objects, one per transaction in the block. Same format as debug_traceBlockByHash.

Example

{
  "jsonrpc": "2.0",
  "method": "debug_traceBlockByNumber",
  "params": ["latest", { "tracer": "callTracer" }],
  "id": 1
}