19

When typing txpool on Geth I get:

{ 
  status: {
    pending: 15,
    queued: 714
  },
  getStatus: function()
}

I don't even know why there are 714 queued transactions when there should be none. I guess I messed something up.

More importantly, my wallet just sent a week-old transaction to my kraken.com deposit that didn't go through at the time due to whatever reason but did now that I had sufficient ether.

How can I clear the transaction queue to prevent this from happening again?

2
  • 1
    I was under the impression that the transaction queue gets cleared each time you shut down / restart geth. Have you tried that?
    – tayvano
    Commented Apr 9, 2016 at 17:16
  • 1
    @tayvano no, it isn't. I'm trying to cope with it right now - I have hundreds of transactions somewhere in queue unsent, that's not the txpool queue, geth restart / update to latest version did not help.
    – Aldekein
    Commented May 6, 2016 at 0:09

2 Answers 2

26

Not a great solution, but it works:

  1. Exit geth
  2. Delete your geth/transactions.rlp file
  3. Restart geth and pending transactions should be empty (running eth.pendingTransactions outputs [])
2
  • 1
    What does this do? Are the pending transactions braodcasted to network, or they are just lost? Commented Dec 18, 2017 at 7:40
  • restart geth dosen't delete queued transactions
    – maroodb
    Commented Oct 31, 2019 at 7:55
13

Queued transactions are transactions where the transaction nonce is not in sequence. The transaction nonce is an incrementing number for each transaction with the same From address.

For example:

  • Transaction from account 0xaaaa...aaaa with nonce 0 has been included in the blockchain.
  • Transaction from account 0xaaaa...aaaa with nonce 1 has been included in the blockchain.
  • 10 transactions from account 0xaaaa...aaaa with nonces 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 as sent to an Ethereum node. These are placed in the transaction queue as the transaction from account 0xaaaa...aaaa with nonce 2 has not been seen by the Ethereum node.
  • Once the transaction from account 0xaaaa...aaaa with nonce 2 is added to the transaction pool, the 10 transactions with nonces 3, 4, 5, 6, 7, 8, 9, 10, 11 and 12 will be moved from the queue to the pending transaction pool and all 11 transactions are ready to be processed and inserted into into the blockchain (provided there is enough gas).

What is the max size of transactions can clients like geth keep in txpool?

2
  • 4
    good explanation helps, but this doesn't answer the question of how to clear them up (cancel them)
    – knocte
    Commented Jun 17, 2016 at 2:52
  • how to clear queued transactions or cancel them ? (after a period of time or number)
    – maroodb
    Commented Nov 5, 2019 at 13:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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