Skip to content

[BAC-325] merge upstream lightninglabs/lndclient master#31

Merged
lucasnaman merged 44 commits intomasterfrom
bac-325-merge-upstream
Apr 29, 2026
Merged

[BAC-325] merge upstream lightninglabs/lndclient master#31
lucasnaman merged 44 commits intomasterfrom
bac-325-merge-upstream

Conversation

@lucasnaman
Copy link
Copy Markdown

[BAC-325] merge upstream lightninglabs/lndclient master

Summary

  • Pulls upstream lightninglabs/lndclient master (~41 commits) up to 1be689d into our IBEX fork while preserving all 42 IBEX-specific commits.
  • Closes 3 of the 7 open Datadog SCA Critical/High Go alerts on this repo by inheriting upstream's Go 1.25.5 toolchain bump and runc 1.2.0 → 1.2.8 dependency update.
  • Adopts upstream's expanded InvoiceUpdate shape and new ChannelInfo.CustomChannelData field while keeping IBEX's AmtPaidMsat (millisatoshi) field used by lnproxy.

Changes in detail

Security (fixed)

This merge closes the following Datadog SCA alerts (pending rescan after merge):

  • CVE-2025-68121 (Critical, Go stdlib crypto/tls — unexpected session resumption) — closed by upstream's Go toolchain bump to 1.25.5.
  • CVE-2025-52881 (High, runc — container escape via arbitrary writes) — closed by upstream's bump to opencontainers/runc 1.2.8.
  • CVE-2025-52565 (High, runc — container escape via /dev/console mount) — same upstream bump.

Dependency bumps (updated)

Pulled in via upstream:

  • github.com/lightningnetwork/lnd v0.19.0-beta → v0.20.1-beta
  • go 1.24.x → 1.25.5 (toolchain directive)
  • github.com/opencontainers/runc 1.2.0 → 1.2.8
  • github.com/docker/docker 28.0.1 → 28.1.1
  • github.com/jackc/pgx/v5 5.5.4 → 5.7.4
  • Plus assorted indirect bumps (btcd, btcwallet, btclog, golang.org/x/*).

invoices_client.go (updated)

  • Adopted upstream's restructured InvoiceUpdate (now embeds the full Invoice and exposes AmtPaid).
  • Preserved IBEX's AmtPaidMsat lnwire.MilliSatoshi field (required by lnproxy per the README).
  • SubscribeSingleInvoice now uses upstream's unmarshalInvoice helper, which sets Invoice.State directly — replaces the old IBEX fromRPCInvoiceState plumbing.

lightning_client.go (updated)

  • Adopted upstream's new ChannelInfo.CustomChannelData field and assignment. No IBEX-specific code conflicted in this file.

README.md (updated)

  • Kept the IBEX-fork header, service-by-service feature list, and "Building a new release" tagging procedure.
  • Added upstream's new lndclient ↔ lnd compatibility table.

Merged from origin/master (admin-56)

This branch was cut before the admin-56 PRs landed on master, so I also merged origin/master after the upstream merge to pick up:

  • CLAUDE.md
  • .github/workflows/claude-code-review.yml
  • .github/workflows/claude-pr-description.yml
  • pull_request_template.md

Test plan

  • go vet ./... — clean
  • go mod tidy — clean (no spurious changes)
  • go build ./... — clean
  • CI green
  • Confirm Datadog SCA alerts on github.com/ibexdwm/lndclient for CVE-2025-68121, CVE-2025-52881, CVE-2025-52565 clear after rescan
  • Smoke-test lnproxy against this branch (uses InvoiceUpdate.AmtPaidMsat — confirm field is populated as before)
  • Confirm consumers using InvoiceUpdate.State still compile after the field moved to embedded Invoice.State (it remains accessible via field promotion, but worth a sanity check)

Out of scope (follow-up)

The following Datadog Go alerts on this repo are not closed by this merge and need a separate PR:

Pull Request Checklist (from upstream template)

  • PR is opened against the correct version branch (master).
  • Version compatibility matrix in the README and minimal required version in lnd_services.go are updated (handled by upstream).
  • N/A — no new RPC methods added, so macaroon_recipes.go is unchanged.

Related

🤖 Generated with Claude Code

starius and others added 30 commits September 8, 2025 11:03
port CloseInstant update and NumberOfPendingHtlcs to lnd-20 branch
SubscribeSingleInvoice: provide full invoice
SubscribeSingleInvoice: provide full invoice (lnd-20-0 port)
Diff generated by running command:
```
go get github.com/lightningnetwork/lnd@v0.19.3-beta
go mod tidy
```
…0.19.3-beta

go.mod: bump LND to v0.19.3-beta
Bumps [github.com/opencontainers/runc](https://github.com/opencontainers/runc) from 1.2.0 to 1.2.8.
- [Release notes](https://github.com/opencontainers/runc/releases)
- [Changelog](https://github.com/opencontainers/runc/blob/v1.2.8/CHANGELOG.md)
- [Commits](opencontainers/runc@v1.2.0...v1.2.8)

---
updated-dependencies:
- dependency-name: github.com/opencontainers/runc
  dependency-version: 1.2.8
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
…_modules/github.com/opencontainers/runc-1.2.8

build(deps): bump github.com/opencontainers/runc from 1.2.0 to 1.2.8
SendCoins: use SatPerVbyte instead of SatPerByte
Bumps [github.com/opencontainers/runc](https://github.com/opencontainers/runc) from 1.2.0 to 1.2.8.
- [Release notes](https://github.com/opencontainers/runc/releases)
- [Changelog](https://github.com/opencontainers/runc/blob/v1.2.8/CHANGELOG.md)
- [Commits](opencontainers/runc@v1.2.0...v1.2.8)

---
updated-dependencies:
- dependency-name: github.com/opencontainers/runc
  dependency-version: 1.2.8
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Port "SendCoins: use SatPerVbyte" and "bump runc to 1.2.8" to lnd-20-0
Updated LND dependency to v0.20.0-beta by running:
  go get github.com/lightningnetwork/lnd@v0.20.0-beta
  go mod tidy

Also updated Go version in the lint Dockerfile to match go.mod.
While v0.18.5-beta likely still works, raising the minimum version
reduces the need to handle deprecated fields, even if they're
technically still supported.
…-version-bump

go.mod: bump LND to v0.20.0-beta
Keep the lnd-20-0 history intact and avoid rewriting commits that
already have tags and external references.
…h-merge-resolve

Merge lnd-20-0 into master with conflict resolution
LND commit c6f458e478f9 (v0.20.0-rc3) moved ChainNotifier startup later in
the lifecycle, so RegisterBlockEpochNtfn callers now see "chain notifier RPC
is still in the process of starting" coming from Recv().

The new BlockUntilChainNotifier config option repeatedly calls
RegisterBlockEpochNtfn during startup and only proceeds once the stream yields
its first block height, retrying solely when we detect the
ErrChainNotifierServerNotActive condition introduced by the LND commit above.
…nNotifier-to-master

lndclient: block until chain notifier is ready
During planned termination, conn.Close() can return ErrClientConnClosing from
gRPC package. This is expected and should not be logged as an error. Downgrade
that case to debug so logs stay clean during shutdown.

Original log line:
[ERR] LNDC: Error closing lnd connection: rpc error: code = Canceled
desc = grpc: the client connection is closing
starius and others added 14 commits January 23, 2026 10:41
lndclient: silence expected close error on shutdown
go.mod: bump lnd to v0.20.1-beta, go to 1.25.5
Marshal explicit route hints in lightningClient.AddInvoice so the
standard invoice path matches AddHoldInvoice.

Add regression coverage for direct AddInvoice route hint encoding and
for route hint parity between AddInvoice and AddHoldInvoice.
Set FallbackAddr on the standard AddInvoice RPC request so the
lightning client preserves explicit on-chain fallback addresses.

Extend the existing invoice tests with direct AddInvoice coverage and
parity checks against AddHoldInvoice.
Set IsAmp on the standard AddInvoice RPC request so callers can
request AMP invoices through lightningClient.AddInvoice.

Extend the existing AddInvoice unit test to assert AMP invoice
requests preserve the flag on the outgoing RPC payload.
Stop forwarding Hash on the standard AddInvoice path and warn when
Hash or HodlInvoice are provided, since callers should use
InvoicesClient.AddHoldInvoice for hold invoices.

Extend the existing AddInvoice test to assert the standard invoice
request omits hold-invoice-only arguments.
Translate BlindedPathCfg into the standard AddInvoice RPC by setting
IsBlinded and forwarding MinNumPathHops as the compatible NumHops
override.

Warn when non-overlapping blinded path settings are provided, and
extend the AddInvoice unit test to assert blinded invoice requests
preserve the translated RPC fields.
Warn when AddHoldInvoice is called with Amp or BlindedPathCfg,
since the hold-invoice RPC cannot represent those inputs.

Add coverage to document that the wrapper still forwards the supported
request fields unchanged when those unsupported inputs are present.
Preserve AddInvoiceData fields across invoice wrappers
Pulls upstream lndclient up to lightninglabs/lndclient@1be689d and
preserves IBEX-specific customizations.

Security CVEs closed by this merge:
- CVE-2025-68121 (Critical, Go stdlib crypto/tls): Go toolchain bumped
  to 1.25.5 via upstream PR lightninglabs#264
- CVE-2025-52881, CVE-2025-52565 (High, runc): runc bumped from 1.2.0
  to 1.2.8 via upstream PRs lightninglabs#252 / lightninglabs#251

Other notable upstream changes pulled in:
- LND v0.19.0-beta -> v0.20.1-beta
- SubscribeSingleInvoice now returns the full unmarshalled Invoice
- ChannelInfo gains CustomChannelData
- Many addinvoice fixes (route hints, fallback addr, blinded paths,
  amp flag, hold-invoice arg validation)

Conflict resolutions (IBEX customizations preserved):
- README.md: kept IBEX release-tagging workflow alongside upstream's
  new lndclient<->lnd compatibility table
- invoices_client.go: adopted upstream's InvoiceUpdate shape
  (embedded Invoice + AmtPaid) and kept IBEX's AmtPaidMsat field for
  millisatoshi precision required by lnproxy
- lightning_client.go: adopted upstream's CustomChannelData additions
  (no IBEX-specific code conflicted)

Remaining open Datadog CVEs to address in a follow-up:
- CVE-2026-33815, CVE-2026-33816 (jackc/pgx/v5 5.7.4 -> 5.7.6+)
- CVE-2026-39883 (otel/sdk 1.35.0 -> 1.38.x+)
- CVE-2026-34040 (docker/docker 28.1.1 -> verify patched version)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Brings in CLAUDE.md, Claude review/PR-description workflows, and the
IBEX pull-request template that landed on master after this branch was
cut.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The merge bumped tools/Dockerfile golang from 1.24.6 to 1.26.0, which
rebuilt golangci-lint and now strictly enforces .golangci.yml's 80-col
lll limit on lines that have been over since the original IBEX
additions in 2024 (commit 1993ca7, "ibex req").

All 9 violations were in IBEX-extension methods/comments
(SendMany / EstimateFees / NewAddress interface + impl, ListChannels
extension, TimePref doc). Wrapped them under 80 cols. No behavior
change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@lucasnaman lucasnaman merged commit f01f1c7 into master Apr 29, 2026
4 checks passed
@lucasnaman lucasnaman deleted the bac-325-merge-upstream branch May 1, 2026 08:27
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.

7 participants