{"action":"created","comment":{"url":"https://api.github.com/repos/bitcoinxt/bitcoinxt/pulls/comments/87226536","pull_request_review_id":7846640,"id":87226536,"diff_hunk":"@@ -84,21 +98,28 @@ void BlockSender::sendBlock(CNode& node,\n \n     // We only support MSG_XTHINBLOCK, if peer wants MSG_THINBLOCK,\n     // fallback to full one.\n-    if (invType == MSG_BLOCK || invType == MSG_THINBLOCK)\n+    if (invType == MSG_BLOCK || (invType == MSG_THINBLOCK\n+                && !NodeStatePtr(node.id)->supportsCompactBlocks))","path":"src/blocksender.cpp","position":43,"original_position":66,"commit_id":"7f057211fa9f255cdd3f336b8e108a395fc06fae","original_commit_id":"157bb5857323999bb2b698b819471d85dc3ef01e","user":{"login":"rebroad","id":1530283,"avatar_url":"https://avatars.githubusercontent.com/u/1530283?v=3","gravatar_id":"","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":"I mean, sending a MSG_THINBLOCK INV - it could be requesting a THINBLOCK _and_ supporting Compact Blocks.","created_at":"2016-11-09T16:26:56Z","updated_at":"2016-11-09T16:26:56Z","html_url":"https://github.com/bitcoinxt/bitcoinxt/pull/162#discussion_r87226536","pull_request_url":"https://api.github.com/repos/bitcoinxt/bitcoinxt/pulls/162","_links":{"self":{"href":"https://api.github.com/repos/bitcoinxt/bitcoinxt/pulls/comments/87226536"},"html":{"href":"https://github.com/bitcoinxt/bitcoinxt/pull/162#discussion_r87226536"},"pull_request":{"href":"https://api.github.com/repos/bitcoinxt/bitcoinxt/pulls/162"}}},"pull_request":{"url":"https://api.github.com/repos/bitcoinxt/bitcoinxt/pulls/162","id":83716967,"html_url":"https://github.com/bitcoinxt/bitcoinxt/pull/162","diff_url":"https://github.com/bitcoinxt/bitcoinxt/pull/162.diff","patch_url":"https://github.com/bitcoinxt/bitcoinxt/pull/162.patch","issue_url":"https://api.github.com/repos/bitcoinxt/bitcoinxt/issues/162","number":162,"state":"open","locked":false,"title":"Compact blocks (BIP152)","user":{"login":"dagurval","id":92707,"avatar_url":"https://avatars.githubusercontent.com/u/92707?v=3","gravatar_id":"","url":"https://api.github.com/users/dagurval","html_url":"https://github.com/dagurval","followers_url":"https://api.github.com/users/dagurval/followers","following_url":"https://api.github.com/users/dagurval/following{/other_user}","gists_url":"https://api.github.com/users/dagurval/gists{/gist_id}","starred_url":"https://api.github.com/users/dagurval/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dagurval/subscriptions","organizations_url":"https://api.github.com/users/dagurval/orgs","repos_url":"https://api.github.com/users/dagurval/repos","events_url":"https://api.github.com/users/dagurval/events{/privacy}","received_events_url":"https://api.github.com/users/dagurval/received_events","type":"User","site_admin":false},"body":"So Core went ahead and created yet another thin block protocol. This is the third thin block implementation I add to XT. It’s getting kind of repetitive. But this is a good step in the direction of on-chain scaling so I’m happy too. This PR is created on top of PR #159.\n\nThis PR has limited testing: It’s been running on my node since yesterday without issues, sharing compact blocks with Core nodes and xthin blocks with others.  I have also successfully tested all rpc-tests (except pruning.py which i skipped) with compact block transfers.\n\n**The missing:**\n- I have cherry-picked p2p-compactblocks.py by @sdaftuar, but I have not been able to get the test to run yet. There are likely issues with regtest differences because of BIP109. Help would be appreciated.\n- I have not implemented _high bandwidth mode_. It is optional per BIP152. I may implement it later together with XThin Xpedited.\n\n**The bonus:**\n- Uses inventoryKnown add transactions the remote node is missing to the compact blocks sent - reducing latency. This is in contrast to the Core implementation that only sends the coinbase tx.\n- Supports parallel download of the same block -- meaning no stalled downloads. XT continues to be the only full node supporting parallel download of the chain tip.\n- Can parallel download xthin and bloom thins for the same block.\n\nCompact blocks are very similar to xthin. Thus this implementation fits well within existing architecture.\n","created_at":"2016-09-01T22:20:24Z","updated_at":"2016-11-09T16:26:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7eca4d887db647d8b9492839d96cf1ba5a01933b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/bitcoinxt/bitcoinxt/pulls/162/commits","review_comments_url":"https://api.github.com/repos/bitcoinxt/bitcoinxt/pulls/162/comments","review_comment_url":"https://api.github.com/repos/bitcoinxt/bitcoinxt/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bitcoinxt/bitcoinxt/issues/162/comments","statuses_url":"https://api.github.com/repos/bitcoinxt/bitcoinxt/statuses/7f057211fa9f255cdd3f336b8e108a395fc06fae","head":{"label":"dagurval:thinblocks-compact","ref":"thinblocks-compact","sha":"7f057211fa9f255cdd3f336b8e108a395fc06fae","user":{"login":"dagurval","id":92707,"avatar_url":"https://avatars.githubusercontent.com/u/92707?v=3","gravatar_id":"","url":"https://api.github.com/users/dagurval","html_url":"https://github.com/dagurval","followers_url":"https://api.github.com/users/dagurval/followers","following_url":"https://api.github.com/users/dagurval/following{/other_user}","gists_url":"https://api.github.com/users/dagurval/gists{/gist_id}","starred_url":"https://api.github.com/users/dagurval/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dagurval/subscriptions","organizations_url":"https://api.github.com/users/dagurval/orgs","repos_url":"https://api.github.com/users/dagurval/repos","events_url":"https://api.github.com/users/dagurval/events{/privacy}","received_events_url":"https://api.github.com/users/dagurval/received_events","type":"User","site_admin":false},"repo":{"id":41377829,"name":"bitcoinxt","full_name":"dagurval/bitcoinxt","owner":{"login":"dagurval","id":92707,"avatar_url":"https://avatars.githubusercontent.com/u/92707?v=3","gravatar_id":"","url":"https://api.github.com/users/dagurval","html_url":"https://github.com/dagurval","followers_url":"https://api.github.com/users/dagurval/followers","following_url":"https://api.github.com/users/dagurval/following{/other_user}","gists_url":"https://api.github.com/users/dagurval/gists{/gist_id}","starred_url":"https://api.github.com/users/dagurval/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dagurval/subscriptions","organizations_url":"https://api.github.com/users/dagurval/orgs","repos_url":"https://api.github.com/users/dagurval/repos","events_url":"https://api.github.com/users/dagurval/events{/privacy}","received_events_url":"https://api.github.com/users/dagurval/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dagurval/bitcoinxt","description":null,"fork":true,"url":"https://api.github.com/repos/dagurval/bitcoinxt","forks_url":"https://api.github.com/repos/dagurval/bitcoinxt/forks","keys_url":"https://api.github.com/repos/dagurval/bitcoinxt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dagurval/bitcoinxt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dagurval/bitcoinxt/teams","hooks_url":"https://api.github.com/repos/dagurval/bitcoinxt/hooks","issue_events_url":"https://api.github.com/repos/dagurval/bitcoinxt/issues/events{/number}","events_url":"https://api.github.com/repos/dagurval/bitcoinxt/events","assignees_url":"https://api.github.com/repos/dagurval/bitcoinxt/assignees{/user}","branches_url":"https://api.github.com/repos/dagurval/bitcoinxt/branches{/branch}","tags_url":"https://api.github.com/repos/dagurval/bitcoinxt/tags","blobs_url":"https://api.github.com/repos/dagurval/bitcoinxt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dagurval/bitcoinxt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dagurval/bitcoinxt/git/refs{/sha}","trees_url":"https://api.github.com/repos/dagurval/bitcoinxt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dagurval/bitcoinxt/statuses/{sha}","languages_url":"https://api.github.com/repos/dagurval/bitcoinxt/languages","stargazers_url":"https://api.github.com/repos/dagurval/bitcoinxt/stargazers","contributors_url":"https://api.github.com/repos/dagurval/bitcoinxt/contributors","subscribers_url":"https://api.github.com/repos/dagurval/bitcoinxt/subscribers","subscription_url":"https://api.github.com/repos/dagurval/bitcoinxt/subscription","commits_url":"https://api.github.com/repos/dagurval/bitcoinxt/commits{/sha}","git_commits_url":"https://api.github.com/repos/dagurval/bitcoinxt/git/commits{/sha}","comments_url":"https://api.github.com/repos/dagurval/bitcoinxt/comments{/number}","issue_comment_url":"https://api.github.com/repos/dagurval/bitcoinxt/issues/comments{/number}","contents_url":"https://api.github.com/repos/dagurval/bitcoinxt/contents/{+path}","compare_url":"https://api.github.com/repos/dagurval/bitcoinxt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dagurval/bitcoinxt/merges","archive_url":"https://api.github.com/repos/dagurval/bitcoinxt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dagurval/bitcoinxt/downloads","issues_url":"https://api.github.com/repos/dagurval/bitcoinxt/issues{/number}","pulls_url":"https://api.github.com/repos/dagurval/bitcoinxt/pulls{/number}","milestones_url":"https://api.github.com/repos/dagurval/bitcoinxt/milestones{/number}","notifications_url":"https://api.github.com/repos/dagurval/bitcoinxt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dagurval/bitcoinxt/labels{/name}","releases_url":"https://api.github.com/repos/dagurval/bitcoinxt/releases{/id}","deployments_url":"https://api.github.com/repos/dagurval/bitcoinxt/deployments","created_at":"2015-08-25T17:28:55Z","updated_at":"2016-01-12T20:17:09Z","pushed_at":"2016-11-01T11:03:08Z","git_url":"git://github.com/dagurval/bitcoinxt.git","ssh_url":"git@github.com:dagurval/bitcoinxt.git","clone_url":"https://github.com/dagurval/bitcoinxt.git","svn_url":"https://github.com/dagurval/bitcoinxt","homepage":null,"size":42134,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"bitcoinxt:master","ref":"master","sha":"a4bf8c6073c082fb972459f1e31d04862aca432b","user":{"login":"bitcoinxt","id":10281400,"avatar_url":"https://avatars.githubusercontent.com/u/10281400?v=3","gravatar_id":"","url":"https://api.github.com/users/bitcoinxt","html_url":"https://github.com/bitcoinxt","followers_url":"https://api.github.com/users/bitcoinxt/followers","following_url":"https://api.github.com/users/bitcoinxt/following{/other_user}","gists_url":"https://api.github.com/users/bitcoinxt/gists{/gist_id}","starred_url":"https://api.github.com/users/bitcoinxt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitcoinxt/subscriptions","organizations_url":"https://api.github.com/users/bitcoinxt/orgs","repos_url":"https://api.github.com/users/bitcoinxt/repos","events_url":"https://api.github.com/users/bitcoinxt/events{/privacy}","received_events_url":"https://api.github.com/users/bitcoinxt/received_events","type":"Organization","site_admin":false},"repo":{"id":28404361,"name":"bitcoinxt","full_name":"bitcoinxt/bitcoinxt","owner":{"login":"bitcoinxt","id":10281400,"avatar_url":"https://avatars.githubusercontent.com/u/10281400?v=3","gravatar_id":"","url":"https://api.github.com/users/bitcoinxt","html_url":"https://github.com/bitcoinxt","followers_url":"https://api.github.com/users/bitcoinxt/followers","following_url":"https://api.github.com/users/bitcoinxt/following{/other_user}","gists_url":"https://api.github.com/users/bitcoinxt/gists{/gist_id}","starred_url":"https://api.github.com/users/bitcoinxt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitcoinxt/subscriptions","organizations_url":"https://api.github.com/users/bitcoinxt/orgs","repos_url":"https://api.github.com/users/bitcoinxt/repos","events_url":"https://api.github.com/users/bitcoinxt/events{/privacy}","received_events_url":"https://api.github.com/users/bitcoinxt/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bitcoinxt/bitcoinxt","description":null,"fork":false,"url":"https://api.github.com/repos/bitcoinxt/bitcoinxt","forks_url":"https://api.github.com/repos/bitcoinxt/bitcoinxt/forks","keys_url":"https://api.github.com/repos/bitcoinxt/bitcoinxt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bitcoinxt/bitcoinxt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bitcoinxt/bitcoinxt/teams","hooks_url":"https://api.github.com/repos/bitcoinxt/bitcoinxt/hooks","issue_events_url":"https://api.github.com/repos/bitcoinxt/bitcoinxt/issues/events{/number}","events_url":"https://api.github.com/repos/bitcoinxt/bitcoinxt/events","assignees_url":"https://api.github.com/repos/bitcoinxt/bitcoinxt/assignees{/user}","branches_url":"https://api.github.com/repos/bitcoinxt/bitcoinxt/branches{/branch}","tags_url":"https://api.github.com/repos/bitcoinxt/bitcoinxt/tags","blobs_url":"https://api.github.com/repos/bitcoinxt/bitcoinxt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bitcoinxt/bitcoinxt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bitcoinxt/bitcoinxt/git/refs{/sha}","trees_url":"https://api.github.com/repos/bitcoinxt/bitcoinxt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bitcoinxt/bitcoinxt/statuses/{sha}","languages_url":"https://api.github.com/repos/bitcoinxt/bitcoinxt/languages","stargazers_url":"https://api.github.com/repos/bitcoinxt/bitcoinxt/stargazers","contributors_url":"https://api.github.com/repos/bitcoinxt/bitcoinxt/contributors","subscribers_url":"https://api.github.com/repos/bitcoinxt/bitcoinxt/subscribers","subscription_url":"https://api.github.com/repos/bitcoinxt/bitcoinxt/subscription","commits_url":"https://api.github.com/repos/bitcoinxt/bitcoinxt/commits{/sha}","git_commits_url":"https://api.github.com/repos/bitcoinxt/bitcoinxt/git/commits{/sha}","comments_url":"https://api.github.com/repos/bitcoinxt/bitcoinxt/comments{/number}","issue_comment_url":"https://api.github.com/repos/bitcoinxt/bitcoinxt/issues/comments{/number}","contents_url":"https://api.github.com/repos/bitcoinxt/bitcoinxt/contents/{+path}","compare_url":"https://api.github.com/repos/bitcoinxt/bitcoinxt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bitcoinxt/bitcoinxt/merges","archive_url":"https://api.github.com/repos/bitcoinxt/bitcoinxt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bitcoinxt/bitcoinxt/downloads","issues_url":"https://api.github.com/repos/bitcoinxt/bitcoinxt/issues{/number}","pulls_url":"https://api.github.com/repos/bitcoinxt/bitcoinxt/pulls{/number}","milestones_url":"https://api.github.com/repos/bitcoinxt/bitcoinxt/milestones{/number}","notifications_url":"https://api.github.com/repos/bitcoinxt/bitcoinxt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bitcoinxt/bitcoinxt/labels{/name}","releases_url":"https://api.github.com/repos/bitcoinxt/bitcoinxt/releases{/id}","deployments_url":"https://api.github.com/repos/bitcoinxt/bitcoinxt/deployments","created_at":"2014-12-23T15:14:51Z","updated_at":"2016-11-05T02:24:24Z","pushed_at":"2016-10-30T01:23:35Z","git_url":"git://github.com/bitcoinxt/bitcoinxt.git","ssh_url":"git@github.com:bitcoinxt/bitcoinxt.git","clone_url":"https://github.com/bitcoinxt/bitcoinxt.git","svn_url":"https://github.com/bitcoinxt/bitcoinxt","homepage":null,"size":46260,"stargazers_count":332,"watchers_count":332,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":106,"mirror_url":null,"open_issues_count":23,"forks":106,"open_issues":23,"watchers":332,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bitcoinxt/bitcoinxt/pulls/162"},"html":{"href":"https://github.com/bitcoinxt/bitcoinxt/pull/162"},"issue":{"href":"https://api.github.com/repos/bitcoinxt/bitcoinxt/issues/162"},"comments":{"href":"https://api.github.com/repos/bitcoinxt/bitcoinxt/issues/162/comments"},"review_comments":{"href":"https://api.github.com/repos/bitcoinxt/bitcoinxt/pulls/162/comments"},"review_comment":{"href":"https://api.github.com/repos/bitcoinxt/bitcoinxt/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bitcoinxt/bitcoinxt/pulls/162/commits"},"statuses":{"href":"https://api.github.com/repos/bitcoinxt/bitcoinxt/statuses/7f057211fa9f255cdd3f336b8e108a395fc06fae"}}}}
{"actor":{"display_login":"rebroad"}}