TriportRPC

debug_traceBlockByNumber

Polygon / https://triport.io/polygon

Minimum tier: Free

Polygon method guide

Last updated:

debug_traceBlockByNumber re-executes all transactions in a single Polygon block — selected by block number or by a block tag — against the historical state at that block, and returns the Geth-style EVM trace produced for each transaction. The result is an array with one trace entry per transaction, in block order. This is the per-block, Geth-namespace counterpart to the single-transaction debug_traceCall; for the Parity-style equivalent see trace_block, whose output schema is different.

Use it when you need to inspect the execution of an entire block at once — for example to index every internal call in a block (MEV / DeFi analytics), to attribute gas usage across transactions, or to reconstruct state transitions for forensic and compliance review. 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 available on the Pro tier and above. It is rate limited per tier (3 RPS on Pro, 10 RPS on Business) with a short burst allowance; there is no daily quota. Tracing a full Polygon block is an expensive operation — a typical mainnet block contains dozens to hundreds of transactions, each expanding into many trace frames, so responses are heavy (commonly 100 KB–2 MB) and latency is measured in seconds, not milliseconds. Prefer a specific tracer with tight options, and keep concurrency low.

Parameters

This method takes no parameters.

Returns

debug_traceBlockByNumber return value
FieldType
resultobject

Examples

curl https://triport.io/polygon \
  -X POST -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <api-key>' \
  -d '{"jsonrpc":"2.0","id":1,"method":"debug_traceBlockByNumber","params":[]}'
const res = await fetch("https://triport.io/polygon", {
  method: "POST",
  headers: { "Content-Type": "application/json", Authorization: "Bearer <api-key>" },
  body: JSON.stringify({
  "jsonrpc": "2.0",
  "id": 1,
  "method": "debug_traceBlockByNumber",
  "params": []
}),
});
const data = await res.json();
import requests
resp = requests.post(
    "https://triport.io/polygon",
    headers={"Authorization": "Bearer <api-key>"},
    json={"jsonrpc":"2.0","id":1,"method":"debug_traceBlockByNumber","params":[]},
)
print(resp.json())

Usage

  1. Transport: HTTP (JSON-RPC).
  2. Chain: Polygon.
  3. Clusters: mainnet.
  4. Credit cost: 5 per call.

FAQ

What does debug_traceBlockByNumber do?
Replays every transaction in a Polygon block selected by number or tag and returns the Geth-style 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.