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

Implement gaiacli init to persist cli settings #1275

Closed
adrianbrink opened this issue Jun 15, 2018 · 8 comments
Closed

Implement gaiacli init to persist cli settings #1275

adrianbrink opened this issue Jun 15, 2018 · 8 comments

Comments

@adrianbrink
Copy link
Contributor

Would it be a security risk if the CLI determines the chain-id itself so that user don't have to provide it as a cli flag?

@cwgoes
Copy link
Contributor

cwgoes commented Jun 15, 2018

If you trust the full node, this should be fine. If you don't trust the full node, you need to start from a local root-of-trust to verify proofs.

Rather than this, how about shipping gaiacli with common genesis files (now in this repository anyways) built in as options from which the user can select?

@ValarDragon
Copy link
Contributor

How is this for the ui for when --chain-id isn't entered:

$ gaiacli send <flags>
Defaulting to the following chain-id: gaia-6002. 
Please enter [y/n] or another chain-id option. Other known chain-ids: [gaia-5001, gaia-5002]

@ebuchman ebuchman added the C:CLI label Jun 19, 2018
@ebuchman
Copy link
Member

We used to have an init sequence that we should bring back. Eg:

gaiacli init --chain-id gaia-7000 --node coinculture.net:46657

This information should be persisted so we never have to enter it again!

It will also require some additional input from the user for "weak subsjectivity initialization". Either:

  • it will spit out the current validator set hash and height and ask if the user agrees
  • the user can provide a known height and validator hash and the tool will verify it from the node

@ebuchman
Copy link
Member

Another alternative is to be able to specify multiple nodes (of course over HTTPS !) and ask all of them for the validator set hash and only if they all agree do we move forward with it.

Of course if that set is malicious, they can conspire to screw the light client ...

@ebuchman
Copy link
Member

related tendermint/tendermint#970

@jackzampolin
Copy link
Member

Sounds like the only thing blocking here is a plan for how exactly to persist these CLI settings. I'm going to change this issue name to reflect that.

@jackzampolin jackzampolin changed the title cli can determine chain-id from connected fullnode Implement gaiacli init to persist cli settings Aug 7, 2018
@mslipper
Copy link
Contributor

Seems related to #1613 ?

@jackzampolin
Copy link
Member

Yup! We should circle up on this.

mslipper added a commit to mslipper/cosmos-sdk that referenced this issue Sep 18, 2018
rigelrozanski pushed a commit that referenced this issue Sep 25, 2018
* Allow a gaia-cli config file to be created

Closes #1613.
Closes #1275.
Closes #1956.

* Add homedir to Gopkg.toml

* Updates from code review

* Post-rebase fixes

* Update test

* Code review refactor

* Fixes from code review

* Fix import

* Fix broken test

* Fixes from rebase

* Fix formatting
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

6 participants