GitHub PullRequestReviewCommentEvent at 2014-09-03 01:30:38
Repository: bitcoin
Actor: rebroad
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/comments/17027451","id":17027451,"diff_hunk":"@@ -67,9 +67,17 @@ static const int MAX_SCRIPTCHECK_THREADS = 16;\n /** -par default (number of script-checking threads, 0 = auto) */\n static const int DEFAULT_SCRIPTCHECK_THREADS = 0;\n /** Number of blocks that can be requested at any given time from a single peer. */\n-static const int MAX_BLOCKS_IN_TRANSIT_PER_PEER = 128;\n-/** Timeout in seconds before considering a block download peer unresponsive. */\n-static const unsigned int BLOCK_DOWNLOAD_TIMEOUT = 60;\n+static const int MAX_BLOCKS_IN_TRANSIT_PER_PEER = 16;\n+/** Timeout in seconds during which a peer must stall block download progress before being disconnected. */\n+static const unsigned int BLOCK_STALLING_TIMEOUT = 2;\n+/** Number of headers sent in one getheaders result. We rely on the assumption that if a peer sends\n+ *  less than this number, we reached their tip. Changing this value is a protocol upgrade. */\n+static const unsigned int MAX_HEADERS_RESULTS = 2000;","path":"src/main.h","position":12,"original_position":12,"commit_id":"2525afb58a71924d48bf99ea19cf741f0c6ccf66","original_commit_id":"2525afb58a71924d48bf99ea19cf741f0c6ccf66","user":{"login":"rebroad","id":1530283,"avatar_url":"https://avatars.githubusercontent.com/u/1530283?v=2","gravatar_id":"a27aa8d1cbe456b5b7bdcc7d43b118fc","url":"https://api.github.com/users/rebroad","html_url":"https://github.com/rebroad","followers_url":"https://api.github.com/users/rebroad/followers","following_url":"https://api.github.com/users/rebroad/following{/other_user}","gists_url":"https://api.github.com/users/rebroad/gists{/gist_id}","starred_url":"https://api.github.com/users/rebroad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rebroad/subscriptions","organizations_url":"https://api.github.com/users/rebroad/orgs","repos_url":"https://api.github.com/users/rebroad/repos","events_url":"https://api.github.com/users/rebroad/events{/privacy}","received_events_url":"https://api.github.com/users/rebroad/received_events","type":"User","site_admin":false},"body":"Why 2000?","created_at":"2014-09-03T01:30:38Z","updated_at":"2014-09-03T01:30:38Z","html_url":"https://github.com/bitcoin/bitcoin/pull/4468#discussion_r17027451","pull_request_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/4468","_links":{"self":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/comments/17027451"},"html":{"href":"https://github.com/bitcoin/bitcoin/pull/4468#discussion_r17027451"},"pull_request":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/4468"}}},"pull_request":{"url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/4468","id":18014056,"html_url":"https://github.com/bitcoin/bitcoin/pull/4468","diff_url":"https://github.com/bitcoin/bitcoin/pull/4468.diff","patch_url":"https://github.com/bitcoin/bitcoin/pull/4468.patch","issue_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/4468","number":4468,"state":"open","locked":false,"title":"Preview: headers-first synchronization","user":{"login":"sipa","id":548488,"avatar_url":"https://avatars.githubusercontent.com/u/548488?v=2","gravatar_id":"369687cc5d256fe269c9fac0216be2a7","url":"https://api.github.com/users/sipa","html_url":"https://github.com/sipa","followers_url":"https://api.github.com/users/sipa/followers","following_url":"https://api.github.com/users/sipa/following{/other_user}","gists_url":"https://api.github.com/users/sipa/gists{/gist_id}","starred_url":"https://api.github.com/users/sipa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sipa/subscriptions","organizations_url":"https://api.github.com/users/sipa/orgs","repos_url":"https://api.github.com/users/sipa/repos","events_url":"https://api.github.com/users/sipa/events{/privacy}","received_events_url":"https://api.github.com/users/sipa/received_events","type":"User","site_admin":false},"body":"Here's a first (well, second) version of a fully-functional headers-first synchronization. It's not ready to be merged (it breaks reindexing, which cannot deal with out-of-order blocks on disk yet).\r\n\r\nMany changes:\r\n* Do not use 'getblocks', but 'getheaders', and use it to build a headers tree.\r\n* Blocks are fetched in parallel from all available outbound peers, using a limited moving window. When one peer stalls the movement of the window, it is disconnected.\r\n* No more orphan blocks. At all. We only ever request a block for which we have verified the headers, and store it to disk immediately. This means that a disk-fill attack would require PoW.\r\n* Some new fields in getpeerinfo:\r\n  * 'syncheight': the height up to which we've validated this peer's headers.\r\n  * 'commonheight': the height up to which we have all blocks in common with this peer.\r\n  * 'inflight': the heights we're currently requesting from this peer.\r\n* Require protocol version 31800 for every peer (released in december 2010).\r\n* No more syncnode (we sync from everyone we can, though limited to 1 during initial *headers* sync).\r\n* Introduce some extra named constants and comments.\r\n* Several bugfixes:\r\n  * CChain::GetLocator() didn't work correctly across the CChain end.\r\n  * FindMostWorkChain() failed to remove the actually failed block from setBlockIndexValid.\r\n  * ProcessMessage() failed to act on ban/reject notices resulting from validation failures during the direct execution (CheckBlock, ...).\r\n","created_at":"2014-07-05T23:09:10Z","updated_at":"2014-09-03T01:30:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"063e217262590422d13c635d04d9bdac303b9ffd","assignee":null,"milestone":{"url":"https://api.github.com/repos/bitcoin/bitcoin/milestones/14","labels_url":"https://api.github.com/repos/bitcoin/bitcoin/milestones/14/labels","id":505738,"number":14,"title":"0.10.0","description":"","creator":{"login":"laanwj","id":126646,"avatar_url":"https://avatars.githubusercontent.com/u/126646?v=2","gravatar_id":"9598ae319be753b20f97f21ed10ca7ed","url":"https://api.github.com/users/laanwj","html_url":"https://github.com/laanwj","followers_url":"https://api.github.com/users/laanwj/followers","following_url":"https://api.github.com/users/laanwj/following{/other_user}","gists_url":"https://api.github.com/users/laanwj/gists{/gist_id}","starred_url":"https://api.github.com/users/laanwj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laanwj/subscriptions","organizations_url":"https://api.github.com/users/laanwj/orgs","repos_url":"https://api.github.com/users/laanwj/repos","events_url":"https://api.github.com/users/laanwj/events{/privacy}","received_events_url":"https://api.github.com/users/laanwj/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":36,"state":"open","created_at":"2013-12-05T10:34:42Z","updated_at":"2014-08-29T19:29:00Z","due_on":null},"commits_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/4468/commits","review_comments_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/4468/comments","review_comment_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/comments/{number}","comments_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/4468/comments","statuses_url":"https://api.github.com/repos/bitcoin/bitcoin/statuses/2525afb58a71924d48bf99ea19cf741f0c6ccf66","head":{"label":"sipa:headersfirst8","ref":"headersfirst8","sha":"2525afb58a71924d48bf99ea19cf741f0c6ccf66","user":{"login":"sipa","id":548488,"avatar_url":"https://avatars.githubusercontent.com/u/548488?v=2","gravatar_id":"369687cc5d256fe269c9fac0216be2a7","url":"https://api.github.com/users/sipa","html_url":"https://github.com/sipa","followers_url":"https://api.github.com/users/sipa/followers","following_url":"https://api.github.com/users/sipa/following{/other_user}","gists_url":"https://api.github.com/users/sipa/gists{/gist_id}","starred_url":"https://api.github.com/users/sipa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sipa/subscriptions","organizations_url":"https://api.github.com/users/sipa/orgs","repos_url":"https://api.github.com/users/sipa/repos","events_url":"https://api.github.com/users/sipa/events{/privacy}","received_events_url":"https://api.github.com/users/sipa/received_events","type":"User","site_admin":false},"repo":{"id":1458655,"name":"bitcoin","full_name":"sipa/bitcoin","owner":{"login":"sipa","id":548488,"avatar_url":"https://avatars.githubusercontent.com/u/548488?v=2","gravatar_id":"369687cc5d256fe269c9fac0216be2a7","url":"https://api.github.com/users/sipa","html_url":"https://github.com/sipa","followers_url":"https://api.github.com/users/sipa/followers","following_url":"https://api.github.com/users/sipa/following{/other_user}","gists_url":"https://api.github.com/users/sipa/gists{/gist_id}","starred_url":"https://api.github.com/users/sipa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sipa/subscriptions","organizations_url":"https://api.github.com/users/sipa/orgs","repos_url":"https://api.github.com/users/sipa/repos","events_url":"https://api.github.com/users/sipa/events{/privacy}","received_events_url":"https://api.github.com/users/sipa/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sipa/bitcoin","description":"Bitcoin integration/staging tree","fork":true,"url":"https://api.github.com/repos/sipa/bitcoin","forks_url":"https://api.github.com/repos/sipa/bitcoin/forks","keys_url":"https://api.github.com/repos/sipa/bitcoin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sipa/bitcoin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sipa/bitcoin/teams","hooks_url":"https://api.github.com/repos/sipa/bitcoin/hooks","issue_events_url":"https://api.github.com/repos/sipa/bitcoin/issues/events{/number}","events_url":"https://api.github.com/repos/sipa/bitcoin/events","assignees_url":"https://api.github.com/repos/sipa/bitcoin/assignees{/user}","branches_url":"https://api.github.com/repos/sipa/bitcoin/branches{/branch}","tags_url":"https://api.github.com/repos/sipa/bitcoin/tags","blobs_url":"https://api.github.com/repos/sipa/bitcoin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sipa/bitcoin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sipa/bitcoin/git/refs{/sha}","trees_url":"https://api.github.com/repos/sipa/bitcoin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sipa/bitcoin/statuses/{sha}","languages_url":"https://api.github.com/repos/sipa/bitcoin/languages","stargazers_url":"https://api.github.com/repos/sipa/bitcoin/stargazers","contributors_url":"https://api.github.com/repos/sipa/bitcoin/contributors","subscribers_url":"https://api.github.com/repos/sipa/bitcoin/subscribers","subscription_url":"https://api.github.com/repos/sipa/bitcoin/subscription","commits_url":"https://api.github.com/repos/sipa/bitcoin/commits{/sha}","git_commits_url":"https://api.github.com/repos/sipa/bitcoin/git/commits{/sha}","comments_url":"https://api.github.com/repos/sipa/bitcoin/comments{/number}","issue_comment_url":"https://api.github.com/repos/sipa/bitcoin/issues/comments/{number}","contents_url":"https://api.github.com/repos/sipa/bitcoin/contents/{+path}","compare_url":"https://api.github.com/repos/sipa/bitcoin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sipa/bitcoin/merges","archive_url":"https://api.github.com/repos/sipa/bitcoin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sipa/bitcoin/downloads","issues_url":"https://api.github.com/repos/sipa/bitcoin/issues{/number}","pulls_url":"https://api.github.com/repos/sipa/bitcoin/pulls{/number}","milestones_url":"https://api.github.com/repos/sipa/bitcoin/milestones{/number}","notifications_url":"https://api.github.com/repos/sipa/bitcoin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sipa/bitcoin/labels{/name}","releases_url":"https://api.github.com/repos/sipa/bitcoin/releases{/id}","created_at":"2011-03-09T10:46:59Z","updated_at":"2014-07-27T14:54:11Z","pushed_at":"2014-09-02T20:10:57Z","git_url":"git://github.com/sipa/bitcoin.git","ssh_url":"git@github.com:sipa/bitcoin.git","clone_url":"https://github.com/sipa/bitcoin.git","svn_url":"https://github.com/sipa/bitcoin","homepage":"http://www.bitcoin.org","size":37900,"stargazers_count":25,"watchers_count":25,"language":"TypeScript","has_issues":false,"has_downloads":false,"has_wiki":true,"forks_count":4,"mirror_url":null,"open_issues_count":0,"forks":4,"open_issues":0,"watchers":25,"default_branch":"lows"}},"base":{"label":"bitcoin:master","ref":"master","sha":"d1062e32fa66db44d0302bbff9d5634f5c698155","user":{"login":"bitcoin","id":528860,"avatar_url":"https://avatars.githubusercontent.com/u/528860?v=2","gravatar_id":"26e4cc7164bdfe71d0daf3764fbc4b33","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=2","gravatar_id":"26e4cc7164bdfe71d0daf3764fbc4b33","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":"2014-09-03T00:12:23Z","pushed_at":"2014-09-02T13:12:03Z","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":102008,"stargazers_count":5783,"watchers_count":5783,"language":"TypeScript","has_issues":true,"has_downloads":false,"has_wiki":false,"forks_count":4163,"mirror_url":null,"open_issues_count":399,"forks":4163,"open_issues":399,"watchers":5783,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/4468"},"html":{"href":"https://github.com/bitcoin/bitcoin/pull/4468"},"issue":{"href":"https://api.github.com/repos/bitcoin/bitcoin/issues/4468"},"comments":{"href":"https://api.github.com/repos/bitcoin/bitcoin/issues/4468/comments"},"review_comments":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/4468/comments"},"review_comment":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/4468/commits"},"statuses":{"href":"https://api.github.com/repos/bitcoin/bitcoin/statuses/2525afb58a71924d48bf99ea19cf741f0c6ccf66"}}}}