{"action":"created","comment":{"url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/pulls/comments/194049461","pull_request_review_id":127151320,"id":194049461,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NDA0OTQ2MQ==","diff_hunk":"@@ -0,0 +1,317 @@\n+#!/usr/bin/env python3","path":"qa/rpc-tests/bip135-threshold.py","position":1,"original_position":1,"commit_id":"80c4ff776d595dbbce7ed1e45917aefa7659d4a8","original_commit_id":"80c4ff776d595dbbce7ed1e45917aefa7659d4a8","user":{"login":"gandrewstone","id":89979,"node_id":"MDQ6VXNlcjg5OTc5","avatar_url":"https://avatars3.githubusercontent.com/u/89979?v=4","gravatar_id":"","url":"https://api.github.com/users/gandrewstone","html_url":"https://github.com/gandrewstone","followers_url":"https://api.github.com/users/gandrewstone/followers","following_url":"https://api.github.com/users/gandrewstone/following{/other_user}","gists_url":"https://api.github.com/users/gandrewstone/gists{/gist_id}","starred_url":"https://api.github.com/users/gandrewstone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gandrewstone/subscriptions","organizations_url":"https://api.github.com/users/gandrewstone/orgs","repos_url":"https://api.github.com/users/gandrewstone/repos","events_url":"https://api.github.com/users/gandrewstone/events{/privacy}","received_events_url":"https://api.github.com/users/gandrewstone/received_events","type":"User","site_admin":false},"body":"rename without \"-\" and use logging in this file too, thx!","created_at":"2018-06-08T13:01:43Z","updated_at":"2018-06-08T13:01:44Z","html_url":"https://github.com/BitcoinUnlimited/BitcoinUnlimited/pull/1088#discussion_r194049461","pull_request_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/pulls/1088","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/pulls/comments/194049461"},"html":{"href":"https://github.com/BitcoinUnlimited/BitcoinUnlimited/pull/1088#discussion_r194049461"},"pull_request":{"href":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/pulls/1088"}}},"pull_request":{"url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/pulls/1088","id":188687394,"node_id":"MDExOlB1bGxSZXF1ZXN0MTg4Njg3Mzk0","html_url":"https://github.com/BitcoinUnlimited/BitcoinUnlimited/pull/1088","diff_url":"https://github.com/BitcoinUnlimited/BitcoinUnlimited/pull/1088.diff","patch_url":"https://github.com/BitcoinUnlimited/BitcoinUnlimited/pull/1088.patch","issue_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/issues/1088","number":1088,"state":"open","locked":false,"title":"Reference implementation of BIP135 (generalized versionbits)","user":{"login":"sanch0panza","id":26766668,"node_id":"MDQ6VXNlcjI2NzY2NjY4","avatar_url":"https://avatars2.githubusercontent.com/u/26766668?v=4","gravatar_id":"","url":"https://api.github.com/users/sanch0panza","html_url":"https://github.com/sanch0panza","followers_url":"https://api.github.com/users/sanch0panza/followers","following_url":"https://api.github.com/users/sanch0panza/following{/other_user}","gists_url":"https://api.github.com/users/sanch0panza/gists{/gist_id}","starred_url":"https://api.github.com/users/sanch0panza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanch0panza/subscriptions","organizations_url":"https://api.github.com/users/sanch0panza/orgs","repos_url":"https://api.github.com/users/sanch0panza/repos","events_url":"https://api.github.com/users/sanch0panza/events{/privacy}","received_events_url":"https://api.github.com/users/sanch0panza/received_events","type":"User","site_admin":false},"body":"This is an initial reference implementation of my 'generalized versionbits' BIP proposal, the draft specification of which you can find at this link:\r\nhttps://github.com/bitcoin/bips/blob/master/bip-0135.mediawiki\r\n\r\nIt provides flexibly configurable parameters for each of the 29 BIP9 deployment bits, including the possibility of\r\n\r\n- different thresholds / window sizes\r\n- customizable grace periods (based either on minimum number of blocks or minimum time in seconds elapsed since lock-in)\r\n- explicitly agnostic to fork type (not only intended for soft forks)\r\n\r\nThe configuration of the deployment bits can be read in from a comma-separated values file, and using the `-dumpforks` option, the built-in configuration can also be dumped out in CSV format to standard output.\r\n\r\nBIP135 aims to be completely backward compatible (if suitably configured) with the BIP9 state machine. I have taken care to ensure this by leaving the original tests as unchanged as possible, and adding tests for the new functionality in separate scripts / programs.\r\n\r\nThe \"unknown versions\" alerting logic in main.cpp needed to be replaced, which slightly alters its behaviour. It now alerts based on a flat > 50/100 threshold and window, and does not attempt to divine the activation states of unknown signals. It also reports on first detection of an unknown signal, as well as gradated (25%, 50%, 70%, 90%, 95%) crossing thresholds, and loss of previously detected unknown signals during a 100-block window.\r\nThe 'unknown version' check itself - performed against the computed version according to Unlimited code - should be backward compatible. The notification / alerting code has only been lightly tested, as it is basically optional (not seen as part of core BIP135 requirements) and probably should be implemented in a fancier way, to allow more user control over when/what/how it reports.\r\n\r\nIn some places this reference implementation is surely a little worse technically than it should be, since I'm not an expert C++ programmer. Please feel free to criticize and offer suggestions for improvement. I'll do my best to provide rationale about any aspects of the implementation.\r\n\r\n---\r\n\r\nUpdate: This is a fresh PR created based on https://github.com/BitcoinUnlimited/BitcoinUnlimited/pull/458 which experienced problems updating in github while attempting to rebase on BU 1.3.0.x.","created_at":"2018-05-17T10:13:30Z","updated_at":"2018-06-08T13:01:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9009bb63e2a63c98887c62855bb1bd4183bd5717","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/pulls/1088/commits","review_comments_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/pulls/1088/comments","review_comment_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/pulls/comments{/number}","comments_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/issues/1088/comments","statuses_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/statuses/80c4ff776d595dbbce7ed1e45917aefa7659d4a8","head":{"label":"sanch0panza:bip135","ref":"bip135","sha":"80c4ff776d595dbbce7ed1e45917aefa7659d4a8","user":{"login":"sanch0panza","id":26766668,"node_id":"MDQ6VXNlcjI2NzY2NjY4","avatar_url":"https://avatars2.githubusercontent.com/u/26766668?v=4","gravatar_id":"","url":"https://api.github.com/users/sanch0panza","html_url":"https://github.com/sanch0panza","followers_url":"https://api.github.com/users/sanch0panza/followers","following_url":"https://api.github.com/users/sanch0panza/following{/other_user}","gists_url":"https://api.github.com/users/sanch0panza/gists{/gist_id}","starred_url":"https://api.github.com/users/sanch0panza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanch0panza/subscriptions","organizations_url":"https://api.github.com/users/sanch0panza/orgs","repos_url":"https://api.github.com/users/sanch0panza/repos","events_url":"https://api.github.com/users/sanch0panza/events{/privacy}","received_events_url":"https://api.github.com/users/sanch0panza/received_events","type":"User","site_admin":false},"repo":{"id":133784657,"node_id":"MDEwOlJlcG9zaXRvcnkxMzM3ODQ2NTc=","name":"BitcoinUnlimited","full_name":"sanch0panza/BitcoinUnlimited","owner":{"login":"sanch0panza","id":26766668,"node_id":"MDQ6VXNlcjI2NzY2NjY4","avatar_url":"https://avatars2.githubusercontent.com/u/26766668?v=4","gravatar_id":"","url":"https://api.github.com/users/sanch0panza","html_url":"https://github.com/sanch0panza","followers_url":"https://api.github.com/users/sanch0panza/followers","following_url":"https://api.github.com/users/sanch0panza/following{/other_user}","gists_url":"https://api.github.com/users/sanch0panza/gists{/gist_id}","starred_url":"https://api.github.com/users/sanch0panza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanch0panza/subscriptions","organizations_url":"https://api.github.com/users/sanch0panza/orgs","repos_url":"https://api.github.com/users/sanch0panza/repos","events_url":"https://api.github.com/users/sanch0panza/events{/privacy}","received_events_url":"https://api.github.com/users/sanch0panza/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sanch0panza/BitcoinUnlimited","description":"Bitcoin Unlimited integration/staging tree","fork":true,"url":"https://api.github.com/repos/sanch0panza/BitcoinUnlimited","forks_url":"https://api.github.com/repos/sanch0panza/BitcoinUnlimited/forks","keys_url":"https://api.github.com/repos/sanch0panza/BitcoinUnlimited/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sanch0panza/BitcoinUnlimited/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sanch0panza/BitcoinUnlimited/teams","hooks_url":"https://api.github.com/repos/sanch0panza/BitcoinUnlimited/hooks","issue_events_url":"https://api.github.com/repos/sanch0panza/BitcoinUnlimited/issues/events{/number}","events_url":"https://api.github.com/repos/sanch0panza/BitcoinUnlimited/events","assignees_url":"https://api.github.com/repos/sanch0panza/BitcoinUnlimited/assignees{/user}","branches_url":"https://api.github.com/repos/sanch0panza/BitcoinUnlimited/branches{/branch}","tags_url":"https://api.github.com/repos/sanch0panza/BitcoinUnlimited/tags","blobs_url":"https://api.github.com/repos/sanch0panza/BitcoinUnlimited/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sanch0panza/BitcoinUnlimited/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sanch0panza/BitcoinUnlimited/git/refs{/sha}","trees_url":"https://api.github.com/repos/sanch0panza/BitcoinUnlimited/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sanch0panza/BitcoinUnlimited/statuses/{sha}","languages_url":"https://api.github.com/repos/sanch0panza/BitcoinUnlimited/languages","stargazers_url":"https://api.github.com/repos/sanch0panza/BitcoinUnlimited/stargazers","contributors_url":"https://api.github.com/repos/sanch0panza/BitcoinUnlimited/contributors","subscribers_url":"https://api.github.com/repos/sanch0panza/BitcoinUnlimited/subscribers","subscription_url":"https://api.github.com/repos/sanch0panza/BitcoinUnlimited/subscription","commits_url":"https://api.github.com/repos/sanch0panza/BitcoinUnlimited/commits{/sha}","git_commits_url":"https://api.github.com/repos/sanch0panza/BitcoinUnlimited/git/commits{/sha}","comments_url":"https://api.github.com/repos/sanch0panza/BitcoinUnlimited/comments{/number}","issue_comment_url":"https://api.github.com/repos/sanch0panza/BitcoinUnlimited/issues/comments{/number}","contents_url":"https://api.github.com/repos/sanch0panza/BitcoinUnlimited/contents/{+path}","compare_url":"https://api.github.com/repos/sanch0panza/BitcoinUnlimited/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sanch0panza/BitcoinUnlimited/merges","archive_url":"https://api.github.com/repos/sanch0panza/BitcoinUnlimited/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sanch0panza/BitcoinUnlimited/downloads","issues_url":"https://api.github.com/repos/sanch0panza/BitcoinUnlimited/issues{/number}","pulls_url":"https://api.github.com/repos/sanch0panza/BitcoinUnlimited/pulls{/number}","milestones_url":"https://api.github.com/repos/sanch0panza/BitcoinUnlimited/milestones{/number}","notifications_url":"https://api.github.com/repos/sanch0panza/BitcoinUnlimited/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sanch0panza/BitcoinUnlimited/labels{/name}","releases_url":"https://api.github.com/repos/sanch0panza/BitcoinUnlimited/releases{/id}","deployments_url":"https://api.github.com/repos/sanch0panza/BitcoinUnlimited/deployments","created_at":"2018-05-17T08:41:57Z","updated_at":"2018-05-17T08:42:04Z","pushed_at":"2018-06-05T06:04:09Z","git_url":"git://github.com/sanch0panza/BitcoinUnlimited.git","ssh_url":"git@github.com:sanch0panza/BitcoinUnlimited.git","clone_url":"https://github.com/sanch0panza/BitcoinUnlimited.git","svn_url":"https://github.com/sanch0panza/BitcoinUnlimited","homepage":"http://www.bitcoinunlimited.info/download.html","size":66968,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"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":"release"}},"base":{"label":"BitcoinUnlimited:dev","ref":"dev","sha":"8c0db57959617e027c1500408ac2306a00b1b5bf","user":{"login":"BitcoinUnlimited","id":14125627,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTI1NjI3","avatar_url":"https://avatars0.githubusercontent.com/u/14125627?v=4","gravatar_id":"","url":"https://api.github.com/users/BitcoinUnlimited","html_url":"https://github.com/BitcoinUnlimited","followers_url":"https://api.github.com/users/BitcoinUnlimited/followers","following_url":"https://api.github.com/users/BitcoinUnlimited/following{/other_user}","gists_url":"https://api.github.com/users/BitcoinUnlimited/gists{/gist_id}","starred_url":"https://api.github.com/users/BitcoinUnlimited/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BitcoinUnlimited/subscriptions","organizations_url":"https://api.github.com/users/BitcoinUnlimited/orgs","repos_url":"https://api.github.com/users/BitcoinUnlimited/repos","events_url":"https://api.github.com/users/BitcoinUnlimited/events{/privacy}","received_events_url":"https://api.github.com/users/BitcoinUnlimited/received_events","type":"Organization","site_admin":false},"repo":{"id":18613259,"node_id":"MDEwOlJlcG9zaXRvcnkxODYxMzI1OQ==","name":"BitcoinUnlimited","full_name":"BitcoinUnlimited/BitcoinUnlimited","owner":{"login":"BitcoinUnlimited","id":14125627,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTI1NjI3","avatar_url":"https://avatars0.githubusercontent.com/u/14125627?v=4","gravatar_id":"","url":"https://api.github.com/users/BitcoinUnlimited","html_url":"https://github.com/BitcoinUnlimited","followers_url":"https://api.github.com/users/BitcoinUnlimited/followers","following_url":"https://api.github.com/users/BitcoinUnlimited/following{/other_user}","gists_url":"https://api.github.com/users/BitcoinUnlimited/gists{/gist_id}","starred_url":"https://api.github.com/users/BitcoinUnlimited/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BitcoinUnlimited/subscriptions","organizations_url":"https://api.github.com/users/BitcoinUnlimited/orgs","repos_url":"https://api.github.com/users/BitcoinUnlimited/repos","events_url":"https://api.github.com/users/BitcoinUnlimited/events{/privacy}","received_events_url":"https://api.github.com/users/BitcoinUnlimited/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/BitcoinUnlimited/BitcoinUnlimited","description":"Bitcoin Unlimited integration/staging tree","fork":false,"url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited","forks_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/forks","keys_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/teams","hooks_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/hooks","issue_events_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/issues/events{/number}","events_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/events","assignees_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/assignees{/user}","branches_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/branches{/branch}","tags_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/tags","blobs_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/git/refs{/sha}","trees_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/statuses/{sha}","languages_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/languages","stargazers_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/stargazers","contributors_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/contributors","subscribers_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/subscribers","subscription_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/subscription","commits_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/commits{/sha}","git_commits_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/git/commits{/sha}","comments_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/comments{/number}","issue_comment_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/issues/comments{/number}","contents_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/contents/{+path}","compare_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/merges","archive_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/downloads","issues_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/issues{/number}","pulls_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/pulls{/number}","milestones_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/milestones{/number}","notifications_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/labels{/name}","releases_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/releases{/id}","deployments_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/deployments","created_at":"2014-04-09T21:03:00Z","updated_at":"2018-06-04T11:32:26Z","pushed_at":"2018-06-08T11:51:30Z","git_url":"git://github.com/BitcoinUnlimited/BitcoinUnlimited.git","ssh_url":"git@github.com:BitcoinUnlimited/BitcoinUnlimited.git","clone_url":"https://github.com/BitcoinUnlimited/BitcoinUnlimited.git","svn_url":"https://github.com/BitcoinUnlimited/BitcoinUnlimited","homepage":"http://www.bitcoinunlimited.info/download.html","size":66904,"stargazers_count":345,"watchers_count":345,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":144,"mirror_url":null,"archived":false,"open_issues_count":73,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":144,"open_issues":73,"watchers":345,"default_branch":"release"}},"_links":{"self":{"href":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/pulls/1088"},"html":{"href":"https://github.com/BitcoinUnlimited/BitcoinUnlimited/pull/1088"},"issue":{"href":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/issues/1088"},"comments":{"href":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/issues/1088/comments"},"review_comments":{"href":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/pulls/1088/comments"},"review_comment":{"href":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/pulls/1088/commits"},"statuses":{"href":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/statuses/80c4ff776d595dbbce7ed1e45917aefa7659d4a8"}},"author_association":"NONE"}}
{"actor":{"display_login":"gandrewstone"}}