{"action":"created","comment":{"url":"https://api.github.com/repos/prysmaticlabs/prysm/pulls/comments/282318970","pull_request_review_id":235374515,"id":282318970,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI4MjMxODk3MA==","diff_hunk":"@@ -271,11 +285,10 @@ func (db *BeaconDB) FinalizedState() (*pb.BeaconState, error) {\n \n // HistoricalStateFromSlot retrieves the state that is closest to the input slot,\n // while being smaller than or equal to the input slot.\n-func (db *BeaconDB) HistoricalStateFromSlot(ctx context.Context, slot uint64) (*pb.BeaconState, error) {\n+func (db *BeaconDB) HistoricalStateFromSlot(ctx context.Context, slot uint64, blockRoot [32]byte) (*pb.BeaconState, error) {","path":"beacon-chain/db/state.go","position":86,"original_position":86,"commit_id":"364fd83dd6b1edff121d42418ee102481578db05","original_commit_id":"364fd83dd6b1edff121d42418ee102481578db05","user":{"login":"nisdas","id":33201827,"node_id":"MDQ6VXNlcjMzMjAxODI3","avatar_url":"https://avatars2.githubusercontent.com/u/33201827?v=4","gravatar_id":"","url":"https://api.github.com/users/nisdas","html_url":"https://github.com/nisdas","followers_url":"https://api.github.com/users/nisdas/followers","following_url":"https://api.github.com/users/nisdas/following{/other_user}","gists_url":"https://api.github.com/users/nisdas/gists{/gist_id}","starred_url":"https://api.github.com/users/nisdas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nisdas/subscriptions","organizations_url":"https://api.github.com/users/nisdas/orgs","repos_url":"https://api.github.com/users/nisdas/repos","events_url":"https://api.github.com/users/nisdas/events{/privacy}","received_events_url":"https://api.github.com/users/nisdas/received_events","type":"User","site_admin":false},"body":"maybe rename this to `HistoricalStateFromBlock` ?","created_at":"2019-05-09T02:24:55Z","updated_at":"2019-05-09T02:32:05Z","html_url":"https://github.com/prysmaticlabs/prysm/pull/2540#discussion_r282318970","pull_request_url":"https://api.github.com/repos/prysmaticlabs/prysm/pulls/2540","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/prysmaticlabs/prysm/pulls/comments/282318970"},"html":{"href":"https://github.com/prysmaticlabs/prysm/pull/2540#discussion_r282318970"},"pull_request":{"href":"https://api.github.com/repos/prysmaticlabs/prysm/pulls/2540"}}},"pull_request":{"url":"https://api.github.com/repos/prysmaticlabs/prysm/pulls/2540","id":277131396,"node_id":"MDExOlB1bGxSZXF1ZXN0Mjc3MTMxMzk2","html_url":"https://github.com/prysmaticlabs/prysm/pull/2540","diff_url":"https://github.com/prysmaticlabs/prysm/pull/2540.diff","patch_url":"https://github.com/prysmaticlabs/prysm/pull/2540.patch","issue_url":"https://api.github.com/repos/prysmaticlabs/prysm/issues/2540","number":2540,"state":"open","locked":false,"title":"Refactor DB Package to Enable Multiple Blocks/States at Slots","user":{"login":"rauljordan","id":5572669,"node_id":"MDQ6VXNlcjU1NzI2Njk=","avatar_url":"https://avatars3.githubusercontent.com/u/5572669?v=4","gravatar_id":"","url":"https://api.github.com/users/rauljordan","html_url":"https://github.com/rauljordan","followers_url":"https://api.github.com/users/rauljordan/followers","following_url":"https://api.github.com/users/rauljordan/following{/other_user}","gists_url":"https://api.github.com/users/rauljordan/gists{/gist_id}","starred_url":"https://api.github.com/users/rauljordan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rauljordan/subscriptions","organizations_url":"https://api.github.com/users/rauljordan/orgs","repos_url":"https://api.github.com/users/rauljordan/repos","events_url":"https://api.github.com/users/rauljordan/events{/privacy}","received_events_url":"https://api.github.com/users/rauljordan/received_events","type":"User","site_admin":false},"body":"This PR eliminates all instances of `BlockBySlot`, as forks can cause several blocks to be saved at the same slot in our runtime. Our code does not account for this and tries to fetch whatever block exists at a certain slot, possibly leading to deviations and discrepancies, and in worst case scenarios, intense reorgs.\r\n\r\nThis PR refactors the `db` package to allow for the above, and also fixes the block children algorithms throughout the repo. ","created_at":"2019-05-08T19:53:11Z","updated_at":"2019-05-09T02:32:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"602a9d9754f5a396d97e4da156ee4922c3ec860b","assignee":{"login":"rauljordan","id":5572669,"node_id":"MDQ6VXNlcjU1NzI2Njk=","avatar_url":"https://avatars3.githubusercontent.com/u/5572669?v=4","gravatar_id":"","url":"https://api.github.com/users/rauljordan","html_url":"https://github.com/rauljordan","followers_url":"https://api.github.com/users/rauljordan/followers","following_url":"https://api.github.com/users/rauljordan/following{/other_user}","gists_url":"https://api.github.com/users/rauljordan/gists{/gist_id}","starred_url":"https://api.github.com/users/rauljordan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rauljordan/subscriptions","organizations_url":"https://api.github.com/users/rauljordan/orgs","repos_url":"https://api.github.com/users/rauljordan/repos","events_url":"https://api.github.com/users/rauljordan/events{/privacy}","received_events_url":"https://api.github.com/users/rauljordan/received_events","type":"User","site_admin":false},"assignees":[{"login":"rauljordan","id":5572669,"node_id":"MDQ6VXNlcjU1NzI2Njk=","avatar_url":"https://avatars3.githubusercontent.com/u/5572669?v=4","gravatar_id":"","url":"https://api.github.com/users/rauljordan","html_url":"https://github.com/rauljordan","followers_url":"https://api.github.com/users/rauljordan/followers","following_url":"https://api.github.com/users/rauljordan/following{/other_user}","gists_url":"https://api.github.com/users/rauljordan/gists{/gist_id}","starred_url":"https://api.github.com/users/rauljordan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rauljordan/subscriptions","organizations_url":"https://api.github.com/users/rauljordan/orgs","repos_url":"https://api.github.com/users/rauljordan/repos","events_url":"https://api.github.com/users/rauljordan/events{/privacy}","received_events_url":"https://api.github.com/users/rauljordan/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"terencechain","id":21316537,"node_id":"MDQ6VXNlcjIxMzE2NTM3","avatar_url":"https://avatars1.githubusercontent.com/u/21316537?v=4","gravatar_id":"","url":"https://api.github.com/users/terencechain","html_url":"https://github.com/terencechain","followers_url":"https://api.github.com/users/terencechain/followers","following_url":"https://api.github.com/users/terencechain/following{/other_user}","gists_url":"https://api.github.com/users/terencechain/gists{/gist_id}","starred_url":"https://api.github.com/users/terencechain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/terencechain/subscriptions","organizations_url":"https://api.github.com/users/terencechain/orgs","repos_url":"https://api.github.com/users/terencechain/repos","events_url":"https://api.github.com/users/terencechain/events{/privacy}","received_events_url":"https://api.github.com/users/terencechain/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":1085358164,"node_id":"MDU6TGFiZWwxMDg1MzU4MTY0","url":"https://api.github.com/repos/prysmaticlabs/prysm/labels/Priority:%20Critical","name":"Priority: Critical","color":"f7262f","default":false},{"id":1039139798,"node_id":"MDU6TGFiZWwxMDM5MTM5Nzk4","url":"https://api.github.com/repos/prysmaticlabs/prysm/labels/Ready%20For%20Review","name":"Ready For Review","color":"f4ad6b","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/prysmaticlabs/prysm/pulls/2540/commits","review_comments_url":"https://api.github.com/repos/prysmaticlabs/prysm/pulls/2540/comments","review_comment_url":"https://api.github.com/repos/prysmaticlabs/prysm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/prysmaticlabs/prysm/issues/2540/comments","statuses_url":"https://api.github.com/repos/prysmaticlabs/prysm/statuses/364fd83dd6b1edff121d42418ee102481578db05","head":{"label":"prysmaticlabs:prefixed-blocks","ref":"prefixed-blocks","sha":"364fd83dd6b1edff121d42418ee102481578db05","user":{"login":"prysmaticlabs","id":35349758,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1MzQ5NzU4","avatar_url":"https://avatars2.githubusercontent.com/u/35349758?v=4","gravatar_id":"","url":"https://api.github.com/users/prysmaticlabs","html_url":"https://github.com/prysmaticlabs","followers_url":"https://api.github.com/users/prysmaticlabs/followers","following_url":"https://api.github.com/users/prysmaticlabs/following{/other_user}","gists_url":"https://api.github.com/users/prysmaticlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/prysmaticlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prysmaticlabs/subscriptions","organizations_url":"https://api.github.com/users/prysmaticlabs/orgs","repos_url":"https://api.github.com/users/prysmaticlabs/repos","events_url":"https://api.github.com/users/prysmaticlabs/events{/privacy}","received_events_url":"https://api.github.com/users/prysmaticlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":117156031,"node_id":"MDEwOlJlcG9zaXRvcnkxMTcxNTYwMzE=","name":"prysm","full_name":"prysmaticlabs/prysm","private":false,"owner":{"login":"prysmaticlabs","id":35349758,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1MzQ5NzU4","avatar_url":"https://avatars2.githubusercontent.com/u/35349758?v=4","gravatar_id":"","url":"https://api.github.com/users/prysmaticlabs","html_url":"https://github.com/prysmaticlabs","followers_url":"https://api.github.com/users/prysmaticlabs/followers","following_url":"https://api.github.com/users/prysmaticlabs/following{/other_user}","gists_url":"https://api.github.com/users/prysmaticlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/prysmaticlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prysmaticlabs/subscriptions","organizations_url":"https://api.github.com/users/prysmaticlabs/orgs","repos_url":"https://api.github.com/users/prysmaticlabs/repos","events_url":"https://api.github.com/users/prysmaticlabs/events{/privacy}","received_events_url":"https://api.github.com/users/prysmaticlabs/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/prysmaticlabs/prysm","description":"Go implementation of the Ethereum 2.0 protocol","fork":false,"url":"https://api.github.com/repos/prysmaticlabs/prysm","forks_url":"https://api.github.com/repos/prysmaticlabs/prysm/forks","keys_url":"https://api.github.com/repos/prysmaticlabs/prysm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/prysmaticlabs/prysm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/prysmaticlabs/prysm/teams","hooks_url":"https://api.github.com/repos/prysmaticlabs/prysm/hooks","issue_events_url":"https://api.github.com/repos/prysmaticlabs/prysm/issues/events{/number}","events_url":"https://api.github.com/repos/prysmaticlabs/prysm/events","assignees_url":"https://api.github.com/repos/prysmaticlabs/prysm/assignees{/user}","branches_url":"https://api.github.com/repos/prysmaticlabs/prysm/branches{/branch}","tags_url":"https://api.github.com/repos/prysmaticlabs/prysm/tags","blobs_url":"https://api.github.com/repos/prysmaticlabs/prysm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/prysmaticlabs/prysm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/prysmaticlabs/prysm/git/refs{/sha}","trees_url":"https://api.github.com/repos/prysmaticlabs/prysm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/prysmaticlabs/prysm/statuses/{sha}","languages_url":"https://api.github.com/repos/prysmaticlabs/prysm/languages","stargazers_url":"https://api.github.com/repos/prysmaticlabs/prysm/stargazers","contributors_url":"https://api.github.com/repos/prysmaticlabs/prysm/contributors","subscribers_url":"https://api.github.com/repos/prysmaticlabs/prysm/subscribers","subscription_url":"https://api.github.com/repos/prysmaticlabs/prysm/subscription","commits_url":"https://api.github.com/repos/prysmaticlabs/prysm/commits{/sha}","git_commits_url":"https://api.github.com/repos/prysmaticlabs/prysm/git/commits{/sha}","comments_url":"https://api.github.com/repos/prysmaticlabs/prysm/comments{/number}","issue_comment_url":"https://api.github.com/repos/prysmaticlabs/prysm/issues/comments{/number}","contents_url":"https://api.github.com/repos/prysmaticlabs/prysm/contents/{+path}","compare_url":"https://api.github.com/repos/prysmaticlabs/prysm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/prysmaticlabs/prysm/merges","archive_url":"https://api.github.com/repos/prysmaticlabs/prysm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/prysmaticlabs/prysm/downloads","issues_url":"https://api.github.com/repos/prysmaticlabs/prysm/issues{/number}","pulls_url":"https://api.github.com/repos/prysmaticlabs/prysm/pulls{/number}","milestones_url":"https://api.github.com/repos/prysmaticlabs/prysm/milestones{/number}","notifications_url":"https://api.github.com/repos/prysmaticlabs/prysm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/prysmaticlabs/prysm/labels{/name}","releases_url":"https://api.github.com/repos/prysmaticlabs/prysm/releases{/id}","deployments_url":"https://api.github.com/repos/prysmaticlabs/prysm/deployments","created_at":"2018-01-11T21:31:33Z","updated_at":"2019-05-09T00:27:34Z","pushed_at":"2019-05-09T01:57:28Z","git_url":"git://github.com/prysmaticlabs/prysm.git","ssh_url":"git@github.com:prysmaticlabs/prysm.git","clone_url":"https://github.com/prysmaticlabs/prysm.git","svn_url":"https://github.com/prysmaticlabs/prysm","homepage":"https://prysmaticlabs.com/","size":118664,"stargazers_count":618,"watchers_count":618,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":127,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":79,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":127,"open_issues":79,"watchers":618,"default_branch":"master"}},"base":{"label":"prysmaticlabs:master","ref":"master","sha":"7c47db0015fc7ca93a2dc9df4b8a088d1bbde4c5","user":{"login":"prysmaticlabs","id":35349758,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1MzQ5NzU4","avatar_url":"https://avatars2.githubusercontent.com/u/35349758?v=4","gravatar_id":"","url":"https://api.github.com/users/prysmaticlabs","html_url":"https://github.com/prysmaticlabs","followers_url":"https://api.github.com/users/prysmaticlabs/followers","following_url":"https://api.github.com/users/prysmaticlabs/following{/other_user}","gists_url":"https://api.github.com/users/prysmaticlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/prysmaticlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prysmaticlabs/subscriptions","organizations_url":"https://api.github.com/users/prysmaticlabs/orgs","repos_url":"https://api.github.com/users/prysmaticlabs/repos","events_url":"https://api.github.com/users/prysmaticlabs/events{/privacy}","received_events_url":"https://api.github.com/users/prysmaticlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":117156031,"node_id":"MDEwOlJlcG9zaXRvcnkxMTcxNTYwMzE=","name":"prysm","full_name":"prysmaticlabs/prysm","private":false,"owner":{"login":"prysmaticlabs","id":35349758,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1MzQ5NzU4","avatar_url":"https://avatars2.githubusercontent.com/u/35349758?v=4","gravatar_id":"","url":"https://api.github.com/users/prysmaticlabs","html_url":"https://github.com/prysmaticlabs","followers_url":"https://api.github.com/users/prysmaticlabs/followers","following_url":"https://api.github.com/users/prysmaticlabs/following{/other_user}","gists_url":"https://api.github.com/users/prysmaticlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/prysmaticlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prysmaticlabs/subscriptions","organizations_url":"https://api.github.com/users/prysmaticlabs/orgs","repos_url":"https://api.github.com/users/prysmaticlabs/repos","events_url":"https://api.github.com/users/prysmaticlabs/events{/privacy}","received_events_url":"https://api.github.com/users/prysmaticlabs/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/prysmaticlabs/prysm","description":"Go implementation of the Ethereum 2.0 protocol","fork":false,"url":"https://api.github.com/repos/prysmaticlabs/prysm","forks_url":"https://api.github.com/repos/prysmaticlabs/prysm/forks","keys_url":"https://api.github.com/repos/prysmaticlabs/prysm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/prysmaticlabs/prysm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/prysmaticlabs/prysm/teams","hooks_url":"https://api.github.com/repos/prysmaticlabs/prysm/hooks","issue_events_url":"https://api.github.com/repos/prysmaticlabs/prysm/issues/events{/number}","events_url":"https://api.github.com/repos/prysmaticlabs/prysm/events","assignees_url":"https://api.github.com/repos/prysmaticlabs/prysm/assignees{/user}","branches_url":"https://api.github.com/repos/prysmaticlabs/prysm/branches{/branch}","tags_url":"https://api.github.com/repos/prysmaticlabs/prysm/tags","blobs_url":"https://api.github.com/repos/prysmaticlabs/prysm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/prysmaticlabs/prysm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/prysmaticlabs/prysm/git/refs{/sha}","trees_url":"https://api.github.com/repos/prysmaticlabs/prysm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/prysmaticlabs/prysm/statuses/{sha}","languages_url":"https://api.github.com/repos/prysmaticlabs/prysm/languages","stargazers_url":"https://api.github.com/repos/prysmaticlabs/prysm/stargazers","contributors_url":"https://api.github.com/repos/prysmaticlabs/prysm/contributors","subscribers_url":"https://api.github.com/repos/prysmaticlabs/prysm/subscribers","subscription_url":"https://api.github.com/repos/prysmaticlabs/prysm/subscription","commits_url":"https://api.github.com/repos/prysmaticlabs/prysm/commits{/sha}","git_commits_url":"https://api.github.com/repos/prysmaticlabs/prysm/git/commits{/sha}","comments_url":"https://api.github.com/repos/prysmaticlabs/prysm/comments{/number}","issue_comment_url":"https://api.github.com/repos/prysmaticlabs/prysm/issues/comments{/number}","contents_url":"https://api.github.com/repos/prysmaticlabs/prysm/contents/{+path}","compare_url":"https://api.github.com/repos/prysmaticlabs/prysm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/prysmaticlabs/prysm/merges","archive_url":"https://api.github.com/repos/prysmaticlabs/prysm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/prysmaticlabs/prysm/downloads","issues_url":"https://api.github.com/repos/prysmaticlabs/prysm/issues{/number}","pulls_url":"https://api.github.com/repos/prysmaticlabs/prysm/pulls{/number}","milestones_url":"https://api.github.com/repos/prysmaticlabs/prysm/milestones{/number}","notifications_url":"https://api.github.com/repos/prysmaticlabs/prysm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/prysmaticlabs/prysm/labels{/name}","releases_url":"https://api.github.com/repos/prysmaticlabs/prysm/releases{/id}","deployments_url":"https://api.github.com/repos/prysmaticlabs/prysm/deployments","created_at":"2018-01-11T21:31:33Z","updated_at":"2019-05-09T00:27:34Z","pushed_at":"2019-05-09T01:57:28Z","git_url":"git://github.com/prysmaticlabs/prysm.git","ssh_url":"git@github.com:prysmaticlabs/prysm.git","clone_url":"https://github.com/prysmaticlabs/prysm.git","svn_url":"https://github.com/prysmaticlabs/prysm","homepage":"https://prysmaticlabs.com/","size":118664,"stargazers_count":618,"watchers_count":618,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":127,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":79,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":127,"open_issues":79,"watchers":618,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/prysmaticlabs/prysm/pulls/2540"},"html":{"href":"https://github.com/prysmaticlabs/prysm/pull/2540"},"issue":{"href":"https://api.github.com/repos/prysmaticlabs/prysm/issues/2540"},"comments":{"href":"https://api.github.com/repos/prysmaticlabs/prysm/issues/2540/comments"},"review_comments":{"href":"https://api.github.com/repos/prysmaticlabs/prysm/pulls/2540/comments"},"review_comment":{"href":"https://api.github.com/repos/prysmaticlabs/prysm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/prysmaticlabs/prysm/pulls/2540/commits"},"statuses":{"href":"https://api.github.com/repos/prysmaticlabs/prysm/statuses/364fd83dd6b1edff121d42418ee102481578db05"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"nisdas"}}