Optimism
Bereit, das in der Produktion aufzurufen?
Das Free-Tier deckt persönliche Projekte ab. Pay-as-you-go skaliert ohne Karte.
Optimism
Das Free-Tier deckt persönliche Projekte ab. Pay-as-you-go skaliert ohne Karte.
debug_traceBlock takes a full block as RLP-encoded bytes, re-executes every transaction in it against the parent state, and returns an opcode-level trace for each. Unlike the by-hash and by-number variants, you hand the OP Mainnet node the raw block itself rather than pointing at one already in its database — useful when you hold the encoded bytes but not a canonical reference. OP Mainnet is the OP Stack rollup that settles to Ethereum L1 and meters gas in ETH; send the request to https://optimism.therpc.io/YOUR_API_KEY (chain ID 10, 0xa) with the 0x-prefixed RLP block and an optional tracer config.
| # | Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|---|
| 1 | rlpBlock | string | Ja | RLP-encoded block data. The block must be a valid, known block; the node re-executes it against the parent state. |
| 2 | options | object | Nein | Same tracer configuration object as debug_traceTransaction. |
| Typ | Beschreibung |
|---|---|
| array | Array of per-transaction trace results in block order, identical in shape to debug_traceBlockByHash output. |
Try it live in the Optimism playground.
| Code | Meldung | Ursache |
|---|---|---|
-32601 | Method not found | debug namespace not enabled on the node. |
-32602 | Invalid params | RLP data is malformed, empty, or does not decode to a valid block structure. |
-32000 | block not found | Parent state for the provided block is not available (archive state missing). |
eth_getBlockByHash with full transactions and re-encode, which is error-prone.debug_traceBlockByHash — it is a full block replay, so a dense block is just as heavy here.Parameter
0x-prefixed RLP-encoded block
Same tracer configuration object as debug_traceTransaction.