Skip to content

Add interop integration test harness for LND, CLN, and Eclair#839

Open
febyeji wants to merge 3 commits intolightningdevkit:mainfrom
febyeji:interop-test-harness
Open

Add interop integration test harness for LND, CLN, and Eclair#839
febyeji wants to merge 3 commits intolightningdevkit:mainfrom
febyeji:interop-test-harness

Conversation

@febyeji
Copy link

@febyeji febyeji commented Mar 24, 2026

Summary

Closes #766

Add a interop test harness for testing LDK-Node against external Lightning implementations (LND, CLN, Eclair).

Test Coverage

Each implementation runs the same shared scenarios:

Implementation Image Version bitcoind
LND lightninglabs/lnd v0.18.5-beta 29.1
CLN elementsproject/lightningd v24.08.2 30.2
Eclair acinq/eclair latest (currently 0.14.0-SNAPSHOT) 30.2
  • Combo tests (16 per impl): {payment, idle} × {ldk, ext} × {coop, force} × {ldk, ext} — covers disconnect/reconnect timing, close type, and close initiator
  • Standalone tests: basic channel cycle, bidirectional payments, concurrent payments, fee-change close, inbound channels, expired invoice
  • Splice tests: CLN only (Eclair/LND do not yet support splicing)

Design Decisions

Feedback on the design trade-offs would be especially appreciated! Here are the first few decisions I've made in this draft:

bitcoind versions. Eclair requires Bitcoin Core 30+ (bitcoind:30.2); CLN also uses 30.2. LND stays on 29.1 due to intermittent GetInfo gRPC hangs under 30.2.

ExternalNode::wait_for_block_sync(). Eclair's API responds before block indexing completes, so it needs explicit sync-waiting. LND's gRPC hangs if forced to wait. Solution: trait default no-op, Eclair overrides.

Eclair container recreation. Stale channel state causes SIGSEGV in secp256k1-jni (eclair#3275). Each test recreates the container; setup_clients() calls lockunspent to release UTXOs from prior force-closes.

Eclair request timeout + settlement polling. 60s reqwest timeout prevents indefinite hangs. pay_invoice/send_keysend poll /getsentinfo so failures surface immediately.

Issues Found

CLN → LDK keysend fails.

  • CLN v24.08+ includes payment_secret in keysend HTLCs, which appears to cause LDK to reject the payment during inbound_payment::verify() — likely because no invoice exists for spontaneous payments
  • test_receive_keysend_payment is skipped for CLN; needs further investigation
  • send_keysend now polls /getsentinfo for settlement (matching pay_invoice)

@ldk-reviews-bot
Copy link

ldk-reviews-bot commented Mar 24, 2026

🎉 This PR is now ready for review!
Please choose at least one reviewer by assigning them on the right bar.
If no reviewers are assigned within 10 minutes, I'll automatically assign one.
Once the first reviewer has submitted a review, a second will be assigned if required.

@tnull tnull self-requested a review March 24, 2026 15:55
@febyeji febyeji force-pushed the interop-test-harness branch 4 times, most recently from 8c1e94f to a50c9d0 Compare March 26, 2026 15:49
@ldk-reviews-bot
Copy link

🔔 1st Reminder

Hey @tnull! This PR has been waiting for your review.
Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.

febyeji added 3 commits March 27, 2026 01:05
- Shared scenarios in tests/common/scenarios/ generic over ExternalNode
- Test entry points for LND, CLN, and Eclair
- Combo orchestrator (combo.rs) with interop_combo_tests! macro generating
  16 tests per implementation (phase × disconnect side × close type × initiator)
- Building blocks use no test_ prefix; full scenarios include setup internally
- #[ignore] annotations for known interop failures:
  CLN keysend (payment_secret issue), Eclair keysend (InvalidOnionPayload),
  CLN/Eclair splice (version requirements)

Co-authored-by: AI (Claude Code)
- Add docker-compose configs for CLN (bitcoind 29.1), LND (bitcoind 29.1), and Eclair (bitcoind 30.2 required by Eclair latest)
- Add CI workflows: cln-integration.yml, lnd-integration.yml, eclair-integration.yml
- Bump corepc-node feature to 29_0 and update download_bitcoind_electrs.sh
@febyeji febyeji force-pushed the interop-test-harness branch from a50c9d0 to 433515c Compare March 26, 2026 17:36
@febyeji febyeji marked this pull request as ready for review March 26, 2026 17:54
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.

Rewrite integration test harness ensuring interop with CLN, Eclair, and LND

2 participants