{"action":"created","comment":{"url":"https://api.github.com/repos/prysmaticlabs/prysm/pulls/comments/325884925","pull_request_review_id":290191963,"id":325884925,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMyNTg4NDkyNQ==","diff_hunk":"@@ -2,46 +2,40 @@ package sync\n \n import (\n \t\"context\"\n-\t\"encoding/base64\"\n-\t\"time\"\n \n \t\"github.com/gogo/protobuf/proto\"\n-\t\"github.com/karlseguin/ccache\"\n \t\"github.com/prysmaticlabs/go-ssz\"\n \t\"github.com/prysmaticlabs/prysm/beacon-chain/core/helpers\"\n \tethpb \"github.com/prysmaticlabs/prysm/proto/eth/v1alpha1\"\n \t\"github.com/prysmaticlabs/prysm/shared/bytesutil\"\n )\n \n-// pendingBlocks cache.\n-// TODO(3147): This cache value should represent a doubly linked list or some management to\n-// process pending blocks after a link to the canonical chain is found.\n-var pendingBlocks = ccache.New(ccache.Configure())\n-\n func (r *RegularSync) beaconBlockSubscriber(ctx context.Context, msg proto.Message) error {\n \tblock := msg.(*ethpb.BeaconBlock)\n \n \theadState := r.chain.HeadState()\n-\n \t// Ignore block older than last finalized checkpoint.\n \tif block.Slot < helpers.StartSlot(headState.FinalizedCheckpoint.Epoch) {\n \t\tlog.Debugf(\"Received a block that's older than finalized checkpoint, %d < %d\",\n \t\t\tblock.Slot, helpers.StartSlot(headState.FinalizedCheckpoint.Epoch))\n \t\treturn nil\n \t}\n \n-\t// Handle block when the parent is unknown.\n+\tblockRoot, err := ssz.SigningRoot(block)\n+\tif err != nil {\n+\t\tlog.Errorf(\"Could not sign root block: %v\", err)\n+\t\treturn nil\n+\t}\n+\t// Ignore block already in pending blocks cache\n+\tif r.seenPendingBlocks[blockRoot] {","path":"beacon-chain/sync/subscriber_beacon_blocks.go","position":null,"original_position":39,"commit_id":"b52b0d8f14705310262e2e4c70f378a6c04bb0c6","original_commit_id":"ae244294af0f0eda1b530ac8074c4c7bf09fcb41","user":{"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},"body":"Done","created_at":"2019-09-18T20:47:50Z","updated_at":"2019-09-18T20:47:50Z","html_url":"https://github.com/prysmaticlabs/prysm/pull/3459#discussion_r325884925","pull_request_url":"https://api.github.com/repos/prysmaticlabs/prysm/pulls/3459","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/prysmaticlabs/prysm/pulls/comments/325884925"},"html":{"href":"https://github.com/prysmaticlabs/prysm/pull/3459#discussion_r325884925"},"pull_request":{"href":"https://api.github.com/repos/prysmaticlabs/prysm/pulls/3459"}},"in_reply_to_id":325880332},"pull_request":{"url":"https://api.github.com/repos/prysmaticlabs/prysm/pulls/3459","id":317160665,"node_id":"MDExOlB1bGxSZXF1ZXN0MzE3MTYwNjY1","html_url":"https://github.com/prysmaticlabs/prysm/pull/3459","diff_url":"https://github.com/prysmaticlabs/prysm/pull/3459.diff","patch_url":"https://github.com/prysmaticlabs/prysm/pull/3459.patch","issue_url":"https://api.github.com/repos/prysmaticlabs/prysm/issues/3459","number":3459,"state":"open","locked":false,"title":"WIP: Parent blocks fetching/processing ","user":{"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},"body":"","created_at":"2019-09-13T03:25:46Z","updated_at":"2019-09-18T20:47:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b60adebf92cb4eea7cc680edbc8f7afbbf5c29a9","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":829519703,"node_id":"MDU6TGFiZWw4Mjk1MTk3MDM=","url":"https://api.github.com/repos/prysmaticlabs/prysm/labels/In%20Progress","name":"In Progress","color":"bfdadc","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/prysmaticlabs/prysm/pulls/3459/commits","review_comments_url":"https://api.github.com/repos/prysmaticlabs/prysm/pulls/3459/comments","review_comment_url":"https://api.github.com/repos/prysmaticlabs/prysm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/prysmaticlabs/prysm/issues/3459/comments","statuses_url":"https://api.github.com/repos/prysmaticlabs/prysm/statuses/b52b0d8f14705310262e2e4c70f378a6c04bb0c6","head":{"label":"prysmaticlabs:recursive-parent-fetching","ref":"recursive-parent-fetching","sha":"b52b0d8f14705310262e2e4c70f378a6c04bb0c6","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 Serenity 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-09-18T20:02:37Z","pushed_at":"2019-09-18T20:47:45Z","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":123976,"stargazers_count":743,"watchers_count":743,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":170,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":89,"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":170,"open_issues":89,"watchers":743,"default_branch":"master"}},"base":{"label":"prysmaticlabs:master","ref":"master","sha":"e1861bdb31b81acaa4bade40364bf9be442695c6","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 Serenity 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-09-18T20:02:37Z","pushed_at":"2019-09-18T20:47:45Z","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":123976,"stargazers_count":743,"watchers_count":743,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":170,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":89,"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":170,"open_issues":89,"watchers":743,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/prysmaticlabs/prysm/pulls/3459"},"html":{"href":"https://github.com/prysmaticlabs/prysm/pull/3459"},"issue":{"href":"https://api.github.com/repos/prysmaticlabs/prysm/issues/3459"},"comments":{"href":"https://api.github.com/repos/prysmaticlabs/prysm/issues/3459/comments"},"review_comments":{"href":"https://api.github.com/repos/prysmaticlabs/prysm/pulls/3459/comments"},"review_comment":{"href":"https://api.github.com/repos/prysmaticlabs/prysm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/prysmaticlabs/prysm/pulls/3459/commits"},"statuses":{"href":"https://api.github.com/repos/prysmaticlabs/prysm/statuses/b52b0d8f14705310262e2e4c70f378a6c04bb0c6"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"terencechain"}}