-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[feature]: Allow persisting dynamic configured alias when not set in lnd.conf or arguments #7123
Comments
Related #5587 (comment) and also applies to #7094 |
Hi @alexbosworth! thanks for opening this issue. I did some research and I have some questions that will clarify things and help me move forward.
This means we should only persist the alias when it's not set in Additionally, should we persist the entire announcement settings (including Alias, Color, ...) if they're updated using the |
What should happen is debatable I guess. Persistence is nice for people who want to control their LND from the API rather than from both the API and the conf file. Lack of persistence is nice for simplicity. Potentially there could be the best of both worlds with a mutable preferences file that gets updated with API changes but I think that might be out of scope A potential option for the db mode is to follow what happens for channel opens that use the channel policy settings as an initial value however once a policy update call is initiated they write the results of that call to the database and override the conf setting permanently and don't pay attention to the conf setting going forward Yes for sure any setting that is overridden on startup could be considered equally |
Hi @alexbosworth, I opened PR #8690 for this issue. Would you mind taking a look and sharing your thoughts on whether I'm heading in the right direction? Any suggestions for improvement would be greatly appreciated! |
Looks good to me, i guess the problem might become more of documentation to let people know that they are only setting an initial value in the conf, and you can't really go backwards right to where the conf is in control again |
To be clear the order of checking for values when lnd starts up would be: Right? |
hmm i didn't see that, ok but can i go back to total default, like remove both alias from conf and db? i guess the documentation aspect still stands |
Yes documentation is important I am just trying to be clear on the proposed flow. So, If user did not specify a node announcement field such as alias in their lnd config file and the user had not called the alias = hex.EncodeToString(serializedPubKey[:10]) So, I guess we can still go back to the default in this case. Just wanted to be clear if this is the flow we are going for. |
Yes, this is the intended flow. check lnd.conf, then db, and if all not set, then use default (which is the first 10 chars of node's pubkey) |
Yes, I guess we can still go back to the default by clearing what we saved initially in the db and not specifying the fields such as alias in the config file. |
Yes, going back to the default is possible. |
If you set your alias using the
UpdateNodeAnnouncement
RPC call it will only maintain this as an update until a restart. Restarting clears all of the node announcement settings.Instead, if a direct configuration is absent the node announcement settings could be persisted when set and used on restart
Otherwise there needs to be a new command issued on every restart to maintain the dynamic setting or the configuration elements must be changed
If the configuration is set at any point through
lnd.conf
or an argument, it does make sense for that to take precedence in a restart over the persisted dynamically set last settingThe text was updated successfully, but these errors were encountered: