Trace Module
Last updated
Last updated
The RPC implementation follows . The RPC method requires any of the following optional parameters:
fromBlock(uint blockNumber) — either block number (hex
), earliest which is the genesis block or latest
(default) best block available. Trace starting block
toBlock(uint blockNumber) — either block number (hex
), earliest which is the genesis block or latest
best block available. Trace ending block
fromAddress(array addresses) — filter transactions done from these addresses only. If an empty array is provided, no filtering is done with this field
toAddress(array addresses) — filter transactions done from these addresses only. If an empty array is provided, no filtering is done with this field
after(uint offset) — default offset is 0. Trace offset (or starting) number
count(uint numberOfTraces) — number of traces to display in a batch
There are a couple default values that you should be aware of:
The maximum number of trace entries a single request of trace_filter is allowed to return is 500. A request exceeding this limit will return an error Blocks processed by requests are temporarily stored on cache for 300 seconds, after which they are deleted
To change the default values you can add Additional Flags when spinning up your tracing node.
For the trace_filter
call, you can make the following JSON RPC request in your terminal (in this case, the filter is from block 20000 to 25000, only for transactions where the recipient is 0x4E0078423a39EfBC1F8B5104540aC2650a756577, it will start with a zero offset and provide the first 20 traces):
The node responds with the trace information corresponding to the filter (response was cropped as it is quite long).