Cosmos-sdk: Make the setup interactive and as painless as possible

Created on 9 Jun 2018  路  6Comments  路  Source: cosmos/cosmos-sdk

Currently, if you follow https://github.com/cosmos/testnets/blob/master/README.md
some things do not work. From a developers perspective it's hard to keep the docs up to date (e.g. the flag --address-candidate was renamed/removed recently).

@faboweb and me think it would be easier if setting up a validator would entail an interactive setup. You'd basically run one command that guide you through the whole setup (warns you about pitfalls, like currently using emojis in moniker names), generate a valid config.toml, and run gaiad.

This would make everyone happy: devs write a minimal markdown file saying "run this single command and you're all set", API changes would break things and you can't miss updating docs. Users be happy because it's so clear and easy what to do.

CLI Legacy API UX

Most helpful comment

awesome idea @Liamsi ! in addition to what bucky shared above i have a few other thoughts on the UX that i could use some input on...

  1. instead of having to include --pubkey and --address-candidate can we let the user specify the name from gaia keys list? so just gaiacli jb declare-candidacy or something like that - which would grab the pubkey and address for them?
  2. --amount could be clearer - is it voting power? stake? bond? something else more descriptive could be more helpful / clarifying.
  3. could --moniker default to name of the address. do we need both name and moniker?
  4. --sequence is very confusing. is it necessary? can we provide a default? is there a way to bring clarity to this flag if it's necessary?
  5. can we default to the latest chain-id unless specified?

but an interactive CLI like above would be 馃挴 and i'd be super happy to work with someone from the SDK on this!

鉁岋笍

All 6 comments

This would be awesome to have as a gaiad setup command!

Notes from @jolesbi about the UX:

$ gaiacli declare-candidacy

We think you'll be a great Validator! 
Tell us, which account do you want to use?
- jb
- jb1
- jb-validator

$ jb1

Great choice! 
How many Atoms are you looking to stake?

$ 50

50 Atoms it is!
And lastly, which network are you looking to join?
- gaia-5001
- gaia-6000
- gaia-6001

$ gaia-6001

Happy Validating!

awesome idea @Liamsi ! in addition to what bucky shared above i have a few other thoughts on the UX that i could use some input on...

  1. instead of having to include --pubkey and --address-candidate can we let the user specify the name from gaia keys list? so just gaiacli jb declare-candidacy or something like that - which would grab the pubkey and address for them?
  2. --amount could be clearer - is it voting power? stake? bond? something else more descriptive could be more helpful / clarifying.
  3. could --moniker default to name of the address. do we need both name and moniker?
  4. --sequence is very confusing. is it necessary? can we provide a default? is there a way to bring clarity to this flag if it's necessary?
  5. can we default to the latest chain-id unless specified?

but an interactive CLI like above would be 馃挴 and i'd be super happy to work with someone from the SDK on this!

鉁岋笍

  1. I agree
  2. which command are you referring to for the --amount flag? What it is doing depends on the command you're running, but it always specifies the amount of a coin your sending / delegating. If theres ambiguity somewhere, I'm all for changing it.
  3. Moniker should be distinct from name imo. I want the name to be something short, since I'll be typing it out a lot. The moniker is the name that faces the rest of the world. (Like how the username in the path to your home folder is short (i.e. your name), but the full name that gets displayed when you login is longer. (You're moniker)

  4. --sequence auto increments, so it doesn't need to be entered.

  5. I agree, it should default to the chain ID gaiad is using, unless gaiad supports being simultaneously connected to multiple chains. (Which it doesn't to my knowledge) This would be a huge usability improvement imo, especially when testing locally.

@ValarDragon

  1. awesome. i tried to explain this in https://github.com/cosmos/cosmos-sdk/issues/1223 but maybe i failed 馃槩 @rigelrozanski

  2. when you declare candidacy you have to specify the amount and the denomination - --amount=5steak. for the hub, we already know what the staking token is so maybe the user doesn't have to mention what denomination they are referring to? also, amount is less descriptive than say ----stake=5or even--atoms=5which contradicts what i said above but would be preferable to--amount=5`. IMO

  3. i hear what you're saying about name and moniker. by interacting with the CLI and the docs, it's not clear which one is for what or why they are both necessary. also, maybe some people don't want to name their validators - so i'd prefer to see --moniker as an option, not as "part of becoming a validator". i think having name, moniker, pubkey, address, and validator address is confusing - so if there is some way of clarifying these things i think that'd be great. (happy to discuss further)

  4. cool. i think peng removed it from the docs - so this has been resolved.

  5. also brought this up in https://github.com/cosmos/cosmos-sdk/issues/1223 - glad we agree 馃槂! @cwgoes

I think this has been taken care of by the inclusion of the gaiacli config command and other CLI improvements. Going to close this issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ValarDragon picture ValarDragon  路  3Comments

cwgoes picture cwgoes  路  3Comments

kevlubkcm picture kevlubkcm  路  3Comments

mossid picture mossid  路  3Comments

jackzampolin picture jackzampolin  路  3Comments