Skip to content

Re-pin rust-lightning to zeus-0.2 (v0.2.5 + Zeus patches) - #5

Open
kaloudis wants to merge 3 commits into
zeusfrom
rl-0.2.5-security-bump
Open

Re-pin rust-lightning to zeus-0.2 (v0.2.5 + Zeus patches)#5
kaloudis wants to merge 3 commits into
zeusfrom
rl-0.2.5-security-bump

Conversation

@kaloudis

Copy link
Copy Markdown

What

Moves the fork off ZeusLN/rust-lightning branch lsps7-for-ldk-node-close-fix (a December 2025 snapshot of upstream main, six days after the 0.2.0 release) onto the new zeus-0.2 branch, which is upstream's 0.2 release branch head (= v0.2.5) plus the same five Zeus patches rebased on top:

  • LSPS7 (Channel Lease Extensions) client handler
  • cooperative close feerate floor bypass
  • BOLT11 route hints override (+ tests)

Why

The old pin predates every 0.2.1-0.2.5 fix, including both upstream security batches:

  • 0.2.3 (Jun 18, 2026, "Through the Loupe"): #4717 (crafted BOLT11 invoice panics on pay), #4716 (route-hint fee overflow unwrap panic when no fee cap is set), #4715 (pre-1970 LSPSDateTime parse panic from counterparty messages), #4713, #4712, #4714, #4718
  • 0.2.5 (Aug 4, 2026, "The MegaScan Project"): #4854 (incorrect HTLC resolution), #4850 (onion message reply-path panic), #4849 (HTLC claim batching reorg panic), #4845/#4852, #4851, #4848, #4828

Because mobile artifacts build with panic = 'abort' (release-smaller profile), every one of the missing "no longer panics" fixes is a hard app abort for ZEUS users. #4717 in particular is remotely triggerable by getting a user to pay a crafted invoice (paste / QR / LNURL).

Tracking upstream's maintained 0.2 release branch also makes future security backports a fast-forward instead of another main-snapshot rebase.

How

  • zeus-0.2 branch pushed to ZeusLN/rust-lightning: v0.2.5 + the 5 rebased commits, cargo test -p lightning (1205 tests), -p lightning-liquidity (101 tests incl. LSPS7) all green
  • v0.2.5 predates upstream #4175 (impl-Future trait methods), so this reverts 84bf2a5 and adapts what was written after it: DualStore's async KVStore impl returns boxed futures again, the builder Arc-wraps DualStore, and test helpers match the LDK 0.2.5 test API
  • Second commit fixes the pre-existing arity breakage in tests/ and benches/ (missing trailing per-call retry-timeout arg) so cargo check --all-targets is green again

Testing

  • cargo check --all-targets: clean
  • cargo test --lib: 23/23 pass
  • The uniffi FFI surface is unchanged: regenerated Kotlin bindings are byte-identical to the current API (ZEUS's committed bindings remain valid)
  • Device testing on Android + iOS with rebuilt artifacts still required before this ships

Move the fork off the stale lsps7-for-ldk-node-close-fix branch (a
Dec 2025 snapshot of upstream main missing every 0.2.1-0.2.5 fix,
including the 0.2.3 'Through the Loupe' and 0.2.5 'MegaScan' security
batches) onto ZeusLN/rust-lightning zeus-0.2, which is upstream 0.2
branch head (= v0.2.5) plus the same five Zeus patches:

- LSPS7 (Channel Lease Extensions) client handler
- cooperative close feerate floor bypass
- BOLT11 route hints override (+ tests)

Since v0.2.5 predates upstream #4175 (impl-Future trait methods),
this also reverts 84bf2a5 ("Update to new upstream rust-lightning
with impl Futures") and adapts the pieces written after it:

- DualStore's async KVStore impl returns boxed futures again
- builder passes Arc-wrapped DualStore to build_with_store
- test helpers updated for LDK 0.2.5 test API (check_closed_event
  is_check_discard_funding arg) and the fork's 3-arg bolt11 send

The pre-existing integration-test compile breakage (bolt11 send call
sites in tests/ and benches/, present since the retry-timeout param
was added) is untouched except where the revert crossed it.
Append the trailing per-call retry-timeout argument (None) at every
bolt11/bolt12/spontaneous send call site in tests/ and benches/.
These targets stopped compiling when the configurable payment retry
timeout parameter was added; with this, cargo check --all-targets is
green again.
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