{"action":"created","comment":{"url":"https://api.github.com/repos/ethereum/eth2.0-specs/pulls/comments/238339046","pull_request_review_id":178462758,"id":238339046,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzODMzOTA0Ng==","diff_hunk":"@@ -122,3 +131,118 @@ Verify that the `shard_block_combined_data_root` is the output of these function\n ### Shard block fork choice rule\n \n The fork choice rule for any shard is LMD GHOST using the validators currently assigned to that shard, but instead of being rooted in the genesis it is rooted in the block referenced in the most recent accepted crosslink (ie. `state.crosslinks[shard].shard_block_hash`). Only blocks whose `beacon_chain_ref` is the block in the main beacon chain at the specified `slot` should be considered (if the beacon chain skips a slot, then the block at that slot is considered to be the block in the beacon chain at the highest slot lower than a slot).\n+\n+## Changes to beacon chain\n+\n+Change to attestation verification:\n+\n+* Let `expected_depth = log2(SHARD_BLOCK_SIZE // SHARD_CHUNK_SIZE * next_power_of_2(slot - last_crosslink_slot))`. For each integer `i = 0, 1`, let `messages[i]` be `AttestationData(slot, shard, parent_hashes, shard_block_hash, expected_depth, attestation_indices.total_validator_count, justified_slot)`.\n+\n+A `ProofOfCustodyChallenge` has the following fields:\n+\n+```python\n+{\n+    # Which validator is responding\n+    'responder_index': 'uint64',\n+    # Seed hash\n+    'seed_hash': 'hash32',\n+    # Depth\n+    'depth': 'uint64',\n+    # Index in tree\n+    'data_index': 'uint64',\n+    # Expiry date\n+    'expiry_slot': 'uint64',\n+    # Who is challenging\n+    'challenger_index': 'uint64',\n+    # Data root\n+    'data_root': 'hash32',\n+    # Proof of custody bit\n+    'bit': 'bool'\n+}\n+```\n+\n+\n+\n+Three new types of `SpecialObject` records:\n+\n+#### PROOF_OF_CUSTODY_SEED_CHANGE\n+\n+```python\n+{\n+    'index': 'uint64',\n+    'new_commitment': 'hash32',\n+    'signature': ['uint256']\n+}\n+```\n+\n+* Let `signed_data` be `bytes8(fork_version) + new_commitment`.\n+* Verify that `BLSVerify(pub=state.validators[index].pubkey, msg=hash(signed_data), sig=signature)` passes.\n+* Verify that `hash(new_commitment) = state.validators[index].proof_of_custody_commitment`.\n+* Verify that `block.slot >= state.validators[index].proof_of_custody_last_change + PROOF_OF_CUSTODY_MIN_CHANGE_PERIOD`.\n+* Set `state.validators[index].proof_of_custody_second_last_change` to `state.validators[index].proof_of_custody_last_change`.\n+* Set `state.validators[index].proof_of_custody_last_change` to `block.slot`.\n+\n+#### PROOF_OF_CUSTODY_CHALLENGE\n+\n+```\n+{\n+    'attestation': SpecialAttestationData,\n+    'validator_index': 'uint64',\n+    'data_index': 'uint64',\n+}\n+```\n+\n+Perform the following checks:\n+\n+* Verify that the attestation is valid.\n+* Verify that `attestation.slot > state.validators[index].proof_of_custody_second_last_change`.\n+* Verify that `validator_index in attestation.aggregate_sig_poc_0_indices` or `validator_index in attestation.aggregate_sig_poc_1_indices`; if the former, let `bit = False`, else `bit = True`.\n+* Verify that `state.validators[index].status == ACTIVE` or `state.validators[index].status == PENDING_EXIT` and `block.slot < state.validators[index].exit_slot + PROOF_OF_CUSTODY_MIN_CHANGE_PERIOD`","path":"specs/core/1_shard-data-chains.md","position":96,"original_position":96,"commit_id":"4eb96cf3ffca3355289708cb628452afe5d7a248","original_commit_id":"4eb96cf3ffca3355289708cb628452afe5d7a248","user":{"login":"djrtwo","id":1433595,"node_id":"MDQ6VXNlcjE0MzM1OTU=","avatar_url":"https://avatars0.githubusercontent.com/u/1433595?v=4","gravatar_id":"","url":"https://api.github.com/users/djrtwo","html_url":"https://github.com/djrtwo","followers_url":"https://api.github.com/users/djrtwo/followers","following_url":"https://api.github.com/users/djrtwo/following{/other_user}","gists_url":"https://api.github.com/users/djrtwo/gists{/gist_id}","starred_url":"https://api.github.com/users/djrtwo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djrtwo/subscriptions","organizations_url":"https://api.github.com/users/djrtwo/orgs","repos_url":"https://api.github.com/users/djrtwo/repos","events_url":"https://api.github.com/users/djrtwo/events{/privacy}","received_events_url":"https://api.github.com/users/djrtwo/received_events","type":"User","site_admin":false},"body":"Should a validator have to respond to PoC challenges if `EXITED` but not yet `WITHDRAWN`?\r\nI suppose not. An `EXITED` validator shouldn't have to be online, and can only be punished for previously signed slashable messages.","created_at":"2018-12-03T16:26:59Z","updated_at":"2018-12-03T16:52:03Z","html_url":"https://github.com/ethereum/eth2.0-specs/pull/145#discussion_r238339046","pull_request_url":"https://api.github.com/repos/ethereum/eth2.0-specs/pulls/145","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/ethereum/eth2.0-specs/pulls/comments/238339046"},"html":{"href":"https://github.com/ethereum/eth2.0-specs/pull/145#discussion_r238339046"},"pull_request":{"href":"https://api.github.com/repos/ethereum/eth2.0-specs/pulls/145"}}},"pull_request":{"url":"https://api.github.com/repos/ethereum/eth2.0-specs/pulls/145","id":231800721,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMxODAwNzIx","html_url":"https://github.com/ethereum/eth2.0-specs/pull/145","diff_url":"https://github.com/ethereum/eth2.0-specs/pull/145.diff","patch_url":"https://github.com/ethereum/eth2.0-specs/pull/145.patch","issue_url":"https://api.github.com/repos/ethereum/eth2.0-specs/issues/145","number":145,"state":"open","locked":false,"title":"Add proofs of custody","user":{"login":"vbuterin","id":2230894,"node_id":"MDQ6VXNlcjIyMzA4OTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/2230894?v=4","gravatar_id":"","url":"https://api.github.com/users/vbuterin","html_url":"https://github.com/vbuterin","followers_url":"https://api.github.com/users/vbuterin/followers","following_url":"https://api.github.com/users/vbuterin/following{/other_user}","gists_url":"https://api.github.com/users/vbuterin/gists{/gist_id}","starred_url":"https://api.github.com/users/vbuterin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vbuterin/subscriptions","organizations_url":"https://api.github.com/users/vbuterin/orgs","repos_url":"https://api.github.com/users/vbuterin/repos","events_url":"https://api.github.com/users/vbuterin/events{/privacy}","received_events_url":"https://api.github.com/users/vbuterin/received_events","type":"User","site_admin":false},"body":"Introduces the following major changes:\r\n\r\n* The bitfield now has 2 bits per validator; the second bit is a proof of custody bit\r\n* Three new special objects, one for updating a validator's proof of custody seed, one for making a challenge, one for responding to a challenge\r\n* If a validator fails to respond on time (~3 months) they get kicked out and penalized.","created_at":"2018-11-18T17:11:31Z","updated_at":"2018-12-03T16:52:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eddf04b9be9c21538c506f2abaef8424b6fa9e54","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ethereum/eth2.0-specs/pulls/145/commits","review_comments_url":"https://api.github.com/repos/ethereum/eth2.0-specs/pulls/145/comments","review_comment_url":"https://api.github.com/repos/ethereum/eth2.0-specs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ethereum/eth2.0-specs/issues/145/comments","statuses_url":"https://api.github.com/repos/ethereum/eth2.0-specs/statuses/4eb96cf3ffca3355289708cb628452afe5d7a248","head":{"label":"ethereum:vbuterin-patch-8","ref":"vbuterin-patch-8","sha":"4eb96cf3ffca3355289708cb628452afe5d7a248","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":149554797,"node_id":"MDEwOlJlcG9zaXRvcnkxNDk1NTQ3OTc=","name":"eth2.0-specs","full_name":"ethereum/eth2.0-specs","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/eth2.0-specs","description":"Ethereum 2.0 Specifications","fork":false,"url":"https://api.github.com/repos/ethereum/eth2.0-specs","forks_url":"https://api.github.com/repos/ethereum/eth2.0-specs/forks","keys_url":"https://api.github.com/repos/ethereum/eth2.0-specs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ethereum/eth2.0-specs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ethereum/eth2.0-specs/teams","hooks_url":"https://api.github.com/repos/ethereum/eth2.0-specs/hooks","issue_events_url":"https://api.github.com/repos/ethereum/eth2.0-specs/issues/events{/number}","events_url":"https://api.github.com/repos/ethereum/eth2.0-specs/events","assignees_url":"https://api.github.com/repos/ethereum/eth2.0-specs/assignees{/user}","branches_url":"https://api.github.com/repos/ethereum/eth2.0-specs/branches{/branch}","tags_url":"https://api.github.com/repos/ethereum/eth2.0-specs/tags","blobs_url":"https://api.github.com/repos/ethereum/eth2.0-specs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ethereum/eth2.0-specs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ethereum/eth2.0-specs/git/refs{/sha}","trees_url":"https://api.github.com/repos/ethereum/eth2.0-specs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ethereum/eth2.0-specs/statuses/{sha}","languages_url":"https://api.github.com/repos/ethereum/eth2.0-specs/languages","stargazers_url":"https://api.github.com/repos/ethereum/eth2.0-specs/stargazers","contributors_url":"https://api.github.com/repos/ethereum/eth2.0-specs/contributors","subscribers_url":"https://api.github.com/repos/ethereum/eth2.0-specs/subscribers","subscription_url":"https://api.github.com/repos/ethereum/eth2.0-specs/subscription","commits_url":"https://api.github.com/repos/ethereum/eth2.0-specs/commits{/sha}","git_commits_url":"https://api.github.com/repos/ethereum/eth2.0-specs/git/commits{/sha}","comments_url":"https://api.github.com/repos/ethereum/eth2.0-specs/comments{/number}","issue_comment_url":"https://api.github.com/repos/ethereum/eth2.0-specs/issues/comments{/number}","contents_url":"https://api.github.com/repos/ethereum/eth2.0-specs/contents/{+path}","compare_url":"https://api.github.com/repos/ethereum/eth2.0-specs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ethereum/eth2.0-specs/merges","archive_url":"https://api.github.com/repos/ethereum/eth2.0-specs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ethereum/eth2.0-specs/downloads","issues_url":"https://api.github.com/repos/ethereum/eth2.0-specs/issues{/number}","pulls_url":"https://api.github.com/repos/ethereum/eth2.0-specs/pulls{/number}","milestones_url":"https://api.github.com/repos/ethereum/eth2.0-specs/milestones{/number}","notifications_url":"https://api.github.com/repos/ethereum/eth2.0-specs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ethereum/eth2.0-specs/labels{/name}","releases_url":"https://api.github.com/repos/ethereum/eth2.0-specs/releases{/id}","deployments_url":"https://api.github.com/repos/ethereum/eth2.0-specs/deployments","created_at":"2018-09-20T05:12:54Z","updated_at":"2018-12-03T14:38:05Z","pushed_at":"2018-12-03T16:03:10Z","git_url":"git://github.com/ethereum/eth2.0-specs.git","ssh_url":"git@github.com:ethereum/eth2.0-specs.git","clone_url":"https://github.com/ethereum/eth2.0-specs.git","svn_url":"https://github.com/ethereum/eth2.0-specs","homepage":null,"size":1060,"stargazers_count":230,"watchers_count":230,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":56,"mirror_url":null,"archived":false,"open_issues_count":26,"license":null,"forks":56,"open_issues":26,"watchers":230,"default_branch":"master"}},"base":{"label":"ethereum:master","ref":"master","sha":"f6a14e68e946570a0ec61cd05f40c19fb5bc2a64","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":149554797,"node_id":"MDEwOlJlcG9zaXRvcnkxNDk1NTQ3OTc=","name":"eth2.0-specs","full_name":"ethereum/eth2.0-specs","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/eth2.0-specs","description":"Ethereum 2.0 Specifications","fork":false,"url":"https://api.github.com/repos/ethereum/eth2.0-specs","forks_url":"https://api.github.com/repos/ethereum/eth2.0-specs/forks","keys_url":"https://api.github.com/repos/ethereum/eth2.0-specs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ethereum/eth2.0-specs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ethereum/eth2.0-specs/teams","hooks_url":"https://api.github.com/repos/ethereum/eth2.0-specs/hooks","issue_events_url":"https://api.github.com/repos/ethereum/eth2.0-specs/issues/events{/number}","events_url":"https://api.github.com/repos/ethereum/eth2.0-specs/events","assignees_url":"https://api.github.com/repos/ethereum/eth2.0-specs/assignees{/user}","branches_url":"https://api.github.com/repos/ethereum/eth2.0-specs/branches{/branch}","tags_url":"https://api.github.com/repos/ethereum/eth2.0-specs/tags","blobs_url":"https://api.github.com/repos/ethereum/eth2.0-specs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ethereum/eth2.0-specs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ethereum/eth2.0-specs/git/refs{/sha}","trees_url":"https://api.github.com/repos/ethereum/eth2.0-specs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ethereum/eth2.0-specs/statuses/{sha}","languages_url":"https://api.github.com/repos/ethereum/eth2.0-specs/languages","stargazers_url":"https://api.github.com/repos/ethereum/eth2.0-specs/stargazers","contributors_url":"https://api.github.com/repos/ethereum/eth2.0-specs/contributors","subscribers_url":"https://api.github.com/repos/ethereum/eth2.0-specs/subscribers","subscription_url":"https://api.github.com/repos/ethereum/eth2.0-specs/subscription","commits_url":"https://api.github.com/repos/ethereum/eth2.0-specs/commits{/sha}","git_commits_url":"https://api.github.com/repos/ethereum/eth2.0-specs/git/commits{/sha}","comments_url":"https://api.github.com/repos/ethereum/eth2.0-specs/comments{/number}","issue_comment_url":"https://api.github.com/repos/ethereum/eth2.0-specs/issues/comments{/number}","contents_url":"https://api.github.com/repos/ethereum/eth2.0-specs/contents/{+path}","compare_url":"https://api.github.com/repos/ethereum/eth2.0-specs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ethereum/eth2.0-specs/merges","archive_url":"https://api.github.com/repos/ethereum/eth2.0-specs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ethereum/eth2.0-specs/downloads","issues_url":"https://api.github.com/repos/ethereum/eth2.0-specs/issues{/number}","pulls_url":"https://api.github.com/repos/ethereum/eth2.0-specs/pulls{/number}","milestones_url":"https://api.github.com/repos/ethereum/eth2.0-specs/milestones{/number}","notifications_url":"https://api.github.com/repos/ethereum/eth2.0-specs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ethereum/eth2.0-specs/labels{/name}","releases_url":"https://api.github.com/repos/ethereum/eth2.0-specs/releases{/id}","deployments_url":"https://api.github.com/repos/ethereum/eth2.0-specs/deployments","created_at":"2018-09-20T05:12:54Z","updated_at":"2018-12-03T14:38:05Z","pushed_at":"2018-12-03T16:03:10Z","git_url":"git://github.com/ethereum/eth2.0-specs.git","ssh_url":"git@github.com:ethereum/eth2.0-specs.git","clone_url":"https://github.com/ethereum/eth2.0-specs.git","svn_url":"https://github.com/ethereum/eth2.0-specs","homepage":null,"size":1060,"stargazers_count":230,"watchers_count":230,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":56,"mirror_url":null,"archived":false,"open_issues_count":26,"license":null,"forks":56,"open_issues":26,"watchers":230,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ethereum/eth2.0-specs/pulls/145"},"html":{"href":"https://github.com/ethereum/eth2.0-specs/pull/145"},"issue":{"href":"https://api.github.com/repos/ethereum/eth2.0-specs/issues/145"},"comments":{"href":"https://api.github.com/repos/ethereum/eth2.0-specs/issues/145/comments"},"review_comments":{"href":"https://api.github.com/repos/ethereum/eth2.0-specs/pulls/145/comments"},"review_comment":{"href":"https://api.github.com/repos/ethereum/eth2.0-specs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ethereum/eth2.0-specs/pulls/145/commits"},"statuses":{"href":"https://api.github.com/repos/ethereum/eth2.0-specs/statuses/4eb96cf3ffca3355289708cb628452afe5d7a248"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"djrtwo"}}