-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
R4R: various improvements to gaiad gentx/init #3498
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #3498 +/- ##
===========================================
- Coverage 55.43% 55.38% -0.06%
===========================================
Files 141 141
Lines 10405 10408 +3
===========================================
- Hits 5768 5764 -4
- Misses 4297 4304 +7
Partials 340 340 |
cmd/gaia/init/init.go
Outdated
@@ -46,11 +45,11 @@ func displayInfo(cdc *codec.Codec, info printInfo) error { | |||
// nolint | |||
func InitCmd(ctx *server.Context, cdc *codec.Codec) *cobra.Command { | |||
cmd := &cobra.Command{ | |||
Use: "init", | |||
Use: "init <moniker>", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we use [...]
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
++
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
grep -rw Use:
would show how inconsistent our approach has been so far. I'm ok with [moniker]
though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addressed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to unify the approach here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah idc really about either, just as long as we're consistent.
@@ -14,6 +14,7 @@ BREAKING CHANGES | |||
- [\#3465](https://github.com/cosmos/cosmos-sdk/issues/3465) `gaiacli rest-server` switched back to insecure mode by default: | |||
- `--insecure` flag is removed. | |||
- `--tls` is now used to enable secure layer. | |||
- [\#3497](https://github.com/cosmos/cosmos-sdk/issues/3497) `gaiad init` now takes moniker as required arguments, not as parameter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't we also audit the other modules and also move anything from required flags to args? I think this could be 1 PR. We could also do a number for simplicity...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once @alexanderbez's comments are addressed I'm good for a 👍 on this. But I think we should also address all the other places in our codebase where the use required flags (I'm looking at slashing/staking/dist tx commands specifically). Maybe in a followup PR?
@jackzampolin I'd be happy to revisit commands under |
Plus, make gaiad init's --moniker turn into a required argument. closes: #3497
43d118a
to
98e82ff
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM -- one minor change though. Also, CI is failing.
@@ -19,11 +19,11 @@ These instructions are for setting up a brand new full node from scratch. | |||
First, initialize the node and create the necessary config files: | |||
|
|||
```bash | |||
gaiad init --moniker <your_custom_moniker> | |||
gaiad init <your_custom_moniker> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we consider using the node's hostname as the default moniker?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. Will amend accordingly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also make this arg optional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change of heart: I'd address this in a separate PR, if you don't mind.
Co-Authored-By: alessio <quadrispro@ubuntu.com>
ACKing sunny's commit. |
@@ -164,6 +169,7 @@ following delegation and commission default parameters: | |||
cmd.Flags().String(client.FlagOutputDocument, "", | |||
"write the genesis transaction JSON document to the given file instead of the default location") | |||
cmd.Flags().String(cli.FlagIP, ip, "The node's public IP") | |||
cmd.Flags().String(cli.FlagNodeID, "", "The node's NodeID") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we default this to the node ID?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea
Closes: #3497
docs/
)PENDING.md
with issue #Files changed
in the github PR explorerFor Admin Use: