Trace transactions
To get detailed information about transaction processing, use the TRACE API. Enable the TRACE API using the --rpc-http-api or --rpc-ws-api command line options.
The TRACE API has two sets of trace calls, ad-hoc tracing APIs and transaction-trace filtering APIs.
Ad-hoc tracing APIs
These APIs allow you to use the trace, vmTrace, or stateDiff diagnostic options when tracing calls or transactions.
When using Bonsai Tries with the ad-hoc tracing APIs, the requested block or transaction must be within the number of blocks retained (by default, 512 from the head of the chain).
The ad-hoc tracing APIs are:
Transaction-trace filtering APIs
These APIs allow you to filter and search by specific information such as the block, address, or transaction. These APIs only use the trace type.
To use the transaction-trace filtering APIs, your node must be an archive node, or the requested block or transaction must be within the number of blocks retained when using Bonsai Tries (by default, 512 from the head of the chain).
The transaction-trace filtering APIs are:
Dumping traces to file
For large blocks or when you prefer file output over a JSON response, use the debug API methods:
Enable or disable trace fields (txHash, stack, memory, storage, and opcodes) via the optional options parameter on both methods. For example, set disableStack, disableMemory, and/or disableStorage to reduce output size or focus on specific data.
Trace files are written under the node data directory in the traces subdirectory; the data directory is set by the --data-path option.