0

If the target hash were artificially low, i.e. 3, how do miners know if there will ever be a nonce that produces such a hash?

0

For a given block header where the only variable is the nonce, it is trivial to brute force all nonce values and verify if any gives a hash that meets the target.

For the vast majority of block hashes, no nonce value will meet the target in normal difficulty settings (let alone at a target of 3).

Miners get around this by altering other values in the block header, such as the timestamp, block version, merkle root (via altering of the Coinbase transaction and/or set of included transactions).

By the balance of probability, you will eventually find one block header for some combination of the above that meets the target.

The difficulty levels control how likely it is for that block header to be found in ~10 minutes for a given hash rate.

The Bitcoin Wiki elaborates on how the calculation is actually performed to determine this difficulty, along with some example code.

| improve this answer | |
0

You try all 2^32 possible nonces. On realistic mining hardware, that takes a very tiny fraction of a second. Of course, most of the time there is no nonce that works. Mining is so hard that all the miners combined only find a block that has any nonce that meets the difficulty once every ten minutes.

| improve this answer | |
0

If the target hash were artificially low, i.e. 3, how do miners know if there will ever be a nonce that produces such a hash?

They don't.

However if the difficulty were ever such that miners were unable to mine new blocks at the expected rate (1 every 10 minutes approximately), the difficulty algorithm would reduce the difficulty after a while (up to 2 weeks if I remember correctly)

| improve this answer | |
  • The difficulty resets every 2016 blocks by a factor in the range of 0.25–4. So we'd be a bit in a predicament if we couldn't mine blocks at all anymore. ;) – Murch Sep 28 at 14:52
  • @Murch Yes. I suspect it would take an unprecedented and unforseeable worldwide catastrophe of extraordinary rapidity to get into this situation in the first place. – RedGrittyBrick Sep 28 at 15:28

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.