Author

Topic: What if 0 value SHA256d block is mined? (Read 196 times)

legendary
Activity: 3122
Merit: 2178
Playgram - The Telegram Casino
February 05, 2018, 10:49:21 AM
#3
[...] unless SHA256 outputs are very well distributed, which they might be in this case.

The outputs of cryptographic hashes are pretty much by definition very well distributed.


I have seen on some blockchain explorers that for the genesis block the previous reference block is 0. I thought that perhaps this would mean that Bitcoin blockchain might loop unexpectedly, but I figured out that coinbase transaction has 50BTC as an output, which would I guess make it invalid now that the block reward is bellow that.

[...]

The size of the coinbase transaction is determined by the miner. In other words a miner creating such as a zero block would just decide to receive whatever coinbase transaction is currently valid.

As mentioned by RGBKey, the chance of such a collision happening is extremely small and pretty much impossible. It's an interesting thought experiment though. If subsequent blocks were to reference the genesis block (or any other older blocks for that matter) I guess they'd get orphaned due to 1) having an invalid timestamp and 2) containing invalid transactions.
hero member
Activity: 854
Merit: 658
rgbkey.github.io/pgp.txt
February 05, 2018, 10:23:24 AM
#2
This is a very very unlikely scenario, you're basically trying to find a single value that hashes to 0, so effectively you're trying to find a hash collision. At the current hash rate of 23,000,000 TH/s of the entire Bitcoin network, you would have a 50% chance of finding the value that hashes to 0 after going through half of all possible hashes, which would be (2^256)/2 possible hashes. Wolfram alpha tells me that (2^256)/2/23,000,000,000,000,000,000 is 2208558830972980411979121875928648144784354871094523697652007751615774728773803 7109375. This is the expected number of seconds it will take the current Bitcoin network to have a 50% chance of finding a block that hashes to 0, otherwise written as 7.0032941114059500633533798703977934575861075313753288... × 10^77 years.

Basically, it's just not gonna happen.
sr. member
Activity: 490
Merit: 389
Do not trust the government
February 05, 2018, 09:57:43 AM
#1
I've been wondering about this for a while. It might even be impossible due to hash value of block being SHA256 value of SHA256 value of the block data, as far as I know (or is this only for Bitcoin addresses?) and there simply might not be a SHA256 value that produces 0 when it's hashed again, unless SHA256 outputs are very well distributed, which they might be in this case.

I have seen on some blockchain explorers that for the genesis block the previous reference block is 0. I thought that perhaps this would mean that Bitcoin blockchain might loop unexpectedly, but I figured out that coinbase transaction has 50BTC as an output, which would I guess make it invalid now that the block reward is bellow that.

Would there be any special problems with this?
Obviously if the difficulty gets too high, block hashes will start overlapping which could create these loops, right?
But I do understand that it is very likely that difficulty would have to grow quite unreasonably high for this, which it never might.
Jump to: