2

Since we're just trying to produce a specific hash output, couldn't the nonce also include letters or otherwise random bits?

1
  • it needs to be increasing, so using a number or more specifically a date makes this easier
    – Loourr
    Apr 23, 2013 at 18:07

2 Answers 2

5

The nonce is an arbitrary string of bits with no particular meaning. Typically they are converted into an unsigned integer for convenience. Every possible set of nonce bits has a corresponding integer in this representation.

To get letter in a nonce, you'd have to present the bits in the nonce in some encoding scheme that had some way to encode letters. There is no such scheme in common use.

3

Technically, the nonce is just 4 bytes that are ignored. There's no reason why the block couldn't contain "Nick" in ASCII, or somebody's phone number.

That being said:

  1. the fastest way to mine is to start with a nonce of all 0's, then increment it.
  2. an easier way to embed data into the blockchain is to use fields in the coinbase.
2
  • So are there any blocks with letters in the nonce? I understand your 2 points, would it increase the probability of solving a block if your miner actually incremented 0-9 then a-z and A-Z, etc?
    – pinhead
    Apr 23, 2013 at 17:24
  • @pinhead So are there any blocks with letters in the nonce? Probably. One in every thousand blocks has a nonce of all letters. There are 200 thousand.
    – Nick ODell
    Apr 23, 2013 at 17:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.