Skip to content

Conversation

@cdecker
Copy link
Collaborator

@cdecker cdecker commented Nov 11, 2025

This PR adds rudimentary support for the LSPS2 protocol, based on @nepet's CLN ElementsProject/lightning#8569 PR adding these features.

To make this work we had to do a bit of yak shaving:

  • The CLN builder for the GL versions of the node software now also builds a main version, which uses a snapshot of master from CLN. This version is used as a floating target for the network to use, when testing.
  • The CLN builder also remixes the CLN versions, adding newer plugins that are backwards compatible to the v25.05gl1 version, so it can get lsps support and a more modern renepay. We will use this in future to ensure even old versions get the upside of updates on the development branch.
  • We now pull a main version as well
  • We needed to enable the lsps-service
  • We needed an lsps-policy plugin, so queries return something

Notice that the test I added so far only tests the lsps-invoice call, not the actual execution. @nepet I think this is likely easiest for you to add and test.

@cdecker cdecker changed the title 202510 lsps invoice feat(node): Add lsps2-invoice support to the plugin Nov 11, 2025
@cdecker cdecker force-pushed the 202510-lsps-invoice branch 5 times, most recently from c99c0e1 to 401ff9a Compare November 12, 2025 16:06
@cdecker
Copy link
Collaborator Author

cdecker commented Nov 12, 2025

Rebased on top of #631 now that it's merged.

@cdecker cdecker force-pushed the 202510-lsps-invoice branch from 401ff9a to 0f2dc89 Compare November 12, 2025 16:39
`invoice` for now is the one we will expose.
This takes care of incoming grpc requests, the conversion to JSON-RPC,
then the actual call, as well as the conversion back from JSON-RPC
result to grpc result.
We need something to test against, the dummy plugin just returns a
fixed result, so the `cln-lsps-servive` plugin has something to work
against.
The new CLN versions start the `cln-grpc` plugin by default, causing
them to collide on the port, if not disabled.
@cdecker cdecker force-pushed the 202510-lsps-invoice branch from 0f2dc89 to 7935b36 Compare November 17, 2025 13:20
It's not being used by anyone, so why keep it. We're building a longer
term LSPS2 implementation.
We were running inside the repo, which meant that the `.venv`
directory was owned by the docker daemon's user (root). By specifying
a separate `.venv` directory we ensure we don't accidentally leave
root-owned directories in the repo.
The hope is to signal in a more clear manner that this is an invoice
that is negotiated with a peer LSP.
@cdecker cdecker force-pushed the 202510-lsps-invoice branch from 7935b36 to 46aa6dc Compare November 17, 2025 13:21
@cdecker cdecker force-pushed the 202510-lsps-invoice branch from 89f47a3 to 65cb0bc Compare November 17, 2025 14:05
@cdecker cdecker merged commit 2dc63fa into main Nov 18, 2025
11 checks passed
@cdecker cdecker deleted the 202510-lsps-invoice branch November 18, 2025 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants