Ethereum
准备好在生产环境中调用了吗?
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
Ethereum
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
debug_traceBlock is the raw-bytes variant of block tracing on Ethereum mainnet (chain ID 1, native coin ETH). Instead of naming a block by hash or number, you hand the node the block itself as RLP-encoded bytes; it decodes them, re-runs every transaction against the parent state, and returns an opcode-level trace for each one in block order. This is the method to reach for when you already hold the serialized block — say, captured off the devp2p wire — rather than asking the node to look one up. Requests go to https://ethereum.therpc.io/YOUR_API_KEY. Like its siblings, it replays the whole block through the EVM, so a debug-enabled archive node is needed for the parent state of older blocks.
| # | 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|---|
| 1 | rlpBlock | string | 是 | RLP-encoded block data. The block must be a valid, known block; the node re-executes it against the parent state. |
| 2 | options | object | 否 | Same tracer configuration object as debug_traceTransaction. |
| 类型 | 描述 |
|---|---|
| array | Array of per-transaction trace results in block order, identical in shape to debug_traceBlockByHash output. |
Try it live in the Ethereum playground.
| 错误码 | 错误信息 | 原因 |
|---|---|---|
-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, then re-encode header and body to RLP — get a single field wrong and the node throws -32602.block not found even though your RLP decodes fine.debug_traceBlockByHash exactly — both replay every transaction in the block, so a busy mainnet block is just as heavy whichever entry point you use.参数
0x-prefixed RLP-encoded block
Same tracer configuration object as debug_traceTransaction.