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

--from should be able to take both an address and a name #1735

Closed
adrianbrink opened this issue Jul 18, 2018 · 6 comments
Closed

--from should be able to take both an address and a name #1735

adrianbrink opened this issue Jul 18, 2018 · 6 comments

Comments

@adrianbrink
Copy link
Contributor

It would be convenient if --from would also work with a simple address. It's seem counterintuitive that sometimes you need a name and sometimes an address.

@cwgoes
Copy link
Contributor

cwgoes commented Jul 18, 2018

Sure, that seems helpful.

Can we extend the concept and allow any command referencing an address to look up a name in the local DB? That way users can register public keys for known entities (e.g. their validator) under nice names and avoid mistakes.

@ValarDragon
Copy link
Contributor

ValarDragon commented Jul 19, 2018

  1. Should this be prelaunch? I'm unsure, since its a pretty important UI thing, but unsure how many more features we want to postpone launch for.
  2. Do we want the implementation of this to be that when you enter an address, we iterate through all entries inside of whatever is called by gaiacli keys list, or instead do we want to have an O(1) data structure to go from address to local pubkey / address. (Similar to Keybase.get's current implementation for names)
  3. Should we make a new keybase key type that is just the public key (similar to whats used for the ledger), to achieve what you're suggesting chris? If so, then we'd also have to refactor all arguments that get a pubkey / address that isn't the one which is signing. This probably wouldn't be bad, maybe a client.GetAddrFromArg(arg string), or smth to that extent, which checks all of the sensible formats / queries keybase.

@alexanderbez
Copy link
Contributor

I think this will be extremely helpful. It may seem cumbersome and maybe confusing to some folks to have to provide from and another flag that specifies the actual address.

@jackzampolin
Copy link
Member

I think this needs to be prioritized since the major way we are requesting users to interact with our software is through the CLI and this is a significant improvement in UX. The idea of looking up addresses in the localDB should be implemented.

@rigelrozanski
Copy link
Contributor

Okay - so now (develop) everything just uses the from and typically doesn't require that associated address... However - we should still make --from be able to take either an address or a name from the key-store as the issue originally outlined

@zramsay
Copy link
Contributor

zramsay commented Aug 27, 2018

so much yes

mslipper added a commit to mslipper/cosmos-sdk that referenced this issue Aug 30, 2018
rigelrozanski pushed a commit that referenced this issue Sep 25, 2018
* Allow --from to be a name or an address

Closes #1735.

* Post-rebase fixes

* Updates from code review

* Updates from code review

* Updates from code review

* Fix merge artifacts

* Fix merge conflicts

* Fix integration tests

* Add back GetFromName() check broken during merge

* Code review updates

* Fix failing test

* Updates from code review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants