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

docs: key management guide #216

Merged
merged 2 commits into from
Aug 7, 2017
Merged

docs: key management guide #216

merged 2 commits into from
Aug 7, 2017

Conversation

zramsay
Copy link
Contributor

@zramsay zramsay commented Aug 7, 2017

@ethanfrey ethanfrey mentioned this pull request Aug 7, 2017
2 tasks
Copy link
Contributor

@ethanfrey ethanfrey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just a few minor changes.


## Create keys

To get an app started quickly, or for dev/test scripting, the `basecli keys new alice --unsafe` command can be used. However, this tutorial is instead concerned with the advanced features of the tooling that don't compromise safety considerations.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where did the --unsafe flag come from?

# basecli keys new alice --unsafe
ERROR: unknown flag: --unsafe

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just remove this mention unless you know something I don't...

Copy link
Contributor Author

@zramsay zramsay Aug 7, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#213 ... only an idea. I'm not opiniated on this since piping things around does the trick, if you don't want that flag, close the issue. I'll remove from docs.


will, for example, return the info for only the "charlie" key returned from the previous `basecoin keys list` command.

Before moving on, let's set some configurations to make `--output json` the default. We can use either the `$BC_HOME` (?) env var or use a `config.toml` that is located in (?)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BCHOME needs to be mentioned, but it's different.

  1. You can set BCHOME to any dir, it looks for a config.toml file in there, and uses output = "json" if it is there... It also stores all keys in a subdir of BCHOME (or BC_HOME they are the same)

  2. You can export BC_OUTPUT=json (or BCOUTPUT=json) to make it all json output.

BC_ prefix is standard with viper and seems cleaner to me. Bucky really liked the eg. TMHOME for tendermint without _ and I made that work here as well with a little setup magic. Pick the one you think is better and use it throughout. (eg. BCHOME, BCOUTPUT, ... or BC_HOME, BC_OUTPUT...)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, we should stick with one format (with the _ is my preference) and (ideally) use a longer variable name (BASECLI_HOME) to make things clearer. For this guide, I will mention only second env var (BC_OUTPUT) and if we really want, we'll have a seperate guide for config option.

@ethanfrey
Copy link
Contributor

Very nice. Thank you for this.

There are two points which I think need to be fixed up, then I will merge.

Also, can you mention the basecli keys get, which is much nicer than list when you have more than a couple keys.

Finally, there is the basecli keys new bit -t secp265k1 to use another algorithm. Then you can see the difference in the pubkeys in basecli keys list.

If you add those points, I will merge. It is actually something useful now. Thank you,

@ethanfrey
Copy link
Contributor

Looks good. Thank you.

@ethanfrey ethanfrey merged commit 3f6071d into cosmos:unstable Aug 7, 2017
ParthDesai pushed a commit to ChorusOne/cosmos-sdk that referenced this pull request Apr 19, 2021
Thunnini pushed a commit to Thunnini/cosmos-sdk that referenced this pull request May 15, 2022
roysc pushed a commit to vulcanize/cosmos-sdk that referenced this pull request Jul 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants