Possible Duplicate:
What exactly is Mining?

What are the exact computations dies Bitcoin is performing during the mining?

I understood that it has to do something with hashes and proof-of-work.

And as far as I got, here is an idea:

SHA-256(something) = specific string

where specific string starts with some zeros, but what is this something?

  • Do you mean when mining? Could you please edit your question to clarify that Sep 19, 2012 at 22:40
  • I edited the question a bit to clarify the problem and conform with Higly Irregular's comment. I hope it is more acceptable to the community now.
    – ThePiachu
    Sep 20, 2012 at 6:27

1 Answer 1


Bitcoin hashes the block headers through SHA-256(SHA-256(header)) hashing. The result of that hash has to be smaller than the current target, which is commonly represented by difficulty.

Those computations are performed many, many times during mining, so there are some slight optimisations for the process. Namely, the use of midstate. Generally, before the header can be hashed, it needs to be split in half due to the SHA-256 algorithm (which operates on data smaller than the header). Half of that data does not change with iterations over the nonce, so it is useful to calculate the midstate of that half of the hashing to use in the algorithm, saving you some computational time during each check.

Asides from that, there is more complexity to it (ah, the damned endianness and so forth), but this should make things clearer for you.

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