{"action":"created","issue":{"url":"https://api.github.com/repos/int6/CoiniumServ/issues/587","labels_url":"https://api.github.com/repos/int6/CoiniumServ/issues/587/labels{/name}","comments_url":"https://api.github.com/repos/int6/CoiniumServ/issues/587/comments","events_url":"https://api.github.com/repos/int6/CoiniumServ/issues/587/events","html_url":"https://github.com/int6/CoiniumServ/issues/587","id":46008000,"number":587,"title":"MPOS Hashrate","user":{"login":"Marty19","id":5931174,"avatar_url":"https://avatars.githubusercontent.com/u/5931174?v=3","gravatar_id":"","url":"https://api.github.com/users/Marty19","html_url":"https://github.com/Marty19","followers_url":"https://api.github.com/users/Marty19/followers","following_url":"https://api.github.com/users/Marty19/following{/other_user}","gists_url":"https://api.github.com/users/Marty19/gists{/gist_id}","starred_url":"https://api.github.com/users/Marty19/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Marty19/subscriptions","organizations_url":"https://api.github.com/users/Marty19/orgs","repos_url":"https://api.github.com/users/Marty19/repos","events_url":"https://api.github.com/users/Marty19/events{/privacy}","received_events_url":"https://api.github.com/users/Marty19/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/int6/CoiniumServ/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2014-10-16T16:39:32Z","updated_at":"2015-02-28T04:17:47Z","closed_at":null,"body":"I have just started using CoiniumServ in MPOS mode and have noticed the hashrates are higher than I normally get. Could this be because stratum-mining writes worker difficulty to the shares database instead of the share difficulty as written by Coinium?\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/5329169-mpos-hashrate?utm_campaign=plugin&utm_content=tracker%2F401667&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F401667&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/int6/CoiniumServ/issues/comments/76509611","html_url":"https://github.com/int6/CoiniumServ/issues/587#issuecomment-76509611","issue_url":"https://api.github.com/repos/int6/CoiniumServ/issues/587","id":76509611,"user":{"login":"jt4590","id":11164271,"avatar_url":"https://avatars.githubusercontent.com/u/11164271?v=3","gravatar_id":"","url":"https://api.github.com/users/jt4590","html_url":"https://github.com/jt4590","followers_url":"https://api.github.com/users/jt4590/followers","following_url":"https://api.github.com/users/jt4590/following{/other_user}","gists_url":"https://api.github.com/users/jt4590/gists{/gist_id}","starred_url":"https://api.github.com/users/jt4590/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jt4590/subscriptions","organizations_url":"https://api.github.com/users/jt4590/orgs","repos_url":"https://api.github.com/users/jt4590/repos","events_url":"https://api.github.com/users/jt4590/events{/privacy}","received_events_url":"https://api.github.com/users/jt4590/received_events","type":"User","site_admin":false},"created_at":"2015-02-28T04:17:46Z","updated_at":"2015-02-28T04:17:46Z","body":"Edit: The code is either pulling the wrong interface data into parse, then biginteger, then diff1 (using the wrong value through the API/Interface), OR the calculation should actually be made from diffa, diffr, or diffs...\r\n\r\nIs diff1 what normally represents the target difficulty set by the server? If so it's the right variable name, it's just pulling diffs (assuming this is the difficulty of the share from the miner) through API into the diff1 variable.\r\n\r\nI found this post from Salfter on issue #332 and starting going through the CS files tracing it back. I'm almost to the interface layer to do some more research. (Had help from another code dev to get my head around this and I think I might be close to finding the pull through API.)\r\n\r\nIssue #332 is actually about the Network Hash Rate while this issue #441 is about the Miner Hash Rate, but I do believe they are both really the same core issue: An incorrect pull from the interface through the API.\r\n\r\nAnd the math on this checks out. It's not exactly the same as the reading Salfter is getting from his miner, but it's VERY close. The miner probably isn't showing further decimal points (or he didn't post them for simplicity), but those are being used by CoiniumServ in the full calculation.\r\n\r\nI'm trying to use this as a replacement for stratum-mining in an MPOS installation. Looking at the entries it creates in the shares table, it writes the difficulty of the found share as reported by bfgminer, multiplied by 2^16 (I operate a Bitgem pool). stratum-mining, by comparison, writes the target difficulty (again, multiplied by 2^16). Consider this example:\r\n\r\n[2014-10-14 12:48:23] Accepted 000dac63 GSD 0aw Diff 73m/2m\r\n\r\nThe second-to-last number (0.073) is the difficulty of a share found by my miner. The last number (0.002) is the target difficulty set by the server (this was while mining against CoiniumServ; I have it running alongside stratum-mining while I test it). CoiniumServ should write the second number (*2^16, which would probably be somewhere near 128) to the shares table. Instead, it wrote 4792.88."}}