I want to monitor the mempool for my pending transactions. I understand one can monitor pending transactions by eth_subscribe (e.g. answered here). But some of my transactions have been stuck in the txpool, and they don't seem to show up in the result ofeth_subscribe`.

I'm confused by the difference between mempool, txpool, and pending transactions returned from eth_subscribe.

  1. how to retrieve transactions that are already in txpool?
  2. eth_subscribe only returns txid. Some of them can't be found by eth.getTransaction. What does that mean?
  3. Transactions returned from eth_subscribe are different from what are in txpool. It's unclear whether they form a superset of txpool or not.

If you are getting confused, I suggest you use JSON-RPC

curl -X POST -d '{"jsonrpc":"2.0","method":"txpool_status","params":[],"id":1}' http://ip:port
curl -X POST -d '{"jsonrpc":"2.0","method":"txpool_content","params":[],"id":1}' http://ip:port
curl -X POST -d '{"jsonrpc":"2.0","method":"txpool_inspect","params":[],"id":1}' http://ip:port

If you are familiar with creating POST requests in the language you are using, change the above curl commands to them and use.

| improve this answer | |
  • I'm not confused about the tools. I'm curious about the difference between txpool and transactions filtered by eth_subscribe('pending'). – qweruiop Nov 1 '18 at 4:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.