Add interop integration test harness for LND, CLN, and Eclair#839
Draft
febyeji wants to merge 7 commits intolightningdevkit:mainfrom
Draft
Add interop integration test harness for LND, CLN, and Eclair#839febyeji wants to merge 7 commits intolightningdevkit:mainfrom
febyeji wants to merge 7 commits intolightningdevkit:mainfrom
Conversation
- 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
|
👋 Thanks for assigning @tnull as a reviewer! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
lightninglabs/lndv0.18.5-betaelementsproject/lightningdv24.08.2acinq/eclairlatest(currently 0.14.0-SNAPSHOT){payment, idle} × {ldk, ext} × {coop, force} × {ldk, ext}— covers disconnect/reconnect timing, close type, and close initiatorDesign 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 intermittentGetInfogRPC 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()callslockunspentto release UTXOs from prior force-closes.Eclair request timeout + settlement polling. 60s reqwest timeout prevents indefinite hangs.
pay_invoice/send_keysendpoll/getsentinfoso failures surface immediately.Issues Found
CLN → LDK keysend fails.
payment_secretin keysend HTLCs, which appears to cause LDK to reject the payment duringinbound_payment::verify()— likely because no invoice exists for spontaneous paymentstest_receive_keysend_paymentis skipped for CLN; needs further investigationsend_keysendnow polls/getsentinfofor settlement (matchingpay_invoice)