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

RPC API: configset doesn't update the persistent config #1104

Open
manasgandy opened this issue Dec 9, 2021 · 6 comments
Open

RPC API: configset doesn't update the persistent config #1104

manasgandy opened this issue Dec 9, 2021 · 6 comments
Labels

Comments

@manasgandy
Copy link
Contributor

The configset API doesn't update the configuration file in the datadir. The configuration persists while the backend is running but loses them once it is stopped. Please fix this or let me know how to.

My guess is to use the following function:

def update_persist_config(section, name, value):

Also, it will be good to have a test for this API call

@AdamISZ
Copy link
Member

AdamISZ commented Dec 9, 2021

See #996 (comment) and as per docs here, "only in memory".

My guess is to use the following function:

Yeah, understood. The thing is, when I wrote that it felt like a really dumb hacky solution (using regex..) :) I just did it for the Qt GUI; it was particularly the inability to keep comments from a direct "dump object to disk" approach that was bothering me (see the function's docstring for more). Because the comments in our config are super-important.

If you can make that hacky update_persist_config function do the job then that's fine, I was hoping at some point there would be a more well constructed solution.

@AdamISZ
Copy link
Member

AdamISZ commented Dec 9, 2021

I guess probably just create a subclass or wrapper class for ConfigParser that allows a comment to be attached to each config var, then write the serialize/deserialize routine for it.

@theborakompanioni
Copy link
Contributor

Any news on this? I think people are quite confused that their config settings do not survive node restarts..
What do you think? Is this something worth having?

@editwentyone
Copy link

that would be so helpful, can this be pushed trough?

@kristapsk
Copy link
Member

We could just reuse existing hackish Qt GUI code for this I think. And optional boolean parameter should be added configset, that indicates whether changes should be permanent or not.

@theborakompanioni
Copy link
Contributor

We could just reuse existing hackish Qt GUI code for this I think. And optional boolean parameter should be added configset, that indicates whether changes should be permanent or not.

That would be so great. It really is counterintuitive currently. 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants