Optimism
¿Listo para usar esto en producción?
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
Optimism
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
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.
| # | Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|---|
| 1 | rlpBlock | string | Sí | RLP-encoded block data. The block must be a valid, known block; the node re-executes it against the parent state. |
| 2 | options | object | No | Same tracer configuration object as debug_traceTransaction. |
| Tipo | Descripción |
|---|---|
| array | Array of per-transaction trace results in block order, identical in shape to debug_traceBlockByHash output. |
Try it live in the Optimism playground.
| Código | Mensaje | Causa |
|---|---|---|
-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.Parámetros
0x-prefixed RLP-encoded block
Same tracer configuration object as debug_traceTransaction.