What causes Transaction Pool Error?

I am using a Python loops to write many transactions simultaneously. If I do not put sleep() between every iteration, I get error such:

algosdk.error.AlgodHTTPError: {“message”:“TransactionPool.Remember: transaction already in ledger: N6DGJLF4PQEJRW4LBELO562XWX7LUXRCGIQETB5ZTLO2C42BRAJQ”}

Or sometimes even when I add sleep time in between, loop will iterate a few times then the same error happens. What’s the reason behind this? Is it because I can only try to commit 1 transaction into 1 block at a time. And If I try to commit 2 transactions to 1 block, it will generate the same transaction ID which then causes the error?

Thank you

All transactions need to be unique to be included in the blockchain. You can add a monotonic growing counter and store it in the notes field in order to do that.

2 Likes

How are those two transactions possible? They are in the same block, having the same sender, same receiver, same amount, and same note.

https://algoexplorer.io/tx/2U5EVSJEO5GRRCVPKLIHE2ZYFORTI6IMRUMDLBUYJPX7BRNJXL2Q
https://algoexplorer.io/tx/4SVYFHD3RDVDG2Q2MVNB34Z6S2BFHVOIF5WC7QFGEVD7MV3B7RHQ

These two transactions have a different “first round” (as you can see in “More Information”).

1 Like