0

I am a little confused with confirmation mechanism in bitcoin PoW consensus.
According to bitcoin wiki:

After a transaction is broadcast to the Bitcoin network, it may be included in a block that is published to the network. When that happens it is said that the transaction has been mined at a depth of 1 block. With each subsequent block that is found, the number of blocks deep is increased by one. To be secure against double spending, a transaction should not be considered as confirmed until it is a certain number of blocks deep.

Let's say if A has 1 btc, and A sent 1 btc to B as transaction T1 and also sent 1 btc to C as transaction T2. It is possible that these 2 transactions are written into 2 different branches.

In this scenario, if miner M1 keeps mining based on branch with T1 and M2 keeps mining based on branch with T2, finally subsequent block for these 2 branches will more than 6, and in most of apps these 2 transactions will be regarded as legal. I am thinking there might be other verification to make a block regarded as confirmed.

My question is: what makes a transaction confirmed? Thanks in advance.

1 Answer 1

0

Let's say if A has 1 btc, and A sent 1 btc to B as transaction T1 and also sent 1 btc to C as transaction T2. It is possible that these 2 transactions are written into 2 different branches.

Yes. That's possible.

But there is still no double-spend because only 1 branch will be the accepted one in the future.

Assume that there are more miners. If miners 3, 4, 5 and 6 start mining on the second branch, it grows faster. After 2 hours, branch1 has 1200 blocks, but branch2 has maybe 1209 blocks. The chain/branch with the most block is the relevant chain. So miner 1 does not even want to mine on his branch anymore because he knows that the others will ignore this blocks 1201, 1202, 1203. So miner 1 also switches to branch2 because otherwise, the only wastes electricity.

2
  • Thanks for your answer. Here is my understanding: if I am wallet, I will only consider the longest chain as the valid chain, so only one chain can be regarded as valid chain and it is nearly impossible having 2 chains in the same length. Is that correct?
    – Frank Kong
    Commented Mar 12, 2018 at 22:55
  • @Frankie the longest chain (the one with the most proof of work) is the valid chain, any other will be forgotten by the network. The protocol is designed so that miners are incentivized to all mine one chain; any divergence can have a high opportunity cost for the miners. It is not impossible to have two competing chains, but usually the losing chain does not survive more than a couple of blocks. You can look up 'orphan blocks' to learn more.
    – chytrik
    Commented Mar 13, 2018 at 6:22

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.