Skip to content

lndclient: warn if connected lnd version is unsupported - #289

Open
saubyk wants to merge 2 commits into
lightninglabs:masterfrom
saubyk:warn-unsupported-lnd-version
Open

saubyk wants to merge 2 commits into
lightninglabs:masterfrom
saubyk:warn-unsupported-lnd-version

Conversation

@saubyk

@saubyk saubyk commented Oct 2, 2026

Copy link
Copy Markdown

The lnd project only supports its current and previous major release (currently v0.21.x and v0.20.x). lndclient only enforces the minimum version requested by the caller, and that minimum can be lowered through LndServicesConfig.CheckVersion, so a user can end up running against an unsupported lnd without noticing.

This PR makes that visible without changing who can connect:

  • Warning in code: if the connected node passes the caller's version check but is older than the new oldestSupportedVersion (v0.20.0), a warning is logged. The connection is not refused, so projects that set their own minimum are unaffected.
  • README: adds a column to the compatibility matrix showing whether each tag's minimum is still a supported lnd version, and a short section describing the support policy and the warning.

oldestSupportedVersion needs to be bumped together with minimalCompatibleVersion when moving to a new major lnd release.

With the default configuration on master the warning never fires, because the default minimum (v0.21.0) is already above the supported floor. It only fires when a caller lowers CheckVersion.

Testing

  • New TestUnsupportedVersionWarning covers a node below, at and above the supported floor.
  • make build equivalent (go build ./...), go test ./... and make unit-race pass locally.
  • make lint was not run locally (no docker available); relying on CI for that.

Pull Request Checklist

  • PR is opened against correct version branch.
  • Version compatibility matrix in the README and minimal required version
    in lnd_services.go are updated.
  • Update macaroon_recipes.go if your PR adds a new method that is called
    differently than the RPC method it invokes. (not applicable)

🤖 Generated with Claude Code

The lnd project only supports its current and previous major release.
The version check only enforces the minimum version requested by the
caller, which can be lowered through the CheckVersion config option. Log
a warning if the connected node passes that check but is older than the
oldest version still supported by lnd, without refusing the connection.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@saubyk saubyk self-assigned this Oct 2, 2026
Mark which entries of the compatibility matrix still require a supported
version of lnd and describe the warning that is logged when connecting
to an unsupported node.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@saubyk
saubyk force-pushed the warn-unsupported-lnd-version branch from 80e137a to 29fe877 Compare October 2, 2026 18:57
@saubyk
saubyk requested a review from starius October 2, 2026 19:02
@litbot-9000

Copy link
Copy Markdown

@starius: review reminder

5 similar comments
@litbot-9000

Copy link
Copy Markdown

@starius: review reminder

@litbot-9000

Copy link
Copy Markdown

@starius: review reminder

@litbot-9000

Copy link
Copy Markdown

@starius: review reminder

@litbot-9000

Copy link
Copy Markdown

@starius: review reminder

@litbot-9000

Copy link
Copy Markdown

@starius: review reminder

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