Skip to content

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

Draft
febyeji wants to merge 7 commits intolightningdevkit:mainfrom
febyeji:interop-test-harness
Draft

Add interop integration test harness for LND, CLN, and Eclair#839
febyeji wants to merge 7 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)

febyeji added 7 commits March 24, 2026 23:43
- Add ExternalNode async trait with channel, payment, and node management methods
- Add wait_for_block_sync() default no-op for modular chain sync handling
- Add ExternalChannel, TestFailure types in external_node.rs
- Implement ExternalNode trait using lnd_grpc_rust with Mutex<LndClient>
- Log errors from spawned close_channel/force_close_channel streams
- Implement ExternalNode trait with 60s request timeout and settlement polling for pay_invoice/send_keysend
- Override wait_for_block_sync() to poll /getinfo until chain tip is reached
- Implement ExternalNode trait for TestClnNode with spawn_blocking for sync RPC
- Support splicing via splice_init/splice_update/splice_signed RPCs
- Add scenario modules: channel, payment, disconnect, splice
- Add expect_event! macro with 60s timeout and retry_until_ok helper
- Add setup_interop_test to fund/connect LDK + external node with block sync via ExternalNode::wait_for_block_sync()
- Extract setup_clients() and setup_ldk_node() per implementation
- Replace inline test logic with shared scenario function calls
- Generate 16 combo tests per implementation via interop_combo_tests! macro
- 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
@ldk-reviews-bot
Copy link

ldk-reviews-bot commented Mar 24, 2026

👋 Thanks for assigning @tnull as a reviewer!
I'll wait for their review and will help manage the review process.
Once they submit their review, I'll check if a second reviewer would be helpful.

@tnull tnull self-requested a review March 24, 2026 15:55
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