3

I've been doing a lot of reading on mining and software related to mining but I can't quite get my head wrapped around the specific nature of what is being hashed together. So far I feel like the current block header, and a nonce are hashed together in hopes of finding a hash that is less than the current target, if it is, you get 25BTC. Here's where I am confused, according to the psuedocode https://bitcoin.stackexchange.com/a/3047 . The only value that changes is the nonce, and that is a fixed possible hex/integer ex: from 0 to 0xFFFFFFFF.

How is it that the difficulty can increase if there are a finite number of attempts to change the nonce?

Am I right about hashing together the block header with the nonce?

I referenced this https://en.bitcoin.it/wiki/Proof_of_work and it makes perfect sense.. except for the fact that I still feel like the nonce is the only value that changes.

Maybe the 32-bit nonce yields way more possibilities that I can fathom and hashing together every possible nonce value is actually what is done.

Thanks!

5

When the nonce range is exhausted, miners change the extraNonce field of the generation transaction. This changes the Merkle root in the header and allows a new range of nonces to be attempted.

Since the Merkle root is 256 bits, this can be repeated indefinitely.

  • Don't the transactions in the block also change the hash? So, whenever you add another transaction couldn't you just start over at 0 with the nonce? – Murch Nov 13 '13 at 19:38
  • 1
    @Murch: Of course. But getting a new transaction is generally rarer than exhausting a nonce range. – Meni Rosenfeld Nov 13 '13 at 21:21

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.