From 90a102cf3e81a5d52f65c6c3a14bd909e07f001e Mon Sep 17 00:00:00 2001 From: Ethan Frey Date: Thu, 18 Jan 2018 12:19:41 +0100 Subject: [PATCH 01/15] Start with demo chub command Add version and node subcommand as TODOs --- Makefile | 4 +++ examples/chub/main.go | 57 ++++++++++++++++++++++++++++++++++++++++ examples/chub/node.go | 44 +++++++++++++++++++++++++++++++ examples/chub/version.go | 11 ++++++++ 4 files changed, 116 insertions(+) create mode 100644 examples/chub/main.go create mode 100644 examples/chub/node.go create mode 100644 examples/chub/version.go diff --git a/Makefile b/Makefile index 703a0803e3..7fc8f75402 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,10 @@ ci: get_tools get_vendor_deps build test_cover ######################################## ### Build +# This can be unified later, here for easy demos +chub: + go install $(BUILD_FLAGS) ./examples/chub + build: @rm -rf examples/basecoin/vendor/ go build $(BUILD_FLAGS) -o build/basecoin ./examples/basecoin/cmd/... diff --git a/examples/chub/main.go b/examples/chub/main.go new file mode 100644 index 0000000000..761fe26f3e --- /dev/null +++ b/examples/chub/main.go @@ -0,0 +1,57 @@ +package main + +import ( + "errors" + "os" + + "github.com/spf13/cobra" + + "github.com/tendermint/tmlibs/cli" + + "github.com/cosmos/cosmos-sdk/app" +) + +// chubCmd is the entry point for this binary +var ( + chubCmd = &cobra.Command{ + Use: "chub", + Short: "Cosmos Hub command-line tool", + Run: help, + } + + lineBreak = &cobra.Command{Run: func(*cobra.Command, []string) {}} +) + +func todoNotImplemented(_ *cobra.Command, _ []string) error { + return errors.New("TODO: Command not yet implemented") +} + +func help(cmd *cobra.Command, args []string) { + cmd.Help() +} + +func main() { + // disable sorting + cobra.EnableCommandSorting = false + + // TODO: set this to something real + var node app.App + + // add commands + // prepareRestServerCommands() + // prepareClientCommands() + + chubCmd.AddCommand( + nodeCommand(node), + // restServerCmd, + // clientCmd, + + lineBreak, + versionCmd, + ) + + // prepare and add flags + // executor := cli.PrepareMainCmd(chubCmd, "CH", os.ExpandEnv("$HOME/.cosmos-chub")) + executor := cli.PrepareBaseCmd(chubCmd, "CH", os.ExpandEnv("$HOME/.cosmos-chub")) + executor.Execute() +} diff --git a/examples/chub/node.go b/examples/chub/node.go new file mode 100644 index 0000000000..3befdc3c82 --- /dev/null +++ b/examples/chub/node.go @@ -0,0 +1,44 @@ +package main + +import ( + "github.com/spf13/cobra" + + "github.com/cosmos/cosmos-sdk/app" +) + +var ( + initNodeCmd = &cobra.Command{ + Use: "init", + Short: "Initialize full node", + RunE: todoNotImplemented, + } + + resetNodeCmd = &cobra.Command{ + Use: "unsafe_reset_all", + Short: "Reset full node data (danger, must resync)", + RunE: todoNotImplemented, + } +) + +func startNodeCmd(node app.App) *cobra.Command { + cmd := &cobra.Command{ + Use: "start", + Short: "Run the full node", + RunE: todoNotImplemented, + } + return cmd +} + +func nodeCommand(node app.App) *cobra.Command { + cmd := &cobra.Command{ + Use: "node", + Short: "Run the full node", + RunE: todoNotImplemented, + } + cmd.AddCommand( + initNodeCmd, + startNodeCmd(node), + resetNodeCmd, + ) + return cmd +} diff --git a/examples/chub/version.go b/examples/chub/version.go new file mode 100644 index 0000000000..4afcddb997 --- /dev/null +++ b/examples/chub/version.go @@ -0,0 +1,11 @@ +package main + +import "github.com/spf13/cobra" + +var ( + versionCmd = &cobra.Command{ + Use: "version", + Short: "Print the app version", + RunE: todoNotImplemented, + } +) From 9aa3189738f53337d4d10f09a26a9d61ed816244 Mon Sep 17 00:00:00 2001 From: Ethan Frey Date: Thu, 18 Jan 2018 12:37:54 +0100 Subject: [PATCH 02/15] Update version to 0.9.0-dev, use GitCommit --- version/version.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/version/version.go b/version/version.go index 14dd668d51..419e406adf 100644 --- a/version/version.go +++ b/version/version.go @@ -9,4 +9,7 @@ const Maj = "0" const Min = "9" const Fix = "0" -const Version = "0.9.0" +const Version = "0.9.0-dev" + +// GitCommit set by build flags +var GitCommit = "" From 2cd22b45bb45580923b49fa79a7e6c809e46f8db Mon Sep 17 00:00:00 2001 From: Ethan Frey Date: Thu, 18 Jan 2018 12:38:25 +0100 Subject: [PATCH 03/15] Implement version in chub --- examples/chub/version.go | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/examples/chub/version.go b/examples/chub/version.go index 4afcddb997..0c83c1bacd 100644 --- a/examples/chub/version.go +++ b/examples/chub/version.go @@ -1,11 +1,25 @@ package main -import "github.com/spf13/cobra" +import ( + "fmt" + + "github.com/spf13/cobra" + + "github.com/cosmos/cosmos-sdk/version" +) var ( versionCmd = &cobra.Command{ Use: "version", Short: "Print the app version", - RunE: todoNotImplemented, + Run: doVersionCmd, } ) + +func doVersionCmd(cmd *cobra.Command, args []string) { + v := version.Version + if version.GitCommit != "" { + v = v + " " + version.GitCommit + } + fmt.Println(v) +} From 87abef1e0ea3dadda1b1b04f5ef30e5ff6adaced Mon Sep 17 00:00:00 2001 From: Ethan Frey Date: Thu, 18 Jan 2018 12:38:39 +0100 Subject: [PATCH 04/15] Mock out chub keys commands --- examples/chub/key.go | 76 +++++++++++++++++++++++++++++++++++++++++++ examples/chub/main.go | 3 +- examples/chub/node.go | 2 +- 3 files changed, 78 insertions(+), 3 deletions(-) create mode 100644 examples/chub/key.go diff --git a/examples/chub/key.go b/examples/chub/key.go new file mode 100644 index 0000000000..29ff1ec2a3 --- /dev/null +++ b/examples/chub/key.go @@ -0,0 +1,76 @@ +package main + +import "github.com/spf13/cobra" + +const ( + flagPassword = "password" + flagNewPassword = "new-password" + flagType = "type" + flagSeed = "seed" + flagDryRun = "dry-run" +) + +var ( + listKeysCmd = &cobra.Command{ + Use: "list", + Short: "List all locally availably keys", + RunE: todoNotImplemented, + } + + showKeysCmd = &cobra.Command{ + Use: "show ", + Short: "Show key info for the given name", + RunE: todoNotImplemented, + } +) + +func keyCommand() *cobra.Command { + cmd := &cobra.Command{ + Use: "keys", + Short: "Add or view local private keys", + Run: help, + } + cmd.AddCommand( + addKeyCommand(), + listKeysCmd, + showKeysCmd, + lineBreak, + deleteKeyCommand(), + updateKeyCommand(), + ) + return cmd +} + +func addKeyCommand() *cobra.Command { + cmd := &cobra.Command{ + Use: "add ", + Short: "Create a new key, or import from seed", + RunE: todoNotImplemented, + } + cmd.Flags().StringP(flagPassword, "p", "", "password to encrypt private key") + cmd.Flags().StringP(flagType, "t", "ed25519", "type of private key (ed25519|secp256k1|ledger)") + cmd.Flags().StringP(flagSeed, "s", "", "Provide seed phrase to recover existing key instead of creating") + cmd.Flags().Bool(flagDryRun, false, "Perform action, but don't add key to local keystore") + return cmd +} + +func updateKeyCommand() *cobra.Command { + cmd := &cobra.Command{ + Use: "update ", + Short: "Change the password used to protect private key", + RunE: todoNotImplemented, + } + cmd.Flags().StringP(flagPassword, "p", "", "current password to decrypt key") + cmd.Flags().String(flagNewPassword, "", "new password to use to protect key") + return cmd +} + +func deleteKeyCommand() *cobra.Command { + cmd := &cobra.Command{ + Use: "delete ", + Short: "Delete the given key", + RunE: todoNotImplemented, + } + cmd.Flags().StringP(flagPassword, "p", "", "password of existing key to delete") + return cmd +} diff --git a/examples/chub/main.go b/examples/chub/main.go index 761fe26f3e..be08229f45 100644 --- a/examples/chub/main.go +++ b/examples/chub/main.go @@ -38,12 +38,11 @@ func main() { var node app.App // add commands - // prepareRestServerCommands() // prepareClientCommands() chubCmd.AddCommand( nodeCommand(node), - // restServerCmd, + keyCommand(), // clientCmd, lineBreak, diff --git a/examples/chub/node.go b/examples/chub/node.go index 3befdc3c82..3e349738d8 100644 --- a/examples/chub/node.go +++ b/examples/chub/node.go @@ -8,7 +8,7 @@ import ( var ( initNodeCmd = &cobra.Command{ - Use: "init", + Use: "init ", Short: "Initialize full node", RunE: todoNotImplemented, } From 27aa06bb7316ea8adb48daffe289f3076415f47d Mon Sep 17 00:00:00 2001 From: Ethan Frey Date: Thu, 18 Jan 2018 15:14:08 +0100 Subject: [PATCH 05/15] Add basic client cli commands --- examples/chub/client.go | 133 ++++++++++++++++++++++++++++++++++++++++ examples/chub/main.go | 2 +- examples/chub/node.go | 2 +- 3 files changed, 135 insertions(+), 2 deletions(-) create mode 100644 examples/chub/client.go diff --git a/examples/chub/client.go b/examples/chub/client.go new file mode 100644 index 0000000000..6f709dda09 --- /dev/null +++ b/examples/chub/client.go @@ -0,0 +1,133 @@ +package main + +import "github.com/spf13/cobra" + +const ( + // these are needed for every init + flagChainID = "chain-id" + flagNode = "node" + + // one of the following should be provided to verify the connection + flagGenesis = "genesis" + flagCommit = "commit" + flagValHash = "validator-set" + + flagSelect = "select" + flagTags = "tag" + flagAny = "any" + + flagBind = "bind" + flagCORS = "cors" +) + +var ( + statusCmd = &cobra.Command{ + Use: "status", + Short: "Query remote node for status", + RunE: todoNotImplemented, + } + + getCmd = &cobra.Command{ + Use: "get", + Short: "Query ABCI state data", + Long: `Query ABCI state data. +Subcommands should be defined for each particular object to query.`, + Run: help, + } + + postCmd = &cobra.Command{ + Use: "post", + Short: "Create a new transaction and post it to the chain", + Long: `Create a new transaction and post it to the chain. +Subcommands should be defined for each particular transaction type.`, + Run: help, + } +) + +func clientCommand() *cobra.Command { + cmd := &cobra.Command{ + Use: "client", + Short: "Interact with the chain via a light-client", + Run: help, + } + cmd.AddCommand( + initClientCommand(), + statusCmd, + blockCommand(), + validatorCommand(), + lineBreak, + txSearchCommand(), + txCommand(), + lineBreak, + getCmd, + postCmd, + lineBreak, + serveCommand(), + ) + return cmd +} + +func initClientCommand() *cobra.Command { + cmd := &cobra.Command{ + Use: "init", + Short: "Initialize light client", + RunE: todoNotImplemented, + } + cmd.Flags().StringP(flagChainID, "c", "", "ID of chain we connect to") + cmd.Flags().StringP(flagNode, "n", "tcp://localhost:46657", "node to connect to") + cmd.Flags().String(flagGenesis, "", "genesis file to verify header validity") + cmd.Flags().String(flagCommit, "", "file with trusted and signed header") + cmd.Flags().String(flagValHash, "", "hash of trusted validator set (hex-encoded)") + return cmd +} + +func blockCommand() *cobra.Command { + cmd := &cobra.Command{ + Use: "block ", + Short: "Get verified data for a the block at given height", + RunE: todoNotImplemented, + } + cmd.Flags().StringSlice(flagSelect, []string{"header", "tx"}, "fields to return (header|txs|results)") + return cmd +} + +func validatorCommand() *cobra.Command { + cmd := &cobra.Command{ + Use: "validatorset ", + Short: "Get the full validator set at given height", + RunE: todoNotImplemented, + } + return cmd +} + +func serveCommand() *cobra.Command { + cmd := &cobra.Command{ + Use: "serve", + Short: "Start LCD (light-client daemon), a local REST server", + RunE: todoNotImplemented, + } + // TODO: handle unix sockets also? + cmd.Flags().StringP(flagBind, "b", "localhost:1317", "interface and port that server binds to") + cmd.Flags().String(flagCORS, "", "Set to domains that can make CORS requests (* for all)") + return cmd +} + +func txSearchCommand() *cobra.Command { + cmd := &cobra.Command{ + Use: "txs", + Short: "Search for all transactions that match the given tags", + RunE: todoNotImplemented, + } + cmd.Flags().StringSlice(flagTags, nil, "tags that must match (may provide multiple)") + cmd.Flags().Bool(flagAny, false, "Return transactions that match ANY tag, rather than ALL") + return cmd +} + +func txCommand() *cobra.Command { + cmd := &cobra.Command{ + Use: "tx ", + Short: "Matches this txhash over all committed blocks", + RunE: todoNotImplemented, + } + return cmd +} diff --git a/examples/chub/main.go b/examples/chub/main.go index be08229f45..9f69968931 100644 --- a/examples/chub/main.go +++ b/examples/chub/main.go @@ -43,7 +43,7 @@ func main() { chubCmd.AddCommand( nodeCommand(node), keyCommand(), - // clientCmd, + clientCommand(), lineBreak, versionCmd, diff --git a/examples/chub/node.go b/examples/chub/node.go index 3e349738d8..be20b64a27 100644 --- a/examples/chub/node.go +++ b/examples/chub/node.go @@ -33,7 +33,7 @@ func nodeCommand(node app.App) *cobra.Command { cmd := &cobra.Command{ Use: "node", Short: "Run the full node", - RunE: todoNotImplemented, + Run: help, } cmd.AddCommand( initNodeCmd, From acf24f1c1b2b7b9a68232b74a8df9e47ed5c02dc Mon Sep 17 00:00:00 2001 From: Ethan Frey Date: Thu, 18 Jan 2018 15:34:45 +0100 Subject: [PATCH 06/15] Allow adding custom query/post commands to chub --- examples/chub/client.go | 18 ++++++++++++++---- examples/chub/key.go | 5 +++-- examples/chub/main.go | 36 ++++++++++++++++++++++++++++-------- examples/chub/node.go | 30 +++++++++++++++++++----------- examples/chub/version.go | 3 ++- 5 files changed, 66 insertions(+), 26 deletions(-) diff --git a/examples/chub/client.go b/examples/chub/client.go index 6f709dda09..9f47a6e761 100644 --- a/examples/chub/client.go +++ b/examples/chub/client.go @@ -32,7 +32,6 @@ var ( Short: "Query ABCI state data", Long: `Query ABCI state data. Subcommands should be defined for each particular object to query.`, - Run: help, } postCmd = &cobra.Command{ @@ -40,15 +39,16 @@ Subcommands should be defined for each particular object to query.`, Short: "Create a new transaction and post it to the chain", Long: `Create a new transaction and post it to the chain. Subcommands should be defined for each particular transaction type.`, - Run: help, } ) -func clientCommand() *cobra.Command { +// ClientCommands returns a sub-tree of all basic client commands +// +// Call AddGetCommand and AddPostCommand to add custom txs and queries +func ClientCommands() *cobra.Command { cmd := &cobra.Command{ Use: "client", Short: "Interact with the chain via a light-client", - Run: help, } cmd.AddCommand( initClientCommand(), @@ -67,6 +67,16 @@ func clientCommand() *cobra.Command { return cmd } +// AddGetCommand adds one or more query subcommands +func AddGetCommand(cmds ...*cobra.Command) { + getCmd.AddCommand(cmds...) +} + +// AddPostCommand adds one or more subcommands to create transactions +func AddPostCommand(cmds ...*cobra.Command) { + postCmd.AddCommand(cmds...) +} + func initClientCommand() *cobra.Command { cmd := &cobra.Command{ Use: "init", diff --git a/examples/chub/key.go b/examples/chub/key.go index 29ff1ec2a3..f7b46d416e 100644 --- a/examples/chub/key.go +++ b/examples/chub/key.go @@ -24,11 +24,12 @@ var ( } ) -func keyCommand() *cobra.Command { +// KeyCommands registers a sub-tree of commands to interact with +// local private key storage. +func KeyCommands() *cobra.Command { cmd := &cobra.Command{ Use: "keys", Short: "Add or view local private keys", - Run: help, } cmd.AddCommand( addKeyCommand(), diff --git a/examples/chub/main.go b/examples/chub/main.go index 9f69968931..bcd826a279 100644 --- a/examples/chub/main.go +++ b/examples/chub/main.go @@ -11,23 +11,42 @@ import ( "github.com/cosmos/cosmos-sdk/app" ) +const ( + flagTo = "to" + flagAmount = "amount" + flagFee = "fee" +) + // chubCmd is the entry point for this binary var ( chubCmd = &cobra.Command{ Use: "chub", Short: "Cosmos Hub command-line tool", - Run: help, } lineBreak = &cobra.Command{Run: func(*cobra.Command, []string) {}} + + getAccountCmd = &cobra.Command{ + Use: "account
", + Short: "Query account balance", + RunE: todoNotImplemented, + } ) func todoNotImplemented(_ *cobra.Command, _ []string) error { return errors.New("TODO: Command not yet implemented") } -func help(cmd *cobra.Command, args []string) { - cmd.Help() +func postSendCommand() *cobra.Command { + cmd := &cobra.Command{ + Use: "send", + Short: "Create and sign a send tx", + RunE: todoNotImplemented, + } + cmd.Flags().String(flagTo, "", "Address to send coins") + cmd.Flags().String(flagAmount, "", "Amount of coins to send") + cmd.Flags().String(flagFee, "", "Fee to pay along with transaction") + return cmd } func main() { @@ -38,15 +57,16 @@ func main() { var node app.App // add commands - // prepareClientCommands() + AddGetCommand(getAccountCmd) + AddPostCommand(postSendCommand()) chubCmd.AddCommand( - nodeCommand(node), - keyCommand(), - clientCommand(), + NodeCommands(node), + KeyCommands(), + ClientCommands(), lineBreak, - versionCmd, + VersionCmd, ) // prepare and add flags diff --git a/examples/chub/node.go b/examples/chub/node.go index be20b64a27..e0c865cfec 100644 --- a/examples/chub/node.go +++ b/examples/chub/node.go @@ -6,6 +6,10 @@ import ( "github.com/cosmos/cosmos-sdk/app" ) +const ( + flagWithTendermint = "with-tendermint" +) + var ( initNodeCmd = &cobra.Command{ Use: "init ", @@ -20,20 +24,14 @@ var ( } ) -func startNodeCmd(node app.App) *cobra.Command { - cmd := &cobra.Command{ - Use: "start", - Short: "Run the full node", - RunE: todoNotImplemented, - } - return cmd -} - -func nodeCommand(node app.App) *cobra.Command { +// NodeCommands registers a sub-tree of commands to interact with +// a local full-node. +// +// Accept an application it should start +func NodeCommands(node app.App) *cobra.Command { cmd := &cobra.Command{ Use: "node", Short: "Run the full node", - Run: help, } cmd.AddCommand( initNodeCmd, @@ -42,3 +40,13 @@ func nodeCommand(node app.App) *cobra.Command { ) return cmd } + +func startNodeCmd(node app.App) *cobra.Command { + cmd := &cobra.Command{ + Use: "start", + Short: "Run the full node", + RunE: todoNotImplemented, + } + cmd.Flags().Bool(flagWithTendermint, true, "run abci app embedded in-process with tendermint") + return cmd +} diff --git a/examples/chub/version.go b/examples/chub/version.go index 0c83c1bacd..59fd799c07 100644 --- a/examples/chub/version.go +++ b/examples/chub/version.go @@ -9,7 +9,8 @@ import ( ) var ( - versionCmd = &cobra.Command{ + // VersionCmd prints out the current sdk version + VersionCmd = &cobra.Command{ Use: "version", Short: "Print the app version", Run: doVersionCmd, From da7a36a866af9012c4316d7d38a5ba554062cd1d Mon Sep 17 00:00:00 2001 From: Ethan Frey Date: Thu, 18 Jan 2018 15:40:54 +0100 Subject: [PATCH 07/15] Add global flags to all queries and posts --- examples/chub/client.go | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/examples/chub/client.go b/examples/chub/client.go index 9f47a6e761..8d5e1c9b86 100644 --- a/examples/chub/client.go +++ b/examples/chub/client.go @@ -16,8 +16,12 @@ const ( flagTags = "tag" flagAny = "any" - flagBind = "bind" - flagCORS = "cors" + flagBind = "bind" + flagCORS = "cors" + flagTrustNode = "trust-node" + + // this is for signing + flagName = "name" ) var ( @@ -42,6 +46,13 @@ Subcommands should be defined for each particular transaction type.`, } ) +func init() { + getCmd.PersistentFlags().Bool(flagTrustNode, false, "Don't verify proofs for responses") + + postCmd.PersistentFlags().String(flagName, "", "Name of private key with which to sign") + postCmd.PersistentFlags().String(flagPassword, "", "Password to use the named private key") +} + // ClientCommands returns a sub-tree of all basic client commands // // Call AddGetCommand and AddPostCommand to add custom txs and queries From 0b0500e8a0d02a486beff27a2c744211df2bc375 Mon Sep 17 00:00:00 2001 From: Ethan Frey Date: Wed, 7 Feb 2018 17:22:49 +0100 Subject: [PATCH 08/15] Rebased on develop, fixed imports --- examples/chub/main.go | 4 ++-- examples/chub/node.go | 6 +++--- glide.lock | 4 ++++ glide.yaml | 4 ++++ 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/examples/chub/main.go b/examples/chub/main.go index bcd826a279..a39274f408 100644 --- a/examples/chub/main.go +++ b/examples/chub/main.go @@ -8,7 +8,7 @@ import ( "github.com/tendermint/tmlibs/cli" - "github.com/cosmos/cosmos-sdk/app" + "github.com/cosmos/cosmos-sdk/baseapp" ) const ( @@ -54,7 +54,7 @@ func main() { cobra.EnableCommandSorting = false // TODO: set this to something real - var node app.App + var node baseapp.BaseApp // add commands AddGetCommand(getAccountCmd) diff --git a/examples/chub/node.go b/examples/chub/node.go index e0c865cfec..1b73c82d6d 100644 --- a/examples/chub/node.go +++ b/examples/chub/node.go @@ -3,7 +3,7 @@ package main import ( "github.com/spf13/cobra" - "github.com/cosmos/cosmos-sdk/app" + "github.com/cosmos/cosmos-sdk/baseapp" ) const ( @@ -28,7 +28,7 @@ var ( // a local full-node. // // Accept an application it should start -func NodeCommands(node app.App) *cobra.Command { +func NodeCommands(node baseapp.BaseApp) *cobra.Command { cmd := &cobra.Command{ Use: "node", Short: "Run the full node", @@ -41,7 +41,7 @@ func NodeCommands(node app.App) *cobra.Command { return cmd } -func startNodeCmd(node app.App) *cobra.Command { +func startNodeCmd(node baseapp.BaseApp) *cobra.Command { cmd := &cobra.Command{ Use: "start", Short: "Run the full node", diff --git a/glide.lock b/glide.lock index 2ce3afb93c..774f3143e9 100644 --- a/glide.lock +++ b/glide.lock @@ -46,6 +46,10 @@ imports: version: 645ef00459ed84a119197bfb8d8205042c6df63d - name: github.com/rigelrozanski/common version: f691f115798593d783b9999b1263c2f4ffecc439 +- name: github.com/spf13/cobra + version: 93959269ad99e80983c9ba742a7e01203a4c0e4f +- name: github.com/spf13/viper + version: 25b30aa063fc18e48662b86996252eabdcf2f0c7 - name: github.com/syndtr/goleveldb version: 211f780988068502fe874c44dae530528ebd840f subpackages: diff --git a/glide.yaml b/glide.yaml index ea7856ff2c..94dba7dda0 100644 --- a/glide.yaml +++ b/glide.yaml @@ -28,6 +28,10 @@ import: - package: golang.org/x/crypto subpackages: - ripemd160 +- package: github.com/spf13/cobra + version: ~0.0.1 +- package: github.com/spf13/viper + version: ^1.0.0 testImport: - package: github.com/stretchr/testify version: ^1.2.1 From 959ad1431e9d94410fe1ae28fde876b0f8e4ec2d Mon Sep 17 00:00:00 2001 From: Ethan Frey Date: Wed, 7 Feb 2018 17:25:18 +0100 Subject: [PATCH 09/15] Capitalized help strings on flags --- examples/chub/client.go | 14 +++++++------- examples/chub/key.go | 10 +++++----- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/examples/chub/client.go b/examples/chub/client.go index 8d5e1c9b86..4d25a4d4d8 100644 --- a/examples/chub/client.go +++ b/examples/chub/client.go @@ -95,10 +95,10 @@ func initClientCommand() *cobra.Command { RunE: todoNotImplemented, } cmd.Flags().StringP(flagChainID, "c", "", "ID of chain we connect to") - cmd.Flags().StringP(flagNode, "n", "tcp://localhost:46657", "node to connect to") - cmd.Flags().String(flagGenesis, "", "genesis file to verify header validity") - cmd.Flags().String(flagCommit, "", "file with trusted and signed header") - cmd.Flags().String(flagValHash, "", "hash of trusted validator set (hex-encoded)") + cmd.Flags().StringP(flagNode, "n", "tcp://localhost:46657", "Node to connect to") + cmd.Flags().String(flagGenesis, "", "Genesis file to verify header validity") + cmd.Flags().String(flagCommit, "", "File with trusted and signed header") + cmd.Flags().String(flagValHash, "", "Hash of trusted validator set (hex-encoded)") return cmd } @@ -108,7 +108,7 @@ func blockCommand() *cobra.Command { Short: "Get verified data for a the block at given height", RunE: todoNotImplemented, } - cmd.Flags().StringSlice(flagSelect, []string{"header", "tx"}, "fields to return (header|txs|results)") + cmd.Flags().StringSlice(flagSelect, []string{"header", "tx"}, "Fields to return (header|txs|results)") return cmd } @@ -128,7 +128,7 @@ func serveCommand() *cobra.Command { RunE: todoNotImplemented, } // TODO: handle unix sockets also? - cmd.Flags().StringP(flagBind, "b", "localhost:1317", "interface and port that server binds to") + cmd.Flags().StringP(flagBind, "b", "localhost:1317", "Interface and port that server binds to") cmd.Flags().String(flagCORS, "", "Set to domains that can make CORS requests (* for all)") return cmd } @@ -139,7 +139,7 @@ func txSearchCommand() *cobra.Command { Short: "Search for all transactions that match the given tags", RunE: todoNotImplemented, } - cmd.Flags().StringSlice(flagTags, nil, "tags that must match (may provide multiple)") + cmd.Flags().StringSlice(flagTags, nil, "Tags that must match (may provide multiple)") cmd.Flags().Bool(flagAny, false, "Return transactions that match ANY tag, rather than ALL") return cmd } diff --git a/examples/chub/key.go b/examples/chub/key.go index f7b46d416e..b3ffa323ae 100644 --- a/examples/chub/key.go +++ b/examples/chub/key.go @@ -48,8 +48,8 @@ func addKeyCommand() *cobra.Command { Short: "Create a new key, or import from seed", RunE: todoNotImplemented, } - cmd.Flags().StringP(flagPassword, "p", "", "password to encrypt private key") - cmd.Flags().StringP(flagType, "t", "ed25519", "type of private key (ed25519|secp256k1|ledger)") + cmd.Flags().StringP(flagPassword, "p", "", "Password to encrypt private key") + cmd.Flags().StringP(flagType, "t", "ed25519", "Type of private key (ed25519|secp256k1|ledger)") cmd.Flags().StringP(flagSeed, "s", "", "Provide seed phrase to recover existing key instead of creating") cmd.Flags().Bool(flagDryRun, false, "Perform action, but don't add key to local keystore") return cmd @@ -61,8 +61,8 @@ func updateKeyCommand() *cobra.Command { Short: "Change the password used to protect private key", RunE: todoNotImplemented, } - cmd.Flags().StringP(flagPassword, "p", "", "current password to decrypt key") - cmd.Flags().String(flagNewPassword, "", "new password to use to protect key") + cmd.Flags().StringP(flagPassword, "p", "", "Current password to decrypt key") + cmd.Flags().String(flagNewPassword, "", "New password to use to protect key") return cmd } @@ -72,6 +72,6 @@ func deleteKeyCommand() *cobra.Command { Short: "Delete the given key", RunE: todoNotImplemented, } - cmd.Flags().StringP(flagPassword, "p", "", "password of existing key to delete") + cmd.Flags().StringP(flagPassword, "p", "", "Password of existing key to delete") return cmd } From b10afcaf4cf90339e9afadd02d825a7c0e3dd06f Mon Sep 17 00:00:00 2001 From: Ethan Frey Date: Wed, 7 Feb 2018 17:33:28 +0100 Subject: [PATCH 10/15] Rough separation of gaiad and gaiacli --- Makefile | 5 +-- examples/{chub => gaiacli}/client.go | 0 examples/{chub => gaiacli}/key.go | 0 examples/{chub => gaiacli}/main.go | 6 ---- examples/{chub => gaiacli}/version.go | 0 examples/gaiad/main.go | 44 +++++++++++++++++++++++++++ examples/{chub => gaiad}/node.go | 11 ++----- examples/gaiad/version.go | 26 ++++++++++++++++ 8 files changed, 76 insertions(+), 16 deletions(-) rename examples/{chub => gaiacli}/client.go (100%) rename examples/{chub => gaiacli}/key.go (100%) rename examples/{chub => gaiacli}/main.go (91%) rename examples/{chub => gaiacli}/version.go (100%) create mode 100644 examples/gaiad/main.go rename examples/{chub => gaiad}/node.go (77%) create mode 100644 examples/gaiad/version.go diff --git a/Makefile b/Makefile index 7fc8f75402..9d7a4345a0 100644 --- a/Makefile +++ b/Makefile @@ -12,8 +12,9 @@ ci: get_tools get_vendor_deps build test_cover ### Build # This can be unified later, here for easy demos -chub: - go install $(BUILD_FLAGS) ./examples/chub +gaia: + go build $(BUILD_FLAGS) -o build/gaid ./examples/gaiad + go build $(BUILD_FLAGS) -o build/gaiacli ./examples/gaiacli build: @rm -rf examples/basecoin/vendor/ diff --git a/examples/chub/client.go b/examples/gaiacli/client.go similarity index 100% rename from examples/chub/client.go rename to examples/gaiacli/client.go diff --git a/examples/chub/key.go b/examples/gaiacli/key.go similarity index 100% rename from examples/chub/key.go rename to examples/gaiacli/key.go diff --git a/examples/chub/main.go b/examples/gaiacli/main.go similarity index 91% rename from examples/chub/main.go rename to examples/gaiacli/main.go index a39274f408..a898b98cd0 100644 --- a/examples/chub/main.go +++ b/examples/gaiacli/main.go @@ -7,8 +7,6 @@ import ( "github.com/spf13/cobra" "github.com/tendermint/tmlibs/cli" - - "github.com/cosmos/cosmos-sdk/baseapp" ) const ( @@ -53,15 +51,11 @@ func main() { // disable sorting cobra.EnableCommandSorting = false - // TODO: set this to something real - var node baseapp.BaseApp - // add commands AddGetCommand(getAccountCmd) AddPostCommand(postSendCommand()) chubCmd.AddCommand( - NodeCommands(node), KeyCommands(), ClientCommands(), diff --git a/examples/chub/version.go b/examples/gaiacli/version.go similarity index 100% rename from examples/chub/version.go rename to examples/gaiacli/version.go diff --git a/examples/gaiad/main.go b/examples/gaiad/main.go new file mode 100644 index 0000000000..ca9bb20dba --- /dev/null +++ b/examples/gaiad/main.go @@ -0,0 +1,44 @@ +package main + +import ( + "errors" + "os" + + "github.com/spf13/cobra" + + "github.com/tendermint/tmlibs/cli" + + "github.com/cosmos/cosmos-sdk/baseapp" +) + +const ( + flagTo = "to" + flagAmount = "amount" + flagFee = "fee" +) + +// gaiadCmd is the entry point for this binary +var ( + gaiadCmd = &cobra.Command{ + Use: "gaiad", + Short: "Gaia Daemon (server)", + } +) + +func todoNotImplemented(_ *cobra.Command, _ []string) error { + return errors.New("TODO: Command not yet implemented") +} + +func main() { + // TODO: set this to something real + var node baseapp.BaseApp + + AddNodeCommands(gaiadCmd, node) + gaiadCmd.AddCommand( + VersionCmd, + ) + + // prepare and add flags + executor := cli.PrepareBaseCmd(gaiadCmd, "GA", os.ExpandEnv("$HOME/.gaiad")) + executor.Execute() +} diff --git a/examples/chub/node.go b/examples/gaiad/node.go similarity index 77% rename from examples/chub/node.go rename to examples/gaiad/node.go index 1b73c82d6d..8d362a6a78 100644 --- a/examples/chub/node.go +++ b/examples/gaiad/node.go @@ -24,21 +24,16 @@ var ( } ) -// NodeCommands registers a sub-tree of commands to interact with -// a local full-node. +// AddNodeCommands registers all commands to interact +// with a local full-node as subcommands of the argument. // // Accept an application it should start -func NodeCommands(node baseapp.BaseApp) *cobra.Command { - cmd := &cobra.Command{ - Use: "node", - Short: "Run the full node", - } +func AddNodeCommands(cmd *cobra.Command, node baseapp.BaseApp) { cmd.AddCommand( initNodeCmd, startNodeCmd(node), resetNodeCmd, ) - return cmd } func startNodeCmd(node baseapp.BaseApp) *cobra.Command { diff --git a/examples/gaiad/version.go b/examples/gaiad/version.go new file mode 100644 index 0000000000..59fd799c07 --- /dev/null +++ b/examples/gaiad/version.go @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + + "github.com/spf13/cobra" + + "github.com/cosmos/cosmos-sdk/version" +) + +var ( + // VersionCmd prints out the current sdk version + VersionCmd = &cobra.Command{ + Use: "version", + Short: "Print the app version", + Run: doVersionCmd, + } +) + +func doVersionCmd(cmd *cobra.Command, args []string) { + v := version.Version + if version.GitCommit != "" { + v = v + " " + version.GitCommit + } + fmt.Println(v) +} From c7f31bdf261172f419e82799bacce17c9f3d3bc7 Mon Sep 17 00:00:00 2001 From: Ethan Frey Date: Wed, 7 Feb 2018 17:38:06 +0100 Subject: [PATCH 11/15] Collapsed nested commands in gaiacli --- Makefile | 2 +- examples/gaiacli/client.go | 9 ++------- examples/gaiacli/main.go | 15 +++++++-------- glide.yaml | 1 - 4 files changed, 10 insertions(+), 17 deletions(-) diff --git a/Makefile b/Makefile index 9d7a4345a0..52a1ec789d 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ ci: get_tools get_vendor_deps build test_cover # This can be unified later, here for easy demos gaia: - go build $(BUILD_FLAGS) -o build/gaid ./examples/gaiad + go build $(BUILD_FLAGS) -o build/gaiad ./examples/gaiad go build $(BUILD_FLAGS) -o build/gaiacli ./examples/gaiacli build: diff --git a/examples/gaiacli/client.go b/examples/gaiacli/client.go index 4d25a4d4d8..5daae467f9 100644 --- a/examples/gaiacli/client.go +++ b/examples/gaiacli/client.go @@ -53,14 +53,10 @@ func init() { postCmd.PersistentFlags().String(flagPassword, "", "Password to use the named private key") } -// ClientCommands returns a sub-tree of all basic client commands +// AddClientCommands returns a sub-tree of all basic client commands // // Call AddGetCommand and AddPostCommand to add custom txs and queries -func ClientCommands() *cobra.Command { - cmd := &cobra.Command{ - Use: "client", - Short: "Interact with the chain via a light-client", - } +func AddClientCommands(cmd *cobra.Command) { cmd.AddCommand( initClientCommand(), statusCmd, @@ -75,7 +71,6 @@ func ClientCommands() *cobra.Command { lineBreak, serveCommand(), ) - return cmd } // AddGetCommand adds one or more query subcommands diff --git a/examples/gaiacli/main.go b/examples/gaiacli/main.go index a898b98cd0..a6570d227b 100644 --- a/examples/gaiacli/main.go +++ b/examples/gaiacli/main.go @@ -15,11 +15,11 @@ const ( flagFee = "fee" ) -// chubCmd is the entry point for this binary +// gaiacliCmd is the entry point for this binary var ( - chubCmd = &cobra.Command{ - Use: "chub", - Short: "Cosmos Hub command-line tool", + gaiacliCmd = &cobra.Command{ + Use: "gaiacli", + Short: "Gaia light-client", } lineBreak = &cobra.Command{Run: func(*cobra.Command, []string) {}} @@ -55,16 +55,15 @@ func main() { AddGetCommand(getAccountCmd) AddPostCommand(postSendCommand()) - chubCmd.AddCommand( + AddClientCommands(gaiacliCmd) + gaiacliCmd.AddCommand( KeyCommands(), - ClientCommands(), lineBreak, VersionCmd, ) // prepare and add flags - // executor := cli.PrepareMainCmd(chubCmd, "CH", os.ExpandEnv("$HOME/.cosmos-chub")) - executor := cli.PrepareBaseCmd(chubCmd, "CH", os.ExpandEnv("$HOME/.cosmos-chub")) + executor := cli.PrepareBaseCmd(gaiacliCmd, "GA", os.ExpandEnv("$HOME/.cosmos-chub")) executor.Execute() } diff --git a/glide.yaml b/glide.yaml index 94dba7dda0..c6d91cdd4a 100644 --- a/glide.yaml +++ b/glide.yaml @@ -29,7 +29,6 @@ import: subpackages: - ripemd160 - package: github.com/spf13/cobra - version: ~0.0.1 - package: github.com/spf13/viper version: ^1.0.0 testImport: From 91592a91f187a0e3f738fbcbc40c42efd7ff928d Mon Sep 17 00:00:00 2001 From: Ethan Frey Date: Wed, 7 Feb 2018 17:48:21 +0100 Subject: [PATCH 12/15] Cleaned up client commands more --- examples/gaiacli/client.go | 44 +++++++++++--------------------------- examples/gaiacli/main.go | 15 ++++++++----- 2 files changed, 23 insertions(+), 36 deletions(-) diff --git a/examples/gaiacli/client.go b/examples/gaiacli/client.go index 5daae467f9..682a571e6e 100644 --- a/examples/gaiacli/client.go +++ b/examples/gaiacli/client.go @@ -30,29 +30,8 @@ var ( Short: "Query remote node for status", RunE: todoNotImplemented, } - - getCmd = &cobra.Command{ - Use: "get", - Short: "Query ABCI state data", - Long: `Query ABCI state data. -Subcommands should be defined for each particular object to query.`, - } - - postCmd = &cobra.Command{ - Use: "post", - Short: "Create a new transaction and post it to the chain", - Long: `Create a new transaction and post it to the chain. -Subcommands should be defined for each particular transaction type.`, - } ) -func init() { - getCmd.PersistentFlags().Bool(flagTrustNode, false, "Don't verify proofs for responses") - - postCmd.PersistentFlags().String(flagName, "", "Name of private key with which to sign") - postCmd.PersistentFlags().String(flagPassword, "", "Password to use the named private key") -} - // AddClientCommands returns a sub-tree of all basic client commands // // Call AddGetCommand and AddPostCommand to add custom txs and queries @@ -66,21 +45,24 @@ func AddClientCommands(cmd *cobra.Command) { txSearchCommand(), txCommand(), lineBreak, - getCmd, - postCmd, - lineBreak, - serveCommand(), ) } -// AddGetCommand adds one or more query subcommands -func AddGetCommand(cmds ...*cobra.Command) { - getCmd.AddCommand(cmds...) +// GetCommands adds common flags to query commands +func GetCommands(cmds ...*cobra.Command) []*cobra.Command { + for _, c := range cmds { + c.Flags().Bool(flagTrustNode, false, "Don't verify proofs for responses") + } + return cmds } -// AddPostCommand adds one or more subcommands to create transactions -func AddPostCommand(cmds ...*cobra.Command) { - postCmd.AddCommand(cmds...) +// PostCommands adds common flags for commands to post tx +func PostCommands(cmds ...*cobra.Command) []*cobra.Command { + for _, c := range cmds { + c.Flags().String(flagName, "", "Name of private key with which to sign") + c.Flags().String(flagPassword, "", "Password to use the named private key") + } + return cmds } func initClientCommand() *cobra.Command { diff --git a/examples/gaiacli/main.go b/examples/gaiacli/main.go index a6570d227b..4957a26ced 100644 --- a/examples/gaiacli/main.go +++ b/examples/gaiacli/main.go @@ -51,14 +51,19 @@ func main() { // disable sorting cobra.EnableCommandSorting = false - // add commands - AddGetCommand(getAccountCmd) - AddPostCommand(postSendCommand()) - + // generic client commands AddClientCommands(gaiacliCmd) + // query commands (custom to binary) gaiacliCmd.AddCommand( + GetCommands(getAccountCmd)...) + // post tx commands (custom to binary) + gaiacliCmd.AddCommand( + PostCommands(postSendCommand())...) + // add proxy, version and key info + gaiacliCmd.AddCommand( + lineBreak, + serveCommand(), KeyCommands(), - lineBreak, VersionCmd, ) From 94251eaf7cca65cc1fc0579eda5cf6f081c792db Mon Sep 17 00:00:00 2001 From: Ethan Frey Date: Wed, 7 Feb 2018 17:54:45 +0100 Subject: [PATCH 13/15] Fixed default directory --- examples/gaiacli/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/gaiacli/main.go b/examples/gaiacli/main.go index 4957a26ced..6321e25ee7 100644 --- a/examples/gaiacli/main.go +++ b/examples/gaiacli/main.go @@ -59,6 +59,7 @@ func main() { // post tx commands (custom to binary) gaiacliCmd.AddCommand( PostCommands(postSendCommand())...) + // add proxy, version and key info gaiacliCmd.AddCommand( lineBreak, @@ -69,6 +70,6 @@ func main() { ) // prepare and add flags - executor := cli.PrepareBaseCmd(gaiacliCmd, "GA", os.ExpandEnv("$HOME/.cosmos-chub")) + executor := cli.PrepareBaseCmd(gaiacliCmd, "GA", os.ExpandEnv("$HOME/.gaiacli")) executor.Execute() } From bdc33f6a10d9c86d981258acff71fcaaf31c3e16 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Tue, 13 Feb 2018 08:39:28 -0500 Subject: [PATCH 14/15] examples/gaia --- Makefile | 4 +-- examples/{ => gaia}/gaiacli/client.go | 0 examples/{ => gaia}/gaiacli/key.go | 0 examples/{ => gaia}/gaiacli/main.go | 0 examples/{ => gaia}/gaiacli/version.go | 0 examples/{ => gaia}/gaiad/main.go | 0 examples/{ => gaia}/gaiad/node.go | 0 examples/{ => gaia}/gaiad/version.go | 0 glide.lock | 48 +++++++++++++++++++++++--- glide.yaml | 3 ++ 10 files changed, 48 insertions(+), 7 deletions(-) rename examples/{ => gaia}/gaiacli/client.go (100%) rename examples/{ => gaia}/gaiacli/key.go (100%) rename examples/{ => gaia}/gaiacli/main.go (100%) rename examples/{ => gaia}/gaiacli/version.go (100%) rename examples/{ => gaia}/gaiad/main.go (100%) rename examples/{ => gaia}/gaiad/node.go (100%) rename examples/{ => gaia}/gaiad/version.go (100%) diff --git a/Makefile b/Makefile index 52a1ec789d..a238e7e7c6 100644 --- a/Makefile +++ b/Makefile @@ -13,8 +13,8 @@ ci: get_tools get_vendor_deps build test_cover # This can be unified later, here for easy demos gaia: - go build $(BUILD_FLAGS) -o build/gaiad ./examples/gaiad - go build $(BUILD_FLAGS) -o build/gaiacli ./examples/gaiacli + go build $(BUILD_FLAGS) -o build/gaiad ./examples/gaia/gaiad + go build $(BUILD_FLAGS) -o build/gaiacli ./examples/gaia/gaiacli build: @rm -rf examples/basecoin/vendor/ diff --git a/examples/gaiacli/client.go b/examples/gaia/gaiacli/client.go similarity index 100% rename from examples/gaiacli/client.go rename to examples/gaia/gaiacli/client.go diff --git a/examples/gaiacli/key.go b/examples/gaia/gaiacli/key.go similarity index 100% rename from examples/gaiacli/key.go rename to examples/gaia/gaiacli/key.go diff --git a/examples/gaiacli/main.go b/examples/gaia/gaiacli/main.go similarity index 100% rename from examples/gaiacli/main.go rename to examples/gaia/gaiacli/main.go diff --git a/examples/gaiacli/version.go b/examples/gaia/gaiacli/version.go similarity index 100% rename from examples/gaiacli/version.go rename to examples/gaia/gaiacli/version.go diff --git a/examples/gaiad/main.go b/examples/gaia/gaiad/main.go similarity index 100% rename from examples/gaiad/main.go rename to examples/gaia/gaiad/main.go diff --git a/examples/gaiad/node.go b/examples/gaia/gaiad/node.go similarity index 100% rename from examples/gaiad/node.go rename to examples/gaia/gaiad/node.go diff --git a/examples/gaiad/version.go b/examples/gaia/gaiad/version.go similarity index 100% rename from examples/gaiad/version.go rename to examples/gaia/gaiad/version.go diff --git a/glide.lock b/glide.lock index 774f3143e9..bb013ee718 100644 --- a/glide.lock +++ b/glide.lock @@ -1,5 +1,5 @@ -hash: b0d6b76ffe90ef74c9c9672f18eb9abb90c3e7636dbc0504e343d88c337b1ea0 -updated: 2018-02-03T12:28:51.055275+01:00 +hash: 2b4ad3bf1489a7cb5e62c6cb4c1fa976d4ae21993743e4968418c4e81925fb99 +updated: 2018-02-13T08:33:22.402132782-05:00 imports: - name: github.com/btcsuite/btcd version: 50de9da05b50eb15658bb350f6ea24368a111ab7 @@ -9,6 +9,8 @@ imports: version: 346938d642f2ec3594ed81d874461961cd0faa76 subpackages: - spew +- name: github.com/fsnotify/fsnotify + version: c2828203cd70a50dcccfb2761f8b1f8ceef9a8e9 - name: github.com/go-kit/kit version: 4dc7be5d2d12881735283bcab7352178e190fc71 subpackages: @@ -38,16 +40,45 @@ imports: - ptypes/timestamp - name: github.com/golang/snappy version: 553a641470496b2327abcac10b36396bd98e45c9 +- name: github.com/hashicorp/hcl + version: 23c074d0eceb2b8a5bfdbb271ab780cde70f05a8 + subpackages: + - hcl/ast + - hcl/parser + - hcl/scanner + - hcl/strconv + - hcl/token + - json/parser + - json/scanner + - json/token +- name: github.com/inconshreveable/mousetrap + version: 76626ae9c91c4f2a10f34cad8ce83ea42c93bb75 - name: github.com/jmhodges/levigo version: c42d9e0ca023e2198120196f842701bb4c55d7b9 - name: github.com/kr/logfmt version: b84e30acd515aadc4b783ad4ff83aff3299bdfe0 +- name: github.com/magiconair/properties + version: 49d762b9817ba1c2e9d0c69183c2b4a8b8f1d934 +- name: github.com/mitchellh/mapstructure + version: b4575eea38cca1123ec2dc90c26529b5c5acfcff +- name: github.com/pelletier/go-toml + version: acdc4509485b587f5e675510c4f2c63e90ff68a8 - name: github.com/pkg/errors version: 645ef00459ed84a119197bfb8d8205042c6df63d - name: github.com/rigelrozanski/common version: f691f115798593d783b9999b1263c2f4ffecc439 +- name: github.com/spf13/afero + version: bb8f1927f2a9d3ab41c9340aa034f6b803f4359c + subpackages: + - mem +- name: github.com/spf13/cast + version: acbeb36b902d72a7a4c18e8f3241075e7ab763e4 - name: github.com/spf13/cobra - version: 93959269ad99e80983c9ba742a7e01203a4c0e4f + version: 7b2c5ac9fc04fc5efafb60700713d4fa609b777b +- name: github.com/spf13/jwalterweatherman + version: 7c0cea34c8ece3fbeb2b27ab9b59511d360fb394 +- name: github.com/spf13/pflag + version: e57e3eeb33f795204c1ca35f56c44f83227c6e66 - name: github.com/spf13/viper version: 25b30aa063fc18e48662b86996252eabdcf2f0c7 - name: github.com/syndtr/goleveldb @@ -66,7 +97,7 @@ imports: - leveldb/table - leveldb/util - name: github.com/tendermint/abci - version: 5a4f56056e23cdfd5f3733db056968e016468508 + version: bf70f5e273bd7dd6e22e64186cd1ccc4e3a03df1 subpackages: - server - types @@ -82,8 +113,9 @@ imports: - name: github.com/tendermint/iavl version: 1a59ec0c82dc940c25339dd7c834df5cb76a95cb - name: github.com/tendermint/tmlibs - version: deaaf014d8b8d1095054380a38b1b00e293f725f + version: c858b3ba78316fdd9096a11409a7e7a493e7d974 subpackages: + - cli - common - db - log @@ -107,6 +139,10 @@ imports: - internal/timeseries - lex/httplex - trace +- name: golang.org/x/sys + version: 37707fdb30a5b38865cfb95e5aab41707daec7fd + subpackages: + - unix - name: golang.org/x/text version: e19ae1496984b1c655b8044a65c0300a3c878dd3 subpackages: @@ -137,6 +173,8 @@ imports: - status - tap - transport +- name: gopkg.in/yaml.v2 + version: d670f9405373e636a5a2765eea47fac0c9bc91a4 testImports: - name: github.com/pmezard/go-difflib version: 792786c7400a136282c1664665ae0a8db921c6c2 diff --git a/glide.yaml b/glide.yaml index c6d91cdd4a..276513b2ce 100644 --- a/glide.yaml +++ b/glide.yaml @@ -28,7 +28,10 @@ import: - package: golang.org/x/crypto subpackages: - ripemd160 +- package: github.com/spf13/pflag + version: v1.0.0 - package: github.com/spf13/cobra + version: v0.0.1 - package: github.com/spf13/viper version: ^1.0.0 testImport: From cb470003b314ae8f1656b6990a994f90d94b5a51 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Tue, 13 Feb 2018 08:55:44 -0500 Subject: [PATCH 15/15] add ebuchman as codeowner --- CODEOWNERS | 1 + 1 file changed, 1 insertion(+) diff --git a/CODEOWNERS b/CODEOWNERS index 75b0327623..2992bcf66f 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1 +1,2 @@ * @jaekwon +* @ebuchman