2

Edit: They do not agree on a specific target hash. Any hash lower than or equal to the difficulty is sufficient. This means clients only have to agree on difficulty.

closed as not constructive by Dori Oct 3 '11 at 9:11

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Are you asking how the difficulty is determined? – David Schwartz Sep 23 '11 at 11:59
  • Hmm, I had not understood the process correctly. I had thought the network was looking for a specific target but it is looking for any hash lower or equal to the difficulty. So it is enough to agree on the difficulty. Thanks David! – kermit Sep 23 '11 at 12:19
3

By "difficulty" I mean the number that determines the minimum acceptable hash. Higher difficulties mean lower hash minimums and thus, on average, more hash attempts needed to produce a valid block. (Related terms are target and nBits).

Every 2,016 blocks there is a difficulty change block. Unless the block is a difficulty change block, the difficulty must be precisely the same as the previous block or the block is invalid.

On a difficulty change block, the difficulty must be precisely what the difficulty algorithm requires or the block is invalid. The algorithm takes into account the amount of time it took to generate the previous group of blocks and computes a new difficulty such that the block generation time will be, on average, once every ten minutes if the network hashing power stays the same.

If you want to see this in the source code, check out the GetNextWorkRequired function in the main.cpp file.

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