ElementsProject / peerswap

MIT License
110 stars 40 forks source link

clightning: compatibility issue with v24.11 #321

Closed YusukeShimizu closed 1 month ago

YusukeShimizu commented 1 month ago

Resolves a compatibility issue with clightning. v24.11 and later versions where the allow-deprecated-apis option may be nested within a configs object of ListConfigs.

Now correctly parses the configuration to determine if deprecated APIs are allowed, ensuring compatibility with both older and newer clightning versions.

Fixes: https://github.com/ElementsProject/peerswap/issues/320

grubles commented 1 month ago

The peerswap plugin now starts when running with CLN master but prints this new error. Is another new API deprecation/removal causing it?

2024-10-03T15:17:52.764Z INFO    plugin-peerswap: peerswap initialized
2024-10-03T15:17:53.434Z DEBUG   lightningd: channel_gossip: no longer in startup mode
2024-10-03T15:17:53.460Z INFO    lightningd: JSON COMMAND sendcustommsg: Invalid parameter node_id (should be a node id): token '""'
2024-10-03T15:17:53.462Z DEBUG   plugin-peerswap: poll_service: could not send msg to : -32602:node_id: should be a node id: invalid token (see logs for details)
YusukeShimizu commented 1 month ago

The error seems to be occurring when sending a custom message for polling.
It's unclear whether this is due to deprecation or removal.

I don't think the failure of the poll will result in an immediate impact.

Once a new version of cln is released on nix, I plan to run integration tests to verify.

grubles commented 1 month ago

Ok I tested a swap using v24.08.1 and master. The poll_service message doesn't seem to break swaps AFAICT.

ACK 663acfd