{"action":"created","issue":{"url":"https://api.github.com/repos/paritytech/parity-ethereum/issues/10118","repository_url":"https://api.github.com/repos/paritytech/parity-ethereum","labels_url":"https://api.github.com/repos/paritytech/parity-ethereum/issues/10118/labels{/name}","comments_url":"https://api.github.com/repos/paritytech/parity-ethereum/issues/10118/comments","events_url":"https://api.github.com/repos/paritytech/parity-ethereum/issues/10118/events","html_url":"https://github.com/paritytech/parity-ethereum/issues/10118","id":395019357,"node_id":"MDU6SXNzdWUzOTUwMTkzNTc=","number":10118,"title":"Error in Ethereum Classic difficulty calculation?","user":{"login":"cseberino","id":4721990,"node_id":"MDQ6VXNlcjQ3MjE5OTA=","avatar_url":"https://avatars3.githubusercontent.com/u/4721990?v=4","gravatar_id":"","url":"https://api.github.com/users/cseberino","html_url":"https://github.com/cseberino","followers_url":"https://api.github.com/users/cseberino/followers","following_url":"https://api.github.com/users/cseberino/following{/other_user}","gists_url":"https://api.github.com/users/cseberino/gists{/gist_id}","starred_url":"https://api.github.com/users/cseberino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cseberino/subscriptions","organizations_url":"https://api.github.com/users/cseberino/orgs","repos_url":"https://api.github.com/users/cseberino/repos","events_url":"https://api.github.com/users/cseberino/events{/privacy}","received_events_url":"https://api.github.com/users/cseberino/received_events","type":"User","site_admin":false},"labels":[{"id":470201456,"node_id":"MDU6TGFiZWw0NzAyMDE0NTY=","url":"https://api.github.com/repos/paritytech/parity-ethereum/labels/Z3-stale%20%F0%9F%8D%83","name":"Z3-stale 🍃","color":"fcFdf2","default":false},{"id":290482950,"node_id":"MDU6TGFiZWwyOTA0ODI5NTA=","url":"https://api.github.com/repos/paritytech/parity-ethereum/labels/Z7-duplicate%20%F0%9F%96%A8","name":"Z7-duplicate 🖨","color":"f8fbf8","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-12-31T18:54:41Z","updated_at":"2018-12-31T21:20:05Z","closed_at":"2018-12-31T21:18:32Z","author_association":"NONE","body":"\r\nParity version: 1.11.8 installed from Linux Ubuntu 18.04 package\r\nLinux Ubuntu 18.04.1\r\nfully synchonized on Ethereum Classic network\r\n\r\nParity 1.11.8 gives a difficulty of 0x7048c3a85d98 for ETC block 7116609 \r\nbut I'm thinking if it should be 0x7048c3a85d95.\r\n\r\nI've discussed with leader of ETCDEV and get the 0x7048c3a85d95 value in both Java and Python code.\r\n\r\nHere is how we calculated 0x7048c3a85d95.....\r\n\r\n*************************************************\r\n\r\nimport java.math.BigInteger;\r\n\r\npublic class Diff {\r\n\r\n  public static BigInteger calc(BigInteger dp, long sec) {\r\n        return dp\r\n                .add(dp.multiply(BigInteger.valueOf(1 - sec / 10))\r\n                .divide(BigInteger.valueOf(2048)));\r\n  }\r\n\r\n  public static final void main(String[] args) {\r\n        System.out.println(calc(new BigInteger(\"709d39938c3e\", 16), 72).toString(16));\r\n        System.out.println(calc(new BigInteger(\"709d39938c3e\", 16), 71).toString(16));\r\n        System.out.println(calc(new BigInteger(\"709d39938c3e\", 16), 73).toString(16));\r\n  }\r\n\r\n}\r\n\r\n*****************************************************************************************************************\r\n\r\n% javac Diff.java \r\n% java Diff \r\n7048c3a85d95\r\n7048c3a85d95\r\n7048c3a85d95\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/paritytech/parity-ethereum/issues/comments/450691368","html_url":"https://github.com/paritytech/parity-ethereum/issues/10118#issuecomment-450691368","issue_url":"https://api.github.com/repos/paritytech/parity-ethereum/issues/10118","id":450691368,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MDY5MTM2OA==","user":{"login":"joshua-mir","id":43032097,"node_id":"MDQ6VXNlcjQzMDMyMDk3","avatar_url":"https://avatars2.githubusercontent.com/u/43032097?v=4","gravatar_id":"","url":"https://api.github.com/users/joshua-mir","html_url":"https://github.com/joshua-mir","followers_url":"https://api.github.com/users/joshua-mir/followers","following_url":"https://api.github.com/users/joshua-mir/following{/other_user}","gists_url":"https://api.github.com/users/joshua-mir/gists{/gist_id}","starred_url":"https://api.github.com/users/joshua-mir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshua-mir/subscriptions","organizations_url":"https://api.github.com/users/joshua-mir/orgs","repos_url":"https://api.github.com/users/joshua-mir/repos","events_url":"https://api.github.com/users/joshua-mir/events{/privacy}","received_events_url":"https://api.github.com/users/joshua-mir/received_events","type":"User","site_admin":false},"created_at":"2018-12-31T21:20:05Z","updated_at":"2018-12-31T21:20:05Z","author_association":"NONE","body":"Likely duplicate https://github.com/paritytech/parity-ethereum/issues/8397#issuecomment-411688770"}}
{"actor":{"display_login":"joshua-mir"}}