Post
Topic
Board Development & Technical Discussion
Topic OP
This artical needs fixing on the bitcoin wiki
by
FreshJR
on 05/04/2013, 17:16:44 UTC
https://en.bitcoin.it/wiki/Generation_Calculator

  • Get the current target.
  • Divide by 115792089237316195423570985008687907853269984665640564039457584007913129639935, which is the maximum value of a 256-bit number. You now have the probability of a single hash solving a block
  • Take the reciprocal of the probability to get the average number of hashes to solve a block.
  • Divide the average number of hashes by your hash/s (not khash/s) to get the average number of seconds required to solve a block.

***(I HAD AN ISSUE WITH THESE INSTRUCTIONS because the current target is not a decimal number)
*** we need a step to convert the hexadecimal target to a decimal number
*** the target might not even be a hexadecimal value because when i converted it, and did the math I didnt get the current difficulty


When looking at steps 1-3 they say:

Step 1 is get current target
Step 2 is divided current target by max target
Step 3 is take reciprocal

Why not say:

Step 1 - get max target.  Also, instead of writing out that number write out 2^256 for brevity.
Step 2 - get current target.  
Step 3 - convert the current target from hexadec to decimal.
Step 4  - divide step 1 by step 2 (max target/current target), which is equivalent to the average number of hashes needed to solve a block and is also the current difficulty.
Step 5 - Divide the average number of hashes by your hash/s (not khash/s) to get the average number of seconds required to solve a block.

(Additional Info) - The recipricol of step 4 is the probability of a single hash solving a block