I’ve tried to find a solid answer to this transaction ordering question and the practical and technical issues that do not seem solved.
My understanding is that after I create a transaction, I can choose to add a fee for miners to pick up my transaction. I submit it to the network for propagation. Miners look in the unspent transaction pool and choose which they want to include in a new block. I saw this Tweet which seems to confirm a transaction ordering problem – using the same transaction input for two transactions with the latter being a high fee and that one confirmed first. I don’t understand why several responders seem to to believe this isn’t a problem.
I am near 2 stores that accept Bitcoin. I spend an input at Costco with no or a little fee. It hangs in the mempool like above. An hour later I am at BestBuy and spend the same input but include a fee — and that transaction gets picked up and processed first by a happy miner.
1) Even if Costco waited an hour, there is no guarantee that my earlier transaction will be confirmed in a block in 10 minutes or 210 minutes. It’s still too long for BestBuy to wait 5 additional confirmations after the first.
2) There is no guarantee that even if that the first Costco transaction was picked up by a miner, that a second miner that picked up the BestBuy transaction a little later couldn’t complete a block which would eventually be in the longer chain. In that case too, the first in transaction eventually gets bounced off the chain.