You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I am running rust-teos v0.2.0. I am currently unable to test the latest master version.
It seems the watchtower plugin is crashing on tower registration when I provide the IP address instead of a hostname. The plugin is crashing when the values are provided as the separate arguments. If I provide the connection values in an URI format, everything works.
$ teos-cli gettowerinfo
{
"tower_id": "037c5189943e296aca768436cc1613abe392bc857e82dcffc6bf0847e21fb14fa2",
"n_registered_users": 1,
"n_watcher_appointments": 0,
"n_responder_trackers": 0,
"bitcoind_reachable": true,
"addresses": [
{
"type": "ipv4",
"address": "127.0.0.1",
"port": 9814
}
]
}
$ lightning-cli registertower 037c5189943e296aca768436cc1613abe392bc857e82dcffc6bf0847e21fb14fa2 127.0.0.1 9814
{
"code": -4,
"message": "Plugin terminated before replying to RPC call."
}
$ journalctl -u clightning | grep watch
Oct 12 18:37:32 nixos lightningd[17907]: INFO plugin-watchtower-client: Starting retry manager
Oct 12 18:37:37 nixos lightningd[17907]: INFO plugin-watchtower-client: Registering in the Eye of Satoshi (tower_id=037c5189943e296aca768436cc1613abe392bc857e82dcffc6bf0847e21fb14fa2)
Oct 12 18:37:37 nixos lightningd[17907]: INFO plugin-watchtower-client: Registration succeeded. Available slots: 10000. Subscription period (block height range): (100-4420)
Oct 12 18:41:44 nixos lightningd[17907]: UNUSUAL plugin-watchtower-client: Plugin loop returned error Error reading command: failed to parse JSON
Oct 12 18:41:44 nixos lightningd[17907]: INFO plugin-watchtower-client: Killing plugin: exited during normal operation
The workaround is to use the hostname instead of IP when providing values as multiple arguments or an URI (<tower_id>@<hostname>:<port>).
I've been taking a look at this and it looks like it is due to how the parameters are parsed from the terminal. This is before they are handed to us by the plugin manager, hence why it was not caught by our unit tests for the param parser.
I'm unsure though whether this is something that can be fixed on their end, or is something that depends on serde-json. I've been playing around a bit with things formatted like x.x... and they are a bit tricky. x.y would be interpreted as a float, whereas x.y.z seems to start being unhandled territory.
I'll need to dig deeper to see what the solution may entail, I guess for now using registertower with multiple inputs and an IP address should be disencouraged
Hello,
I am running rust-teos v0.2.0. I am currently unable to test the latest master version.
It seems the watchtower plugin is crashing on tower registration when I provide the IP address instead of a hostname. The plugin is crashing when the values are provided as the separate arguments. If I provide the connection values in an URI format, everything works.
The workaround is to use the hostname instead of IP when providing values as multiple arguments or an URI (
<tower_id>@<hostname>:<port>
).Wouldn't it be better to support only URI format for providing the connection values?
CC: @sr-gi
The text was updated successfully, but these errors were encountered: