Polygon
هل أنت مستعد لاستدعاء هذا في الإنتاج؟
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
Polygon
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
debug_traceBlock takes a Polygon PoS block as raw RLP bytes, re-executes it against its parent state, and returns a trace for each transaction. It is the byte-input sibling of debug_traceBlockByHash: instead of naming a block already on-chain, you hand the node the encoded block itself. Polygon's Bor client is Geth-based, so the usual callTracer, prestateTracer, and default struct-log tracers apply to these MATIC-fee blocks. Send the request to https://polygon.therpc.io/YOUR_API_KEY (chain ID 137, 0x89). It returns opcode-level execution traces for every transaction in the block provided as RLP-encoded bytes.
| # | الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|---|
| 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 Polygon 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 then re-encode, since a single malformed field rejects the whole input.debug_traceBlockByHash: it is a full block replay, so cost scales with how many transactions the block carries, not with the convenience of passing raw bytes.المعاملات
0x-prefixed RLP-encoded block
Same tracer configuration object as debug_traceTransaction.