Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify command structure #1184

Closed
3 tasks
cwgoes opened this issue Jun 9, 2018 · 7 comments
Closed
3 tasks

Simplify command structure #1184

cwgoes opened this issue Jun 9, 2018 · 7 comments
Assignees
Labels

Comments

@cwgoes
Copy link
Contributor

cwgoes commented Jun 9, 2018

  • Remove tendermint distinction, except for tendermint-validator-set
  • Instead of current subcommand structure, split into query and tx
  • Ensure that simple transaction queries ("what did I last send") are easy
@cwgoes
Copy link
Contributor Author

cwgoes commented Jun 9, 2018

cc @rigelrozanski

@ebuchman ebuchman added the C:CLI label Jun 20, 2018
@zramsay
Copy link
Contributor

zramsay commented Sep 8, 2018

improving the CLI is definitely captured in other issues

@zramsay zramsay closed this as completed Sep 8, 2018
@rigelrozanski
Copy link
Contributor

Are the points which @cwgoes brought up addressed though? Not as far as I can tell going through the CLI - if anything we should discuss this issue or link it to the duplicate issues before closing.

Alternatively we could break this up into multiple issues. going to reopen.

"rather an addressed issue stay accidentally open than an unaddressed issue be accidentally closed."

@rigelrozanski rigelrozanski reopened this Sep 8, 2018
@alessio
Copy link
Contributor

alessio commented Sep 23, 2018

Happy to pick this up. @cwgoes @rigelrozanski do you reckon we need to break this down into multiple issues?

@alessio alessio self-assigned this Sep 23, 2018
@alessio
Copy link
Contributor

alessio commented Sep 24, 2018

Proposing new interface:

  • gaiacli help
Gaia light-client

Usage:
  gaiacli [command]

Available Commands:
  init        Initialize light client
  status      Query remote node for status
  query       Querying subcommands
  tx          Transactions subcommands
  rest-server Start LCD (light-client daemon), a local REST server
              
  keys        Add or view local private keys
              
  version     Print the app version
  help        Help about any command

Flags:
  -e, --encoding string   Binary encoding (hex|b64|btc) (default "hex")
  -h, --help              help for gaiacli
      --home string       directory for config and data (default "/home/alessio/.gaiacli")
  -o, --output string     Output format (text|json) (default "text")
      --trace             print out full stack trace on errors

Use "gaiacli [command] --help" for more information about a command.
  • gaiacli help tx
Transactions subcommands

Usage:
  gaiacli tx [command]

Available Commands:
  broadcast        Broadcast transactions generated offline
  send             Create and sign a send tx
  sign             Sign transactions
              
  create-validator create new validator initialized with a self-delegation to it
  edit-validator   edit and existing validator account
  delegate         delegate liquid tokens to an validator
  redelegate       redelegate illiquid tokens from one validator to another
  unbond           begin or complete unbonding shares from a validator
  unjail           unjail validator previously jailed for downtime
              
  submit-proposal  Submit a proposal along with an initial deposit
  deposit          deposit tokens for activing proposal
  vote             vote for an active proposal, options: Yes/No/NoWithVeto/Abstain

Flags:
  -h, --help   help for tx

Global Flags:
  -e, --encoding string   Binary encoding (hex|b64|btc) (default "hex")
      --home string       directory for config and data (default "/home/alessio/.gaiacli")
  -o, --output string     Output format (text|json) (default "text")
      --trace             print out full stack trace on errors

Use "gaiacli tx [command] --help" for more information about a command.
  • gaiacli help query
Querying subcommands

Usage:
  gaiacli query [command]

Available Commands:
  block                    Get verified data for a the block at given height
  tendermint-validator-set Get the full tendermint validator set at given height
              
  txs                      Search for all transactions that match the given tags.
  tx                       Matches this txhash over all committed blocks
              
  account                  Query account balance
              
  delegation               Query a delegation based on address and validator address
  delegations              Query all delegations made from one delegator
  parameters               Query the current staking parameters information
  pool                     Query the current staking pool values
  redelegation             Query a redelegation record based on delegator and a source and destination validator address
  redelegations            Query all redelegations records for one delegator
  signing-info             Query a validator's signing information
  unbonding-delegation     Query an unbonding-delegation record based on delegator and validator address
  unbonding-delegations    Query all unbonding-delegations records for one delegator
  validator                Query a validator
  validators               Query for all validators
              
  query-proposal           query proposal details
  query-proposals          query proposals with optional filters
  query-vote               query vote
  query-votes              query votes on a proposal

Flags:
  -h, --help   help for query

Global Flags:
  -e, --encoding string   Binary encoding (hex|b64|btc) (default "hex")
      --home string       directory for config and data (default "/home/alessio/.gaiacli")
  -o, --output string     Output format (text|json) (default "text")
      --trace             print out full stack trace on errors

Use "gaiacli query [command] --help" for more information about a command.

@alessio
Copy link
Contributor

alessio commented Sep 24, 2018

I propose to remove the query-prefix from all the gov's query commands as well, e,g: query-proposal -> proposal, as shown in the following example:

$ gaiacli help query
Querying subcommands

Usage:
  gaiacli query [command]

Available Commands:
  block                    Get verified data for a the block at given height
  tendermint-validator-set Get the full tendermint validator set at given height
              
  txs                      Search for all transactions that match the given tags.
  tx                       Matches this txhash over all committed blocks
              
  account                  Query account balance
              
  delegation               Query a delegation based on address and validator address
  delegations              Query all delegations made from one delegator
  parameters               Query the current staking parameters information
  pool                     Query the current staking pool values
  redelegation             Query a redelegation record based on delegator and a source and destination validator address
  redelegations            Query all redelegations records for one delegator
  signing-info             Query a validator's signing information
  unbonding-delegation     Query an unbonding-delegation record based on delegator and validator address
  unbonding-delegations    Query all unbonding-delegations records for one delegator
  validator                Query a validator
  validators               Query for all validators
              
  proposal                 Query details of a single proposal
  proposals                Query proposals with optional filters
  vote                     Query details of a single vote
  votes                    Query votes on a proposal

Flags:
  -h, --help   help for query

Global Flags:
  -e, --encoding string   Binary encoding (hex|b64|btc) (default "hex")
      --home string       directory for config and data (default "/home/alessio/.gaiacli")
  -o, --output string     Output format (text|json) (default "text")
      --trace             print out full stack trace on errors

Use "gaiacli query [command] --help" for more information about a command.

@cwgoes
Copy link
Contributor Author

cwgoes commented Sep 24, 2018

@alessio Agreed with all suggestions, let's make sure gaiacli help tx and gaiacli tx --help show the same thing.

alessio pushed a commit that referenced this issue Sep 24, 2018
Remove unused SignTxRequstHandler

Closes: #1184
alessio pushed a commit that referenced this issue Sep 26, 2018
Remove unused SignTxRequstHandler

Closes: #1184
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants