Skip to content

Fix vanilla channel interoperability with stock LDK - #149

Draft
bitwalt wants to merge 2 commits into
RGB-Tools:masterfrom
kaleidoswap:upstream-stock-ldk-interop
Draft

Fix vanilla channel interoperability with stock LDK#149
bitwalt wants to merge 2 commits into
RGB-Tools:masterfrom
kaleidoswap:upstream-stock-ldk-interop

Conversation

@bitwalt

@bitwalt bitwalt commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Fixes #148.

This PR validates and integrates plain-channel interoperability with stock LDK. The corresponding Rust-Lightning fix is RGB-Tools/rust-lightning#36.

Changes

  • point the Rust-Lightning submodule at the reviewed interoperability branch until Integrate Tor Connection Options #36 lands
  • update the expected plain-channel commitment fee from 9920 to 9060 sat, removing the 172 weight units reserved for an RGB OP_RETURN
  • add a standalone stock ldk-node test fixture under src/test/interoperability/ldk-node
  • run the ignored interoperability tests in a dedicated CI job

The fixture is a separate Cargo crate so this repository's [patch.crates-io] entries cannot replace its stock LDK dependencies. Its revision is locked for reproducible CI builds.

Coverage

Four tests cover:

  • stock LDK opening a private channel, paying in both directions, and closing cooperatively
  • stock LDK opening an announced channel that remains public, ready, and usable
  • RLN opening a private channel, paying in both directions, and closing cooperatively
  • an RGB channel offered to stock LDK never becoming ready

The successful private-channel payments also exercise invoice route hints without adding a separate route-hint assertion to this PR.

Merge order

RGB-Tools/rust-lightning#36 should merge first. Then this PR can restore the submodule URL to RGB-Tools and pin the merged commit before merging.

Validation

  • cargo fmt --package rgb-lightning-node -- --check
  • cargo fmt --manifest-path src/test/interoperability/ldk-node/Cargo.toml -- --check
  • cargo check --all-targets
  • cargo test interoperability --no-run
  • git diff --check

Compatibility

The underlying Rust-Lightning fix changes wire and commitment transaction encoding. A release carrying it needs a coordinated upgrade for deployed channels. Persisted channel state itself is unchanged.

@bitwalt
bitwalt force-pushed the upstream-stock-ldk-interop branch from 8a36aad to b0af20e Compare August 12, 2026 21:52
@codecov

codecov Bot commented Aug 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.74%. Comparing base (aa11b7c) to head (b0af20e).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #149      +/-   ##
==========================================
+ Coverage   87.69%   87.74%   +0.04%     
==========================================
  Files          16       16              
  Lines        8414     8459      +45     
==========================================
+ Hits         7379     7422      +43     
- Misses       1035     1037       +2     
Flag Coverage Δ
rust 87.74% <ø> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

RLN cannot open or accept vanilla channels with stock LDK peers

1 participant