3

Using this scenario https://bitcoin.stackexchange.com/a/40435

Let's say we have two competing blockchain tips: They both start from Block A as a parent, but then there are two different blocks found at the same time: Block B1 and Block B2. Both blocks have the same difficulty level, and as we learned above this is independent of when exactly they were found. Therefore, the total difficulty of Block A + Block B1 = Block A + Block B2. One of the two chains will have a greater total difficulty once either Block C1 or Block C2 will be found.

Is there consensus on the tip being B1 or B2, or only until C1 or C2 is found? If 2 blockchain explorers have both B1 and B2, can they randomly choose either to be the tip of the blockchain and both would be deemed to be correct?

2 Answers 2

8

No, there is no consensus until the next block is found. The network is experiencing a blockchain-fork. It will only mend once one of the tips pulls ahead by adding another block. Then all nodes will reorganize to the longest chain and consensus is reestablished. The losing chain becomes an extinct branch – valid but not part of the longest chain.

There can't be consensus before because from a node's perspective there is no way to tell reliably which one of the two blocks is more popular in the network. They could ask around, but would get mixed answers and could be deceived through a sybil attack anyway. Therefore, nodes accept the first valid block they hear about as the current blockchain tip until proven otherwise – the only valid proof being to be shown a longer chain. They'd still keep the competing block though, and propagate if it is later needed for a reorganization.

In fact, such blockchain forks can even persist for several blocks when competing blocks are found subsequently. E.g. in 2012 there was a blockchain fork with four blocks.

During a blockchain fork, there is a higher risk of doublespends because the competing blocks at same height may confirm different transactions. However, if they occur from natural random chance (instead of an attack), they would be working from the same set of unconfirmed transactions and should contain a mostly matching set. As each blockchain tip considers the other not to be relevant, they do not split transactions to be confirmed, but both try to confirm the whole set.

So, yes. Both are valid blockchain tips, either may turn out to be part of the longest chain in the long run, but a good blockchain explorer should maybe show both until it is clear which one will remain part of the longest chain.

2
  • 4
    There is no substantial difference between having a block on top or not. Bitcoin does not achieve consensus, ever. Every node makes an individual guess about which chain to accept, and nodes can disagree for arbitrarily long times. The more blocks on top, the better that guess is, but it always remains a guess. Feb 15, 2016 at 22:15
  • 1
    "They could ask around, but would get mixed answers and could be deceived through a sybil attack anyway." And not only that, but all that really matters is what block whoever happens to mine the next block thinks is the tip. The "winning" block could be an extreme minority right now, maybe even a third one. Feb 19, 2016 at 8:35
4

Only once C1 or C2 is found. Before that some nodes will have B1 as tip, while others will have B2 as tip. Also note that most nodes wouldn't even necessarily know about both B1 and B2: most will only know either B1 or B2. As such, those nodes are not even aware that there is no global consensus.

That's a reason why for larger amounts of money you really want to wait multiple confirmations. 6 is a number commonly accepted as safe.

3
  • Aren't competing blocks still propagated because they may be needed for a reorganization? Or do they only get requested once it becomes clear they are needed?
    – Murch
    Feb 15, 2016 at 12:11
  • Yeah, not sure but I think they are actually (was bit confused by transaction double spends which aren't). But even then there's a (small) period of time where the node doesn't know. I also don't think SPV clients would get to know about the non consensus state.
    – Jannes
    Feb 15, 2016 at 15:12
  • 3
    Node only relay blocks that become part of their best chain. They have no rational interest in helping a competing chain succeed. When there is a reorganization, all blocks in the new side of the fork are relayed at once. Feb 15, 2016 at 22:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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