{"action":"created","comment":{"url":"https://api.github.com/repos/ethersphere/go-ethereum/pulls/comments/191060936","pull_request_review_id":123568609,"id":191060936,"diff_hunk":"@@ -0,0 +1,276 @@\n+package notify\n+\n+import (\n+\t\"bytes\"\n+\t\"crypto/ecdsa\"\n+\t\"fmt\"\n+\t\"sync\"\n+\n+\t\"github.com/ethereum/go-ethereum/common\"\n+\t\"github.com/ethereum/go-ethereum/crypto\"\n+\t\"github.com/ethereum/go-ethereum/log\"\n+\t\"github.com/ethereum/go-ethereum/p2p\"\n+\t\"github.com/ethereum/go-ethereum/rlp\"\n+\t\"github.com/ethereum/go-ethereum/swarm/pss\"\n+)\n+\n+const (","path":"swarm/pss/notify/notify.go","position":17,"original_position":17,"commit_id":"c5817b48ecde1a017a5101e39dda3ff551497f1a","original_commit_id":"c5817b48ecde1a017a5101e39dda3ff551497f1a","user":{"login":"zelig","id":769725,"avatar_url":"https://avatars2.githubusercontent.com/u/769725?v=4","gravatar_id":"","url":"https://api.github.com/users/zelig","html_url":"https://github.com/zelig","followers_url":"https://api.github.com/users/zelig/followers","following_url":"https://api.github.com/users/zelig/following{/other_user}","gists_url":"https://api.github.com/users/zelig/gists{/gist_id}","starred_url":"https://api.github.com/users/zelig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zelig/subscriptions","organizations_url":"https://api.github.com/users/zelig/orgs","repos_url":"https://api.github.com/users/zelig/repos","events_url":"https://api.github.com/users/zelig/events{/privacy}","received_events_url":"https://api.github.com/users/zelig/received_events","type":"User","site_admin":false},"body":"ok right. ","created_at":"2018-05-26T23:37:38Z","updated_at":"2018-05-26T23:58:00Z","html_url":"https://github.com/ethersphere/go-ethereum/pull/560#discussion_r191060936","pull_request_url":"https://api.github.com/repos/ethersphere/go-ethereum/pulls/560","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/ethersphere/go-ethereum/pulls/comments/191060936"},"html":{"href":"https://github.com/ethersphere/go-ethereum/pull/560#discussion_r191060936"},"pull_request":{"href":"https://api.github.com/repos/ethersphere/go-ethereum/pulls/560"}},"in_reply_to_id":190861314},"pull_request":{"url":"https://api.github.com/repos/ethersphere/go-ethereum/pulls/560","id":189467239,"html_url":"https://github.com/ethersphere/go-ethereum/pull/560","diff_url":"https://github.com/ethersphere/go-ethereum/pull/560.diff","patch_url":"https://github.com/ethersphere/go-ethereum/pull/560.patch","issue_url":"https://api.github.com/repos/ethersphere/go-ethereum/issues/560","number":560,"state":"open","locked":false,"title":"swarm/pss: Generic notifications package","user":{"login":"nolash","id":9886925,"avatar_url":"https://avatars1.githubusercontent.com/u/9886925?v=4","gravatar_id":"","url":"https://api.github.com/users/nolash","html_url":"https://github.com/nolash","followers_url":"https://api.github.com/users/nolash/followers","following_url":"https://api.github.com/users/nolash/following{/other_user}","gists_url":"https://api.github.com/users/nolash/gists{/gist_id}","starred_url":"https://api.github.com/users/nolash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nolash/subscriptions","organizations_url":"https://api.github.com/users/nolash/orgs","repos_url":"https://api.github.com/users/nolash/repos","events_url":"https://api.github.com/users/nolash/events{/privacy}","received_events_url":"https://api.github.com/users/nolash/received_events","type":"User","site_admin":false},"body":"This PR adds a notifications package to pss. It enables separate notifications objects to be constructed for each notification service.\r\n\r\nThe primary use case are resource update subscriptions.\r\n\r\nA notification subscription is added to an address bin, and all addresses within that bin share a symmetric key. Thus, for every notification sent out, there is a guarantee that not more sends will be performed than the number of address bins.\r\n\r\nFor example, if the address _threshold_ is one byte, then a maximum of 256 sends will be performed for that notification. Empty bins will not be sent to.\r\n\r\nNext steps should probably be to:\r\n\r\n* Implement key rotation.\r\n* Refactor pss to allow bit-level instead of byte-level addressing.","created_at":"2018-05-21T19:31:00Z","updated_at":"2018-05-26T23:58:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b17b26a1a9915d94322fdf52a2b4efa4dbc7da28","assignee":{"login":"nolash","id":9886925,"avatar_url":"https://avatars1.githubusercontent.com/u/9886925?v=4","gravatar_id":"","url":"https://api.github.com/users/nolash","html_url":"https://github.com/nolash","followers_url":"https://api.github.com/users/nolash/followers","following_url":"https://api.github.com/users/nolash/following{/other_user}","gists_url":"https://api.github.com/users/nolash/gists{/gist_id}","starred_url":"https://api.github.com/users/nolash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nolash/subscriptions","organizations_url":"https://api.github.com/users/nolash/orgs","repos_url":"https://api.github.com/users/nolash/repos","events_url":"https://api.github.com/users/nolash/events{/privacy}","received_events_url":"https://api.github.com/users/nolash/received_events","type":"User","site_admin":false},"assignees":[{"login":"nolash","id":9886925,"avatar_url":"https://avatars1.githubusercontent.com/u/9886925?v=4","gravatar_id":"","url":"https://api.github.com/users/nolash","html_url":"https://github.com/nolash","followers_url":"https://api.github.com/users/nolash/followers","following_url":"https://api.github.com/users/nolash/following{/other_user}","gists_url":"https://api.github.com/users/nolash/gists{/gist_id}","starred_url":"https://api.github.com/users/nolash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nolash/subscriptions","organizations_url":"https://api.github.com/users/nolash/orgs","repos_url":"https://api.github.com/users/nolash/repos","events_url":"https://api.github.com/users/nolash/events{/privacy}","received_events_url":"https://api.github.com/users/nolash/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":86320164,"url":"https://api.github.com/repos/ethersphere/go-ethereum/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":777000422,"url":"https://api.github.com/repos/ethersphere/go-ethereum/labels/pss","name":"pss","color":"c7f968","default":false},{"id":772604789,"url":"https://api.github.com/repos/ethersphere/go-ethereum/labels/ready%20for%20another%20review","name":"ready for another review","color":"0e8a16","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/ethersphere/go-ethereum/pulls/560/commits","review_comments_url":"https://api.github.com/repos/ethersphere/go-ethereum/pulls/560/comments","review_comment_url":"https://api.github.com/repos/ethersphere/go-ethereum/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ethersphere/go-ethereum/issues/560/comments","statuses_url":"https://api.github.com/repos/ethersphere/go-ethereum/statuses/c5817b48ecde1a017a5101e39dda3ff551497f1a","head":{"label":"ethersphere:pss-notify-first","ref":"pss-notify-first","sha":"c5817b48ecde1a017a5101e39dda3ff551497f1a","user":{"login":"ethersphere","id":6946989,"avatar_url":"https://avatars2.githubusercontent.com/u/6946989?v=4","gravatar_id":"","url":"https://api.github.com/users/ethersphere","html_url":"https://github.com/ethersphere","followers_url":"https://api.github.com/users/ethersphere/followers","following_url":"https://api.github.com/users/ethersphere/following{/other_user}","gists_url":"https://api.github.com/users/ethersphere/gists{/gist_id}","starred_url":"https://api.github.com/users/ethersphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethersphere/subscriptions","organizations_url":"https://api.github.com/users/ethersphere/orgs","repos_url":"https://api.github.com/users/ethersphere/repos","events_url":"https://api.github.com/users/ethersphere/events{/privacy}","received_events_url":"https://api.github.com/users/ethersphere/received_events","type":"Organization","site_admin":false},"repo":{"id":17790136,"name":"go-ethereum","full_name":"ethersphere/go-ethereum","owner":{"login":"ethersphere","id":6946989,"avatar_url":"https://avatars2.githubusercontent.com/u/6946989?v=4","gravatar_id":"","url":"https://api.github.com/users/ethersphere","html_url":"https://github.com/ethersphere","followers_url":"https://api.github.com/users/ethersphere/followers","following_url":"https://api.github.com/users/ethersphere/following{/other_user}","gists_url":"https://api.github.com/users/ethersphere/gists{/gist_id}","starred_url":"https://api.github.com/users/ethersphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethersphere/subscriptions","organizations_url":"https://api.github.com/users/ethersphere/orgs","repos_url":"https://api.github.com/users/ethersphere/repos","events_url":"https://api.github.com/users/ethersphere/events{/privacy}","received_events_url":"https://api.github.com/users/ethersphere/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ethersphere/go-ethereum","description":"Ethereum Go","fork":true,"url":"https://api.github.com/repos/ethersphere/go-ethereum","forks_url":"https://api.github.com/repos/ethersphere/go-ethereum/forks","keys_url":"https://api.github.com/repos/ethersphere/go-ethereum/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ethersphere/go-ethereum/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ethersphere/go-ethereum/teams","hooks_url":"https://api.github.com/repos/ethersphere/go-ethereum/hooks","issue_events_url":"https://api.github.com/repos/ethersphere/go-ethereum/issues/events{/number}","events_url":"https://api.github.com/repos/ethersphere/go-ethereum/events","assignees_url":"https://api.github.com/repos/ethersphere/go-ethereum/assignees{/user}","branches_url":"https://api.github.com/repos/ethersphere/go-ethereum/branches{/branch}","tags_url":"https://api.github.com/repos/ethersphere/go-ethereum/tags","blobs_url":"https://api.github.com/repos/ethersphere/go-ethereum/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ethersphere/go-ethereum/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ethersphere/go-ethereum/git/refs{/sha}","trees_url":"https://api.github.com/repos/ethersphere/go-ethereum/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ethersphere/go-ethereum/statuses/{sha}","languages_url":"https://api.github.com/repos/ethersphere/go-ethereum/languages","stargazers_url":"https://api.github.com/repos/ethersphere/go-ethereum/stargazers","contributors_url":"https://api.github.com/repos/ethersphere/go-ethereum/contributors","subscribers_url":"https://api.github.com/repos/ethersphere/go-ethereum/subscribers","subscription_url":"https://api.github.com/repos/ethersphere/go-ethereum/subscription","commits_url":"https://api.github.com/repos/ethersphere/go-ethereum/commits{/sha}","git_commits_url":"https://api.github.com/repos/ethersphere/go-ethereum/git/commits{/sha}","comments_url":"https://api.github.com/repos/ethersphere/go-ethereum/comments{/number}","issue_comment_url":"https://api.github.com/repos/ethersphere/go-ethereum/issues/comments{/number}","contents_url":"https://api.github.com/repos/ethersphere/go-ethereum/contents/{+path}","compare_url":"https://api.github.com/repos/ethersphere/go-ethereum/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ethersphere/go-ethereum/merges","archive_url":"https://api.github.com/repos/ethersphere/go-ethereum/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ethersphere/go-ethereum/downloads","issues_url":"https://api.github.com/repos/ethersphere/go-ethereum/issues{/number}","pulls_url":"https://api.github.com/repos/ethersphere/go-ethereum/pulls{/number}","milestones_url":"https://api.github.com/repos/ethersphere/go-ethereum/milestones{/number}","notifications_url":"https://api.github.com/repos/ethersphere/go-ethereum/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ethersphere/go-ethereum/labels{/name}","releases_url":"https://api.github.com/repos/ethersphere/go-ethereum/releases{/id}","deployments_url":"https://api.github.com/repos/ethersphere/go-ethereum/deployments","created_at":"2014-03-16T02:06:34Z","updated_at":"2018-05-26T09:57:04Z","pushed_at":"2018-05-26T09:57:02Z","git_url":"git://github.com/ethersphere/go-ethereum.git","ssh_url":"git@github.com:ethersphere/go-ethereum.git","clone_url":"https://github.com/ethersphere/go-ethereum.git","svn_url":"https://github.com/ethersphere/go-ethereum","homepage":"","size":93551,"stargazers_count":91,"watchers_count":91,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":26,"mirror_url":null,"archived":false,"open_issues_count":148,"license":{"key":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0"},"forks":26,"open_issues":148,"watchers":91,"default_branch":"swarm-network-rewrite"}},"base":{"label":"ethersphere:swarm-network-rewrite","ref":"swarm-network-rewrite","sha":"3c317fa17c3abf9bdba7e52af3741a9f9b2407ac","user":{"login":"ethersphere","id":6946989,"avatar_url":"https://avatars2.githubusercontent.com/u/6946989?v=4","gravatar_id":"","url":"https://api.github.com/users/ethersphere","html_url":"https://github.com/ethersphere","followers_url":"https://api.github.com/users/ethersphere/followers","following_url":"https://api.github.com/users/ethersphere/following{/other_user}","gists_url":"https://api.github.com/users/ethersphere/gists{/gist_id}","starred_url":"https://api.github.com/users/ethersphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethersphere/subscriptions","organizations_url":"https://api.github.com/users/ethersphere/orgs","repos_url":"https://api.github.com/users/ethersphere/repos","events_url":"https://api.github.com/users/ethersphere/events{/privacy}","received_events_url":"https://api.github.com/users/ethersphere/received_events","type":"Organization","site_admin":false},"repo":{"id":17790136,"name":"go-ethereum","full_name":"ethersphere/go-ethereum","owner":{"login":"ethersphere","id":6946989,"avatar_url":"https://avatars2.githubusercontent.com/u/6946989?v=4","gravatar_id":"","url":"https://api.github.com/users/ethersphere","html_url":"https://github.com/ethersphere","followers_url":"https://api.github.com/users/ethersphere/followers","following_url":"https://api.github.com/users/ethersphere/following{/other_user}","gists_url":"https://api.github.com/users/ethersphere/gists{/gist_id}","starred_url":"https://api.github.com/users/ethersphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethersphere/subscriptions","organizations_url":"https://api.github.com/users/ethersphere/orgs","repos_url":"https://api.github.com/users/ethersphere/repos","events_url":"https://api.github.com/users/ethersphere/events{/privacy}","received_events_url":"https://api.github.com/users/ethersphere/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ethersphere/go-ethereum","description":"Ethereum Go","fork":true,"url":"https://api.github.com/repos/ethersphere/go-ethereum","forks_url":"https://api.github.com/repos/ethersphere/go-ethereum/forks","keys_url":"https://api.github.com/repos/ethersphere/go-ethereum/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ethersphere/go-ethereum/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ethersphere/go-ethereum/teams","hooks_url":"https://api.github.com/repos/ethersphere/go-ethereum/hooks","issue_events_url":"https://api.github.com/repos/ethersphere/go-ethereum/issues/events{/number}","events_url":"https://api.github.com/repos/ethersphere/go-ethereum/events","assignees_url":"https://api.github.com/repos/ethersphere/go-ethereum/assignees{/user}","branches_url":"https://api.github.com/repos/ethersphere/go-ethereum/branches{/branch}","tags_url":"https://api.github.com/repos/ethersphere/go-ethereum/tags","blobs_url":"https://api.github.com/repos/ethersphere/go-ethereum/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ethersphere/go-ethereum/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ethersphere/go-ethereum/git/refs{/sha}","trees_url":"https://api.github.com/repos/ethersphere/go-ethereum/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ethersphere/go-ethereum/statuses/{sha}","languages_url":"https://api.github.com/repos/ethersphere/go-ethereum/languages","stargazers_url":"https://api.github.com/repos/ethersphere/go-ethereum/stargazers","contributors_url":"https://api.github.com/repos/ethersphere/go-ethereum/contributors","subscribers_url":"https://api.github.com/repos/ethersphere/go-ethereum/subscribers","subscription_url":"https://api.github.com/repos/ethersphere/go-ethereum/subscription","commits_url":"https://api.github.com/repos/ethersphere/go-ethereum/commits{/sha}","git_commits_url":"https://api.github.com/repos/ethersphere/go-ethereum/git/commits{/sha}","comments_url":"https://api.github.com/repos/ethersphere/go-ethereum/comments{/number}","issue_comment_url":"https://api.github.com/repos/ethersphere/go-ethereum/issues/comments{/number}","contents_url":"https://api.github.com/repos/ethersphere/go-ethereum/contents/{+path}","compare_url":"https://api.github.com/repos/ethersphere/go-ethereum/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ethersphere/go-ethereum/merges","archive_url":"https://api.github.com/repos/ethersphere/go-ethereum/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ethersphere/go-ethereum/downloads","issues_url":"https://api.github.com/repos/ethersphere/go-ethereum/issues{/number}","pulls_url":"https://api.github.com/repos/ethersphere/go-ethereum/pulls{/number}","milestones_url":"https://api.github.com/repos/ethersphere/go-ethereum/milestones{/number}","notifications_url":"https://api.github.com/repos/ethersphere/go-ethereum/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ethersphere/go-ethereum/labels{/name}","releases_url":"https://api.github.com/repos/ethersphere/go-ethereum/releases{/id}","deployments_url":"https://api.github.com/repos/ethersphere/go-ethereum/deployments","created_at":"2014-03-16T02:06:34Z","updated_at":"2018-05-26T09:57:04Z","pushed_at":"2018-05-26T09:57:02Z","git_url":"git://github.com/ethersphere/go-ethereum.git","ssh_url":"git@github.com:ethersphere/go-ethereum.git","clone_url":"https://github.com/ethersphere/go-ethereum.git","svn_url":"https://github.com/ethersphere/go-ethereum","homepage":"","size":93551,"stargazers_count":91,"watchers_count":91,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":26,"mirror_url":null,"archived":false,"open_issues_count":148,"license":{"key":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0"},"forks":26,"open_issues":148,"watchers":91,"default_branch":"swarm-network-rewrite"}},"_links":{"self":{"href":"https://api.github.com/repos/ethersphere/go-ethereum/pulls/560"},"html":{"href":"https://github.com/ethersphere/go-ethereum/pull/560"},"issue":{"href":"https://api.github.com/repos/ethersphere/go-ethereum/issues/560"},"comments":{"href":"https://api.github.com/repos/ethersphere/go-ethereum/issues/560/comments"},"review_comments":{"href":"https://api.github.com/repos/ethersphere/go-ethereum/pulls/560/comments"},"review_comment":{"href":"https://api.github.com/repos/ethersphere/go-ethereum/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ethersphere/go-ethereum/pulls/560/commits"},"statuses":{"href":"https://api.github.com/repos/ethersphere/go-ethereum/statuses/c5817b48ecde1a017a5101e39dda3ff551497f1a"}},"author_association":"NONE"}}
{"actor":{"display_login":"zelig"}}