0
1
I'm confused about one of the core principles of Bitcoin. When various nodes are confirming transactions, why does the longest block win out? That is, why doesn't the system allow whoever confirms a transaction or group of transactions first be the block that all the other nodes accept? I realize there has to be some logic in the situation where two nodes submit confirmations at the same time, but what problems would get introduced if the node that confirmed a group of transactions first, regardless of the size of the block, win?
Thanks but its your use of the word "usually" taht is the basis for my question. Why not "always"? What bad things could happen if the system let the first node that confirmed transactions to win? – Dave – 2017-12-24T16:38:49.733
If everyone always picked the first block that would be perfect, however, it's possible that nodes disagree on which block they saw first. If two blocks are found at the same height at almost exactly the same time (i.e. less than two seconds apart), it is possible that both propagate to part of the network and the one found later gets extended first. Then everyone would start following the new longest chain which wasn't built on the first found. – Murch – 2017-12-24T16:58:18.093
So to put a bow on this, if nodes disagree on which block they saw first, couldn't they just use the timestamp of when that block was formed? Or am I misunderstanding how timestamps are used when calculating blocks? – Dave – 2017-12-28T00:00:38.400
@Dave: Timestamps are chosen by the author of the block and not necessarily accurate enough to be used as a tie breaker. The timestamp has fairly lose restrictions, it only has to be greater than the median time of the last 11 blocks and no more than two hours in the future. – Murch – 2017-12-28T02:45:34.323