{"action":"created","comment":{"url":"https://api.github.com/repos/ethereum/py-evm/pulls/comments/243394295","pull_request_review_id":187148309,"id":243394295,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MzM5NDI5NQ==","diff_hunk":"@@ -402,6 +404,32 @@ def get_domain(fork_data: 'ForkData',\n         slot,\n     ) * 4294967296 + domain_type\n \n+def verify_slashable_vote_data(state: BeaconState, vote_data: SlashableVoteData) -> bool:\n+    vote_count = len(vote_data.aggregate_signature_poc_0_indices) + len(vote_data.aggregate_signature_poc_1_indices)\n+    if vote_count > MAX_CASPER_VOTES:\n+        return False\n+\n+    pubkeys = [\n+        bls.aggregate_pubkeys([state.validators[i].pubkey for i in vote_data.aggregate_signature_poc_0_indices]),\n+        bls.aggregate_pubkeys([state.validators[i].pubkey for i in vote_data.aggregate_signature_poc_1_indices])\n+    ]\n+\n+    # TODO: change to hash_tree_root(vote_data) when we have SSZ tree hashing\n+    vote_data_root = vote_data.root\n+    messages = [","path":"eth/beacon/helpers.py","position":32,"original_position":32,"commit_id":"349c2e9788ddde3be67c69ad6b63e4cc0ca89a80","original_commit_id":"349c2e9788ddde3be67c69ad6b63e4cc0ca89a80","user":{"login":"hwwhww","id":9263930,"node_id":"MDQ6VXNlcjkyNjM5MzA=","avatar_url":"https://avatars3.githubusercontent.com/u/9263930?v=4","gravatar_id":"","url":"https://api.github.com/users/hwwhww","html_url":"https://github.com/hwwhww","followers_url":"https://api.github.com/users/hwwhww/followers","following_url":"https://api.github.com/users/hwwhww/following{/other_user}","gists_url":"https://api.github.com/users/hwwhww/gists{/gist_id}","starred_url":"https://api.github.com/users/hwwhww/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hwwhww/subscriptions","organizations_url":"https://api.github.com/users/hwwhww/orgs","repos_url":"https://api.github.com/users/hwwhww/repos","events_url":"https://api.github.com/users/hwwhww/events{/privacy}","received_events_url":"https://api.github.com/users/hwwhww/received_events","type":"User","site_admin":false},"body":"```python\r\nmessages = (\r\n    ...\r\n)\r\n```","created_at":"2018-12-20T19:39:54Z","updated_at":"2018-12-20T19:40:38Z","html_url":"https://github.com/ethereum/py-evm/pull/1658#discussion_r243394295","pull_request_url":"https://api.github.com/repos/ethereum/py-evm/pulls/1658","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/ethereum/py-evm/pulls/comments/243394295"},"html":{"href":"https://github.com/ethereum/py-evm/pull/1658#discussion_r243394295"},"pull_request":{"href":"https://api.github.com/repos/ethereum/py-evm/pulls/1658"}}},"pull_request":{"url":"https://api.github.com/repos/ethereum/py-evm/pulls/1658","id":240242810,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQwMjQyODEw","html_url":"https://github.com/ethereum/py-evm/pull/1658","diff_url":"https://github.com/ethereum/py-evm/pull/1658.diff","patch_url":"https://github.com/ethereum/py-evm/pull/1658.patch","issue_url":"https://api.github.com/repos/ethereum/py-evm/issues/1658","number":1658,"state":"open","locked":false,"title":"[WIP] Add slashable helper","user":{"login":"ralexstokes","id":3113781,"node_id":"MDQ6VXNlcjMxMTM3ODE=","avatar_url":"https://avatars3.githubusercontent.com/u/3113781?v=4","gravatar_id":"","url":"https://api.github.com/users/ralexstokes","html_url":"https://github.com/ralexstokes","followers_url":"https://api.github.com/users/ralexstokes/followers","following_url":"https://api.github.com/users/ralexstokes/following{/other_user}","gists_url":"https://api.github.com/users/ralexstokes/gists{/gist_id}","starred_url":"https://api.github.com/users/ralexstokes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ralexstokes/subscriptions","organizations_url":"https://api.github.com/users/ralexstokes/orgs","repos_url":"https://api.github.com/users/ralexstokes/repos","events_url":"https://api.github.com/users/ralexstokes/events{/privacy}","received_events_url":"https://api.github.com/users/ralexstokes/received_events","type":"User","site_admin":false},"body":"### What was wrong?\r\n\r\nFixes #1636.\r\n\r\nMissing a helper function to verify a `SlashableVoteData` instance.\r\n\r\n### How was it fixed?\r\n\r\nImplemented the function and required auxillary functionality to get it working with current codebase. In particular, we are using a flat hash in lieu of the yet-to-be-stabilized `ssz` tree hash.\r\n\r\n#### Cute Animal Picture\r\n\r\n![put a cute animal picture link inside the parentheses](http://r.ddmcdn.com/w_624/s_f/o_1/cx_0/cy_17/cw_624/ch_416/APL/uploads/2014/06/cute-animals-pictures12.jpg)\r\n","created_at":"2018-12-20T17:13:08Z","updated_at":"2018-12-20T19:40:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4a77eda39355ce86713a1e568a940d19038b532a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ethereum/py-evm/pulls/1658/commits","review_comments_url":"https://api.github.com/repos/ethereum/py-evm/pulls/1658/comments","review_comment_url":"https://api.github.com/repos/ethereum/py-evm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ethereum/py-evm/issues/1658/comments","statuses_url":"https://api.github.com/repos/ethereum/py-evm/statuses/349c2e9788ddde3be67c69ad6b63e4cc0ca89a80","head":{"label":"ralexstokes:add-slashable-helper","ref":"add-slashable-helper","sha":"349c2e9788ddde3be67c69ad6b63e4cc0ca89a80","user":{"login":"ralexstokes","id":3113781,"node_id":"MDQ6VXNlcjMxMTM3ODE=","avatar_url":"https://avatars3.githubusercontent.com/u/3113781?v=4","gravatar_id":"","url":"https://api.github.com/users/ralexstokes","html_url":"https://github.com/ralexstokes","followers_url":"https://api.github.com/users/ralexstokes/followers","following_url":"https://api.github.com/users/ralexstokes/following{/other_user}","gists_url":"https://api.github.com/users/ralexstokes/gists{/gist_id}","starred_url":"https://api.github.com/users/ralexstokes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ralexstokes/subscriptions","organizations_url":"https://api.github.com/users/ralexstokes/orgs","repos_url":"https://api.github.com/users/ralexstokes/repos","events_url":"https://api.github.com/users/ralexstokes/events{/privacy}","received_events_url":"https://api.github.com/users/ralexstokes/received_events","type":"User","site_admin":false},"repo":{"id":162506375,"node_id":"MDEwOlJlcG9zaXRvcnkxNjI1MDYzNzU=","name":"py-evm","full_name":"ralexstokes/py-evm","private":false,"owner":{"login":"ralexstokes","id":3113781,"node_id":"MDQ6VXNlcjMxMTM3ODE=","avatar_url":"https://avatars3.githubusercontent.com/u/3113781?v=4","gravatar_id":"","url":"https://api.github.com/users/ralexstokes","html_url":"https://github.com/ralexstokes","followers_url":"https://api.github.com/users/ralexstokes/followers","following_url":"https://api.github.com/users/ralexstokes/following{/other_user}","gists_url":"https://api.github.com/users/ralexstokes/gists{/gist_id}","starred_url":"https://api.github.com/users/ralexstokes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ralexstokes/subscriptions","organizations_url":"https://api.github.com/users/ralexstokes/orgs","repos_url":"https://api.github.com/users/ralexstokes/repos","events_url":"https://api.github.com/users/ralexstokes/events{/privacy}","received_events_url":"https://api.github.com/users/ralexstokes/received_events","type":"User","site_admin":false},"html_url":"https://github.com/ralexstokes/py-evm","description":"A Python implementation of the Ethereum Virtual Machine","fork":true,"url":"https://api.github.com/repos/ralexstokes/py-evm","forks_url":"https://api.github.com/repos/ralexstokes/py-evm/forks","keys_url":"https://api.github.com/repos/ralexstokes/py-evm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ralexstokes/py-evm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ralexstokes/py-evm/teams","hooks_url":"https://api.github.com/repos/ralexstokes/py-evm/hooks","issue_events_url":"https://api.github.com/repos/ralexstokes/py-evm/issues/events{/number}","events_url":"https://api.github.com/repos/ralexstokes/py-evm/events","assignees_url":"https://api.github.com/repos/ralexstokes/py-evm/assignees{/user}","branches_url":"https://api.github.com/repos/ralexstokes/py-evm/branches{/branch}","tags_url":"https://api.github.com/repos/ralexstokes/py-evm/tags","blobs_url":"https://api.github.com/repos/ralexstokes/py-evm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ralexstokes/py-evm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ralexstokes/py-evm/git/refs{/sha}","trees_url":"https://api.github.com/repos/ralexstokes/py-evm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ralexstokes/py-evm/statuses/{sha}","languages_url":"https://api.github.com/repos/ralexstokes/py-evm/languages","stargazers_url":"https://api.github.com/repos/ralexstokes/py-evm/stargazers","contributors_url":"https://api.github.com/repos/ralexstokes/py-evm/contributors","subscribers_url":"https://api.github.com/repos/ralexstokes/py-evm/subscribers","subscription_url":"https://api.github.com/repos/ralexstokes/py-evm/subscription","commits_url":"https://api.github.com/repos/ralexstokes/py-evm/commits{/sha}","git_commits_url":"https://api.github.com/repos/ralexstokes/py-evm/git/commits{/sha}","comments_url":"https://api.github.com/repos/ralexstokes/py-evm/comments{/number}","issue_comment_url":"https://api.github.com/repos/ralexstokes/py-evm/issues/comments{/number}","contents_url":"https://api.github.com/repos/ralexstokes/py-evm/contents/{+path}","compare_url":"https://api.github.com/repos/ralexstokes/py-evm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ralexstokes/py-evm/merges","archive_url":"https://api.github.com/repos/ralexstokes/py-evm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ralexstokes/py-evm/downloads","issues_url":"https://api.github.com/repos/ralexstokes/py-evm/issues{/number}","pulls_url":"https://api.github.com/repos/ralexstokes/py-evm/pulls{/number}","milestones_url":"https://api.github.com/repos/ralexstokes/py-evm/milestones{/number}","notifications_url":"https://api.github.com/repos/ralexstokes/py-evm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ralexstokes/py-evm/labels{/name}","releases_url":"https://api.github.com/repos/ralexstokes/py-evm/releases{/id}","deployments_url":"https://api.github.com/repos/ralexstokes/py-evm/deployments","created_at":"2018-12-20T00:39:41Z","updated_at":"2018-12-20T00:39:44Z","pushed_at":"2018-12-20T17:07:50Z","git_url":"git://github.com/ralexstokes/py-evm.git","ssh_url":"git@github.com:ralexstokes/py-evm.git","clone_url":"https://github.com/ralexstokes/py-evm.git","svn_url":"https://github.com/ralexstokes/py-evm","homepage":"https://trinity.ethereum.org/","size":7412,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ethereum:master","ref":"master","sha":"59be468a814e49becea6a20a952b41e8ca442736","user":{"login":"ethereum","id":6250754,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYyNTA3NTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/6250754?v=4","gravatar_id":"","url":"https://api.github.com/users/ethereum","html_url":"https://github.com/ethereum","followers_url":"https://api.github.com/users/ethereum/followers","following_url":"https://api.github.com/users/ethereum/following{/other_user}","gists_url":"https://api.github.com/users/ethereum/gists{/gist_id}","starred_url":"https://api.github.com/users/ethereum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethereum/subscriptions","organizations_url":"https://api.github.com/users/ethereum/orgs","repos_url":"https://api.github.com/users/ethereum/repos","events_url":"https://api.github.com/users/ethereum/events{/privacy}","received_events_url":"https://api.github.com/users/ethereum/received_events","type":"Organization","site_admin":false},"repo":{"id":77478378,"node_id":"MDEwOlJlcG9zaXRvcnk3NzQ3ODM3OA==","name":"py-evm","full_name":"ethereum/py-evm","private":false,"owner":{"login":"ethereum","id":6250754,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYyNTA3NTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/6250754?v=4","gravatar_id":"","url":"https://api.github.com/users/ethereum","html_url":"https://github.com/ethereum","followers_url":"https://api.github.com/users/ethereum/followers","following_url":"https://api.github.com/users/ethereum/following{/other_user}","gists_url":"https://api.github.com/users/ethereum/gists{/gist_id}","starred_url":"https://api.github.com/users/ethereum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethereum/subscriptions","organizations_url":"https://api.github.com/users/ethereum/orgs","repos_url":"https://api.github.com/users/ethereum/repos","events_url":"https://api.github.com/users/ethereum/events{/privacy}","received_events_url":"https://api.github.com/users/ethereum/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/ethereum/py-evm","description":"A Python implementation of the Ethereum Virtual Machine","fork":false,"url":"https://api.github.com/repos/ethereum/py-evm","forks_url":"https://api.github.com/repos/ethereum/py-evm/forks","keys_url":"https://api.github.com/repos/ethereum/py-evm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ethereum/py-evm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ethereum/py-evm/teams","hooks_url":"https://api.github.com/repos/ethereum/py-evm/hooks","issue_events_url":"https://api.github.com/repos/ethereum/py-evm/issues/events{/number}","events_url":"https://api.github.com/repos/ethereum/py-evm/events","assignees_url":"https://api.github.com/repos/ethereum/py-evm/assignees{/user}","branches_url":"https://api.github.com/repos/ethereum/py-evm/branches{/branch}","tags_url":"https://api.github.com/repos/ethereum/py-evm/tags","blobs_url":"https://api.github.com/repos/ethereum/py-evm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ethereum/py-evm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ethereum/py-evm/git/refs{/sha}","trees_url":"https://api.github.com/repos/ethereum/py-evm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ethereum/py-evm/statuses/{sha}","languages_url":"https://api.github.com/repos/ethereum/py-evm/languages","stargazers_url":"https://api.github.com/repos/ethereum/py-evm/stargazers","contributors_url":"https://api.github.com/repos/ethereum/py-evm/contributors","subscribers_url":"https://api.github.com/repos/ethereum/py-evm/subscribers","subscription_url":"https://api.github.com/repos/ethereum/py-evm/subscription","commits_url":"https://api.github.com/repos/ethereum/py-evm/commits{/sha}","git_commits_url":"https://api.github.com/repos/ethereum/py-evm/git/commits{/sha}","comments_url":"https://api.github.com/repos/ethereum/py-evm/comments{/number}","issue_comment_url":"https://api.github.com/repos/ethereum/py-evm/issues/comments{/number}","contents_url":"https://api.github.com/repos/ethereum/py-evm/contents/{+path}","compare_url":"https://api.github.com/repos/ethereum/py-evm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ethereum/py-evm/merges","archive_url":"https://api.github.com/repos/ethereum/py-evm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ethereum/py-evm/downloads","issues_url":"https://api.github.com/repos/ethereum/py-evm/issues{/number}","pulls_url":"https://api.github.com/repos/ethereum/py-evm/pulls{/number}","milestones_url":"https://api.github.com/repos/ethereum/py-evm/milestones{/number}","notifications_url":"https://api.github.com/repos/ethereum/py-evm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ethereum/py-evm/labels{/name}","releases_url":"https://api.github.com/repos/ethereum/py-evm/releases{/id}","deployments_url":"https://api.github.com/repos/ethereum/py-evm/deployments","created_at":"2016-12-27T19:36:00Z","updated_at":"2018-12-20T19:32:46Z","pushed_at":"2018-12-20T19:32:40Z","git_url":"git://github.com/ethereum/py-evm.git","ssh_url":"git@github.com:ethereum/py-evm.git","clone_url":"https://github.com/ethereum/py-evm.git","svn_url":"https://github.com/ethereum/py-evm","homepage":"https://trinity.ethereum.org/","size":7427,"stargazers_count":761,"watchers_count":761,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":339,"mirror_url":null,"archived":false,"open_issues_count":172,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":339,"open_issues":172,"watchers":761,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ethereum/py-evm/pulls/1658"},"html":{"href":"https://github.com/ethereum/py-evm/pull/1658"},"issue":{"href":"https://api.github.com/repos/ethereum/py-evm/issues/1658"},"comments":{"href":"https://api.github.com/repos/ethereum/py-evm/issues/1658/comments"},"review_comments":{"href":"https://api.github.com/repos/ethereum/py-evm/pulls/1658/comments"},"review_comment":{"href":"https://api.github.com/repos/ethereum/py-evm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ethereum/py-evm/pulls/1658/commits"},"statuses":{"href":"https://api.github.com/repos/ethereum/py-evm/statuses/349c2e9788ddde3be67c69ad6b63e4cc0ca89a80"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"hwwhww"}}