Author

Topic: How is hashrate calculated when all you know is luck/shares/difficulty? (Read 360 times)

member
Activity: 60
Merit: 20
How is hashrate calculated when all you know is luck/shares/difficulty?



Hashrate = difficulty x time
Hashrate is a measurement of the total combined computational power that is being used to mine and process transactions on a Proof-of-Work blockchain, such as Bitcoin and Ethereum

1000 hashes/second = 1 kh/s

1000 kh/s = 1 Mh/s

1000 Mh/s = 1 Gh/s

1000 Gh/s = 1 Th/s

1000 Th/s = 1 Ph/s

The hash rate of your GPU tells you how many hashes per second it can calculate. If your GPU has a higher hash rate than the difficulty, you’ll find that you have more time to solve each block. If you want to make more money from mining, you want to have a high hash rate.



Hashrate = difficulty x time Huh  This is a confused concept, what is diffculty?  

Hashrate is just how many time of hashing can you device calculate (or process or do) on a block header which is a 80 bytes data (or message) during one second time period. In bitcoin, two pass sha256 calculation on a block header data consists of a hashing which produce a hash value for an message.

On CPU miners, it is very simple, how many time can hash function complete calculation on a block header data.
On ASIC miners, it is complex a bit, 1st sha256 is calculated by CPU, then, 2nd hashing (2nd pass sha256) is ran by ASIC chip. Then, output nonce is varified by CPU again. So, there are various formats to calculate hashrate in various softwares, which, I said, are not acuracy or confused.

So, I prefer how many block headers (or local works) can be processed during one second as a benchmark to quant the processing capacity of a hashing device, which can be a good base for comparation of various miner capacity. My cgminer can display how many works has been hashed out on screen.

I found that frequency increase => hashrate increase, sometime, hashed_out works can be varied or not incresed, which means device fail to increase its hashing calculation capacity. And frequency increase often produce more hot and easy to burn out asic chip. So, I only use 300 MHz for BM1397 stick.  

Buying more hardware will increase your hashing capacity. But, it will cost your capital and running cost. Now, bitcoin price drops to $21k USD. Then, mage miners, pools will run under loss, and quit their business. If bitcoin drops to $5k USD, very feasible scenario, running cost will kill a lot of miners.




newbie
Activity: 5
Merit: 0
How is hashrate calculated when all you know is luck/shares/difficulty?



Hashrate = difficulty x time
Hashrate is a measurement of the total combined computational power that is being used to mine and process transactions on a Proof-of-Work blockchain, such as Bitcoin and Ethereum

1000 hashes/second = 1 kh/s

1000 kh/s = 1 Mh/s

1000 Mh/s = 1 Gh/s

1000 Gh/s = 1 Th/s

1000 Th/s = 1 Ph/s

The hash rate of your GPU tells you how many hashes per second it can calculate. If your GPU has a higher hash rate than the difficulty, you’ll find that you have more time to solve each block. If you want to make more money from mining, you want to have a high hash rate.
member
Activity: 60
Merit: 20
Thank kano,

Now, I got much understand about hashrate in various views, eg, as you guys pointed out:
a found nonce's hash value --> share difficulty or work difficulty, then, sum up difficulty*4.29G for hashrate.

But, some hash value is a bit good or bit bad which can produce different difficulty value.
This is a quality measure of found hash value from nonce, which is not subjected to asic chip, or
device processing speed capacity.

My benchmark using number of processed works in second as a quant measure of processing works
capacity and speed, is correct in logic, I believe. So, I can estimate how many works may include a work which
may produce an extreme small hash value for resolving a btc. I use practice data.

Every day, we got 144 btc in bitcoin network control measure, or 144 x 10 minutes. Three miners are studied:
Every day for 21.5 GH/s miner can process (or hash out) works: 144x3000            =>  432,000 works.
Every day for      1 TH/s miner can process (or hash out) works: 144x139,800       =>  20,131,200 works.
Every day for      1 PH/s miner can process (or hash out) works: 144x139,697,400 =>  20,116,425,600 works.

Foundy USA data is used. She got huge process work capacity. She can often resolve a block in 1 minute.
1 minute,   she can process 405,010,702,080 works  
2 minutes,  she can process 810,021,404,160 works
5 minutes,  she can process 2,025,053,510,400 works
10 minutes,she can process 4,050,107,020,800 works

How long can three type of miners process 405,010,702,800 works as an minimum quant of hashing work capacity to hit a btc?
21.5GH/s miner, 405,010,702,080 works / 432,000 works            => 937,524 days / 365 days => 2,569 years. yek! 2569 years need.
1TH/s miner,      405,010,702,080 works / 20,131,200 works       => 20,119   days / 365         => 55 years. yek!
1PH/s miner,      405,010,702,080 works / 20,116,425,600 works => 20.1 days.  seem a hope!

So, my conclusion is only 1PH/s miner can survive in this business. Other small miner just waste energy and time, and should not jump in this business. Any other way to do this business?

So, I have to build a 1PH/s+ miner in years ahead for a better business feasibility.

I believe I has answered the quiestion: hashrate, usage of hashrate, luck, share, difficult.



legendary
Activity: 4634
Merit: 1851
Linux since 1997 RedHat 4
Miners don't count hashes (0x0 to 0xffffffff).

Most miners do asic boost, so if they counted hashes they would report a lower hash rate.

As NotFuzzyWarm effectively mentioned above, it's sum(share difficulty)/time

Internally, the miners do it similarly: sum(nonce difficulty)/time
since miners usually have a mask of what nonces to return, not all 1 diff.


In early stage, CPU
No one cares about CPU mining - that's off topic here

...
Now, asic chip is used in mining machines (or mining devices) as tool to do hash a block header. A block header data is written into (send to) a asic chip (or usb write block header into asci chip data buffer with a command). Then, asic chip process the block header data, and produce few nonces. Then, this work has been hashed out. We count 4.295 GH per work to give to this asic chip or asic device. If a asic chip got 21.5 GH/s speed capacity, then, this asic chip can process 5 works per second. It should sum up 4.295 G once the asic chip complete every task and produce found nonces.  hashes += 0xffffffff

No. It's as I said.
You may find that in old code with old mining chips, but none of the chips since asic-boost do that as I already explained.

P.S. I written a few miner drivers ... ... ...
member
Activity: 60
Merit: 20
Miners don't count hashes (0x0 to 0xffffffff).

Most miners do asic boost, so if they counted hashes they would report a lower hash rate.

As NotFuzzyWarm effectively mentioned above, it's sum(share difficulty)/time

Internally, the miners do it similarly: sum(nonce difficulty)/time
since miners usually have a mask of what nonces to return, not all 1 diff.


In early stage, CPU is used to do hash calculation. Trying 0x1 with the block header by calling sha256 function once. Then, trying 0x2 with the block header by calling sha256 function again. .... Trying 0xffffffff with the block header by calling sha256 function again. Then, this block header has been hashed out(completed). THen, create another block header data which is called local work. Then, do all hash calculation again. ...   until you solve a block header or other guy solve the block header.

Now, asic chip is used in mining machines (or mining devices) as tool to do hash a block header. A block header data is written into (send to) a asic chip (or usb write block header into asci chip data buffer with a command). Then, asic chip process the block header data, and produce few nonces. Then, this work has been hashed out. We count 4.295 GH per work to give to this asic chip or asic device. If a asic chip got 21.5 GH/s speed capacity, then, this asic chip can process 5 works per second. It should sum up 4.295 G once the asic chip complete every task and produce found nonces.  hashes += 0xffffffff in c program (4.295 G sum up). But, some software use different ways to work out their hashrate, eg. sum up 4.295 GH on every test nonces which is output from asic chip. Issue is some work got no nonce ouput or multiple nonces from asic chip completed process of a task(work). Some pool may use different ways to work out pool hashrate.

A pool may got a lot of miners with a lot of mining devices or asic devices or GPU devices, etc...  

Difficulty is another concept.  next talk.
legendary
Activity: 4634
Merit: 1851
Linux since 1997 RedHat 4
Miners don't count hashes (0x0 to 0xffffffff).

Most miners do asic boost, so if they counted hashes they would report a lower hash rate.

As NotFuzzyWarm effectively mentioned above, it's sum(share difficulty)/time

Internally, the miners do it similarly: sum(nonce difficulty)/time
since miners usually have a mask of what nonces to return, not all 1 diff.
member
Activity: 60
Merit: 20
How is hashrate calculated when all you know is luck/shares/difficulty?


Mining bitcoin, you got block header which consist of 80 bytes message from a pool or from bitcoin core server, etc.

Then, you use nonce 0x1 with this header, and hash this header. this process is one hash.

cycle nonce from 0x1  to 0xffffffff with this header. these process complete a work full hash out.
It needs 4.295 G time hashes to complete brute force search on one block header, or 4.295 GH to hash out a work.

It is unlikely to found an extreme small hash value from hashing a work. So, you produce another block header (called local work) to hash it again. repeat doing this brute force process to search an extreme small hash value from a work.

Hashrate is a speed measurement of hash times done in per second. eg. 4.295 GH/s mean your device can do 4.295 G hashes in 1 second to process a work, eg. use bitcoin network benchmark 10 minutes control measure:
21.5  GH/s  can process or hash out 5 works in per second.           10 minutes, process 3000 works.
1      TH/s  can process or hash out 233 works in per second.        10 minutes, process 139,800 works.
1      PH/s  can process or hash out 232,829 works in per second.  10 minutes, process 139,697,400 works.

It is more chance to found a work which produce an extreme hash value if you can process more works.

All pools, solo miners get block header data are different due to data input time or different transactions contained in block header, they all work on their different block headers, so, no competition between them. You should not be fear of big pool. There may be some competition within the pool if the pool use a single header data for all clients without coordination.

It is a luck if the work you process can produce an extreme hash value. But, it also depend on your miner process capacity. I prefer using how many works can be processed in per second as a benchmark.

Largest pool at moment, Foundry USA got 28992 PH/s process capacity or their mining device can do 28992 Peta times hashes per second.  I saw one header was solved in about 1 minutes by the pool. How many works this pool can  process:
1 minute,   she can process 405,010,702,080 works   or 405   G works
2 minutes,  she can process 810,021,404,160 works   or 810   G works
5 minutes,  she can process 2,025,053,510,400 works or 2,025 G works
10 minutes,she can process 4,050,107,020,800 works or 4,050 G works

But, sometime, it can be not solved in more than 1 hour.
Other pools use different block headers. If your block head is good, you can solve a block before big pools.



legendary
Activity: 3822
Merit: 2703
Evil beware: We have waffles!
A snippet from Kanopool Help area:
Quote
How it is actually calculated
A 1 Difficulty share is considered proof of having done approximately 4 billion hashes (232 to be exact).
Thus over a 1 minute time range, if your miner has submitted the expected averate 18 Shares per Minute,
and your miner is mining at the default 8190 Difficulty, then your hash rate is simply 8190 * 232 * 18 / 60 H/s
With those numbers you'd get 10.55THs.

Of course the Difficulty you mine at will be set by the pool, and will depend on your miner, so that you are submitting, on average, 18 Shares per Minute.
newbie
Activity: 7
Merit: 0
How is hashrate calculated when all you know is luck/shares/difficulty?

Jump to: