7

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.

11

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.

  • The regular Democracy of majority is applied – Ivan Cantarino Sep 20 '17 at 18:23
  • I have no idea what you're trying to say, Ivan. – Pieter Wuille Sep 20 '17 at 18:25
  • @pietier What do you mean "one of which is valid, and the other is invalid' ? why wouldn't both be valid ? – franck Mar 30 '18 at 15:45
  • @franck That is the premise I'm starting from: it would be possible to create two blocks with the same hash, only one of which is valid. It's also possible to have two valid blocks or two invalid blocks with the same hash, but that isn't what I'm talking about. – Pieter Wuille Mar 30 '18 at 23:18
  • @PieterWuille thanks just wanted a confirmation. Did you check the code to be certain of this thing ? That would mean there's no timeout in some "invalid blocks list" – franck Apr 2 '18 at 14:07
0

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)

  • 1
    We would still have two different coinbase transactions, unless we're also trying to pay the same address. :) – Murch Sep 27 '17 at 14:17
  • Sorry, we had someone spam one sentence answers in the past two days from multiple accounts, I first thought that this answer was part of that series when I added my vote to delete, as there was one on this very question before. Thanks for the fast edit. – Murch Sep 27 '17 at 14:23

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.