简体   繁体   中英

Go Ethereum, txpool Namespace, empty responses

I have access to a Geth node running with the following options:

geth \
  --http \
  --http.addr 0.0.0.0 \
  --http.port 8545 \
  --http.api eth,net,web3,txpool \
  --http.corsdomain '*'

The node has been synced with the mode: snap .

Why do all my txpool API requests return "empty" responses?

  • txpool_content: curl http://IP:PORT -X POST -H "Content-Type: application/json" --data '{"jsonrpc": "2.0", "method": "txpool_content", "params": [], "id": 0}' -> {"jsonrpc":"2.0","id":0,"result":{"pending":{},"queued":{}}}
  • txpool_inspect: curl http://IP:PORT -X POST -H "Content-Type: application/json" --data '{"jsonrpc": "2.0", "method": "txpool_inspect", "params": [], "id": 0}' -> {"jsonrpc":"2.0","id":0,"result":{"pending":{},"queued":{}}}
  • txpool_status: curl http://IP:PORT -X POST -H "Content-Type: application/json" --data '{"jsonrpc": "2.0", "method": "txpool_status", "params": [], "id": 0}' -> {"jsonrpc":"2.0","id":0,"result":{"pending":"0x0","queued":"0x0"}}

Thank you!

Based on your comment:

No, I am not submitting any tx

The mempool/tx-pool/tx-queue (usually mean the same thing with different terminologies across different Ethereum clients) will remain empty because there is nothing to process. Each node has its own pool and it isn't global. It is up to the consensus mechanism of the blockchain to include tx's into the next block from the respective validator/mining nodes.

Different clients have different ways of handling tx pools eg OpenEthereum . But generally you will see the pending queue filled up (and probably never processed) if there is a bad nonce, or low gas price set. If the block time is large enough you can also see the pending tx's waiting to be mined.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM