2

I have a problem understanding the concept of handling two or more blocks that distributed at the same time (in the blockchain network).

As far as I understood, When I get 2 or more blocks at the same time, the miner starts to create a new block on the top of the longest block he received.

But what if user1 got BlockA and BlockB (BlockB is the longest one), and user2 got BlockA, and BlockB is delayed (it takes time to send this block to user2 because of many reasons), so eventually user2 sees only BlockA at the moment, and starts to build a block on a top of this block, while user1 builds the block on top of BlockB.

I don't fully understand how blockchain synchronizes the blocks properly. I need a better explanation.

  • There can be temporary forks in the chain over few blocks when miners "argue" what is the heaviest chain and eventually settle. However I'll leave more detailed answer to somebody who has better insight in this matter. – Mikko Ohtamaa Feb 23 '17 at 19:46
2

User2 may begin to mine on top of BlockA, but he will have much less mining power than the rest of the network, so it will take a long time for him to find a block. Eventually, when he reconnects with the network, he will see the longer chain coming off BlockB, and drop his smaller chain to rejoin the network. Note that the heaviest chain is by definition the "true" chain. This is called a chain reorganization and it happens occasionally, which is why you need to wait for a few confirmations before considering any block final. The blocks that user2 mined before he realized he was on the wrong chain are called orphans, and they can be included in the main chain as uncles, so that he still gets a bit of a reward.

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.