-
Notifications
You must be signed in to change notification settings - Fork 1
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
Update/v0.15.1 #48
Update/v0.15.1 #48
Conversation
Dominion5254
commented
Jun 12, 2024
- Bump LND Dependency max version to <0.19.0
- Update RTL to v0.15.1
I have been running my own build of this to test RTL 0.15.1 and found one issue in the configurator. It seems the json config file is now case-sensitive. Due to the serde mapping in the configurator, the "Authentication" and "Settings" property in the json start with a capital letter A and S, which is not expected I fixed it in the configurator like this (used 'alias' so that the properties are still read, but written out lowercase): diff --git a/configurator/src/main.rs b/configurator/src/main.rs
index d3fef69..da4638f 100644
--- a/configurator/src/main.rs
+++ b/configurator/src/main.rs
@@ -120,9 +120,9 @@ struct RTLNode {
index: usize,
ln_implementation: RTLNodeType,
ln_node: String,
- #[serde(rename = "Authentication")]
+ #[serde(alias = "Authentication")]
authentication: RTLNodeAuthentication,
- #[serde(rename = "Settings")]
+ #[serde(alias = "Settings")]
settings: RTLNodeSettings,
} |
Can you clarify what you mean by "not expected"? Were you seeing issues with RTL accepting the key-values in RTL-Config.json? I would expect
I don't quite understand why the |
They should be camelCased, but they are not now. I installed 0.15.0 from the registry, when I upgraded to my custom build with an updated RTL version, it couldn't start because of missing properties "settings" and "authentication", then I found that in my config they were UpperCased. I think the serde override is not needed, so I changed it to an alias to stay backwards compatible. If it still works as is, maybe it was a fluke upstream 🤷 😄 |
I am inclined to leave as-is given that I can't seem to reproduce with this repo. It looks like your fork isn't public, but if you wanted to open it up and share the repo link I can take a look to see what might be amiss. Although I suspect the culprit is likely related to build environment. |
It's exactly the same as this plus those serde mappings. I've been keeping up with the 0.51.1 branch upstream the last few commits. I'll do a clean test from a 0.15.0 install to this pr on my build env and let you know. might have just been a fluke. |
tested from a clean install from registry to an upgrade to this pr, seems to work. What I noticed that on 0.15.0, it saves as "Settings" and "Authentication", but after the upgrade it is "settings", even though that's not how the 'rename' serde attribute works afaik, so I don't know what is/was happing then. don't fix what ain't broken I suppose, I can't seem to replicate it anymore. |
There is still some issue somewhere... I restarted my server today, I did not update or touch anything else. RTL did not start and has these logs:
Checked the config file, the properties are "camelCased". I'm not sure what is going on now... Upstream uses camelCase, see here: https://github.com/Ride-The-Lightning/RTL/blob/master/Sample-RTL-Config.json But now RTL does not start. I think the RTL-Config.json file is not actually (over)written:
note that date, that's from a few days ago. Even though I restarted the service today. |
I think I figured it out. The properties need to be "camelCased".
All the properties need to be camelCased, so the serde attributes need to be either removed, or use "alias" to stay backwards-compatible, so the properties can be read as UpperCase, but are always written as camelCase. |
I was able to reproduce the error It seems the issue is arising with the deserialization of the RTL-Config.json into the RTLNode struct. Replacing serde |