80 Compute Units.
Traces need the state of the traced block, so Linea Mainnet can trace the last 512 blocks, about an hour. For older blocks,
debug_traceBlockByNumber and debug_traceBlockByHash return an empty list even when the block has transactions, and debug_traceTransaction returns JSON-RPC error -32603 with the message Internal error. The example below uses a block from 3 December 2026: replace it with a block or transaction from the last 512 blocks, for example from eth_getBlockByNumber with "latest".Parameters
blockNumber - String - Required - The block number as a string in hexadecimal format.
object - Object - Required - The tracer object with the following fields:
tracer- String - The type of tracer, options are:callTracerorprestateTracer.callTracer- String - The callTracer keeps track of all call frames, including depth - calls, that are made during a transaction.prestateTracer- String - The prestateTracer replays the transaction and tracks every part of state that occurred during the transaction.
tracerConfig- Object (Optional) - The object to specify the configurations of the tracer.onlyTopCall- Boolean - When set to true, this will only trace the primary (top-level) call and not any sub-calls. It eliminates the additional processing for each call frame.
Returns
result - An array with one entry per transaction in the block, each containing:
txHash- The hash of the transaction.result- WithcallTracer, the call trace of the transaction, an object with:from- The address the transaction is sent from.gas- The integer of the gas provided for the transaction execution.gasUsed- The integer of the gas used.to- The address the transaction is directed to.input- The data given at the time of input.output- The data returned by the call, when present.value- The integer of the value sent with this transaction.type- The type of call.calls- A list of sub-calls, when present.
prestateTracer, each result is instead a map keyed by account address, holding the state the transaction touched (such as balance, nonce, code and storage).