mining swimming pools – Calculating hashrate from stratum messages


Occupied with validating algorithm for calculating hashrate from stratum messages.

From my understanding following knowledge is required:
start_timeĀ , time when miner began calculating
end_time, time when share from miner was discovered
problem, set by the mining pool

System for calculating hashrate(discovered on-line) is:
hashrate = problem * 2**32 / (end_time - start_time)

Instance:
problem is 131072 from {"id":null,"methodology":"mining.set_difficulty","params":[131072]}
(end_time - start_time) is 8.844114780426025 from one actual take a look at instance

Calculation:
131072 * 2**32 / 8.844114780426025
131072 * 4294967296 / 8.844114780426025
562949953421312 / 8.844114780426025
Hashrate: 63652492917351.58 or round 63 Th/s

Questions:

  1. Is that this right ?
  2. What’s 2**32 ? (suspect that it’s related to nonce in block header)

Leave a Reply

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

Back To Top