Repository navigation
clightning-rest: remove unmaintained service - #113
Conversation
108479d to
45b984d
Compare
seberm
left a comment
There was a problem hiding this comment.
Thanks, the removal looks complete. There are no leftover references, and the migration messages work for clightning-rest and rtl.cl-rest at configVersion 0.1.0 and 0.1.1. Beyond CI, I also ran regtest and full. regtest runs lnconnect-clnrest-cert without netns, against 127.0.0.1. Both pass.
Two requests:
1. The versioning condition hits every backups user
Because of || config.services.backups.enable, every backups user sees this entry, including ones who never ran c-lightning-REST. This config fails to evaluate:
{
nix-bitcoin.configVersion = "0.1.0";
services.bitcoind.enable = true;
services.backups.enable = true;
}The error tells the user to remove services.clightning-rest, which they never set. Suggest splitting it into two entries:
{
version = "0.1.1";
condition = clightningRestUsed;
message = ''
<current message unchanged>
'';
}
{
version = "0.1.1";
condition = !clightningRestUsed
&& config.services.backups.enable && config.services.clightning.enable;
message = ''
c-lightning-REST has been removed. If you previously ran it, the backups service
no longer includes its data directory (default: /var/lib/clightning-rest).
See docs/configuration.md, "Upgrading to config version 0.1.1".
'';
}
];
clightningRestUsed = options.services.clightning-rest.isDefined
|| options.services.rtl.cl-rest.isDefined;c-lightning-REST always enabled clightning, so the second entry still covers everyone affected. I checked that this evaluates as intended:
- backups without CLN: no message
- backups + CLN: only the backups note
clightning-restset: only the removal message- backups + CLN at 0.1.1: evaluates
2. Please move the client.pem → server.pem fix into its own commit
It's an independent, user-visible fix, not part of the removal. clnrest serves server.pem and doesn't request client certificates. client.pem is the mutual-TLS client cert (gRPC uses that layout), so the old cert= in direct-connection URLs never matched the certificate the server presents. Onion and WireGuard URLs use --nocert and weren't affected. As its own commit, it's visible in history and gets its own release-note line. The lnconnect-clnrest-cert regression test can go with it.
Remove the module, package, connection helpers and associated Tor, WireGuard, network namespace, nodeinfo and backup integrations. Core Lightning REST access continues through clnrest. Reject removed options and document the config version 0.1.1 migration, including API compatibility, shared isolation and retained data backups. Keep the removal notice specific to configurations using removed options. Show a separate backup notice only when backups and Core Lightning are enabled, so Bitcoin-only backup users can still evaluate older configs. Assisted-by: OpenAI Codex (GPT-6)
Direct connection URLs embedded client.pem, so cert= did not match the certificate presented by clnrest. Export server.pem instead. Tor and WireGuard URLs use --nocert and are unaffected. Add a regression check comparing the URL's decoded certificate with the live TLS handshake and document the fix in the 0.1.1 upgrade notes. Assisted-by: OpenAI Codex (GPT-6)
45b984d to
69feb92
Compare
@seberm Addressed in the current force-push. Please review and merge if you are OK with the current PR. |
seberm
left a comment
There was a problem hiding this comment.
Both requests addressed; CI green and regtest passes on a test host. Thanks!
Remove the module, package, connection helpers and associated Tor, WireGuard, network namespace, nodeinfo and backup integrations. Core Lightning REST access continues through clnrest.
Reject removed options and document the config version 0.1.1 migration, including API compatibility, shared isolation and retained data backups. Fix clnrest connection URLs to export server.pem and add a regression check against the certificate served during the TLS handshake.
Validation: flake checks for both supported systems, shellcheck, mdBook, affected scenario and migration evaluations, and a local TLS regression that rejects the former client.pem behavior. Full Linux VM execution is pending because the configured builder is unreachable.
Assisted-by: OpenAI Codex (GPT-6)