Author

Topic: Two miners solving a block at the same time (Read 240 times)

newbie
Activity: 62
Merit: 0
December 15, 2017, 02:52:34 PM
#5
Thanks for a very detailed answer. Now I see why the miners reward need to wait for  6    50 confirmations to be spent.

Fixed that for you.

Thank you so much. Had a wrong information set in my mind somehow.
legendary
Activity: 3472
Merit: 4801
December 07, 2017, 06:30:59 PM
#4
Thanks for a very detailed answer. Now I see why the miners reward need to wait for   6   100 confirmations to be spent.

Fixed that for you.
newbie
Activity: 62
Merit: 0
December 07, 2017, 05:26:24 PM
#3
These abandoned blocks are commonly called "orphaned blocks" and are the reason that services will sometimes require multiple confirmations before they consider a transaction to be completed.

Thanks for a very detailed answer. Now I see why the miners reward need to wait for 6 confirmations to be spent.
legendary
Activity: 3472
Merit: 4801
December 07, 2017, 04:20:20 PM
#2
I assume this doesn't happen

It happens many times per week.

(or is effectively handled)

It is.

but I just want to understand how. If two miners from different countries solve a block at the same time (may be a few milliseconds apart) and add to their chain and the nodes close to it verify the proof of work, how does the blockchain pick the correct block?

Each node chooses whichever block they receive first.

For a short while the network is split.  Some nodes and miners have accepted one block and the miners are working on building a new block on top of it.  Other nodes and miners have accepted the other block and the miners are working on building a new block on top of it.

One of those sets of miners will eventually complete a next block.  When they broadcast it, any nodes or miners that received the same initial block as them will simply accept this new block and add it to their blockchain.  Any nodes or miners that initially received the OTHER block will see that there is a chain of TWO new blocks that is longer than their current chain of ONE block.  Since the protocol requires them to accept the longest valid chain (most proof-of-work), they will abandon the block that they have and replace it with the two blocks.  They will then relay these two blocks to any nodes or miners that they are connected to.

These abandoned blocks are commonly called "orphaned blocks" and are the reason that services will sometimes require multiple confirmations before they consider a transaction to be completed.

by time?

Nope.

If the blockheight is the same, then they accept the first block they see.  If the blockheights are different, then they accept the chain of blocks with the most proof-of-work (typically the chain with the most blocks).
newbie
Activity: 62
Merit: 0
December 07, 2017, 04:00:32 PM
#1
I assume this doesn't happen (or is effectively handled) but I just want to understand how. If two miners from different countries solve a block at the same time (may be a few milliseconds apart) and add to their chain and the nodes close to it verify the proof of work, how does the blockchain pick the correct block? by time?
Jump to: