debug_traceBlockByNumber
Last updated:
`debug_traceBlockByNumber` re-executes all transactions contained in a single block — selected by block number or by a block tag — against the historical state at that block, and returns the EVM trace produced for each transaction. This is the per-block equivalent of tracing one transaction with [`debug_traceTransaction`](./debug_traceTransaction.md): the result is an array with one trace entry per transaction, in block order.
Use it when you need to inspect the execution of an entire block at once — for example to audit every internal call in a block, to attribute gas usage across transactions, or to reconstruct state transitions for analytics. By default the node uses the built-in opcode-level (struct-log) tracer; pass a `tracer` in the options object to switch to a higher-level tracer such as `callTracer` or `prestateTracer`.
This is a `debug`-namespace method and is available on the **Pro** tier and above. It is rate limited per tier (5 RPS on Pro, 15 RPS on Business) with a short burst allowance; there is no daily quota. Tracing a full block is an expensive operation — for older blocks or struct-log output the call can return a large response, so prefer a specific `tracer` and tight options when you can.
Parameters
This method takes no parameters.
Returns
| Field | Type |
|---|---|
| result | object |
Examples
curl https://<your-endpoint>/ \
-X POST -H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"debug_traceBlockByNumber","params":[]}'const res = await fetch("https://<your-endpoint>/", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"id": 1,
"method": "debug_traceBlockByNumber",
"params": [],
"jsonrpc": "2.0"
}),
});
const data = await res.json();import requests
resp = requests.post("https://<your-endpoint>/", json={"id":1,"method":"debug_traceBlockByNumber","params":[],"jsonrpc":"2.0"})
print(resp.json())Usage
- Transport: HTTP (JSON-RPC).
- Networks: mainnet.
- Credit cost: 5 per call.
FAQ
- What does debug_traceBlockByNumber do?
- Replays every transaction in a block identified by number or tag and returns the EVM execution trace for each one.
- How many credits does debug_traceBlockByNumber cost?
- debug_traceBlockByNumber costs 5 credit(s) per call on Triport by default.
- Is debug_traceBlockByNumber available over WebSocket?
- debug_traceBlockByNumber is an HTTP JSON-RPC method.