{"action":"created","issue":{"url":"https://api.github.com/repos/sipa/bitcoin/issues/101","repository_url":"https://api.github.com/repos/sipa/bitcoin","labels_url":"https://api.github.com/repos/sipa/bitcoin/issues/101/labels{/name}","comments_url":"https://api.github.com/repos/sipa/bitcoin/issues/101/comments","events_url":"https://api.github.com/repos/sipa/bitcoin/issues/101/events","html_url":"https://github.com/sipa/bitcoin/pull/101","id":162013442,"number":101,"title":"Cached Hashes","user":{"login":"NicolasDorier","id":3020646,"avatar_url":"https://avatars.githubusercontent.com/u/3020646?v=3","gravatar_id":"","url":"https://api.github.com/users/NicolasDorier","html_url":"https://github.com/NicolasDorier","followers_url":"https://api.github.com/users/NicolasDorier/followers","following_url":"https://api.github.com/users/NicolasDorier/following{/other_user}","gists_url":"https://api.github.com/users/NicolasDorier/gists{/gist_id}","starred_url":"https://api.github.com/users/NicolasDorier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NicolasDorier/subscriptions","organizations_url":"https://api.github.com/users/NicolasDorier/orgs","repos_url":"https://api.github.com/users/NicolasDorier/repos","events_url":"https://api.github.com/users/NicolasDorier/events{/privacy}","received_events_url":"https://api.github.com/users/NicolasDorier/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-06-23T20:17:09Z","updated_at":"2016-06-24T21:01:07Z","closed_at":"2016-06-24T21:01:07Z","pull_request":{"url":"https://api.github.com/repos/sipa/bitcoin/pulls/101","html_url":"https://github.com/sipa/bitcoin/pull/101","diff_url":"https://github.com/sipa/bitcoin/pull/101.diff","patch_url":"https://github.com/sipa/bitcoin/pull/101.patch"},"body":"Some notes about the implementation:\r\n\r\n* It calculates the three midstate hashes as soon as a CheckSig segwit operation happens, whathever the SigHash,\r\n* It is possible that two different threads calculate the midstate hashes of a transaction twice,\r\n\r\nBefinits are:\r\n\r\n* hashcashes map access is limited so we don't have too much lock contention\r\n* Fewer conditional branches in consensus code\r\n* Simple to review\r\n\r\nThis commit is only for having a cache that is simple to review and understand. It is probably possible to fix the two first points above, but the code overhead is not worth it when our goal is only to fix the O(n²) issue.\r\n\r\n(rebased version of https://github.com/sipa/bitcoin/pull/70)"},"comment":{"url":"https://api.github.com/repos/sipa/bitcoin/issues/comments/228460907","html_url":"https://github.com/sipa/bitcoin/pull/101#issuecomment-228460907","issue_url":"https://api.github.com/repos/sipa/bitcoin/issues/101","id":228460907,"user":{"login":"NicolasDorier","id":3020646,"avatar_url":"https://avatars.githubusercontent.com/u/3020646?v=3","gravatar_id":"","url":"https://api.github.com/users/NicolasDorier","html_url":"https://github.com/NicolasDorier","followers_url":"https://api.github.com/users/NicolasDorier/followers","following_url":"https://api.github.com/users/NicolasDorier/following{/other_user}","gists_url":"https://api.github.com/users/NicolasDorier/gists{/gist_id}","starred_url":"https://api.github.com/users/NicolasDorier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NicolasDorier/subscriptions","organizations_url":"https://api.github.com/users/NicolasDorier/orgs","repos_url":"https://api.github.com/users/NicolasDorier/repos","events_url":"https://api.github.com/users/NicolasDorier/events{/privacy}","received_events_url":"https://api.github.com/users/NicolasDorier/received_events","type":"User","site_admin":false},"created_at":"2016-06-24T21:01:07Z","updated_at":"2016-06-24T21:01:07Z","body":"https://github.com/bitcoin/bitcoin/pull/8259"}}
{"actor":{"display_login":"NicolasDorier"}}