To my knowledge, neither SHA256 or scrypt have ever had provable instances of hash collisions occur.. However, if this highly unlikely event was to happen, what would that mean for the state of the blockchain? Would it cause consensus confusion since there would be 2 blocks with the same hash that point back to different previous blocks? And/or would it make it best practice to avoid whatever algorithm the collision occurred with?

Just curious,



1 Answer 1


This is a very unlikely event to occur, but, in the case it would happen nothing strange will go on.

Also if a block is mined by two miners at the same time, some nodes will see and accept one of the two "twins" blocks first, and the second will be simply ignored. After the majority of nodes agrees that one of the two blocks is the "good" one (A) the other twin block (B) get rejected by all nodes following a network discard of such block(B).

However, chances of that happening are negligible, because the block hash is a random 256 bit output (smaller than the current target), which allows for an immense number of possible hash outputs of a similar magnitude as the address space. ref

Well explained also by P Wuille:

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

  • I commend you for the thoroughness of your answer and the inclusion of references. If I could do more than upvote this and accept it as the answer to my question, I would. Commented Jul 31, 2018 at 21:21
  • 1
    The second and third paragraph of your answer concerns an orphan block situation, which is different than a blockhash collision. Pieter’s answer that you referenced covers the blockhash collision situation well.
    – chytrik
    Commented Aug 1, 2018 at 8:28
  • Has this situation ever occurred in the bitcoin blockchain? Commented Jan 21, 2021 at 16:07
  • Though with increased difficulty the blockhash space is reduced increasing the chances, but still very small. Commented Oct 16, 2021 at 14:05

Not the answer you're looking for? Browse other questions tagged or ask your own question.