-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
edit-validator will set moniker with the local hostname #2423
Comments
Thanks for the report @wukongcheng! Indeed you are correct, Viper strikes again. |
omg 🤦 - thanks for the catch, and the investigation into the cause |
Not sure what the best course of action is here? Maybe a TM update? I think using a different flag may result in a messy/confusing UX. I suppose we could prefix all the edit flags with @ValarDragon would it be harmful to not default to the hostname in TM? |
I think hostname is a sensible default for TM. It would probably make observability on testing tendermint clusters harder to not have it default to hostname, though arguably we could say that in that situation the tester should be editing the moniker themself. Does viper expose a boolean of any sort to indicate if it was manually set or not? |
@ValarDragon yes but it doesn't work lol...issue has been open forever iirc. |
Sounds like we can move this from |
I definitely think we should fix this. I imagine validators will get quite upset if their monikers change unexpectedly. (This shouldn't be expected behavior lol) |
Yes, this definitely needs to be fixed. I suppose we can prefix all the flags with |
@alessio Did we fix this already? |
AFAICT not just yet |
The
It should be relatively easy for the command to build a new |
I can't reproduce this. If I run
Which is an expected behaviour. |
I remember there was a bug to this affect which was previously already fixed... maybe worth rummaging through related issues, this issue may already be resolved |
Looks like this issue is resolved. Please reopen if you run into this issue. |
Summary of Bug
If you call the 'edit-validator' without the '--moniker' flag, the 'moniker' of the validator's description will be set with the local hostname.
Steps to Reproduce
Description: {silei }
Description: {SileiMac.local }
Description: {raymond }
What's the reason
The flag '--moniker' in 'edit-validator' cli has the same name with the tendermint's 'moniker'. And in tendermint,
moniker defaults to the machine's hostname instead of "anonymous"
. Both the two 'moniker' take effect by thespf13/viper
.If the flag is not specified, viper will look up its kvstore before the default value:
So the tendermint 'moniker' will be returned.
After I use another flag name instead of 'moniker' in the edit-validator, it works fine.
The text was updated successfully, but these errors were encountered: