5

According to the Bitcoin Wiki:

it is extremely unlikely for two people to have the same Merkle root because the first transaction in your block is a generation "sent" to one of your unique Bitcoin addresses.

What does this mean? Isn't the Merkle root the hash of all the transactions in the list? Why would we have a different set of transactions if the point is to validate the same set of transactions?

I think I'm not sure what 'generation' means here.

7

The first transaction in a block is called the "generation" or "coinbase" transaction. It has no real inputs, and spends no coins. Instead, it pays out the subsidy and fees to the miner that generated the block.

As any two miners will have a different address they want their payout to, their coinbase transactions will be different. If the coinbase transactions are different, the Merkle trees will be different too.

Why would we have a different set of transactions if the point is to validate the same set of transactions?

The purpose of mining is not validation - every node in the network validates all transactions. The purpose of mining is ordering transactions, so as to choose one of multiple valid transactions that spend the same coins. However, miners are incentivized to only include valid transactions, because if they didn't, the network wouldn't accept their blocks (and their subsidy).

However, there is no guarantee that even ignoring the coinbase transaction, two miners are going to be working on the exact same set of transactions. In fact, if we had technology to guarantee that, we wouldn't need a blockchain or mining at all.

Specifically, it is possible that someone creates two conflicting transactions A and B, which are both valid, but spend the same coin. Clearly only one of the two can be accepted by the network. I connect to a node in Australia and to one in Brazil, and simultaneously send A to Japan, and B to Brazil. Nodes in Asia will likely see A first, and nodes in the Americas will likely see B first. Because of the finite speed of light, you cannot guarantee that any two nodes will see it at the same time. Someone needs to make a call about whether A or B will be accepted. Bitcoin's solution is to let miners choose - whatever the first miner who creates a block that includes A or B picks, wins.

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.