JAZ Chain
  • Guide
    • Products
    • Network
      • Endpoints
      • Metamask
      • Faucet
    • Glossary
    • Node Setup
      • Requirements
      • Installation
        • Using Command
        • Using Docker
      • Rotate session keys
      • Set session keys
      • Bind unique-node-nft
      • Claim Rewards
    • Run a tracing node
      • Run a Tracing Node
      • Additional Flags
      • Using a tracing Node
  • Build
    • Ethereum API
      • Libiaries
      • Dev Environments
      • Debug && Trace
        • Debug
        • Txpool
          • Trace Module
      • Gas
    • Substrate API
Powered by GitBook
On this page
  1. Build
  2. Ethereum API
  3. Debug && Trace
  4. Txpool

Trace Module

PreviousTxpoolNextGas

Last updated 2 years ago

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.

Using the Tracing Module

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):

curl http://127.0.0.1:9933 -H "Content-Type:application/json;charset=utf-8" -d \
  '{
    "jsonrpc":"2.0",
    "id":1,
    "method":"trace_filter", "params":[{"fromBlock":"0x4E20","toBlock":"0x5014","toAddress":["0x4E0078423a39EfBC1F8B5104540aC2650a756577"],"after":0,"count":20}]
  }'

The node responds with the trace information corresponding to the filter (response was cropped as it is quite long).

trace_filter (opens new window)
OpenEthereum's trace module guidelines (opens new window)