Skip to content

rebalance: support custom CLN version strings#891

Draft
bittylicious wants to merge 1 commit into
lightningd:masterfrom
bittylicious:rebalance-custom-version-minimal
Draft

rebalance: support custom CLN version strings#891
bittylicious wants to merge 1 commit into
lightningd:masterfrom
bittylicious:rebalance-custom-version-minimal

Conversation

@bittylicious

Copy link
Copy Markdown
Contributor

Summary

  • accept custom Core Lightning build identifiers that are not dotted release numbers
  • infer the legacy or modern getroutes schema from the returned route fields
  • preserve the minimum-version check for parseable release versions

Background

Core Lightning exposes its build identifier verbatim through getinfo.version, so custom builds may return a branch or package name instead of a release such as v26.06.2. The rebalance plugin currently parses that value as dotted integers during initialization, which raises ValueError and leaves the plugin only partially initialized.

This change treats an unparseable identifier as an unknown release version. Route handling no longer needs that release number: it detects the pre-26.06 or 26.06+ schema from the actual getroutes path. Parseable versions older than v25.09 are still rejected as before.

Compatibility

The repository CI matrix runs the rebalance integration tests against CLN 25.12, 26.04, and 26.06.1 on Python 3.10 and 3.12, covering both route schemas. An opaque build identifier necessarily skips only the startup release-number check; unavailable RPCs still fail normally when called.

Tests

  • pytest -q rebalance/test_clnutils.py (7 passed)
  • ruff check and ruff format --check
  • python3 -m py_compile
  • git diff --check

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.

1 participant