• Forum has been upgraded, all links, images, etc are as they were. Please see Official Announcements for more information

DASH Mining problems - algo DGW, difficulty adjustment.

Johnge

New member
I'm working on a DASH mining profit calculator, and can't prove the difficulty adjustment formula with historical data in explorer.dash.org. Here my proven way, did I miss anything? It really confuse me, any help is appreciated.

1.DASH difficulty adjustment formula, nextblockdifficulty = (currentblockdifficulty * 2 + sum(pre 23 blocks difficulty)/25 * ( 24 blocks targetimespan / 24 blocks actualtimespan).
2.I used the block data higher than #34140, which use the algo of DGW.
 
Assuming that by difficulty you actually mean target, there are still few issues:
- you should multiply by actualtimespan and divide by targettimespan, not the otherwise https://github.com/dashpay/dash/blob/v0.12.2.x/src/pow.cpp#L123-L124
- you can't simplify calculations this way (even though algoritmically it's correct) due to accumulated rounding errors, should actually loop through as it's defined in reference DarkGravityWave implementation https://github.com/dashpay/dash/blob/v0.12.2.x/src/pow.cpp#L96
 
Hi UdjinM6, thanks for repley.

Can you explain the rounding errors ? I want to add this rule into my mining profit calculator and get a accurate outcome.
 
Back
Top