<p>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.</p>

<p>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.</p>

<blockquote>
  <p>Why would we have a different set of transactions if the point is to validate the same set of transactions?</p>
</blockquote>

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

<p>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.</p>

<p>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.</p>

CC BY-SA 3.0
2017-08-13T00:05:54.963Z
2017-08-13T00:18:28.867Z
2017-08-13T00:18:28.867Z
Pieter Wuille
<p>According to the <a href="https://en.bitcoin.it/wiki/Block_hashing_algorithm" rel="noreferrer">Bitcoin Wiki</a>:</p>

<blockquote>
  <p>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.</p>
</blockquote>

<p>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?</p>

<p>I think I'm not sure what 'generation' means here.</p>

<mining-theory><hash>
Why do two miners get different hashes for the same list of transactions?
aroooo
# Why do two miners get different hashes for the same list of transactions?

(Asked by: username_0 on 2017-08-12)

According to the [Bitcoin Wiki](https://en.bitcoin.it/wiki/Block_hashing_algorithm):

> 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.

**Tags:** mining-theory, hash


---

## 1 answers

### Answer by username_1 on 2017-08-13. Score: 9 | Accepted answer

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.


---

