{"action":"created","comment":{"url":"https://api.github.com/repos/lightningnetwork/lnd/pulls/comments/226802598","pull_request_review_id":166720706,"id":226802598,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNjgwMjU5OA==","diff_hunk":"@@ -1634,8 +1634,18 @@ func (d *AuthenticatedGossiper) processNetworkAnnouncement(\n \t\t\treturn nil\n \t\t}\n \n-\t\t// Node announcement was successfully proceeded and know it\n-\t\t// might be broadcast to other connected nodes.\n+\t\t// In order to ensure we don't leak unadvertised nodes, we'll\n+\t\t// make a quick check to ensure this node intends to publicly\n+\t\t// advertise itself to the network.\n+\t\tisPublic, err := d.cfg.Router.IsPublicNode(node.PubKeyBytes)\n+\n+\t\t// If it doesn't, we'll skip broadcasting this announcement to\n+\t\t// the rest of our peers.\n+\t\tif !isPublic || err != nil {\n+\t\t\tnMsg.err <- nil\n+\t\t\treturn announcements","path":"discovery/gossiper.go","position":15,"original_position":15,"commit_id":"7bfab4dede71d5d4d323c854bf7c1ba587ed99e1","original_commit_id":"b3a941ea4f8f7e2bd102f4de42c968b67b14b433","user":{"login":"halseth","id":3765732,"node_id":"MDQ6VXNlcjM3NjU3MzI=","avatar_url":"https://avatars1.githubusercontent.com/u/3765732?v=4","gravatar_id":"","url":"https://api.github.com/users/halseth","html_url":"https://github.com/halseth","followers_url":"https://api.github.com/users/halseth/followers","following_url":"https://api.github.com/users/halseth/following{/other_user}","gists_url":"https://api.github.com/users/halseth/gists{/gist_id}","starred_url":"https://api.github.com/users/halseth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/halseth/subscriptions","organizations_url":"https://api.github.com/users/halseth/orgs","repos_url":"https://api.github.com/users/halseth/repos","events_url":"https://api.github.com/users/halseth/events{/privacy}","received_events_url":"https://api.github.com/users/halseth/received_events","type":"User","site_admin":false},"body":"I was thinking of the case where we receive a node announcement, and later we learn about a public channel for the node. E.g. we open a private channel with the node, receive a node announcement, then they open a public channel which we learn about. I _thiiink_ it's okay now, as they probably should send out a `NodeAnnouncement` after they open the public channel.","created_at":"2018-10-19T23:13:16Z","updated_at":"2018-10-19T23:21:50Z","html_url":"https://github.com/lightningnetwork/lnd/pull/1981#discussion_r226802598","pull_request_url":"https://api.github.com/repos/lightningnetwork/lnd/pulls/1981","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/lightningnetwork/lnd/pulls/comments/226802598"},"html":{"href":"https://github.com/lightningnetwork/lnd/pull/1981#discussion_r226802598"},"pull_request":{"href":"https://api.github.com/repos/lightningnetwork/lnd/pulls/1981"}}},"pull_request":{"url":"https://api.github.com/repos/lightningnetwork/lnd/pulls/1981","id":218468121,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE4NDY4MTIx","html_url":"https://github.com/lightningnetwork/lnd/pull/1981","diff_url":"https://github.com/lightningnetwork/lnd/pull/1981.diff","patch_url":"https://github.com/lightningnetwork/lnd/pull/1981.patch","issue_url":"https://api.github.com/repos/lightningnetwork/lnd/issues/1981","number":1981,"state":"open","locked":false,"title":"rpc+server: ensure we don't leak unadvertised nodes within invoice routing hints","user":{"login":"wpaulino","id":9447167,"node_id":"MDQ6VXNlcjk0NDcxNjc=","avatar_url":"https://avatars0.githubusercontent.com/u/9447167?v=4","gravatar_id":"","url":"https://api.github.com/users/wpaulino","html_url":"https://github.com/wpaulino","followers_url":"https://api.github.com/users/wpaulino/followers","following_url":"https://api.github.com/users/wpaulino/following{/other_user}","gists_url":"https://api.github.com/users/wpaulino/gists{/gist_id}","starred_url":"https://api.github.com/users/wpaulino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wpaulino/subscriptions","organizations_url":"https://api.github.com/users/wpaulino/orgs","repos_url":"https://api.github.com/users/wpaulino/repos","events_url":"https://api.github.com/users/wpaulino/events{/privacy}","received_events_url":"https://api.github.com/users/wpaulino/received_events","type":"User","site_admin":false},"body":"In this commit, we ensure that we don't include routing hints for\r\nunadvertised nodes at the time of invoice creation. Otherwise, this\r\nwould lead us to leak these unadvertised nodes to anyone who can get\r\ntheir hands on the invoice being created. To prevent this, we'll now\r\nlook at the network graph and ensure that the node in unadvertised if\r\nall of their edges are unadvertised and only extend to us.","created_at":"2018-09-26T22:01:03Z","updated_at":"2018-10-19T23:21:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d10a687364e88cc830f480331037304c573f12fa","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":990013318,"node_id":"MDU6TGFiZWw5OTAwMTMzMTg=","url":"https://api.github.com/repos/lightningnetwork/lnd/labels/P2","name":"P2","color":"fbca04","default":false},{"id":990064593,"node_id":"MDU6TGFiZWw5OTAwNjQ1OTM=","url":"https://api.github.com/repos/lightningnetwork/lnd/labels/first%20pass%20review%20done","name":"first pass review done","color":"bf333c","default":false},{"id":990064318,"node_id":"MDU6TGFiZWw5OTAwNjQzMTg=","url":"https://api.github.com/repos/lightningnetwork/lnd/labels/needs%20testing","name":"needs testing","color":"a4f963","default":false},{"id":778128862,"node_id":"MDU6TGFiZWw3NzgxMjg4NjI=","url":"https://api.github.com/repos/lightningnetwork/lnd/labels/payments","name":"payments","color":"f754c6","default":false},{"id":583597139,"node_id":"MDU6TGFiZWw1ODM1OTcxMzk=","url":"https://api.github.com/repos/lightningnetwork/lnd/labels/privacy","name":"privacy","color":"bfdadc","default":false},{"id":487149500,"node_id":"MDU6TGFiZWw0ODcxNDk1MDA=","url":"https://api.github.com/repos/lightningnetwork/lnd/labels/routing","name":"routing","color":"d4c5f9","default":false},{"id":431182550,"node_id":"MDU6TGFiZWw0MzExODI1NTA=","url":"https://api.github.com/repos/lightningnetwork/lnd/labels/rpc","name":"rpc","color":"006b75","default":false}],"milestone":{"url":"https://api.github.com/repos/lightningnetwork/lnd/milestones/8","html_url":"https://github.com/lightningnetwork/lnd/milestone/8","labels_url":"https://api.github.com/repos/lightningnetwork/lnd/milestones/8/labels","id":3538310,"node_id":"MDk6TWlsZXN0b25lMzUzODMxMA==","number":8,"title":"0.5.1","description":"","creator":{"login":"Roasbeef","id":998190,"node_id":"MDQ6VXNlcjk5ODE5MA==","avatar_url":"https://avatars3.githubusercontent.com/u/998190?v=4","gravatar_id":"","url":"https://api.github.com/users/Roasbeef","html_url":"https://github.com/Roasbeef","followers_url":"https://api.github.com/users/Roasbeef/followers","following_url":"https://api.github.com/users/Roasbeef/following{/other_user}","gists_url":"https://api.github.com/users/Roasbeef/gists{/gist_id}","starred_url":"https://api.github.com/users/Roasbeef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Roasbeef/subscriptions","organizations_url":"https://api.github.com/users/Roasbeef/orgs","repos_url":"https://api.github.com/users/Roasbeef/repos","events_url":"https://api.github.com/users/Roasbeef/events{/privacy}","received_events_url":"https://api.github.com/users/Roasbeef/received_events","type":"User","site_admin":false},"open_issues":14,"closed_issues":12,"state":"open","created_at":"2018-08-01T07:31:44Z","updated_at":"2018-10-18T03:18:47Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/lightningnetwork/lnd/pulls/1981/commits","review_comments_url":"https://api.github.com/repos/lightningnetwork/lnd/pulls/1981/comments","review_comment_url":"https://api.github.com/repos/lightningnetwork/lnd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lightningnetwork/lnd/issues/1981/comments","statuses_url":"https://api.github.com/repos/lightningnetwork/lnd/statuses/7bfab4dede71d5d4d323c854bf7c1ba587ed99e1","head":{"label":"wpaulino:routing-hints-unadvertised-nodes","ref":"routing-hints-unadvertised-nodes","sha":"7bfab4dede71d5d4d323c854bf7c1ba587ed99e1","user":{"login":"wpaulino","id":9447167,"node_id":"MDQ6VXNlcjk0NDcxNjc=","avatar_url":"https://avatars0.githubusercontent.com/u/9447167?v=4","gravatar_id":"","url":"https://api.github.com/users/wpaulino","html_url":"https://github.com/wpaulino","followers_url":"https://api.github.com/users/wpaulino/followers","following_url":"https://api.github.com/users/wpaulino/following{/other_user}","gists_url":"https://api.github.com/users/wpaulino/gists{/gist_id}","starred_url":"https://api.github.com/users/wpaulino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wpaulino/subscriptions","organizations_url":"https://api.github.com/users/wpaulino/orgs","repos_url":"https://api.github.com/users/wpaulino/repos","events_url":"https://api.github.com/users/wpaulino/events{/privacy}","received_events_url":"https://api.github.com/users/wpaulino/received_events","type":"User","site_admin":false},"repo":{"id":115386014,"node_id":"MDEwOlJlcG9zaXRvcnkxMTUzODYwMTQ=","name":"lnd","full_name":"wpaulino/lnd","private":false,"owner":{"login":"wpaulino","id":9447167,"node_id":"MDQ6VXNlcjk0NDcxNjc=","avatar_url":"https://avatars0.githubusercontent.com/u/9447167?v=4","gravatar_id":"","url":"https://api.github.com/users/wpaulino","html_url":"https://github.com/wpaulino","followers_url":"https://api.github.com/users/wpaulino/followers","following_url":"https://api.github.com/users/wpaulino/following{/other_user}","gists_url":"https://api.github.com/users/wpaulino/gists{/gist_id}","starred_url":"https://api.github.com/users/wpaulino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wpaulino/subscriptions","organizations_url":"https://api.github.com/users/wpaulino/orgs","repos_url":"https://api.github.com/users/wpaulino/repos","events_url":"https://api.github.com/users/wpaulino/events{/privacy}","received_events_url":"https://api.github.com/users/wpaulino/received_events","type":"User","site_admin":false},"html_url":"https://github.com/wpaulino/lnd","description":"Lightning Network Daemon ⚡️","fork":true,"url":"https://api.github.com/repos/wpaulino/lnd","forks_url":"https://api.github.com/repos/wpaulino/lnd/forks","keys_url":"https://api.github.com/repos/wpaulino/lnd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wpaulino/lnd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wpaulino/lnd/teams","hooks_url":"https://api.github.com/repos/wpaulino/lnd/hooks","issue_events_url":"https://api.github.com/repos/wpaulino/lnd/issues/events{/number}","events_url":"https://api.github.com/repos/wpaulino/lnd/events","assignees_url":"https://api.github.com/repos/wpaulino/lnd/assignees{/user}","branches_url":"https://api.github.com/repos/wpaulino/lnd/branches{/branch}","tags_url":"https://api.github.com/repos/wpaulino/lnd/tags","blobs_url":"https://api.github.com/repos/wpaulino/lnd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wpaulino/lnd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wpaulino/lnd/git/refs{/sha}","trees_url":"https://api.github.com/repos/wpaulino/lnd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wpaulino/lnd/statuses/{sha}","languages_url":"https://api.github.com/repos/wpaulino/lnd/languages","stargazers_url":"https://api.github.com/repos/wpaulino/lnd/stargazers","contributors_url":"https://api.github.com/repos/wpaulino/lnd/contributors","subscribers_url":"https://api.github.com/repos/wpaulino/lnd/subscribers","subscription_url":"https://api.github.com/repos/wpaulino/lnd/subscription","commits_url":"https://api.github.com/repos/wpaulino/lnd/commits{/sha}","git_commits_url":"https://api.github.com/repos/wpaulino/lnd/git/commits{/sha}","comments_url":"https://api.github.com/repos/wpaulino/lnd/comments{/number}","issue_comment_url":"https://api.github.com/repos/wpaulino/lnd/issues/comments{/number}","contents_url":"https://api.github.com/repos/wpaulino/lnd/contents/{+path}","compare_url":"https://api.github.com/repos/wpaulino/lnd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wpaulino/lnd/merges","archive_url":"https://api.github.com/repos/wpaulino/lnd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wpaulino/lnd/downloads","issues_url":"https://api.github.com/repos/wpaulino/lnd/issues{/number}","pulls_url":"https://api.github.com/repos/wpaulino/lnd/pulls{/number}","milestones_url":"https://api.github.com/repos/wpaulino/lnd/milestones{/number}","notifications_url":"https://api.github.com/repos/wpaulino/lnd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wpaulino/lnd/labels{/name}","releases_url":"https://api.github.com/repos/wpaulino/lnd/releases{/id}","deployments_url":"https://api.github.com/repos/wpaulino/lnd/deployments","created_at":"2017-12-26T04:40:40Z","updated_at":"2018-10-19T07:11:51Z","pushed_at":"2018-10-19T23:16:54Z","git_url":"git://github.com/wpaulino/lnd.git","ssh_url":"git@github.com:wpaulino/lnd.git","clone_url":"https://github.com/wpaulino/lnd.git","svn_url":"https://github.com/wpaulino/lnd","homepage":"","size":21515,"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":{"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":"lightningnetwork:master","ref":"master","sha":"c9e42a6ce02df426586607a0450f84e06805c610","user":{"login":"lightningnetwork","id":13424735,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNDI0NzM1","avatar_url":"https://avatars0.githubusercontent.com/u/13424735?v=4","gravatar_id":"","url":"https://api.github.com/users/lightningnetwork","html_url":"https://github.com/lightningnetwork","followers_url":"https://api.github.com/users/lightningnetwork/followers","following_url":"https://api.github.com/users/lightningnetwork/following{/other_user}","gists_url":"https://api.github.com/users/lightningnetwork/gists{/gist_id}","starred_url":"https://api.github.com/users/lightningnetwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lightningnetwork/subscriptions","organizations_url":"https://api.github.com/users/lightningnetwork/orgs","repos_url":"https://api.github.com/users/lightningnetwork/repos","events_url":"https://api.github.com/users/lightningnetwork/events{/privacy}","received_events_url":"https://api.github.com/users/lightningnetwork/received_events","type":"Organization","site_admin":false},"repo":{"id":49765480,"node_id":"MDEwOlJlcG9zaXRvcnk0OTc2NTQ4MA==","name":"lnd","full_name":"lightningnetwork/lnd","private":false,"owner":{"login":"lightningnetwork","id":13424735,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNDI0NzM1","avatar_url":"https://avatars0.githubusercontent.com/u/13424735?v=4","gravatar_id":"","url":"https://api.github.com/users/lightningnetwork","html_url":"https://github.com/lightningnetwork","followers_url":"https://api.github.com/users/lightningnetwork/followers","following_url":"https://api.github.com/users/lightningnetwork/following{/other_user}","gists_url":"https://api.github.com/users/lightningnetwork/gists{/gist_id}","starred_url":"https://api.github.com/users/lightningnetwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lightningnetwork/subscriptions","organizations_url":"https://api.github.com/users/lightningnetwork/orgs","repos_url":"https://api.github.com/users/lightningnetwork/repos","events_url":"https://api.github.com/users/lightningnetwork/events{/privacy}","received_events_url":"https://api.github.com/users/lightningnetwork/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/lightningnetwork/lnd","description":"Lightning Network Daemon ⚡️","fork":false,"url":"https://api.github.com/repos/lightningnetwork/lnd","forks_url":"https://api.github.com/repos/lightningnetwork/lnd/forks","keys_url":"https://api.github.com/repos/lightningnetwork/lnd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lightningnetwork/lnd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lightningnetwork/lnd/teams","hooks_url":"https://api.github.com/repos/lightningnetwork/lnd/hooks","issue_events_url":"https://api.github.com/repos/lightningnetwork/lnd/issues/events{/number}","events_url":"https://api.github.com/repos/lightningnetwork/lnd/events","assignees_url":"https://api.github.com/repos/lightningnetwork/lnd/assignees{/user}","branches_url":"https://api.github.com/repos/lightningnetwork/lnd/branches{/branch}","tags_url":"https://api.github.com/repos/lightningnetwork/lnd/tags","blobs_url":"https://api.github.com/repos/lightningnetwork/lnd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lightningnetwork/lnd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lightningnetwork/lnd/git/refs{/sha}","trees_url":"https://api.github.com/repos/lightningnetwork/lnd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lightningnetwork/lnd/statuses/{sha}","languages_url":"https://api.github.com/repos/lightningnetwork/lnd/languages","stargazers_url":"https://api.github.com/repos/lightningnetwork/lnd/stargazers","contributors_url":"https://api.github.com/repos/lightningnetwork/lnd/contributors","subscribers_url":"https://api.github.com/repos/lightningnetwork/lnd/subscribers","subscription_url":"https://api.github.com/repos/lightningnetwork/lnd/subscription","commits_url":"https://api.github.com/repos/lightningnetwork/lnd/commits{/sha}","git_commits_url":"https://api.github.com/repos/lightningnetwork/lnd/git/commits{/sha}","comments_url":"https://api.github.com/repos/lightningnetwork/lnd/comments{/number}","issue_comment_url":"https://api.github.com/repos/lightningnetwork/lnd/issues/comments{/number}","contents_url":"https://api.github.com/repos/lightningnetwork/lnd/contents/{+path}","compare_url":"https://api.github.com/repos/lightningnetwork/lnd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lightningnetwork/lnd/merges","archive_url":"https://api.github.com/repos/lightningnetwork/lnd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lightningnetwork/lnd/downloads","issues_url":"https://api.github.com/repos/lightningnetwork/lnd/issues{/number}","pulls_url":"https://api.github.com/repos/lightningnetwork/lnd/pulls{/number}","milestones_url":"https://api.github.com/repos/lightningnetwork/lnd/milestones{/number}","notifications_url":"https://api.github.com/repos/lightningnetwork/lnd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lightningnetwork/lnd/labels{/name}","releases_url":"https://api.github.com/repos/lightningnetwork/lnd/releases{/id}","deployments_url":"https://api.github.com/repos/lightningnetwork/lnd/deployments","created_at":"2016-01-16T08:19:33Z","updated_at":"2018-10-19T19:18:40Z","pushed_at":"2018-10-19T23:16:56Z","git_url":"git://github.com/lightningnetwork/lnd.git","ssh_url":"git@github.com:lightningnetwork/lnd.git","clone_url":"https://github.com/lightningnetwork/lnd.git","svn_url":"https://github.com/lightningnetwork/lnd","homepage":"","size":21026,"stargazers_count":3142,"watchers_count":3142,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":793,"mirror_url":null,"archived":false,"open_issues_count":291,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":793,"open_issues":291,"watchers":3142,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lightningnetwork/lnd/pulls/1981"},"html":{"href":"https://github.com/lightningnetwork/lnd/pull/1981"},"issue":{"href":"https://api.github.com/repos/lightningnetwork/lnd/issues/1981"},"comments":{"href":"https://api.github.com/repos/lightningnetwork/lnd/issues/1981/comments"},"review_comments":{"href":"https://api.github.com/repos/lightningnetwork/lnd/pulls/1981/comments"},"review_comment":{"href":"https://api.github.com/repos/lightningnetwork/lnd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lightningnetwork/lnd/pulls/1981/commits"},"statuses":{"href":"https://api.github.com/repos/lightningnetwork/lnd/statuses/7bfab4dede71d5d4d323c854bf7c1ba587ed99e1"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"halseth"}}