Disclaimer: I'm a complete crypto-currency noob, and besides doing some alt-coin mining for 3 months now I never had the slightest idea what's behind all this.
Not until I've read Satoshi's whitepaper last week.
After letting it settle for some days, and a closer look into the algorithm and source code, I think I might have found a problem which _could_ have serious implications.
I barely scrapped the surface of this all, so if you think I'm wrong either because I'm just dumb or lacking some knowledge feel free to say so, and preferably point me to additional information/papers for further reading.
Most probably someone else has already pointed this out years ago and I just could not find that information.
Anyway, from what I have read a block header is the hash of the version, previous block, Merkle root, time stamp, difficulty (short VPMTD+N because I don't want to write this again
) and a variable nonce chosen in a way that the resulting hash has the needed number of leading zero bits to fulfill the difficulty criterion.
Since VPMTD is fixed for a given block and SHA256 is a deterministic function the number of possible hashes is finite because the number of nonces is finite (uint32_t possibilities), in other words not all _possible_ hashes exist, just a finite subset.
Therefore it _could_ be that for this given finite set of inputs there is no hash which has the required number of leading zero bits.
VERY improbable, but not impossible.
In this case there would be no next block and the complete block-chain would come to a halt.
So would Bitcoin and a multimillion crypto economy.
Or is (what I would do) there already some heuristic which detects an unusual long block-time (e.g. longer than the difficulty re-target time) and changes the input (if I remember correctly there are some padding bits which could be abused for this, or just change the difficulty which is also part of the hash) to prevent this?
Or am I just the next noob who asks this dumb question?
A curious mind....