{"action":"created","comment":{"url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/comments/41104103","id":41104103,"diff_hunk":"@@ -162,6 +162,29 @@ namespace {\n      */\n     map<uint256, NodeId> mapBlockSource;\n \n+    /**\n+     * Filter for transactions that were recently rejected by\n+     * AcceptToMemoryPool. These are not rerequested until the chain tip\n+     * changes, at which point the entire filter is reset. Protected by\n+     * cs_main.\n+     *\n+     * Without this filter we'd be re-requesting txs from each of our peers,\n+     * increasing bandwidth consumption considerably. For instance, with 100\n+     * peers, half of which relay a tx we don't accept, that might be a 50x\n+     * bandwidth increase. A flooding attacker attempting to roll-over the\n+     * filter using minimum-sized, 60byte, transactions might manage to send\n+     * 1000/sec if we have fast peers, so we pick 120,000 to give our peers a","path":"src/main.cpp","position":15,"original_position":15,"commit_id":"0847d9cb5fcd2fdd5a21bde699944d966cf5add9","original_commit_id":"0847d9cb5fcd2fdd5a21bde699944d966cf5add9","user":{"login":"dcousens","id":413395,"avatar_url":"https://avatars.githubusercontent.com/u/413395?v=3","gravatar_id":"","url":"https://api.github.com/users/dcousens","html_url":"https://github.com/dcousens","followers_url":"https://api.github.com/users/dcousens/followers","following_url":"https://api.github.com/users/dcousens/following{/other_user}","gists_url":"https://api.github.com/users/dcousens/gists{/gist_id}","starred_url":"https://api.github.com/users/dcousens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcousens/subscriptions","organizations_url":"https://api.github.com/users/dcousens/orgs","repos_url":"https://api.github.com/users/dcousens/repos","events_url":"https://api.github.com/users/dcousens/events{/privacy}","received_events_url":"https://api.github.com/users/dcousens/received_events","type":"User","site_admin":false},"body":"Pick `120,000` what?","created_at":"2015-10-04T23:23:36Z","updated_at":"2015-10-04T23:23:36Z","html_url":"https://github.com/bitcoin/bitcoin/pull/6452#discussion_r41104103","pull_request_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/6452","_links":{"self":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/comments/41104103"},"html":{"href":"https://github.com/bitcoin/bitcoin/pull/6452#discussion_r41104103"},"pull_request":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/6452"}}},"pull_request":{"url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/6452","id":40220453,"html_url":"https://github.com/bitcoin/bitcoin/pull/6452","diff_url":"https://github.com/bitcoin/bitcoin/pull/6452.diff","patch_url":"https://github.com/bitcoin/bitcoin/pull/6452.patch","issue_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/6452","number":6452,"state":"closed","locked":false,"title":"Keep track of recently rejected transactions with a rolling bloom filter","user":{"login":"petertodd","id":7042,"avatar_url":"https://avatars.githubusercontent.com/u/7042?v=3","gravatar_id":"","url":"https://api.github.com/users/petertodd","html_url":"https://github.com/petertodd","followers_url":"https://api.github.com/users/petertodd/followers","following_url":"https://api.github.com/users/petertodd/following{/other_user}","gists_url":"https://api.github.com/users/petertodd/gists{/gist_id}","starred_url":"https://api.github.com/users/petertodd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petertodd/subscriptions","organizations_url":"https://api.github.com/users/petertodd/orgs","repos_url":"https://api.github.com/users/petertodd/repos","events_url":"https://api.github.com/users/petertodd/events{/privacy}","received_events_url":"https://api.github.com/users/petertodd/received_events","type":"User","site_admin":false},"body":"@marcos's #6450, but with a rolling bloom filter instead of a limitedmap. The number of rejected txids saved has been greatly improved, which should help in some attack scenarios. In addition the filter is now cleared every time the chaintip changes, rather than based on a timeout, to better match the cases where a previously rejected transaction would now be valid. (nLockTime, double-spends, etc.)","created_at":"2015-07-17T10:55:40Z","updated_at":"2015-10-04T23:23:36Z","closed_at":"2015-07-31T16:32:01Z","merged_at":null,"merge_commit_sha":"336041d22388dd995f863abc3e4804584e02b94f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/6452/commits","review_comments_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/6452/comments","review_comment_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/6452/comments","statuses_url":"https://api.github.com/repos/bitcoin/bitcoin/statuses/0847d9cb5fcd2fdd5a21bde699944d966cf5add9","head":{"label":"petertodd:recent-rejects-rolling-bloom","ref":"recent-rejects-rolling-bloom","sha":"0847d9cb5fcd2fdd5a21bde699944d966cf5add9","user":{"login":"petertodd","id":7042,"avatar_url":"https://avatars.githubusercontent.com/u/7042?v=3","gravatar_id":"","url":"https://api.github.com/users/petertodd","html_url":"https://github.com/petertodd","followers_url":"https://api.github.com/users/petertodd/followers","following_url":"https://api.github.com/users/petertodd/following{/other_user}","gists_url":"https://api.github.com/users/petertodd/gists{/gist_id}","starred_url":"https://api.github.com/users/petertodd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petertodd/subscriptions","organizations_url":"https://api.github.com/users/petertodd/orgs","repos_url":"https://api.github.com/users/petertodd/repos","events_url":"https://api.github.com/users/petertodd/events{/privacy}","received_events_url":"https://api.github.com/users/petertodd/received_events","type":"User","site_admin":false},"repo":{"id":5992112,"name":"bitcoin","full_name":"petertodd/bitcoin","owner":{"login":"petertodd","id":7042,"avatar_url":"https://avatars.githubusercontent.com/u/7042?v=3","gravatar_id":"","url":"https://api.github.com/users/petertodd","html_url":"https://github.com/petertodd","followers_url":"https://api.github.com/users/petertodd/followers","following_url":"https://api.github.com/users/petertodd/following{/other_user}","gists_url":"https://api.github.com/users/petertodd/gists{/gist_id}","starred_url":"https://api.github.com/users/petertodd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petertodd/subscriptions","organizations_url":"https://api.github.com/users/petertodd/orgs","repos_url":"https://api.github.com/users/petertodd/repos","events_url":"https://api.github.com/users/petertodd/events{/privacy}","received_events_url":"https://api.github.com/users/petertodd/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/petertodd/bitcoin","description":"Bitcoin integration/staging tree","fork":true,"url":"https://api.github.com/repos/petertodd/bitcoin","forks_url":"https://api.github.com/repos/petertodd/bitcoin/forks","keys_url":"https://api.github.com/repos/petertodd/bitcoin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/petertodd/bitcoin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/petertodd/bitcoin/teams","hooks_url":"https://api.github.com/repos/petertodd/bitcoin/hooks","issue_events_url":"https://api.github.com/repos/petertodd/bitcoin/issues/events{/number}","events_url":"https://api.github.com/repos/petertodd/bitcoin/events","assignees_url":"https://api.github.com/repos/petertodd/bitcoin/assignees{/user}","branches_url":"https://api.github.com/repos/petertodd/bitcoin/branches{/branch}","tags_url":"https://api.github.com/repos/petertodd/bitcoin/tags","blobs_url":"https://api.github.com/repos/petertodd/bitcoin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/petertodd/bitcoin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/petertodd/bitcoin/git/refs{/sha}","trees_url":"https://api.github.com/repos/petertodd/bitcoin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/petertodd/bitcoin/statuses/{sha}","languages_url":"https://api.github.com/repos/petertodd/bitcoin/languages","stargazers_url":"https://api.github.com/repos/petertodd/bitcoin/stargazers","contributors_url":"https://api.github.com/repos/petertodd/bitcoin/contributors","subscribers_url":"https://api.github.com/repos/petertodd/bitcoin/subscribers","subscription_url":"https://api.github.com/repos/petertodd/bitcoin/subscription","commits_url":"https://api.github.com/repos/petertodd/bitcoin/commits{/sha}","git_commits_url":"https://api.github.com/repos/petertodd/bitcoin/git/commits{/sha}","comments_url":"https://api.github.com/repos/petertodd/bitcoin/comments{/number}","issue_comment_url":"https://api.github.com/repos/petertodd/bitcoin/issues/comments{/number}","contents_url":"https://api.github.com/repos/petertodd/bitcoin/contents/{+path}","compare_url":"https://api.github.com/repos/petertodd/bitcoin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/petertodd/bitcoin/merges","archive_url":"https://api.github.com/repos/petertodd/bitcoin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/petertodd/bitcoin/downloads","issues_url":"https://api.github.com/repos/petertodd/bitcoin/issues{/number}","pulls_url":"https://api.github.com/repos/petertodd/bitcoin/pulls{/number}","milestones_url":"https://api.github.com/repos/petertodd/bitcoin/milestones{/number}","notifications_url":"https://api.github.com/repos/petertodd/bitcoin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/petertodd/bitcoin/labels{/name}","releases_url":"https://api.github.com/repos/petertodd/bitcoin/releases{/id}","created_at":"2012-09-28T03:31:40Z","updated_at":"2015-07-10T20:43:06Z","pushed_at":"2015-10-03T16:21:47Z","git_url":"git://github.com/petertodd/bitcoin.git","ssh_url":"git@github.com:petertodd/bitcoin.git","clone_url":"https://github.com/petertodd/bitcoin.git","svn_url":"https://github.com/petertodd/bitcoin","homepage":"http://www.bitcoin.org","size":57975,"stargazers_count":6,"watchers_count":6,"language":"TypeScript","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":6,"default_branch":"master"}},"base":{"label":"bitcoin:master","ref":"master","sha":"eddaba7b5692288087a926da5733e86b47274e4e","user":{"login":"bitcoin","id":528860,"avatar_url":"https://avatars.githubusercontent.com/u/528860?v=3","gravatar_id":"","url":"https://api.github.com/users/bitcoin","html_url":"https://github.com/bitcoin","followers_url":"https://api.github.com/users/bitcoin/followers","following_url":"https://api.github.com/users/bitcoin/following{/other_user}","gists_url":"https://api.github.com/users/bitcoin/gists{/gist_id}","starred_url":"https://api.github.com/users/bitcoin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitcoin/subscriptions","organizations_url":"https://api.github.com/users/bitcoin/orgs","repos_url":"https://api.github.com/users/bitcoin/repos","events_url":"https://api.github.com/users/bitcoin/events{/privacy}","received_events_url":"https://api.github.com/users/bitcoin/received_events","type":"Organization","site_admin":false},"repo":{"id":1181927,"name":"bitcoin","full_name":"bitcoin/bitcoin","owner":{"login":"bitcoin","id":528860,"avatar_url":"https://avatars.githubusercontent.com/u/528860?v=3","gravatar_id":"","url":"https://api.github.com/users/bitcoin","html_url":"https://github.com/bitcoin","followers_url":"https://api.github.com/users/bitcoin/followers","following_url":"https://api.github.com/users/bitcoin/following{/other_user}","gists_url":"https://api.github.com/users/bitcoin/gists{/gist_id}","starred_url":"https://api.github.com/users/bitcoin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitcoin/subscriptions","organizations_url":"https://api.github.com/users/bitcoin/orgs","repos_url":"https://api.github.com/users/bitcoin/repos","events_url":"https://api.github.com/users/bitcoin/events{/privacy}","received_events_url":"https://api.github.com/users/bitcoin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bitcoin/bitcoin","description":"Bitcoin Core integration/staging tree","fork":false,"url":"https://api.github.com/repos/bitcoin/bitcoin","forks_url":"https://api.github.com/repos/bitcoin/bitcoin/forks","keys_url":"https://api.github.com/repos/bitcoin/bitcoin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bitcoin/bitcoin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bitcoin/bitcoin/teams","hooks_url":"https://api.github.com/repos/bitcoin/bitcoin/hooks","issue_events_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/events{/number}","events_url":"https://api.github.com/repos/bitcoin/bitcoin/events","assignees_url":"https://api.github.com/repos/bitcoin/bitcoin/assignees{/user}","branches_url":"https://api.github.com/repos/bitcoin/bitcoin/branches{/branch}","tags_url":"https://api.github.com/repos/bitcoin/bitcoin/tags","blobs_url":"https://api.github.com/repos/bitcoin/bitcoin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bitcoin/bitcoin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bitcoin/bitcoin/git/refs{/sha}","trees_url":"https://api.github.com/repos/bitcoin/bitcoin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bitcoin/bitcoin/statuses/{sha}","languages_url":"https://api.github.com/repos/bitcoin/bitcoin/languages","stargazers_url":"https://api.github.com/repos/bitcoin/bitcoin/stargazers","contributors_url":"https://api.github.com/repos/bitcoin/bitcoin/contributors","subscribers_url":"https://api.github.com/repos/bitcoin/bitcoin/subscribers","subscription_url":"https://api.github.com/repos/bitcoin/bitcoin/subscription","commits_url":"https://api.github.com/repos/bitcoin/bitcoin/commits{/sha}","git_commits_url":"https://api.github.com/repos/bitcoin/bitcoin/git/commits{/sha}","comments_url":"https://api.github.com/repos/bitcoin/bitcoin/comments{/number}","issue_comment_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/comments{/number}","contents_url":"https://api.github.com/repos/bitcoin/bitcoin/contents/{+path}","compare_url":"https://api.github.com/repos/bitcoin/bitcoin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bitcoin/bitcoin/merges","archive_url":"https://api.github.com/repos/bitcoin/bitcoin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bitcoin/bitcoin/downloads","issues_url":"https://api.github.com/repos/bitcoin/bitcoin/issues{/number}","pulls_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls{/number}","milestones_url":"https://api.github.com/repos/bitcoin/bitcoin/milestones{/number}","notifications_url":"https://api.github.com/repos/bitcoin/bitcoin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bitcoin/bitcoin/labels{/name}","releases_url":"https://api.github.com/repos/bitcoin/bitcoin/releases{/id}","created_at":"2010-12-19T15:16:43Z","updated_at":"2015-10-04T22:43:53Z","pushed_at":"2015-10-04T19:09:06Z","git_url":"git://github.com/bitcoin/bitcoin.git","ssh_url":"git@github.com:bitcoin/bitcoin.git","clone_url":"https://github.com/bitcoin/bitcoin.git","svn_url":"https://github.com/bitcoin/bitcoin","homepage":"https://bitcoin.org/en/download","size":138379,"stargazers_count":7588,"watchers_count":7588,"language":"C++","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":5244,"mirror_url":null,"open_issues_count":443,"forks":5244,"open_issues":443,"watchers":7588,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/6452"},"html":{"href":"https://github.com/bitcoin/bitcoin/pull/6452"},"issue":{"href":"https://api.github.com/repos/bitcoin/bitcoin/issues/6452"},"comments":{"href":"https://api.github.com/repos/bitcoin/bitcoin/issues/6452/comments"},"review_comments":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/6452/comments"},"review_comment":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/6452/commits"},"statuses":{"href":"https://api.github.com/repos/bitcoin/bitcoin/statuses/0847d9cb5fcd2fdd5a21bde699944d966cf5add9"}}}}