Repository navigation
Conversation
The image listens on 8080 and ships wget but not curl, so the compose healthcheck always failed and the docker run examples mapped the wrong port. Fix both, along with the LND certificate instructions, and note that the reverse proxy must terminate TLS since callback URLs are always https. Document the release binaries, the HTTP endpoints, and how to build and run the tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The cln-grpc node.proto is unchanged between v26.06.8 and v26.06.9. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
LUD-06 requires the invoice's description hash to equal sha256 of the metadata served at /.well-known/lnurlp. Invoices carried a plain description instead, so wallets that check it (Zeus, Phoenix, Breez) rejected them. Build the metadata in one place and use it for both the well-known response and the invoice: CLN gets it as the description with deschashonly, LND as the description hash. The LUD-12 comment no longer goes in the description; CLN keeps it in the invoice label and LND drops it. The metadata now includes the LUD-16 text/identifier entry and is serialized as JSON instead of interpolated. Usernames outside the LUD-16 charset return 404 and the rest are lowercased. On CLN, verify only answers for invoices labeled lnaddress-, so it no longer exposes other invoices on the node. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add a HEALTHCHECK that polls /health with busybox wget, so deployments no longer need their own, and drop it from the example compose file. Ship an appsettings.json that logs Microsoft.AspNetCore at Warning, so the healthcheck doesn't log six lines every 30 seconds. Document that cln-grpc client certificates grant full control of the node and how to limit their exposure. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Move PEM reading, CA chain validation and invoice labels out of ClnService so a second Core Lightning transport can share them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cln-grpc accepts any client certificate signed by the node's CA and can't restrict what it may call, so the certificate LnAddress needs grants full control of the node, funds included. LIGHTNING__BACKEND=clnrest talks to the clnrest plugin instead, with a rune that can be restricted to getinfo, invoice with an lnaddress- label, and listinvoices by payment_hash. clnrest's certificate is validated against the node's CA, like cln-grpc's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Document enabling clnrest, the rune to create and how to revoke it, and how to move from cln-grpc. cln-grpc stays as a legacy option with its warning, and the advice to keep either port off the public network now covers both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Enable clnrest on the regtest node, have the fixture create the rune the README recommends, and run the same tests over cln-grpc and clnrest. Check that the rune rejects every other call, and that the README documents the same rune. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
cln-grpc can't restrict a client. In v26.06.9 the plugin configures TLS with
client_ca_root(ca)and no auth interceptor, so any certificate signed by the node's CA gets every RPC method, includingpayandwithdraw. Its source says so (plugins/grpc-plugin/src/tls.rs): "the server will accept any client that is signed by the CA. In the future, we might add runes". Minting a separate client cert doesn't help. clnrest checks a rune on every call, against the method and its parameters.What
LIGHTNING__BACKEND=clnrest→ newClnRestService:POST /v1/{invoice,listinvoices,getinfo}with theRuneheader. Env:CLNREST__URL,CLNREST__RUNE,CLNREST__CACERT(the node'sca.pem; it can be omitted only behind a publicly trusted proxy). Behaves the same as the gRPC backend: description hash, comment in label, verify limited tolnaddress-invoices.LIGHTNING__BACKEND=cln(gRPC) still works unchanged, and is documented as legacy.Helpers/and shared by both transports.The recommended rune
getinfo;invoicewith anlnaddress-label;listinvoicesbypayment_hashinvoicewith any other labellistinvoiceswith no filter or by label (can't dump other invoices)pay,withdraw,listfunds,createrune, …Docs
showrunes/blacklistrune, and env vars.CLNREST__CACERTtakes the sameca.pemas before, and labels are unchanged, so verify keeps working for old invoices.Tests
Runeheader,amount_msat/label/description/deschashonly), comment in label, paid/unpaid/expired, foreign and unknown invoices → null, sync warnings, rune rejection → error, config validation.listfunds,withdraw,pay,createrune, unfilteredlistinvoicesand invoices with other labels. One test checks that the README documents exactly the rune the tests use.LIGHTNING__BACKEND=clnreston a private network with the regtest node. Healthy;description_hash == sha256(metadata)perlightning-cli decode; comment in label; real payment settles and verify returns the preimage; foreign invoice → Not found; no/healthlog noise.ClnGrpcIntegrationTestandClnRestIntegrationTest.Deployment note
Nothing changes unless you switch. To move the ms02 deployment: add
clnrest-port=3010andclnrest-host=<container IP or 0.0.0.0 on the private network>to lightningd, create the rune, then replaceLIGHTNING__BACKEND=cln+CLN__*withLIGHTNING__BACKEND=clnrest,CLNREST__URL=https://lightningd:3010,CLNREST__RUNEandCLNREST__CACERT(the sameca.pem). Then dropclient.pem/client-key.pemfrom LnAddress's env.🤖 Generated with Claude Code