{"action":"created","comment":{"url":"https://api.github.com/repos/cosmos/cosmos-sdk/pulls/comments/193208179","pull_request_review_id":126135883,"id":193208179,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MzIwODE3OQ==","diff_hunk":"@@ -0,0 +1,240 @@\n+/*\n+ * Ported from Tendermint\n+ */\n+package server\n+\n+import (\n+\t\"fmt\"\n+\t\"net\"\n+\t\"os\"\n+\t\"path/filepath\"\n+\t\"strings\"\n+\n+\t\"github.com/spf13/cobra\"\n+\n+\tcfg \"github.com/tendermint/tendermint/config\"\n+\tgaiacfg \"github.com/cosmos/cosmos-sdk/config\"\n+\t\"github.com/tendermint/tendermint/p2p\"\n+\t\"github.com/tendermint/tendermint/types\"\n+\tpvm \"github.com/tendermint/tendermint/types/priv_validator\"\n+\tcmn \"github.com/tendermint/tmlibs/common\"\n+\t\"github.com/cosmos/cosmos-sdk/wire\"\n+)\n+\n+var (\n+\tnValidators    int\n+\tnNonValidators int\n+\toutputDir      string\n+\tnodeDirPrefix  string\n+\n+\tpopulatePersistentPeers bool\n+\thostnamePrefix          string\n+\tstartingIPAddress       string\n+\tp2pPort                 int\n+)\n+\n+const (\n+\tnodeDirPerm = 0755\n+)","path":"server/testnet.go","position":38,"original_position":38,"commit_id":"3da43bac0986959b61051f528894cbe4637142a5","original_commit_id":"3da43bac0986959b61051f528894cbe4637142a5","user":{"login":"rigelrozanski","id":20132176,"node_id":"MDQ6VXNlcjIwMTMyMTc2","avatar_url":"https://avatars1.githubusercontent.com/u/20132176?v=4","gravatar_id":"","url":"https://api.github.com/users/rigelrozanski","html_url":"https://github.com/rigelrozanski","followers_url":"https://api.github.com/users/rigelrozanski/followers","following_url":"https://api.github.com/users/rigelrozanski/following{/other_user}","gists_url":"https://api.github.com/users/rigelrozanski/gists{/gist_id}","starred_url":"https://api.github.com/users/rigelrozanski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rigelrozanski/subscriptions","organizations_url":"https://api.github.com/users/rigelrozanski/orgs","repos_url":"https://api.github.com/users/rigelrozanski/repos","events_url":"https://api.github.com/users/rigelrozanski/events{/privacy}","received_events_url":"https://api.github.com/users/rigelrozanski/received_events","type":"User","site_admin":false},"body":"const nodeDirPerm = 0755","created_at":"2018-06-05T20:19:19Z","updated_at":"2018-06-05T20:19:19Z","html_url":"https://github.com/cosmos/cosmos-sdk/pull/1141#discussion_r193208179","pull_request_url":"https://api.github.com/repos/cosmos/cosmos-sdk/pulls/1141","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/cosmos/cosmos-sdk/pulls/comments/193208179"},"html":{"href":"https://github.com/cosmos/cosmos-sdk/pull/1141#discussion_r193208179"},"pull_request":{"href":"https://api.github.com/repos/cosmos/cosmos-sdk/pulls/1141"}}},"pull_request":{"url":"https://api.github.com/repos/cosmos/cosmos-sdk/pulls/1141","id":192810892,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkyODEwODky","html_url":"https://github.com/cosmos/cosmos-sdk/pull/1141","diff_url":"https://github.com/cosmos/cosmos-sdk/pull/1141.diff","patch_url":"https://github.com/cosmos/cosmos-sdk/pull/1141.patch","issue_url":"https://api.github.com/repos/cosmos/cosmos-sdk/issues/1141","number":1141,"state":"open","locked":false,"title":"WIP: testnet command","user":{"login":"greg-szabo","id":16846635,"node_id":"MDQ6VXNlcjE2ODQ2NjM1","avatar_url":"https://avatars3.githubusercontent.com/u/16846635?v=4","gravatar_id":"","url":"https://api.github.com/users/greg-szabo","html_url":"https://github.com/greg-szabo","followers_url":"https://api.github.com/users/greg-szabo/followers","following_url":"https://api.github.com/users/greg-szabo/following{/other_user}","gists_url":"https://api.github.com/users/greg-szabo/gists{/gist_id}","starred_url":"https://api.github.com/users/greg-szabo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greg-szabo/subscriptions","organizations_url":"https://api.github.com/users/greg-szabo/orgs","repos_url":"https://api.github.com/users/greg-szabo/repos","events_url":"https://api.github.com/users/greg-szabo/events{/privacy}","received_events_url":"https://api.github.com/users/greg-szabo/received_events","type":"User","site_admin":false},"body":"The purpose of this change is to introduce a `testnet` command, similar to the one in Tendermint. The command creates separate folders with initialized configuration. This enables easy testnet setup and configuration management.\r\n\r\nThis change is still being tested. The PR is opened so we can discuss the changes made and to make sure it's in sync with developer expectations. The main points:\r\n\r\n1. The `init` command code was separated into its own function. This makes it reusable for both the `init` and the `testnet` commands.\r\n2. The internal configuration used by `init` was broken out into a struct so it's easier to handle it or customize it for different features. This is similar to the config package in Tendermint, however the structure is only used internally. (No \"config file\" added.)\r\n\r\nIf these decisions are ok, I'll finish testing the code and ask for a review / merge.\r\n\r\n<!-- Thanks for filing a PR! Before hitting the button, please check the following items.-->\r\n\r\n* [ ] Updated all relevant documentation in docs\r\n* [X] Updated all code comments where relevant\r\n* [ ] Wrote tests\r\n* [X] Updated CHANGELOG.md\r\n","created_at":"2018-06-05T19:23:27Z","updated_at":"2018-06-05T20:19:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"31eba1992b3a2ac8c6f66bcd430788fea8cb7e05","assignee":null,"assignees":[],"requested_reviewers":[{"login":"ebuchman","id":2300911,"node_id":"MDQ6VXNlcjIzMDA5MTE=","avatar_url":"https://avatars3.githubusercontent.com/u/2300911?v=4","gravatar_id":"","url":"https://api.github.com/users/ebuchman","html_url":"https://github.com/ebuchman","followers_url":"https://api.github.com/users/ebuchman/followers","following_url":"https://api.github.com/users/ebuchman/following{/other_user}","gists_url":"https://api.github.com/users/ebuchman/gists{/gist_id}","starred_url":"https://api.github.com/users/ebuchman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebuchman/subscriptions","organizations_url":"https://api.github.com/users/ebuchman/orgs","repos_url":"https://api.github.com/users/ebuchman/repos","events_url":"https://api.github.com/users/ebuchman/events{/privacy}","received_events_url":"https://api.github.com/users/ebuchman/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/cosmos/cosmos-sdk/pulls/1141/commits","review_comments_url":"https://api.github.com/repos/cosmos/cosmos-sdk/pulls/1141/comments","review_comment_url":"https://api.github.com/repos/cosmos/cosmos-sdk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cosmos/cosmos-sdk/issues/1141/comments","statuses_url":"https://api.github.com/repos/cosmos/cosmos-sdk/statuses/3da43bac0986959b61051f528894cbe4637142a5","head":{"label":"cosmos:greg/testnet-command","ref":"greg/testnet-command","sha":"3da43bac0986959b61051f528894cbe4637142a5","user":{"login":"cosmos","id":228843,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyODg0Mw==","avatar_url":"https://avatars0.githubusercontent.com/u/228843?v=4","gravatar_id":"","url":"https://api.github.com/users/cosmos","html_url":"https://github.com/cosmos","followers_url":"https://api.github.com/users/cosmos/followers","following_url":"https://api.github.com/users/cosmos/following{/other_user}","gists_url":"https://api.github.com/users/cosmos/gists{/gist_id}","starred_url":"https://api.github.com/users/cosmos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cosmos/subscriptions","organizations_url":"https://api.github.com/users/cosmos/orgs","repos_url":"https://api.github.com/users/cosmos/repos","events_url":"https://api.github.com/users/cosmos/events{/privacy}","received_events_url":"https://api.github.com/users/cosmos/received_events","type":"Organization","site_admin":false},"repo":{"id":51193526,"node_id":"MDEwOlJlcG9zaXRvcnk1MTE5MzUyNg==","name":"cosmos-sdk","full_name":"cosmos/cosmos-sdk","owner":{"login":"cosmos","id":228843,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyODg0Mw==","avatar_url":"https://avatars0.githubusercontent.com/u/228843?v=4","gravatar_id":"","url":"https://api.github.com/users/cosmos","html_url":"https://github.com/cosmos","followers_url":"https://api.github.com/users/cosmos/followers","following_url":"https://api.github.com/users/cosmos/following{/other_user}","gists_url":"https://api.github.com/users/cosmos/gists{/gist_id}","starred_url":"https://api.github.com/users/cosmos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cosmos/subscriptions","organizations_url":"https://api.github.com/users/cosmos/orgs","repos_url":"https://api.github.com/users/cosmos/repos","events_url":"https://api.github.com/users/cosmos/events{/privacy}","received_events_url":"https://api.github.com/users/cosmos/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cosmos/cosmos-sdk","description":"Secure Blockchain Framework","fork":false,"url":"https://api.github.com/repos/cosmos/cosmos-sdk","forks_url":"https://api.github.com/repos/cosmos/cosmos-sdk/forks","keys_url":"https://api.github.com/repos/cosmos/cosmos-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cosmos/cosmos-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cosmos/cosmos-sdk/teams","hooks_url":"https://api.github.com/repos/cosmos/cosmos-sdk/hooks","issue_events_url":"https://api.github.com/repos/cosmos/cosmos-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/cosmos/cosmos-sdk/events","assignees_url":"https://api.github.com/repos/cosmos/cosmos-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/cosmos/cosmos-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/cosmos/cosmos-sdk/tags","blobs_url":"https://api.github.com/repos/cosmos/cosmos-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cosmos/cosmos-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cosmos/cosmos-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/cosmos/cosmos-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cosmos/cosmos-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/cosmos/cosmos-sdk/languages","stargazers_url":"https://api.github.com/repos/cosmos/cosmos-sdk/stargazers","contributors_url":"https://api.github.com/repos/cosmos/cosmos-sdk/contributors","subscribers_url":"https://api.github.com/repos/cosmos/cosmos-sdk/subscribers","subscription_url":"https://api.github.com/repos/cosmos/cosmos-sdk/subscription","commits_url":"https://api.github.com/repos/cosmos/cosmos-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/cosmos/cosmos-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/cosmos/cosmos-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/cosmos/cosmos-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/cosmos/cosmos-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/cosmos/cosmos-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cosmos/cosmos-sdk/merges","archive_url":"https://api.github.com/repos/cosmos/cosmos-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cosmos/cosmos-sdk/downloads","issues_url":"https://api.github.com/repos/cosmos/cosmos-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/cosmos/cosmos-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/cosmos/cosmos-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/cosmos/cosmos-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cosmos/cosmos-sdk/labels{/name}","releases_url":"https://api.github.com/repos/cosmos/cosmos-sdk/releases{/id}","deployments_url":"https://api.github.com/repos/cosmos/cosmos-sdk/deployments","created_at":"2016-02-06T07:15:53Z","updated_at":"2018-06-03T10:13:18Z","pushed_at":"2018-06-05T19:23:28Z","git_url":"git://github.com/cosmos/cosmos-sdk.git","ssh_url":"git@github.com:cosmos/cosmos-sdk.git","clone_url":"https://github.com/cosmos/cosmos-sdk.git","svn_url":"https://github.com/cosmos/cosmos-sdk","homepage":"https://tendermint.com","size":89969,"stargazers_count":396,"watchers_count":396,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":113,"mirror_url":null,"archived":false,"open_issues_count":230,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":113,"open_issues":230,"watchers":396,"default_branch":"master"}},"base":{"label":"cosmos:develop","ref":"develop","sha":"e0e50fce50de8c9172c43c2dd41d986fd926384d","user":{"login":"cosmos","id":228843,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyODg0Mw==","avatar_url":"https://avatars0.githubusercontent.com/u/228843?v=4","gravatar_id":"","url":"https://api.github.com/users/cosmos","html_url":"https://github.com/cosmos","followers_url":"https://api.github.com/users/cosmos/followers","following_url":"https://api.github.com/users/cosmos/following{/other_user}","gists_url":"https://api.github.com/users/cosmos/gists{/gist_id}","starred_url":"https://api.github.com/users/cosmos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cosmos/subscriptions","organizations_url":"https://api.github.com/users/cosmos/orgs","repos_url":"https://api.github.com/users/cosmos/repos","events_url":"https://api.github.com/users/cosmos/events{/privacy}","received_events_url":"https://api.github.com/users/cosmos/received_events","type":"Organization","site_admin":false},"repo":{"id":51193526,"node_id":"MDEwOlJlcG9zaXRvcnk1MTE5MzUyNg==","name":"cosmos-sdk","full_name":"cosmos/cosmos-sdk","owner":{"login":"cosmos","id":228843,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyODg0Mw==","avatar_url":"https://avatars0.githubusercontent.com/u/228843?v=4","gravatar_id":"","url":"https://api.github.com/users/cosmos","html_url":"https://github.com/cosmos","followers_url":"https://api.github.com/users/cosmos/followers","following_url":"https://api.github.com/users/cosmos/following{/other_user}","gists_url":"https://api.github.com/users/cosmos/gists{/gist_id}","starred_url":"https://api.github.com/users/cosmos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cosmos/subscriptions","organizations_url":"https://api.github.com/users/cosmos/orgs","repos_url":"https://api.github.com/users/cosmos/repos","events_url":"https://api.github.com/users/cosmos/events{/privacy}","received_events_url":"https://api.github.com/users/cosmos/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cosmos/cosmos-sdk","description":"Secure Blockchain Framework","fork":false,"url":"https://api.github.com/repos/cosmos/cosmos-sdk","forks_url":"https://api.github.com/repos/cosmos/cosmos-sdk/forks","keys_url":"https://api.github.com/repos/cosmos/cosmos-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cosmos/cosmos-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cosmos/cosmos-sdk/teams","hooks_url":"https://api.github.com/repos/cosmos/cosmos-sdk/hooks","issue_events_url":"https://api.github.com/repos/cosmos/cosmos-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/cosmos/cosmos-sdk/events","assignees_url":"https://api.github.com/repos/cosmos/cosmos-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/cosmos/cosmos-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/cosmos/cosmos-sdk/tags","blobs_url":"https://api.github.com/repos/cosmos/cosmos-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cosmos/cosmos-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cosmos/cosmos-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/cosmos/cosmos-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cosmos/cosmos-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/cosmos/cosmos-sdk/languages","stargazers_url":"https://api.github.com/repos/cosmos/cosmos-sdk/stargazers","contributors_url":"https://api.github.com/repos/cosmos/cosmos-sdk/contributors","subscribers_url":"https://api.github.com/repos/cosmos/cosmos-sdk/subscribers","subscription_url":"https://api.github.com/repos/cosmos/cosmos-sdk/subscription","commits_url":"https://api.github.com/repos/cosmos/cosmos-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/cosmos/cosmos-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/cosmos/cosmos-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/cosmos/cosmos-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/cosmos/cosmos-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/cosmos/cosmos-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cosmos/cosmos-sdk/merges","archive_url":"https://api.github.com/repos/cosmos/cosmos-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cosmos/cosmos-sdk/downloads","issues_url":"https://api.github.com/repos/cosmos/cosmos-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/cosmos/cosmos-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/cosmos/cosmos-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/cosmos/cosmos-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cosmos/cosmos-sdk/labels{/name}","releases_url":"https://api.github.com/repos/cosmos/cosmos-sdk/releases{/id}","deployments_url":"https://api.github.com/repos/cosmos/cosmos-sdk/deployments","created_at":"2016-02-06T07:15:53Z","updated_at":"2018-06-03T10:13:18Z","pushed_at":"2018-06-05T19:23:28Z","git_url":"git://github.com/cosmos/cosmos-sdk.git","ssh_url":"git@github.com:cosmos/cosmos-sdk.git","clone_url":"https://github.com/cosmos/cosmos-sdk.git","svn_url":"https://github.com/cosmos/cosmos-sdk","homepage":"https://tendermint.com","size":89969,"stargazers_count":396,"watchers_count":396,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":113,"mirror_url":null,"archived":false,"open_issues_count":230,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":113,"open_issues":230,"watchers":396,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cosmos/cosmos-sdk/pulls/1141"},"html":{"href":"https://github.com/cosmos/cosmos-sdk/pull/1141"},"issue":{"href":"https://api.github.com/repos/cosmos/cosmos-sdk/issues/1141"},"comments":{"href":"https://api.github.com/repos/cosmos/cosmos-sdk/issues/1141/comments"},"review_comments":{"href":"https://api.github.com/repos/cosmos/cosmos-sdk/pulls/1141/comments"},"review_comment":{"href":"https://api.github.com/repos/cosmos/cosmos-sdk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cosmos/cosmos-sdk/pulls/1141/commits"},"statuses":{"href":"https://api.github.com/repos/cosmos/cosmos-sdk/statuses/3da43bac0986959b61051f528894cbe4637142a5"}},"author_association":"NONE"}}
{"actor":{"display_login":"rigelrozanski"}}