50

The process of mining as described in the answer to this question is simultaneously repeated by multiple miners.

Is it possible for two miners to find the next block at the same instant? If it is, what happens if they do?

1
  • 6
    It doesn't even need to be in the same instant. As long as the second block is found before the first block is widely known, there will be a fork.
    – Nick ODell
    Commented Mar 6, 2013 at 17:37

2 Answers 2

34

Yes, it is possible, and you can actually follow "orphaned blocks" here: https://blockchain.info/orphaned-blocks

Bitcoin clients always trust the longest chain, so if two blocks is mined on the same time, it's up to (51% of) the miners to decide which is going to be 'accepted' and which is going to be worthless.

This is one of the reasons why you shouldn't trust only a few confirms, as the confirms could be a orphaned blockchain. After "enough" confirms, everyone will mine on the "correct" blockchain, because any work(mining) on a orphaned blockchain is waste of power (unless your trying to perform a 51% attack).

5
  • 10
    How does one know which of the two blocks is accepted by 51%? What prevents two blocks to be accepted by 50/50? At which point is it obvious that a block is orphaned? Commented Nov 30, 2015 at 8:08
  • 1
    When does the reward go to the miner who solved the blocked, is it instantaneous or after 51% have confirmed? Commented Jul 26, 2017 at 17:14
  • 1
    @Andrew A miner accepts the first block that reached him. So lets say 51% will accept be on one block and 49 on other. When next block is mined on one of these chains all the miners switch to that chain. It is likely that 51% will mine next block first on their chain. Thus the notion of which chain is accepted by majority (51% in this case).
    – croraf
    Commented Oct 27, 2017 at 21:05
  • @kasa When one chain outpaces the other by many new blocks (so the block in question is confirmed by many new blocks stacked on top of it) we can be sure that the reward is given. How much many is in this context is defined by the protocol: you can spend the reward after 100 blocks confirmed it.
    – croraf
    Commented Oct 27, 2017 at 21:14
  • Indeed, it seems that not always the longest chain is accepted. You could notice from the link you provided blockchain.info/orphaned-blocks that some orphaned blocks hold greater number of transactions than the confirmed blocks! Commented Oct 28, 2019 at 1:02
16

What Nicolai said is not completely right. The network would decide which one is the main chain according to the following block mined. Let's assume that block A and B are mined at almost the same time. The miners would accept the first block that was broadcast to them, so there would be some miners accept A and others accept B, it doesn't matter whether A/B is accepted by 51% or more miners or not. Miners accepting A would try to mine the next block on top of A, while other miners accepting B would try to mine the next block on top of B. If next block to be found is on the top of A, then miners mining on the B will turn to the A chain, which is the main chain. BTW, the block B is named as an orphaned block, you can find more on the https://blockchain.info/orphaned-blocks. Of course, there may be a circumstance that the next block is mined at roughly the same time both on top of A and on top of B, then the process mentioned above would circulate again till the problem gets solved. Now you can understand why the new blocks won't be spendable until at least 120 blocks have been built on top of it in a chain.

1
  • 2
    "won't be spendable until at least 120 blocks have been built on top of it in a chain" Does the protocol force certain rules regarding this? Can I spend my UTXOs if they belong to the last mined block? Or I need to wait til an arbitrarily number of blocks (defined by the protocol) are mined on top of it?
    – John Smith
    Commented Oct 12, 2018 at 20:41

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.