Optimism
هل أنت مستعد لاستدعاء هذا في الإنتاج؟
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
Optimism
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
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.
| # | الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|---|
| 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 Optimism 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 and re-encode, which is error-prone.debug_traceBlockByHash — it is a full block replay, so a dense block is just as heavy here.المعاملات
0x-prefixed RLP-encoded block
Same tracer configuration object as debug_traceTransaction.