Search code examples
bitcoinsha256

Is there a scenario in Bitcoin where given all the nonces, you can't solve the cryptographic puzzle?


I just read that the Bitcoin nonce is 4-bytes, meaning there are ~4 billion possibilities for the nonce.

Is there a scenario in Bitcoin where given all the nonces, you can't produce a hash/solution for the cryptographic puzzle where you need a value that begins with the necessary # of zeros?

In other words, if you need 11 beginning zeros to solve the puzzle, perhaps no nonce will yield this.

If this case existed, my presumption is you'd need to select different transactions for the block you're mining given that these are selected by the miner.

It'd be great to get some clarity on this as I haven't seen it addressed anywhere.


Solution

  • Not only is this possible, it happens all the time.

    So, here's how it works: when a golden nonce isn't found during mining -- when all possibilities are brute forced -- the date of the block is updated to a new time and the mining process starts anew.

    Changing the date/time of the block changes the hashing algorithm solution so the miner has to brute force all of the nonces (a 32 bit value) again using the new date/time.