Skip to content

LSPS: ship only the client, remove the LSPS2 service from CLN #9619

Open

Description

@nepet

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

  1. 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.
  2. 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.
  3. 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.
  1. Remove the service: delete service code, options and tests, rename plugins/lsps-plugin/ to plugins/lsps-client/ in a pure-rename commit, add a changelog entry for the removal.
  2. 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

  1. Are you OK with this goal and series?
  2. Removing experimental-lsps2-service and experimental-lsps2-promise-secret: is a changelog entry enough for experimental options, or do you want a deprecation period?
  3. Are you OK with publishing lsps-types from this repo to crates.io, versioned and released like cln-rpc? If not, we'd move it to its own public repo and depend on it from crates.io.

Activity

  1. self-assigned this
    on Oct 11, 2026
  2. added this to the v26.12 milestone on Oct 11, 2026
  3. cdecker commented on Oct 14, 2026

    @cdecker
    Member

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions