{"action":"created","comment":{"url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/pulls/comments/213615562","pull_request_review_id":150486590,"id":213615562,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMzYxNTU2Mg==","diff_hunk":"@@ -738,7 +741,7 @@ private async Task<ConnectBlocksResult> ConnectBlockAsync(ChainedHeaderBlock blo\n             }\n \n             // Call the validation engine.\n-            ValidationContext validationContext = await this.consensusRules.FullValidationAsync(blockToConnect).ConfigureAwait(false);\n+            ValidationContext validationContext = await this.fullValidator.ValidateAsync(blockToConnect.ChainedHeader, blockToConnect.Block).ConfigureAwait(false);","path":"src/Stratis.Bitcoin/Consensus/ConsensusManager.cs","position":29,"original_position":29,"commit_id":"1daf02fb1e4ea784f1b4b6436fcc914ab628121a","original_commit_id":"8d36c370be6f5161184de7f6aeeab99abf387604","user":{"login":"noescape00","id":10259355,"node_id":"MDQ6VXNlcjEwMjU5MzU1","avatar_url":"https://avatars0.githubusercontent.com/u/10259355?v=4","gravatar_id":"","url":"https://api.github.com/users/noescape00","html_url":"https://github.com/noescape00","followers_url":"https://api.github.com/users/noescape00/followers","following_url":"https://api.github.com/users/noescape00/following{/other_user}","gists_url":"https://api.github.com/users/noescape00/gists{/gist_id}","starred_url":"https://api.github.com/users/noescape00/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noescape00/subscriptions","organizations_url":"https://api.github.com/users/noescape00/orgs","repos_url":"https://api.github.com/users/noescape00/repos","events_url":"https://api.github.com/users/noescape00/events{/privacy}","received_events_url":"https://api.github.com/users/noescape00/received_events","type":"User","site_admin":false},"body":"Yeah, change the signature. \r\nIt looks like internally validator constructs ChainedHeaderBlock again so we might easily save allocation here by avoiding creating another ChainedHeaderBlock there. ","created_at":"2018-08-29T09:56:14Z","updated_at":"2018-08-29T09:56:14Z","html_url":"https://github.com/stratisproject/StratisBitcoinFullNode/pull/2052#discussion_r213615562","pull_request_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/pulls/2052","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/pulls/comments/213615562"},"html":{"href":"https://github.com/stratisproject/StratisBitcoinFullNode/pull/2052#discussion_r213615562"},"pull_request":{"href":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/pulls/2052"}},"in_reply_to_id":213493776},"pull_request":{"url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/pulls/2052","id":211562201,"node_id":"MDExOlB1bGxSZXF1ZXN0MjExNTYyMjAx","html_url":"https://github.com/stratisproject/StratisBitcoinFullNode/pull/2052","diff_url":"https://github.com/stratisproject/StratisBitcoinFullNode/pull/2052.diff","patch_url":"https://github.com/stratisproject/StratisBitcoinFullNode/pull/2052.patch","issue_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/issues/2052","number":2052,"state":"open","locked":false,"title":"Peer endpoint in validation context","user":{"login":"zeptin","id":25860,"node_id":"MDQ6VXNlcjI1ODYw","avatar_url":"https://avatars2.githubusercontent.com/u/25860?v=4","gravatar_id":"","url":"https://api.github.com/users/zeptin","html_url":"https://github.com/zeptin","followers_url":"https://api.github.com/users/zeptin/followers","following_url":"https://api.github.com/users/zeptin/following{/other_user}","gists_url":"https://api.github.com/users/zeptin/gists{/gist_id}","starred_url":"https://api.github.com/users/zeptin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zeptin/subscriptions","organizations_url":"https://api.github.com/users/zeptin/orgs","repos_url":"https://api.github.com/users/zeptin/repos","events_url":"https://api.github.com/users/zeptin/events{/privacy}","received_events_url":"https://api.github.com/users/zeptin/received_events","type":"User","site_admin":false},"body":"Relates to the following issues:\r\n\r\n#2008\r\n#1936 (specifically the PeerBanningTests)\r\n\r\nThe PeerBanningTests are not yet completely working. This is because, for the most part, they are using the `BlockMinedAsync` method in tests relating to peer banning. This is nonsensical, as there is no banning performed within `BlockMinedAsync` by design (as the local node is the source of the block and obviously cannot ban itself). It is further presumed that the local node will not knowingly deliver invalid blocks to peers, so the tests as currently envisioned have to be rethought. Possibly `CM.BlockDownloaded` could be made public and used instead of `BlockMinedAsync`, but this introduces the difficulty of having to obtain the peer ID within the tests.\r\n\r\nAt least one test also has contradictory naming and asserts, i.e. `NodeIsSynced_PeerSendsABadBlockAndPeerDisconnectedAndAddressIsNull_ThePeerGetsBanned_Async` has `Assert.False(context.PeerBanning.IsBanned(peerEndPoint));`, where you would expect the Assert to be true based on the name of the test alone.\r\n\r\nThis PR is therefore primarily to get a preliminary review of the changes to the validation context etc., the final fixes to the PeerBanningTests will follow pending additional discussion.","created_at":"2018-08-28T21:22:22Z","updated_at":"2018-08-29T09:56:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"82eec777849b67df4b8774c19affae238113fe58","assignee":null,"assignees":[],"requested_reviewers":[{"login":"dangershony","id":7487930,"node_id":"MDQ6VXNlcjc0ODc5MzA=","avatar_url":"https://avatars2.githubusercontent.com/u/7487930?v=4","gravatar_id":"","url":"https://api.github.com/users/dangershony","html_url":"https://github.com/dangershony","followers_url":"https://api.github.com/users/dangershony/followers","following_url":"https://api.github.com/users/dangershony/following{/other_user}","gists_url":"https://api.github.com/users/dangershony/gists{/gist_id}","starred_url":"https://api.github.com/users/dangershony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dangershony/subscriptions","organizations_url":"https://api.github.com/users/dangershony/orgs","repos_url":"https://api.github.com/users/dangershony/repos","events_url":"https://api.github.com/users/dangershony/events{/privacy}","received_events_url":"https://api.github.com/users/dangershony/received_events","type":"User","site_admin":false},{"login":"Aprogiena","id":30052221,"node_id":"MDQ6VXNlcjMwMDUyMjIx","avatar_url":"https://avatars0.githubusercontent.com/u/30052221?v=4","gravatar_id":"","url":"https://api.github.com/users/Aprogiena","html_url":"https://github.com/Aprogiena","followers_url":"https://api.github.com/users/Aprogiena/followers","following_url":"https://api.github.com/users/Aprogiena/following{/other_user}","gists_url":"https://api.github.com/users/Aprogiena/gists{/gist_id}","starred_url":"https://api.github.com/users/Aprogiena/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Aprogiena/subscriptions","organizations_url":"https://api.github.com/users/Aprogiena/orgs","repos_url":"https://api.github.com/users/Aprogiena/repos","events_url":"https://api.github.com/users/Aprogiena/events{/privacy}","received_events_url":"https://api.github.com/users/Aprogiena/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":1012493668,"node_id":"MDU6TGFiZWwxMDEyNDkzNjY4","url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/labels/Activation","name":"Activation","color":"51c61f","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/pulls/2052/commits","review_comments_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/pulls/2052/comments","review_comment_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/pulls/comments{/number}","comments_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/issues/2052/comments","statuses_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/statuses/1daf02fb1e4ea784f1b4b6436fcc914ab628121a","head":{"label":"zeptin:peer-endpoint-2008","ref":"peer-endpoint-2008","sha":"1daf02fb1e4ea784f1b4b6436fcc914ab628121a","user":{"login":"zeptin","id":25860,"node_id":"MDQ6VXNlcjI1ODYw","avatar_url":"https://avatars2.githubusercontent.com/u/25860?v=4","gravatar_id":"","url":"https://api.github.com/users/zeptin","html_url":"https://github.com/zeptin","followers_url":"https://api.github.com/users/zeptin/followers","following_url":"https://api.github.com/users/zeptin/following{/other_user}","gists_url":"https://api.github.com/users/zeptin/gists{/gist_id}","starred_url":"https://api.github.com/users/zeptin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zeptin/subscriptions","organizations_url":"https://api.github.com/users/zeptin/orgs","repos_url":"https://api.github.com/users/zeptin/repos","events_url":"https://api.github.com/users/zeptin/events{/privacy}","received_events_url":"https://api.github.com/users/zeptin/received_events","type":"User","site_admin":false},"repo":{"id":141340460,"node_id":"MDEwOlJlcG9zaXRvcnkxNDEzNDA0NjA=","name":"StratisBitcoinFullNode","full_name":"zeptin/StratisBitcoinFullNode","owner":{"login":"zeptin","id":25860,"node_id":"MDQ6VXNlcjI1ODYw","avatar_url":"https://avatars2.githubusercontent.com/u/25860?v=4","gravatar_id":"","url":"https://api.github.com/users/zeptin","html_url":"https://github.com/zeptin","followers_url":"https://api.github.com/users/zeptin/followers","following_url":"https://api.github.com/users/zeptin/following{/other_user}","gists_url":"https://api.github.com/users/zeptin/gists{/gist_id}","starred_url":"https://api.github.com/users/zeptin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zeptin/subscriptions","organizations_url":"https://api.github.com/users/zeptin/orgs","repos_url":"https://api.github.com/users/zeptin/repos","events_url":"https://api.github.com/users/zeptin/events{/privacy}","received_events_url":"https://api.github.com/users/zeptin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zeptin/StratisBitcoinFullNode","description":"Bitcoin full node in C#","fork":true,"url":"https://api.github.com/repos/zeptin/StratisBitcoinFullNode","forks_url":"https://api.github.com/repos/zeptin/StratisBitcoinFullNode/forks","keys_url":"https://api.github.com/repos/zeptin/StratisBitcoinFullNode/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zeptin/StratisBitcoinFullNode/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zeptin/StratisBitcoinFullNode/teams","hooks_url":"https://api.github.com/repos/zeptin/StratisBitcoinFullNode/hooks","issue_events_url":"https://api.github.com/repos/zeptin/StratisBitcoinFullNode/issues/events{/number}","events_url":"https://api.github.com/repos/zeptin/StratisBitcoinFullNode/events","assignees_url":"https://api.github.com/repos/zeptin/StratisBitcoinFullNode/assignees{/user}","branches_url":"https://api.github.com/repos/zeptin/StratisBitcoinFullNode/branches{/branch}","tags_url":"https://api.github.com/repos/zeptin/StratisBitcoinFullNode/tags","blobs_url":"https://api.github.com/repos/zeptin/StratisBitcoinFullNode/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zeptin/StratisBitcoinFullNode/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zeptin/StratisBitcoinFullNode/git/refs{/sha}","trees_url":"https://api.github.com/repos/zeptin/StratisBitcoinFullNode/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zeptin/StratisBitcoinFullNode/statuses/{sha}","languages_url":"https://api.github.com/repos/zeptin/StratisBitcoinFullNode/languages","stargazers_url":"https://api.github.com/repos/zeptin/StratisBitcoinFullNode/stargazers","contributors_url":"https://api.github.com/repos/zeptin/StratisBitcoinFullNode/contributors","subscribers_url":"https://api.github.com/repos/zeptin/StratisBitcoinFullNode/subscribers","subscription_url":"https://api.github.com/repos/zeptin/StratisBitcoinFullNode/subscription","commits_url":"https://api.github.com/repos/zeptin/StratisBitcoinFullNode/commits{/sha}","git_commits_url":"https://api.github.com/repos/zeptin/StratisBitcoinFullNode/git/commits{/sha}","comments_url":"https://api.github.com/repos/zeptin/StratisBitcoinFullNode/comments{/number}","issue_comment_url":"https://api.github.com/repos/zeptin/StratisBitcoinFullNode/issues/comments{/number}","contents_url":"https://api.github.com/repos/zeptin/StratisBitcoinFullNode/contents/{+path}","compare_url":"https://api.github.com/repos/zeptin/StratisBitcoinFullNode/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zeptin/StratisBitcoinFullNode/merges","archive_url":"https://api.github.com/repos/zeptin/StratisBitcoinFullNode/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zeptin/StratisBitcoinFullNode/downloads","issues_url":"https://api.github.com/repos/zeptin/StratisBitcoinFullNode/issues{/number}","pulls_url":"https://api.github.com/repos/zeptin/StratisBitcoinFullNode/pulls{/number}","milestones_url":"https://api.github.com/repos/zeptin/StratisBitcoinFullNode/milestones{/number}","notifications_url":"https://api.github.com/repos/zeptin/StratisBitcoinFullNode/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zeptin/StratisBitcoinFullNode/labels{/name}","releases_url":"https://api.github.com/repos/zeptin/StratisBitcoinFullNode/releases{/id}","deployments_url":"https://api.github.com/repos/zeptin/StratisBitcoinFullNode/deployments","created_at":"2018-07-17T20:32:06Z","updated_at":"2018-07-17T20:32:12Z","pushed_at":"2018-08-29T06:15:51Z","git_url":"git://github.com/zeptin/StratisBitcoinFullNode.git","ssh_url":"git@github.com:zeptin/StratisBitcoinFullNode.git","clone_url":"https://github.com/zeptin/StratisBitcoinFullNode.git","svn_url":"https://github.com/zeptin/StratisBitcoinFullNode","homepage":"https://stratisplatform.com","size":34034,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"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":"master"}},"base":{"label":"stratisproject:core-way-activation","ref":"core-way-activation","sha":"053bc94827289a744dddf32f19d15057ba8f1ca1","user":{"login":"stratisproject","id":15229748,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1MjI5NzQ4","avatar_url":"https://avatars0.githubusercontent.com/u/15229748?v=4","gravatar_id":"","url":"https://api.github.com/users/stratisproject","html_url":"https://github.com/stratisproject","followers_url":"https://api.github.com/users/stratisproject/followers","following_url":"https://api.github.com/users/stratisproject/following{/other_user}","gists_url":"https://api.github.com/users/stratisproject/gists{/gist_id}","starred_url":"https://api.github.com/users/stratisproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stratisproject/subscriptions","organizations_url":"https://api.github.com/users/stratisproject/orgs","repos_url":"https://api.github.com/users/stratisproject/repos","events_url":"https://api.github.com/users/stratisproject/events{/privacy}","received_events_url":"https://api.github.com/users/stratisproject/received_events","type":"Organization","site_admin":false},"repo":{"id":67271290,"node_id":"MDEwOlJlcG9zaXRvcnk2NzI3MTI5MA==","name":"StratisBitcoinFullNode","full_name":"stratisproject/StratisBitcoinFullNode","owner":{"login":"stratisproject","id":15229748,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1MjI5NzQ4","avatar_url":"https://avatars0.githubusercontent.com/u/15229748?v=4","gravatar_id":"","url":"https://api.github.com/users/stratisproject","html_url":"https://github.com/stratisproject","followers_url":"https://api.github.com/users/stratisproject/followers","following_url":"https://api.github.com/users/stratisproject/following{/other_user}","gists_url":"https://api.github.com/users/stratisproject/gists{/gist_id}","starred_url":"https://api.github.com/users/stratisproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stratisproject/subscriptions","organizations_url":"https://api.github.com/users/stratisproject/orgs","repos_url":"https://api.github.com/users/stratisproject/repos","events_url":"https://api.github.com/users/stratisproject/events{/privacy}","received_events_url":"https://api.github.com/users/stratisproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/stratisproject/StratisBitcoinFullNode","description":"Bitcoin full node in C#","fork":false,"url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode","forks_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/forks","keys_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/teams","hooks_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/hooks","issue_events_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/issues/events{/number}","events_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/events","assignees_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/assignees{/user}","branches_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/branches{/branch}","tags_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/tags","blobs_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/git/refs{/sha}","trees_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/statuses/{sha}","languages_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/languages","stargazers_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/stargazers","contributors_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/contributors","subscribers_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/subscribers","subscription_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/subscription","commits_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/commits{/sha}","git_commits_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/git/commits{/sha}","comments_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/comments{/number}","issue_comment_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/issues/comments{/number}","contents_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/contents/{+path}","compare_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/merges","archive_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/downloads","issues_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/issues{/number}","pulls_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/pulls{/number}","milestones_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/milestones{/number}","notifications_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/labels{/name}","releases_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/releases{/id}","deployments_url":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/deployments","created_at":"2016-09-03T04:32:51Z","updated_at":"2018-08-29T09:50:54Z","pushed_at":"2018-08-29T09:54:38Z","git_url":"git://github.com/stratisproject/StratisBitcoinFullNode.git","ssh_url":"git@github.com:stratisproject/StratisBitcoinFullNode.git","clone_url":"https://github.com/stratisproject/StratisBitcoinFullNode.git","svn_url":"https://github.com/stratisproject/StratisBitcoinFullNode","homepage":"https://stratisplatform.com","size":33263,"stargazers_count":539,"watchers_count":539,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":243,"mirror_url":null,"archived":false,"open_issues_count":151,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":243,"open_issues":151,"watchers":539,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/pulls/2052"},"html":{"href":"https://github.com/stratisproject/StratisBitcoinFullNode/pull/2052"},"issue":{"href":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/issues/2052"},"comments":{"href":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/issues/2052/comments"},"review_comments":{"href":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/pulls/2052/comments"},"review_comment":{"href":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/pulls/2052/commits"},"statuses":{"href":"https://api.github.com/repos/stratisproject/StratisBitcoinFullNode/statuses/1daf02fb1e4ea784f1b4b6436fcc914ab628121a"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"noescape00"}}