Repository navigation
Open
Milestone
Description
Thanks @cdecker, @nGoline and @daywalker90 for the reviews and fixes on #8948. I'd like to change course, and want to agree on the plan with you before opening the first PR.
Goal
- CLN ships only the LSPS client (experimental-lsps-client): it stays in-tree, same binary, same options.
- The LSPS2 service (experimental-lsps2-service, experimental-lsps2-promise-secret) is removed from CLN. The code stays available on the LSP-Plugin: Add MPP support #8948 branch to move it to the plugins repo if required.
- The shared protocol types and the opening-fee computation become a small crate, lsps-types, at the top level next to cln-rpc/cln-grpc. The client uses it, and anyone implementing an LSPS2 service in Rust can reuse it.
Why
- The service side of LSPS2 is mostly operator code: pricing, liquidity and risk policy, MPP session handling, recovery. It changes with each operator's needs, most CLN users never run it, and it puts LSP business logic on CLN reviewers and CI. It is better maintained outside CLN by whoever runs an LSP. We can of course provide the state machine as standalone plugin on the plugins repo, outside of the CLN repo, for others to build on top of it.
- The client is what CLN users run, and it changes rarely. Today it is only tested against the in-tree service. It should instead be tested against an LSP that misbehaves.
PR series
lsps-types: new top-level crate, the client and the in-tree service switch to it. No behavior change except spec fixes, each in its own commit.- Mock LSP + client security tests: an independent Python LSPS2 mock in tests/plugins/ (deliberately not using lsps-types, so the fee logic is checked independently), and client tests against a misbehaving LSP: transport, get_info, buy, fees/MPP. Existing client tests move from the in-tree service to the mock. Known client bugs land as xfail.
- Client hardening: fixes for those xfails and safer defaults:
- wait for 1 confirmation before channel_ready when the LSP doesn't require trust
- refuse client_trusts_lsp = true unless the user opts in per call or sets an exposure cap
- bound lsp_cltv_expiry_delta
- strict extra_fee checks.
- Remove the service: delete service code, options and tests, rename
plugins/lsps-plugin/toplugins/lsps-client/in a pure-rename commit, add a changelog entry for the removal. - More client tests: HTLC timeouts/CLTV, unconfirmed and forgotten channels.
#8948 stays open as a reference while the series lands. I'll close it when the service is removed.
Questions
- Are you OK with this goal and series?
- Removing
experimental-lsps2-serviceandexperimental-lsps2-promise-secret: is a changelog entry enough for experimental options, or do you want a deprecation period? - Are you OK with publishing
lsps-typesfrom this repo to crates.io, versioned and released likecln-rpc? If not, we'd move it to its own public repo and depend on it from crates.io.
Reacted by Madeline and Christian Decker
Reacted by Andezion
Activity
cdecker commentedon Oct 14, 2026
I think I agree, since we have seen in several occasions that the delineation lines and interfaces that we wanted to expose to operators may have been too narrow or too wide. I hope we can re-add the server-side of the LSPS2, once we have gotten enough of feedback on how those customization options should be working.
Regarding removal of experimental features, no changelog entries are needed for addition, so I'd say none are needed for removal either, but if you'd like to document the rationale, the changelog could be that place.