I would like to get the pending transactions in the whole network of ethereum. For example, the transaction '0xabcdefg' is right now pending in the pool, waiting to be mined by miners, after 12 seconds, '0xabcdefg' will be packeted in to blocks. I just want to get the '0xabcdefg' in the pool before this 12 seconds. In a word, I would like to get a list of the waiting list of the whole network of ethereum. What should I do? It seems that geth, infual, and the etherscan can not get all the pending transactions, is this caused by the mechanism of ethereum?
1 Answer
First of all, each node maintains its own list of pending transactions. The nodes continuously download pending transaction from each other, but this is asynchronous process and most of the time lists on different nodes differ. Also, each node usually limits number of pending transactions it wants to store, so if total number of pending transactions is higher that this limit, the node will drop some transactions, and different nodes will probably drop different transactions. Also, node may treat its own transactions (published by this node) differently, for example never drop them. Also, miners may have some private pending transactions, that miner does no show to other nodes before transaction will be included into block. All these makes it really hard to collect all pending transactions.
Probably, list of pending transactions at Etherscan.io will satisfy your needs.