2

Supposing there is a double spend, call the transactions T1 and T2. If someone propagated both transactions within a short space of time to the network, of course only one of them can make it into the next mined block. Do we know anything about the probabilities of which of T1 and T2 will make it, or is it 50/50? Obviously from block 2 onward the longest chain is most likely to remain. But for the very next block, do we know anything?

2

Bitcoin is a gossip network and relays transaction or blocks on a best effort basis. Hence you cannot determine the probability of one transaction being seen by the network versus the other.

Now in terms of mining the transactions in a block there are a couple of cases that needs to be considered. For assumption sake let us assume that we are considering a miner's node that first receives T1 and then after a few seconds receives T2.

  • Default case: Most miners still manage their mempool on a first seen basis. That means if a miner sees T1 first, it might reject T2 even if the fees provided by T2 are higher than that of T1.
  • Replace by Fee (RBF) is signaled: If T1 had opt-in RBF signaled (nSequence in any one its input is less than 0xFFFFFFFE) then the miner may replace T1 with T2 from its mempool.

Now the only remaining conflict can be if there are two blocks mined at the same time and at the same height, one containing T1 and the other containing T2. The chain version on which the next block gets mined will finally determine which transaction will attain practical finality.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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