<p>They would be the same block ;-)</p>

<p>If a block happen to have the same hash of another one then all the odds are for those two blocks to share the same exact data i.e. be the same block. Before arguing if we managed to create a collision (extremely low probability, zero I would say) we should investigate if we managed to mine the same transactions in the same order and using the same nonce (low probability, but order of magnitude greater than the previous case)</p>

CC BY-SA 3.0
2017-09-27T14:17:55.543Z
We would still have two different coinbase transactions, unless we're also trying to pay the same address. :)
Murch
CC BY-SA 3.0
2017-09-26T15:55:47.140Z
2017-09-27T14:15:49.953Z
2017-09-27T14:15:49.953Z
Gianluca Ghettini
<p>Blocks are identified by their hash.</p>

<p>This means that in your story, in Jan 2017, when B gets broadcast, any node that it is advertized to will think "I already have this block", and ignore it.</p>

<p>However, when we consider block hash collisions to be a realistic situation, there is another issue that may arise:</p>

<p>If two blocks with the same hash and the same parent are produced ~simultaneously, one of which is valid, and the other is invalid (but does have valid proof of work), some nodes in the network will see one first, and others will see the other first. Those who see the invalid version first will mark the block as permanently invalid, and they won't bother even trying to learn about the valid one when another block builds on top. This would lead to a permanent chain fork between the nodes who saw the invalid block first and those who saw the valid one first.</p>

CC BY-SA 3.0
2017-09-17T18:53:39.430Z
2017-09-20T19:27:12.950Z
2017-09-20T19:27:12.950Z
Pieter Wuille
<p>Consider the following scenario: </p>

<ul>
<li><p>January 2016 block A gets submitted. Its hash is <code>0001010</code>.</p></li>
<li><p>January 2017 block B gets submitted. Its hash is also <code>0001010</code> (collision).</p></li>
<li><p>10 minutes later, block C gets submitted and the previous field points to the hash <code>0001010</code>.</p></li>
</ul>

<p>Is it still possible to determine that the previous block is block B and not block A? </p>

<p>Note that while this is unlikely, there are not 2^256 possibilities a block hash can be. Every block hash has to start with zeroes which decreases the amount of possibilities. In this scenario there are only 2^4 possibilities even though the hash has 7 bits which would theoretically allow 2^7 possibilities.</p>

<blockchain><block><hash>
What would happen if two blocks had the same hash?
Peter111
# What would happen if two blocks had the same hash?

(Asked by: username_0 on 2017-09-17)

Consider the following scenario:

* January 2016 block A gets submitted. Its hash is `0001010`.
* January 2017 block B gets submitted. Its hash is also `0001010` (collision).
* 10 minutes later, block C gets submitted and the previous field points to the hash `0001010`.

Is it still possible to determine that the previous block is block B and not block A?

Note that while this is unlikely, there are not 2^256 possibilities a block hash can be. Every block hash has to start with zeroes which decreases the amount of possibilities. In this scenario there are only 2^4 possibilities even though the hash has 7 bits which would theoretically allow 2^7 possibilities.

**Tags:** blockchain, block, hash


---

## 2 answers

### Answer by username_3 on 2017-09-17. Score: 17 | Accepted answer

Blocks are identified by their hash.

This means that in your story, in Jan 2017, when B gets broadcast, any node that it is advertized to will think "I already have this block", and ignore it.

However, when we consider block hash collisions to be a realistic situation, there is another issue that may arise:

If two blocks with the same hash and the same parent are produced ~simultaneously, one of which is valid, and the other is invalid (but does have valid proof of work), some nodes in the network will see one first, and others will see the other first. Those who see the invalid version first will mark the block as permanently invalid, and they won't bother even trying to learn about the valid one when another block builds on top. This would lead to a permanent chain fork between the nodes who saw the invalid block first and those who saw the valid one first.


---

### Answer by username_1 on 2017-09-26. Score: 1

They would be the same block ;-)

If a block happen to have the same hash of another one then all the odds are for those two blocks to share the same exact data i.e. be the same block. Before arguing if we managed to create a collision (extremely low probability, zero I would say) we should investigate if we managed to mine the same transactions in the same order and using the same nonce (low probability, but order of magnitude greater than the previous case)

> **Comments:**
> **username_2**: We would still have two different coinbase transactions, unless we're also trying to pay the same address. :)  

---

