Let's say I have two geth nodes which run on two distant networks with slow connections between them, and I use the same newly created address (private key) to send two different transactions with the two geth nodes. Since for each node it's a new address, both transactions have nonce set to 0 and enter the pending state and are broadcast to the network. So what happens when the two pending transaction broadcasts reach each other? How will the transaction pool handle the two different transactions from the same address with the same nonce?

up vote 2 down vote accepted

One of these will be minded first making the other invalid.

In your example, the node A gets one of the transactions and the node B gets the other. Assume that the block is mined by B, then A will receive the new block and will immediately discard the pending transacion with nonce 0, because now it is invalid. Note that A gets the correct nonce for the "new" address from the last mined block.

Hope this helps

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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