Cosmos-sdk: UX: improve [gaiacli keys]

Created on 20 Mar 2018  路  5Comments  路  Source: cosmos/cosmos-sdk

  • [ ] the requirement to use names (--name) should be removed. It's fine as a helper but right now it's super confusing. I should be able to do basecli keys add --new and just get an un-named key. The only output should be the address to stdout (maybe in combination with a --dev flag). The extra stuff like text and recovery phrase outputted to stdout is clutter for automated tests.
  • [ ] re-introduce the --from flag for basecli keys send. This flag IIRC once existed. Sending a transaction should have a --from and a --to. Even if the --name flag is well described (it currently isn't), using --name as the "from" is wholly unintuitive.
CLI

Most helpful comment

For gaiacli send, here is what I am thinking for changing --name to --from. I think we should have some code duplication in gaia-7000, and support both --name and --from, but provide a warning whenever a user uses --name instead of --from. Update all the docs to not mention --from anymore, and make the help note that its deprecated. (The purpose of this deprecation is to make the transition less painful for people) Overall, I think transitioning like this will save a lot of problems on our end regarding communicating this breaking change, since gaia-7000 users will see the warning when using the code.

Then once gaia-7000 is merged remove the code supporting --name.

All 5 comments

I think basecli keys shouldn't know about tx formats. You should generate the bytes to sign, and sign it as a separate step using basecli keys.

We should also include more information for people trying to specify the recovery key themselves. (i.e. what the wordlist is, minimum number of words, etc.)

Is requiring --name a big problem for automation scripts? It didn't appear to me to be too bad in the CLI tests, and its something we want to enforce onto most users.

For gaiacli send, here is what I am thinking for changing --name to --from. I think we should have some code duplication in gaia-7000, and support both --name and --from, but provide a warning whenever a user uses --name instead of --from. Update all the docs to not mention --from anymore, and make the help note that its deprecated. (The purpose of this deprecation is to make the transition less painful for people) Overall, I think transitioning like this will save a lot of problems on our end regarding communicating this breaking change, since gaia-7000 users will see the warning when using the code.

Then once gaia-7000 is merged remove the code supporting --name.

Closing this as fix was merged with #1568

Was this page helpful?
0 / 5 - 0 ratings