Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[request]Mining difficulty adjustment #325

Open
luozhaohui opened this issue Aug 27, 2018 · 4 comments
Open

[request]Mining difficulty adjustment #325

luozhaohui opened this issue Aug 27, 2018 · 4 comments

Comments

@luozhaohui
Copy link
Contributor

Once the difficulty goes up, it takes months to go go down.

Report from kali:
screenshot from metaverse.farm
some one put 800GH (yes giga hash) solo for 1 hour
difficulty jumped from 31 to 35T really quickly (as it should)
now look at the difficulty when he is gone, 800GH of extra hashpower gone, and it takes ages to get back to original levels.
8 hours passed since that "1 hour 800GH burst mining" and difficulty is nowhere near the original level.

difficulty_adjustment

@baaa
Copy link

baaa commented Oct 12, 2018

This bug is crippling the network... This is a list of block times from today, columns:
Block Height - Block Time - Difficulty - Miner

 1571042  97 48.842 Dodopool
 1571043 138 48.794           Unknown(MToecQJZ4ku55yJYAU62ZghExgRWq3phEu)
 1571044  24 48.746           Unknown(MToecQJZ4ku55yJYAU62ZghExgRWq3phEu)
 1571045 818 48.699 Dodopool
 1571046  13 48.746 Dodopool
 1571047  67 48.699           Unknown(MToecQJZ4ku55yJYAU62ZghExgRWq3phEu)
 1571048 131 48.651           Unknown(MToecQJZ4ku55yJYAU62ZghExgRWq3phEu)
 1571049  20 48.699           Unknown(MToecQJZ4ku55yJYAU62ZghExgRWq3phEu)
 1571050  76 48.651 Dodopool
 1571051 158 48.604           Unknown(MToecQJZ4ku55yJYAU62ZghExgRWq3phEu)
 1571052  37 48.556           Unknown(MToecQJZ4ku55yJYAU62ZghExgRWq3phEu)
 1571053  42 48.509 Dodopool
 1571054  69 48.461 Dodopool
 1571055 237 48.414 Dodopool
 1571056  17 48.461           Unknown(MToecQJZ4ku55yJYAU62ZghExgRWq3phEu)
 1571057 337 48.414 Dodopool
 1571058   2 48.461           sandpool.org
 1571059  15 48.509 Dodopool
 1571060 403 48.461           sandpool.org
 1571061  90 48.414           sandpool.org
 1571062   3 48.461 Dodopool
 1571063   9 48.508 Dodopool
 1571064 166 48.461           sandpool.org
 1571065  19 48.508 Dodopool
 1571066  11 48.556 Dodopool
 1571067 117 48.508           sandpool.org
 1571068  19 48.556           sandpool.org
 1571069  38 48.508 Dodopool
 1571070 123 48.461 Dodopool
 1571071  48 48.414 Dodopool
 1571072   4 48.461 Dodopool
 1571073  22 48.508 Dodopool
 1571074  31 48.461 Dodopool
 1571075 189 48.414 Dodopool
 1571076  68 48.366           sandpool.org
 1571077  67 48.319 Dodopool
 1571078  11 48.366 Dodopool
 1571079   5 48.413 Dodopool
 1571080 111 48.366 Dodopool
 1571081 301 48.319 Dodopool
 1571082  81 48.272           sandpool.org
 1571083 103 48.225 Dodopool

@betachen
Copy link
Member

betachen commented Jan 10, 2019

Change as:

if(_bi.number < FORKBLOCK)                                                 
    {                                                                          
        if(_bi.timestamp >= _parent.timestamp + time_config)                   
        {                                                                      
            target = _parent.bits - (_parent.bits/1024);                       
        } else {                                                               
            target = _parent.bits + (_parent.bits/1024);                               }                                                                      
    } else  { 
        bigint const interval = (bigint)(_bi.timestamp-_parent.timestamp);     
        bigint const adjustvalue= max<bigint>(2 - interval /10 ,-99);          
        target = _parent.bits + _parent.bits/2048*adjustvalue;                 
    }

@codrush
Copy link
Contributor

codrush commented Jan 16, 2019

@canguruhh
Copy link
Member

Whats the status of this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants