nonce - What determines the size of a hash during mining?

nonce – What determines the size of a hash during mining?

 

From what I understand is that a miner generates nonces to find a nonce that is smaller than the target hash.

No a miner repeatedly assembles data and chooses a value for one datum called a nonce, then calculates the hash of this data (including the nonce). The miner repeats this until the calculated hash, not the nonce, is smaller than the target value.

However, how does one determine the size of that nonce/hash?

The hash is a number. You can compare numbers numerically to see which is larger. For example, 52 is smaller than 57. The original code was

if (hash <= hashTarget)

See How does solving a block work in relation to the first letter/number after the 0’s?



Source link

Leave a Comment

Your email address will not be published. Required fields are marked *