{"action":"created","issue":{"url":"https://api.github.com/repos/decred/haste/issues/6","repository_url":"https://api.github.com/repos/decred/haste","labels_url":"https://api.github.com/repos/decred/haste/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/decred/haste/issues/6/comments","events_url":"https://api.github.com/repos/decred/haste/issues/6/events","html_url":"https://github.com/decred/haste/issues/6","id":175334601,"number":6,"title":"Misplaced mining.set_difficulty ?","user":{"login":"kargakis","id":3900799,"avatar_url":"https://avatars.githubusercontent.com/u/3900799?v=3","gravatar_id":"","url":"https://api.github.com/users/kargakis","html_url":"https://github.com/kargakis","followers_url":"https://api.github.com/users/kargakis/followers","following_url":"https://api.github.com/users/kargakis/following{/other_user}","gists_url":"https://api.github.com/users/kargakis/gists{/gist_id}","starred_url":"https://api.github.com/users/kargakis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kargakis/subscriptions","organizations_url":"https://api.github.com/users/kargakis/orgs","repos_url":"https://api.github.com/users/kargakis/repos","events_url":"https://api.github.com/users/kargakis/events{/privacy}","received_events_url":"https://api.github.com/users/kargakis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-06T19:48:31Z","updated_at":"2016-09-06T22:09:28Z","closed_at":null,"body":"I may be wrong but based on the [introduction](https://github.com/decred/haste#introduction) of the stratum protocol, [mining.set_difficulty](https://github.com/decred/haste#server-sends-miningnotify-combination-message-in-response-to-miningsubscribe) shouldn't be sent during mining.notify?"},"comment":{"url":"https://api.github.com/repos/decred/haste/issues/comments/245111855","html_url":"https://github.com/decred/haste/issues/6#issuecomment-245111855","issue_url":"https://api.github.com/repos/decred/haste/issues/6","id":245111855,"user":{"login":"jolan","id":927740,"avatar_url":"https://avatars.githubusercontent.com/u/927740?v=3","gravatar_id":"","url":"https://api.github.com/users/jolan","html_url":"https://github.com/jolan","followers_url":"https://api.github.com/users/jolan/followers","following_url":"https://api.github.com/users/jolan/following{/other_user}","gists_url":"https://api.github.com/users/jolan/gists{/gist_id}","starred_url":"https://api.github.com/users/jolan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jolan/subscriptions","organizations_url":"https://api.github.com/users/jolan/orgs","repos_url":"https://api.github.com/users/jolan/repos","events_url":"https://api.github.com/users/jolan/events{/privacy}","received_events_url":"https://api.github.com/users/jolan/received_events","type":"User","site_admin":false},"created_at":"2016-09-06T22:09:28Z","updated_at":"2016-09-06T22:09:28Z","body":"Yes it's a bit confusing.  There's a set_difficulty param in mining.notify.  It's sent \"properly\" later.\r\n\r\nThe example in the documentation is from a yiimp-based pool.  Here's one from an mpos-based pool:\r\n\r\n```\r\n[2016-09-06 22:04:41] > {\"id\": 1, \"method\": \"mining.subscribe\", \"params\": [\"ccminer/0.2.0-decred\"]}\r\n[2016-09-06 22:04:41] < {\"id\":1,\"result\":[[[\"mining.set_difficulty\",\"deadbeefcafebabe01b1000000000000\"],[\"mining.notify\",\"deadbeefcafebabe01b1000000000000\"]],\"00000000000000007fffe642\",12],\"error\":null}\r\n[2016-09-06 22:04:41] Stratum session id: deadbeefcafebabe01b1000000000000\r\n[2016-09-06 22:04:41] > {\"id\": 2, \"method\": \"mining.authorize\", \"params\": [\"jolan.minei5\", \"x\"]}\r\n[2016-09-06 22:04:41] < {\"id\":null,\"method\":\"mining.set_difficulty\",\"params\":[16]}\r\n[2016-09-06 22:04:41] < {\"id\":null,\"method\":\"mining.notify\",\"params\":[\"86c2\",\"f6671a1b2621c394b0c570158647901d8576417eb617108c0000108c00000000\",\"72b611a9b693498abe88a2be3a0a32f0fbaa1038049bc1e8734a1601bd5c12410619ddbf220a0bda6066179934da8514d8003e97dc13ffa95cc17d4bac51194\r\nd0100073fe9d2b7b80500000098a0000087fa111aa79c142101000000ccee000005090000523dcf570000000000000000\",\"\",[],\"01000000\",\"1a11fa87\",\"57cf3d52\",true]}\r\n[2016-09-06 22:04:41] < {\"id\":2,\"result\":true,\"error\":null}\r\n[2016-09-06 22:04:41] > {\"id\": 3, \"method\": \"mining.extranonce.subscribe\", \"params\": []}\r\n[2016-09-06 22:04:41] < {\"id\":3,\"result\":true,\"error\":null}\r\n```"}}
{"actor":{"display_login":"jolan"}}