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

config fix #13661

Closed
Tracked by #14566
tac0turtle opened this issue Oct 26, 2022 · 5 comments · Fixed by #14342
Closed
Tracked by #14566

config fix #13661

tac0turtle opened this issue Oct 26, 2022 · 5 comments · Fixed by #14342
Assignees
Labels
T: Dev UX UX for SDK developers (i.e. how to call our code) T: UX

Comments

@tac0turtle
Copy link
Member

tac0turtle commented Oct 26, 2022

Summary

When starting up your node with a new binary many times there is an existing config, but the new config doesn't have the new config variables that may have been added. Something like this was written for tendermint and we could easily port it over.

Proposal

provide a way to fix existing configs with new variables.

TM implementation:

@tac0turtle tac0turtle added T: UX T: Dev UX UX for SDK developers (i.e. how to call our code) labels Oct 26, 2022
@alexanderbez
Copy link
Contributor

Why not just do a diff and print a warning with missing keys?

@tac0turtle
Copy link
Member Author

why not just do it for the user? less manual labor for the node operator means a happier node operator

@alexanderbez
Copy link
Contributor

alexanderbez commented Oct 26, 2022

Do what for the user? The user still has to manually add the values they want. Only thing we can do is let them know what's missing.

Otherwise, you can just bypass this altogether and populate missing fields with the default values.

@tac0turtle
Copy link
Member Author

on startup of the node ideally we check the config, if all values + new ones are there, we do nothing, if not we grab the defaults and write them to the config. This way users don't have to copy paste to add them. if we output in the console what's missing we can do the next step to auto add them

@alexanderbez
Copy link
Contributor

... if all values + new ones are there, we do nothing, if not we grab the defaults and write them to the config

Yes, this makes sense to me. This is what I was alluding to. But there's no need for a script or command to do this (which is what TM seems to do?) -- we can do it automatically on startup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: Dev UX UX for SDK developers (i.e. how to call our code) T: UX
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants