{"action":"created","issue":{"url":"https://api.github.com/repos/dogecoin/dogecoin/issues/783","labels_url":"https://api.github.com/repos/dogecoin/dogecoin/issues/783/labels{/name}","comments_url":"https://api.github.com/repos/dogecoin/dogecoin/issues/783/comments","events_url":"https://api.github.com/repos/dogecoin/dogecoin/issues/783/events","html_url":"https://github.com/dogecoin/dogecoin/issues/783","id":54102305,"number":783,"title":"Is the ComputeMinWork function wrong for the new difficulty adjustments?","user":{"login":"scmorse","id":4519249,"avatar_url":"https://avatars.githubusercontent.com/u/4519249?v=3","gravatar_id":"","url":"https://api.github.com/users/scmorse","html_url":"https://github.com/scmorse","followers_url":"https://api.github.com/users/scmorse/followers","following_url":"https://api.github.com/users/scmorse/following{/other_user}","gists_url":"https://api.github.com/users/scmorse/gists{/gist_id}","starred_url":"https://api.github.com/users/scmorse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scmorse/subscriptions","organizations_url":"https://api.github.com/users/scmorse/orgs","repos_url":"https://api.github.com/users/scmorse/repos","events_url":"https://api.github.com/users/scmorse/events{/privacy}","received_events_url":"https://api.github.com/users/scmorse/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dogecoin/dogecoin/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":{"login":"rnicoll","id":3513077,"avatar_url":"https://avatars.githubusercontent.com/u/3513077?v=3","gravatar_id":"","url":"https://api.github.com/users/rnicoll","html_url":"https://github.com/rnicoll","followers_url":"https://api.github.com/users/rnicoll/followers","following_url":"https://api.github.com/users/rnicoll/following{/other_user}","gists_url":"https://api.github.com/users/rnicoll/gists{/gist_id}","starred_url":"https://api.github.com/users/rnicoll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rnicoll/subscriptions","organizations_url":"https://api.github.com/users/rnicoll/orgs","repos_url":"https://api.github.com/users/rnicoll/repos","events_url":"https://api.github.com/users/rnicoll/events{/privacy}","received_events_url":"https://api.github.com/users/rnicoll/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/dogecoin/dogecoin/milestones/5","html_url":"https://github.com/dogecoin/dogecoin/milestones/1.10","labels_url":"https://api.github.com/repos/dogecoin/dogecoin/milestones/5/labels","id":1180517,"number":5,"title":"1.10","description":null,"creator":{"login":"rnicoll","id":3513077,"avatar_url":"https://avatars.githubusercontent.com/u/3513077?v=3","gravatar_id":"","url":"https://api.github.com/users/rnicoll","html_url":"https://github.com/rnicoll","followers_url":"https://api.github.com/users/rnicoll/followers","following_url":"https://api.github.com/users/rnicoll/following{/other_user}","gists_url":"https://api.github.com/users/rnicoll/gists{/gist_id}","starred_url":"https://api.github.com/users/rnicoll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rnicoll/subscriptions","organizations_url":"https://api.github.com/users/rnicoll/orgs","repos_url":"https://api.github.com/users/rnicoll/repos","events_url":"https://api.github.com/users/rnicoll/events{/privacy}","received_events_url":"https://api.github.com/users/rnicoll/received_events","type":"User","site_admin":false},"open_issues":13,"closed_issues":20,"state":"open","created_at":"2015-06-25T07:36:15Z","updated_at":"2015-08-07T21:47:50Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2015-01-12T20:26:51Z","updated_at":"2015-08-07T21:47:50Z","closed_at":"2015-08-07T21:47:50Z","body":"I'm not 100% sure that it is, but with some quick napkin math, it seems like the ComputeMinWork function isn't correct. \r\n\r\nI would expect that this:\r\n\r\n<pre>\r\n// Maximum 10% adjustment...\r\nbnResult = (bnResult * 110) / 100;\r\n// ... in best-case exactly 4-times-normal target time\r\nnTime -= nTargetTimespanNEW*4;\r\n</pre>\r\n\r\nShould be this:\r\n\r\n<pre>\r\n// Maximum 50% adjustment...\r\nbnResult = (bnResult * 150) / 100;\r\n// ... in best-case exactly 5-times-normal target time\r\nnTime -= nTargetTimespanNEW*5;\r\n</pre>\r\n\r\nI got this because if <code>nActualTime = 5*nTargetTimespanNEW</code>, then <code>nModulatedTime = (retargetTimespan + (retargetTimespan/2)</code>, which is the maximum it can be. When it attains this maximum, `bnNew` is increased by 50%. "},"comment":{"url":"https://api.github.com/repos/dogecoin/dogecoin/issues/comments/128840373","html_url":"https://github.com/dogecoin/dogecoin/issues/783#issuecomment-128840373","issue_url":"https://api.github.com/repos/dogecoin/dogecoin/issues/783","id":128840373,"user":{"login":"rnicoll","id":3513077,"avatar_url":"https://avatars.githubusercontent.com/u/3513077?v=3","gravatar_id":"","url":"https://api.github.com/users/rnicoll","html_url":"https://github.com/rnicoll","followers_url":"https://api.github.com/users/rnicoll/followers","following_url":"https://api.github.com/users/rnicoll/following{/other_user}","gists_url":"https://api.github.com/users/rnicoll/gists{/gist_id}","starred_url":"https://api.github.com/users/rnicoll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rnicoll/subscriptions","organizations_url":"https://api.github.com/users/rnicoll/orgs","repos_url":"https://api.github.com/users/rnicoll/repos","events_url":"https://api.github.com/users/rnicoll/events{/privacy}","received_events_url":"https://api.github.com/users/rnicoll/received_events","type":"User","site_admin":false},"created_at":"2015-08-07T21:47:50Z","updated_at":"2015-08-07T21:47:50Z","body":"It looks like Bitcoin Core has removed the code, check and error entirely in 0.11, neatly eliminating the problem entirely. Thanks for letting us know, though!\r\n"}}