debug_traceBlockByHash

The debug_traceBlockByHash method returns the full trace of all transactions in a block identified by its hash. This method provides comprehensive debugging information for every transaction in the block, including all internal calls, opcode execution, gas consumption, and storage modifications.

This method is essential for analyzing block execution, debugging multiple related transactions, identifying gas optimization opportunities across a block, and understanding complex multi-transaction interactions on the Kaia network. Developers can use it to trace all activity in a specific block, analyze MEV (Miner Extractable Value) patterns, debug failed transactions in context, understand transaction interdependencies, and perform comprehensive block audits. The configurable tracer options allow focusing on specific execution aspects while managing the volume of data returned.

This method is available only on the full archive node.


Parameters

parameter
type
description
blockHash
string (required)
Hash of the block to trace (32-byte hex string with 0x prefix)
traceConfig
object (optional)
Configuration object to customize the trace output for all transactions in the block

Trace Config Properties:

property
type
description
tracer
string (optional)
The type of tracer: 'callTracer' for call tree, 'prestateTracer' for state diff, '4byteTracer' for method signatures, or custom JavaScript tracer code
timeout
string (optional)
Maximum time allowed for the trace operation (e.g., '10s'). Defaults to '5s'
disableStorage
boolean (optional)
Set to true to disable storage capture, significantly reducing trace size and improving performance
disableMemory
boolean (optional)
Set to true to disable memory capture in the trace
disableStack
boolean (optional)
Set to true to disable stack capture in the trace
Return Object

The method returns an array of trace objects, one for each transaction in the block. The structure of each trace depends on the tracer used and follows the same format as debug_traceTransaction.

Request Example
Request
Response Example
Response

Share on
Share on FacebookShare on XShare on LinkedIn
Did you find this page useful?