You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 20, 2023. It is now read-only.
I was hoping that someone can help me understand math behind the difficulty.
Let's say that the current ETH difficulty is 12P. Now if I want to calculate the percentage 'luck' to a block like on the 2miners solo pool, does it stand to reason that if a miner sends X number of shares that total 6P they would be 50% toward a block or is there a further consideration of the 4.295Gh factor (i.e. D=1 is 4.295GH, D=2 is 8.59GH)?
If we include the 4.295 factor and use D=1, can it be assumed that a block solve or 100% luck would be 12P * 4.295 = 51.54P (total shares accepted)? So then, statistically, a miner would have to send 51.54P worth of accepted shares before solving a block?
I don't really understand where the 4.295 factor comes from to begin with. I recall seeing an article some time ago that explained that mining Bitcoin, 1 share would be found every 4.296 billion hashes but that is the only reference to 4.295 I have ever seen.
I don't know, maybe I'm just confusing myself here. I'm just trying to find a way to calculate the 'luck' factor based on shares received from any given miner. Again, how 2miners does it.
EDIT:
So I decided to do a little testing and I added a little bit of code so I could log the actual submitted hash of an accepted share (shareDifficulty = shareDiff * EthereumConstants.Pow2x32 in EthereumJob.cs) and logged it to a database table.
I ran a rig of 6 RTX 3070s for 24 hours and this is what I found.
Over the 24 hour period, with a pool difficulty of D=4.063 (17.45GH) the rig submitted 1804 shares.
The Reported Hashrate in HiveOS and T-rex is 373.40 MH/s
1804 shares = 0.0208796296296296 shares/second
If I multiply the shares per second by the difficulty D=4.063 (17.45 GH) that equals 364.35 MH/s
0.0208796296296296 * 17450MH = 364.35MH/s
Now the actual total hash that the rig submitted and logged to the database was
321,685,041,789,027 H or 321.685041789027 TH
If I divide the total hash recorded by the total seconds (86400 per 24h), the effective hashrate is
321685041789027 H / 86400 s = 3,723,206,502.187813 H/s or 3.723206502187813 GH/s
Now if the assumption is that the percentage time to a block is based on the number of hashes submitted then would I calculate the percentage to a block solve with;
a) actual hash submitted / networkDifficulty or
b) shares submitted * pool difficulty / networkDifficulty
If the answer is b), I'm still having a really hard time understanding how and why the pool difficulty is calculated with a factor of 4.295 and how that would apply to calculating the percentage probibility to a block solution.
I'm over complicating this, aren't I? Most likely but, any insight would be appreciated.
I guess I could just run this 6 RTX 3070 rig and wait to see if/when it solves a block and work the math backward from there. Could take a little while though, haha.. Perhaps I add a few more rigs to the test pool.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I was hoping that someone can help me understand math behind the difficulty.
Let's say that the current ETH difficulty is 12P. Now if I want to calculate the percentage 'luck' to a block like on the 2miners solo pool, does it stand to reason that if a miner sends X number of shares that total 6P they would be 50% toward a block or is there a further consideration of the 4.295Gh factor (i.e. D=1 is 4.295GH, D=2 is 8.59GH)?
If we include the 4.295 factor and use D=1, can it be assumed that a block solve or 100% luck would be 12P * 4.295 = 51.54P (total shares accepted)? So then, statistically, a miner would have to send 51.54P worth of accepted shares before solving a block?
I don't really understand where the 4.295 factor comes from to begin with. I recall seeing an article some time ago that explained that mining Bitcoin, 1 share would be found every 4.296 billion hashes but that is the only reference to 4.295 I have ever seen.
I don't know, maybe I'm just confusing myself here. I'm just trying to find a way to calculate the 'luck' factor based on shares received from any given miner. Again, how 2miners does it.
EDIT:
So I decided to do a little testing and I added a little bit of code so I could log the actual submitted hash of an accepted share (shareDifficulty = shareDiff * EthereumConstants.Pow2x32 in EthereumJob.cs) and logged it to a database table.
I ran a rig of 6 RTX 3070s for 24 hours and this is what I found.
Over the 24 hour period, with a pool difficulty of D=4.063 (17.45GH) the rig submitted 1804 shares.
The Reported Hashrate in HiveOS and T-rex is 373.40 MH/s
1804 shares = 0.0208796296296296 shares/second
If I multiply the shares per second by the difficulty D=4.063 (17.45 GH) that equals 364.35 MH/s
0.0208796296296296 * 17450MH = 364.35MH/s
Now the actual total hash that the rig submitted and logged to the database was
321,685,041,789,027 H or 321.685041789027 TH
If I divide the total hash recorded by the total seconds (86400 per 24h), the effective hashrate is
321685041789027 H / 86400 s = 3,723,206,502.187813 H/s or 3.723206502187813 GH/s
Now if the assumption is that the percentage time to a block is based on the number of hashes submitted then would I calculate the percentage to a block solve with;
a) actual hash submitted / networkDifficulty or
b) shares submitted * pool difficulty / networkDifficulty
If the answer is b), I'm still having a really hard time understanding how and why the pool difficulty is calculated with a factor of 4.295 and how that would apply to calculating the percentage probibility to a block solution.
I'm over complicating this, aren't I? Most likely but, any insight would be appreciated.
I guess I could just run this 6 RTX 3070 rig and wait to see if/when it solves a block and work the math backward from there. Could take a little while though, haha.. Perhaps I add a few more rigs to the test pool.
Beta Was this translation helpful? Give feedback.
All reactions