How does one know they solved a block?

7

1

Having the difficulty (either in the "bits" form, big integer form, or human-readable format) and a given block hash, how does one know if they solved that block? What is the formula or algorithm for checking it?

(The question might seem trivial, but it does not seem to be described explicitly on the SE or the Wiki)

ThePiachu

Posted 2011-12-02T10:02:01.173

Reputation: 41 594

Answers

5

Assuming everything else in the block is valid, the block hash simply needs to be smaller than the target. https://en.bitcoin.it/wiki/Difficulty explains how to find the target from the bits representation; and to find it from the human-readable difficulty D, you calculate 2^208*(2^16-1)/D.

Meni Rosenfeld

Posted 2011-12-02T10:02:01.173

Reputation: 18 542