{"action":"created","comment":{"url":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/pulls/comments/225546250","pull_request_review_id":165167832,"id":225546250,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNTU0NjI1MA==","diff_hunk":"@@ -4,13 +4,15 @@ import (\n \t\"context\"\n \t\"fmt\"\n \n+\tpubsub \"github.com/libp2p/go-floodsub\"\n \thost \"github.com/libp2p/go-libp2p-host\"\n \tpeer \"github.com/libp2p/go-libp2p-peer\"\n \tma \"github.com/multiformats/go-multiaddr\"\n )\n \n type Node struct {\n \thost.Host        // lib-p2p host\n+\tdiscovery        Discovery","path":"node.go","position":12,"original_position":12,"commit_id":"1f12e5f145c528dc0619747e570baf0a6b213f9b","original_commit_id":"a11cadf5a870bea38d55e2ffadcd7bc1c98b412a","user":{"login":"mhchia","id":8223657,"node_id":"MDQ6VXNlcjgyMjM2NTc=","avatar_url":"https://avatars3.githubusercontent.com/u/8223657?v=4","gravatar_id":"","url":"https://api.github.com/users/mhchia","html_url":"https://github.com/mhchia","followers_url":"https://api.github.com/users/mhchia/followers","following_url":"https://api.github.com/users/mhchia/following{/other_user}","gists_url":"https://api.github.com/users/mhchia/gists{/gist_id}","starred_url":"https://api.github.com/users/mhchia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhchia/subscriptions","organizations_url":"https://api.github.com/users/mhchia/orgs","repos_url":"https://api.github.com/users/mhchia/repos","events_url":"https://api.github.com/users/mhchia/events{/privacy}","received_events_url":"https://api.github.com/users/mhchia/received_events","type":"User","site_admin":false},"body":"Agree. If this is the case, could we just put `discovery` in `Node`, and remove it from `ShardManager`?","created_at":"2018-10-16T13:47:08Z","updated_at":"2018-10-16T13:47:08Z","html_url":"https://github.com/ethresearch/sharding-p2p-poc/pull/74#discussion_r225546250","pull_request_url":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/pulls/74","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/pulls/comments/225546250"},"html":{"href":"https://github.com/ethresearch/sharding-p2p-poc/pull/74#discussion_r225546250"},"pull_request":{"href":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/pulls/74"}},"in_reply_to_id":225408983},"pull_request":{"url":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/pulls/74","id":221415356,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIxNDE1MzU2","html_url":"https://github.com/ethresearch/sharding-p2p-poc/pull/74","diff_url":"https://github.com/ethresearch/sharding-p2p-poc/pull/74.diff","patch_url":"https://github.com/ethresearch/sharding-p2p-poc/pull/74.patch","issue_url":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/issues/74","number":74,"state":"open","locked":false,"title":"Abstract discovery","user":{"login":"NIC619","id":17670147,"node_id":"MDQ6VXNlcjE3NjcwMTQ3","avatar_url":"https://avatars0.githubusercontent.com/u/17670147?v=4","gravatar_id":"","url":"https://api.github.com/users/NIC619","html_url":"https://github.com/NIC619","followers_url":"https://api.github.com/users/NIC619/followers","following_url":"https://api.github.com/users/NIC619/following{/other_user}","gists_url":"https://api.github.com/users/NIC619/gists{/gist_id}","starred_url":"https://api.github.com/users/NIC619/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NIC619/subscriptions","organizations_url":"https://api.github.com/users/NIC619/orgs","repos_url":"https://api.github.com/users/NIC619/repos","events_url":"https://api.github.com/users/NIC619/events{/privacy}","received_events_url":"https://api.github.com/users/NIC619/received_events","type":"User","site_admin":false},"body":"### How was it fixed?\r\n- [x] Add Discovery interface\r\n    - `Advertise(ctx context.Context, shardID ShardIDType) error`\r\n        - advertise an already advertised shard => cancel the advertisement on that shard\r\n    - `FindPeers(ctx context.Context, shardID ShardIDType) ([]pstore.PeerInfo, error)`\r\n- [x] Use ShardPrefTable as current discovery mechanism\r\n\r\n\r\n\r\n#### Cute Animal Picture\r\n\r\n![](https://www.maxpixel.net/static/photo/2x/Cute-Tom-Funny-Face-Pet-Funny-Animal-Cat-Feline-1496059.jpg)","created_at":"2018-10-09T12:14:54Z","updated_at":"2018-10-16T13:47:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c16d2390fb20a56162a6f164b978f7c44c035b15","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/pulls/74/commits","review_comments_url":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/pulls/74/comments","review_comment_url":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/issues/74/comments","statuses_url":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/statuses/1f12e5f145c528dc0619747e570baf0a6b213f9b","head":{"label":"NIC619:abstract_discovery","ref":"abstract_discovery","sha":"1f12e5f145c528dc0619747e570baf0a6b213f9b","user":{"login":"NIC619","id":17670147,"node_id":"MDQ6VXNlcjE3NjcwMTQ3","avatar_url":"https://avatars0.githubusercontent.com/u/17670147?v=4","gravatar_id":"","url":"https://api.github.com/users/NIC619","html_url":"https://github.com/NIC619","followers_url":"https://api.github.com/users/NIC619/followers","following_url":"https://api.github.com/users/NIC619/following{/other_user}","gists_url":"https://api.github.com/users/NIC619/gists{/gist_id}","starred_url":"https://api.github.com/users/NIC619/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NIC619/subscriptions","organizations_url":"https://api.github.com/users/NIC619/orgs","repos_url":"https://api.github.com/users/NIC619/repos","events_url":"https://api.github.com/users/NIC619/events{/privacy}","received_events_url":"https://api.github.com/users/NIC619/received_events","type":"User","site_admin":false},"repo":{"id":142528732,"node_id":"MDEwOlJlcG9zaXRvcnkxNDI1Mjg3MzI=","name":"sharding-p2p-poc","full_name":"NIC619/sharding-p2p-poc","private":false,"owner":{"login":"NIC619","id":17670147,"node_id":"MDQ6VXNlcjE3NjcwMTQ3","avatar_url":"https://avatars0.githubusercontent.com/u/17670147?v=4","gravatar_id":"","url":"https://api.github.com/users/NIC619","html_url":"https://github.com/NIC619","followers_url":"https://api.github.com/users/NIC619/followers","following_url":"https://api.github.com/users/NIC619/following{/other_user}","gists_url":"https://api.github.com/users/NIC619/gists{/gist_id}","starred_url":"https://api.github.com/users/NIC619/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NIC619/subscriptions","organizations_url":"https://api.github.com/users/NIC619/orgs","repos_url":"https://api.github.com/users/NIC619/repos","events_url":"https://api.github.com/users/NIC619/events{/privacy}","received_events_url":"https://api.github.com/users/NIC619/received_events","type":"User","site_admin":false},"html_url":"https://github.com/NIC619/sharding-p2p-poc","description":"poc of ethereum sharding p2p layer on pubsub system in libp2p","fork":true,"url":"https://api.github.com/repos/NIC619/sharding-p2p-poc","forks_url":"https://api.github.com/repos/NIC619/sharding-p2p-poc/forks","keys_url":"https://api.github.com/repos/NIC619/sharding-p2p-poc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NIC619/sharding-p2p-poc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NIC619/sharding-p2p-poc/teams","hooks_url":"https://api.github.com/repos/NIC619/sharding-p2p-poc/hooks","issue_events_url":"https://api.github.com/repos/NIC619/sharding-p2p-poc/issues/events{/number}","events_url":"https://api.github.com/repos/NIC619/sharding-p2p-poc/events","assignees_url":"https://api.github.com/repos/NIC619/sharding-p2p-poc/assignees{/user}","branches_url":"https://api.github.com/repos/NIC619/sharding-p2p-poc/branches{/branch}","tags_url":"https://api.github.com/repos/NIC619/sharding-p2p-poc/tags","blobs_url":"https://api.github.com/repos/NIC619/sharding-p2p-poc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NIC619/sharding-p2p-poc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NIC619/sharding-p2p-poc/git/refs{/sha}","trees_url":"https://api.github.com/repos/NIC619/sharding-p2p-poc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NIC619/sharding-p2p-poc/statuses/{sha}","languages_url":"https://api.github.com/repos/NIC619/sharding-p2p-poc/languages","stargazers_url":"https://api.github.com/repos/NIC619/sharding-p2p-poc/stargazers","contributors_url":"https://api.github.com/repos/NIC619/sharding-p2p-poc/contributors","subscribers_url":"https://api.github.com/repos/NIC619/sharding-p2p-poc/subscribers","subscription_url":"https://api.github.com/repos/NIC619/sharding-p2p-poc/subscription","commits_url":"https://api.github.com/repos/NIC619/sharding-p2p-poc/commits{/sha}","git_commits_url":"https://api.github.com/repos/NIC619/sharding-p2p-poc/git/commits{/sha}","comments_url":"https://api.github.com/repos/NIC619/sharding-p2p-poc/comments{/number}","issue_comment_url":"https://api.github.com/repos/NIC619/sharding-p2p-poc/issues/comments{/number}","contents_url":"https://api.github.com/repos/NIC619/sharding-p2p-poc/contents/{+path}","compare_url":"https://api.github.com/repos/NIC619/sharding-p2p-poc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NIC619/sharding-p2p-poc/merges","archive_url":"https://api.github.com/repos/NIC619/sharding-p2p-poc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NIC619/sharding-p2p-poc/downloads","issues_url":"https://api.github.com/repos/NIC619/sharding-p2p-poc/issues{/number}","pulls_url":"https://api.github.com/repos/NIC619/sharding-p2p-poc/pulls{/number}","milestones_url":"https://api.github.com/repos/NIC619/sharding-p2p-poc/milestones{/number}","notifications_url":"https://api.github.com/repos/NIC619/sharding-p2p-poc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NIC619/sharding-p2p-poc/labels{/name}","releases_url":"https://api.github.com/repos/NIC619/sharding-p2p-poc/releases{/id}","deployments_url":"https://api.github.com/repos/NIC619/sharding-p2p-poc/deployments","created_at":"2018-07-27T04:44:58Z","updated_at":"2018-08-13T16:33:09Z","pushed_at":"2018-10-16T13:29:55Z","git_url":"git://github.com/NIC619/sharding-p2p-poc.git","ssh_url":"git@github.com:NIC619/sharding-p2p-poc.git","clone_url":"https://github.com/NIC619/sharding-p2p-poc.git","svn_url":"https://github.com/NIC619/sharding-p2p-poc","homepage":"","size":1733,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ethresearch:master","ref":"master","sha":"d38c2ecee939281e379428dfdccc0c2531bd483e","user":{"login":"ethresearch","id":32943906,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyOTQzOTA2","avatar_url":"https://avatars3.githubusercontent.com/u/32943906?v=4","gravatar_id":"","url":"https://api.github.com/users/ethresearch","html_url":"https://github.com/ethresearch","followers_url":"https://api.github.com/users/ethresearch/followers","following_url":"https://api.github.com/users/ethresearch/following{/other_user}","gists_url":"https://api.github.com/users/ethresearch/gists{/gist_id}","starred_url":"https://api.github.com/users/ethresearch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethresearch/subscriptions","organizations_url":"https://api.github.com/users/ethresearch/orgs","repos_url":"https://api.github.com/users/ethresearch/repos","events_url":"https://api.github.com/users/ethresearch/events{/privacy}","received_events_url":"https://api.github.com/users/ethresearch/received_events","type":"Organization","site_admin":false},"repo":{"id":138018957,"node_id":"MDEwOlJlcG9zaXRvcnkxMzgwMTg5NTc=","name":"sharding-p2p-poc","full_name":"ethresearch/sharding-p2p-poc","private":false,"owner":{"login":"ethresearch","id":32943906,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyOTQzOTA2","avatar_url":"https://avatars3.githubusercontent.com/u/32943906?v=4","gravatar_id":"","url":"https://api.github.com/users/ethresearch","html_url":"https://github.com/ethresearch","followers_url":"https://api.github.com/users/ethresearch/followers","following_url":"https://api.github.com/users/ethresearch/following{/other_user}","gists_url":"https://api.github.com/users/ethresearch/gists{/gist_id}","starred_url":"https://api.github.com/users/ethresearch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethresearch/subscriptions","organizations_url":"https://api.github.com/users/ethresearch/orgs","repos_url":"https://api.github.com/users/ethresearch/repos","events_url":"https://api.github.com/users/ethresearch/events{/privacy}","received_events_url":"https://api.github.com/users/ethresearch/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/ethresearch/sharding-p2p-poc","description":"poc of ethereum sharding p2p layer on pubsub system in libp2p","fork":false,"url":"https://api.github.com/repos/ethresearch/sharding-p2p-poc","forks_url":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/forks","keys_url":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/teams","hooks_url":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/hooks","issue_events_url":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/issues/events{/number}","events_url":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/events","assignees_url":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/assignees{/user}","branches_url":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/branches{/branch}","tags_url":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/tags","blobs_url":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/git/refs{/sha}","trees_url":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/statuses/{sha}","languages_url":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/languages","stargazers_url":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/stargazers","contributors_url":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/contributors","subscribers_url":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/subscribers","subscription_url":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/subscription","commits_url":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/commits{/sha}","git_commits_url":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/git/commits{/sha}","comments_url":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/comments{/number}","issue_comment_url":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/issues/comments{/number}","contents_url":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/contents/{+path}","compare_url":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/merges","archive_url":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/downloads","issues_url":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/issues{/number}","pulls_url":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/pulls{/number}","milestones_url":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/milestones{/number}","notifications_url":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/labels{/name}","releases_url":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/releases{/id}","deployments_url":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/deployments","created_at":"2018-06-20T10:45:28Z","updated_at":"2018-10-16T08:39:14Z","pushed_at":"2018-10-16T13:29:56Z","git_url":"git://github.com/ethresearch/sharding-p2p-poc.git","ssh_url":"git@github.com:ethresearch/sharding-p2p-poc.git","clone_url":"https://github.com/ethresearch/sharding-p2p-poc.git","svn_url":"https://github.com/ethresearch/sharding-p2p-poc","homepage":"","size":1741,"stargazers_count":21,"watchers_count":21,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"archived":false,"open_issues_count":15,"license":null,"forks":12,"open_issues":15,"watchers":21,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/pulls/74"},"html":{"href":"https://github.com/ethresearch/sharding-p2p-poc/pull/74"},"issue":{"href":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/issues/74"},"comments":{"href":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/issues/74/comments"},"review_comments":{"href":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/pulls/74/comments"},"review_comment":{"href":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/pulls/74/commits"},"statuses":{"href":"https://api.github.com/repos/ethresearch/sharding-p2p-poc/statuses/1f12e5f145c528dc0619747e570baf0a6b213f9b"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"mhchia"}}