{"action":"created","issue":{"url":"https://api.github.com/repos/zcash/zcash/issues/147","repository_url":"https://api.github.com/repos/zcash/zcash","labels_url":"https://api.github.com/repos/zcash/zcash/issues/147/labels{/name}","comments_url":"https://api.github.com/repos/zcash/zcash/issues/147/comments","events_url":"https://api.github.com/repos/zcash/zcash/issues/147/events","html_url":"https://github.com/zcash/zcash/issues/147","id":64635851,"number":147,"title":"select difficulty adjustment algorithm","user":{"login":"nathan-at-least","id":4369700,"avatar_url":"https://avatars.githubusercontent.com/u/4369700?v=3","gravatar_id":"","url":"https://api.github.com/users/nathan-at-least","html_url":"https://github.com/nathan-at-least","followers_url":"https://api.github.com/users/nathan-at-least/followers","following_url":"https://api.github.com/users/nathan-at-least/following{/other_user}","gists_url":"https://api.github.com/users/nathan-at-least/gists{/gist_id}","starred_url":"https://api.github.com/users/nathan-at-least/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nathan-at-least/subscriptions","organizations_url":"https://api.github.com/users/nathan-at-least/orgs","repos_url":"https://api.github.com/users/nathan-at-least/repos","events_url":"https://api.github.com/users/nathan-at-least/events{/privacy}","received_events_url":"https://api.github.com/users/nathan-at-least/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/zcash/zcash/labels/blockchain%20genesis","name":"blockchain genesis","color":"fbca04"},{"url":"https://api.github.com/repos/zcash/zcash/labels/consensus%20protocol","name":"consensus protocol","color":"f766c7"},{"url":"https://api.github.com/repos/zcash/zcash/labels/economics","name":"economics","color":"80abb5"},{"url":"https://api.github.com/repos/zcash/zcash/labels/engineering%20meeting%20agenda","name":"engineering meeting agenda","color":"8fe4ff"},{"url":"https://api.github.com/repos/zcash/zcash/labels/in%201.0","name":"in 1.0","color":"ffc987"},{"url":"https://api.github.com/repos/zcash/zcash/labels/performance","name":"performance","color":"b495f9"},{"url":"https://api.github.com/repos/zcash/zcash/labels/PoW%20and%20mining","name":"PoW and mining","color":"903b00"},{"url":"https://api.github.com/repos/zcash/zcash/labels/question","name":"question","color":"cc317c"},{"url":"https://api.github.com/repos/zcash/zcash/labels/research","name":"research","color":"0052cc"},{"url":"https://api.github.com/repos/zcash/zcash/labels/SECURITY","name":"SECURITY","color":"e01010"},{"url":"https://api.github.com/repos/zcash/zcash/labels/special%20to%20Daira","name":"special to Daira","color":"ffa480"},{"url":"https://api.github.com/repos/zcash/zcash/labels/special%20to%20Nathan","name":"special to Nathan","color":"a485d9"}],"state":"open","locked":false,"assignee":{"login":"str4d","id":4993799,"avatar_url":"https://avatars.githubusercontent.com/u/4993799?v=3","gravatar_id":"","url":"https://api.github.com/users/str4d","html_url":"https://github.com/str4d","followers_url":"https://api.github.com/users/str4d/followers","following_url":"https://api.github.com/users/str4d/following{/other_user}","gists_url":"https://api.github.com/users/str4d/gists{/gist_id}","starred_url":"https://api.github.com/users/str4d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/str4d/subscriptions","organizations_url":"https://api.github.com/users/str4d/orgs","repos_url":"https://api.github.com/users/str4d/repos","events_url":"https://api.github.com/users/str4d/events{/privacy}","received_events_url":"https://api.github.com/users/str4d/received_events","type":"User","site_admin":false},"assignees":[{"login":"str4d","id":4993799,"avatar_url":"https://avatars.githubusercontent.com/u/4993799?v=3","gravatar_id":"","url":"https://api.github.com/users/str4d","html_url":"https://github.com/str4d","followers_url":"https://api.github.com/users/str4d/followers","following_url":"https://api.github.com/users/str4d/following{/other_user}","gists_url":"https://api.github.com/users/str4d/gists{/gist_id}","starred_url":"https://api.github.com/users/str4d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/str4d/subscriptions","organizations_url":"https://api.github.com/users/str4d/orgs","repos_url":"https://api.github.com/users/str4d/repos","events_url":"https://api.github.com/users/str4d/events{/privacy}","received_events_url":"https://api.github.com/users/str4d/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/zcash/zcash/milestones/34","html_url":"https://github.com/zcash/zcash/milestones/Protocol%202016.0-beta","labels_url":"https://api.github.com/repos/zcash/zcash/milestones/34/labels","id":1770018,"number":34,"title":"Protocol 2016.0-beta","description":"","creator":{"login":"nathan-at-least","id":4369700,"avatar_url":"https://avatars.githubusercontent.com/u/4369700?v=3","gravatar_id":"","url":"https://api.github.com/users/nathan-at-least","html_url":"https://github.com/nathan-at-least","followers_url":"https://api.github.com/users/nathan-at-least/followers","following_url":"https://api.github.com/users/nathan-at-least/following{/other_user}","gists_url":"https://api.github.com/users/nathan-at-least/gists{/gist_id}","starred_url":"https://api.github.com/users/nathan-at-least/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nathan-at-least/subscriptions","organizations_url":"https://api.github.com/users/nathan-at-least/orgs","repos_url":"https://api.github.com/users/nathan-at-least/repos","events_url":"https://api.github.com/users/nathan-at-least/events{/privacy}","received_events_url":"https://api.github.com/users/nathan-at-least/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":24,"state":"closed","created_at":"2016-05-16T22:10:32Z","updated_at":"2016-09-03T09:56:17Z","due_on":"2016-05-25T07:00:00Z","closed_at":"2016-06-06T22:40:59Z"},"comments":76,"created_at":"2015-03-26T21:14:41Z","updated_at":"2016-09-05T10:55:15Z","closed_at":null,"body":"Are there improvements to availability if difficulty is adjusted each block? Is there any larger vulnerability (eg: DOSing a nodes peer connections to starve it of blocks lowering it's local belief about difficulty)?\r\n\r\nAre there any known advantages or risks which clearly make this worthwhile to spend time on or avoid?\r\n\r\nWe suspect this may be important in the long term, because PoW mining may eventually lead to cascading exit of miners when their margins go <= 0 (Brad Templeton Death Spiral, #95), or during sudden-withdrawal infanticide, or during sudden withdrawal due to side-chain knock-on effects (see #146). This *may* help with availability during those kinds of events (although it won't mitigate those events directly).\r\n\r\nIs the implementation complexity low? (It would seem like changing a single constant K to 1 in \"calculate difficulty every K blocks\".)"},"comment":{"url":"https://api.github.com/repos/zcash/zcash/issues/comments/244719102","html_url":"https://github.com/zcash/zcash/issues/147#issuecomment-244719102","issue_url":"https://api.github.com/repos/zcash/zcash/issues/147","id":244719102,"user":{"login":"zawy12","id":18004719,"avatar_url":"https://avatars.githubusercontent.com/u/18004719?v=3","gravatar_id":"","url":"https://api.github.com/users/zawy12","html_url":"https://github.com/zawy12","followers_url":"https://api.github.com/users/zawy12/followers","following_url":"https://api.github.com/users/zawy12/following{/other_user}","gists_url":"https://api.github.com/users/zawy12/gists{/gist_id}","starred_url":"https://api.github.com/users/zawy12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zawy12/subscriptions","organizations_url":"https://api.github.com/users/zawy12/orgs","repos_url":"https://api.github.com/users/zawy12/repos","events_url":"https://api.github.com/users/zawy12/events{/privacy}","received_events_url":"https://api.github.com/users/zawy12/received_events","type":"User","site_admin":false},"created_at":"2016-09-05T10:55:15Z","updated_at":"2016-09-05T10:55:15Z","body":"I tested it on the true data from debug.log instead of personal log.  Change from N=2 to N=3 on the > 2.5 line.   A 10x attack like the one below would result in a 10x delay on a single post-attack block (25 minutes).  I am excited about this algo, if Zcash uses it or not.  It needs a change to prevent an attack that would be 5 blocks on, 5 blocks off repeatedly. They seem to be capable of and planning 5-block attacks. In words: revert to 1st spike up averaging period period if a second spike up occurs within 24 blocks of the 1st one. A \"cream on cake\" change that's too late is to stop the gentle cycles that occur with simple averaging, at 4x the averaging period. \r\n\r\n# zawy difficulty algorithm  v0.12\r\nif ( $ActualTimespan[3] / $TargetTimespan[3] > 2.5 )  || \r\n       $ActualTimespan[2] / $TargetTimespan[2] < 0.18 )  { $N=2; }\r\n$difficulty = $SumPastDifficulties[$N] * $TargetInterval / $ActualTimespan[$N]; \r\n$N++ if $N < 25; \r\n```\r\n![zawyv0 12](https://cloud.githubusercontent.com/assets/18004719/18245857/aeb89180-7335-11e6-9c28-6a648e84aabe.png)\r\n"}}
{"actor":{"display_login":"zawy12"}}