Skip to content

Commit 813a92c

Browse files
committed
Unify Docker Compose files with profiles for CLN, LND, and Eclair
Update Eclair image to latest, add CLN experimental-splicing and experimental-onion-messages flags per maintainer feedback. Add splice interop tests for Eclair
1 parent c492f33 commit 813a92c

6 files changed

Lines changed: 152 additions & 166 deletions

File tree

.github/workflows/cln-integration.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
sudo apt-get install -y socat
2020
2121
- name: Start bitcoind, electrs, and lightningd
22-
run: docker compose -f docker-compose-cln.yml up -d
22+
run: docker compose --profile cln up -d
2323

2424
- name: Forward lightningd RPC socket
2525
run: |
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: CI Checks - Eclair Integration Tests
2+
3+
on: [push, pull_request]
4+
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.ref }}
7+
cancel-in-progress: true
8+
9+
jobs:
10+
check-eclair:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
16+
- name: Start bitcoind and electrs
17+
run: docker compose up -d
18+
19+
- name: Wait for bitcoind to be healthy
20+
run: |
21+
for i in $(seq 1 30); do
22+
if docker exec ldk-node-bitcoin-1 bitcoin-cli -regtest -rpcuser=user -rpcpassword=pass getblockchaininfo > /dev/null 2>&1; then
23+
echo "bitcoind is ready"
24+
break
25+
fi
26+
echo "Waiting for bitcoind... ($i/30)"
27+
sleep 2
28+
done
29+
30+
- name: Create Eclair wallet on bitcoind
31+
run: |
32+
output=$(docker exec ldk-node-bitcoin-1 bitcoin-cli -regtest -rpcuser=user -rpcpassword=pass createwallet eclair 2>&1) || {
33+
if echo "$output" | grep -q "already exists"; then
34+
echo "Eclair wallet already exists, continuing"
35+
else
36+
echo "Failed to create Eclair wallet: $output"
37+
exit 1
38+
fi
39+
}
40+
41+
- name: Start Eclair
42+
run: docker compose --profile eclair up -d
43+
44+
- name: Wait for Eclair to be ready
45+
run: |
46+
for i in $(seq 1 60); do
47+
if curl -s -u :eclairpassword http://127.0.0.1:8080/getinfo > /dev/null 2>&1; then
48+
echo "Eclair is ready"
49+
break
50+
fi
51+
echo "Waiting for Eclair... ($i/60)"
52+
sleep 5
53+
done
54+
curl -s -u :eclairpassword http://127.0.0.1:8080/getinfo || { echo "Eclair failed to start"; docker logs ldk-node-eclair-1; exit 1; }
55+
56+
- name: Run Eclair integration tests
57+
run: RUSTFLAGS="--cfg eclair_test" cargo test --test integration_tests_eclair -- --show-output --test-threads=1

.github/workflows/lnd-integration.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,20 @@ jobs:
3737
run: echo "LND_DATA_DIR=$(mktemp -d)" >> $GITHUB_ENV
3838

3939
- name: Start bitcoind, electrs, and LND
40-
run: docker compose -f docker-compose-lnd.yml up -d
40+
run: docker compose --profile lnd up -d
41+
env:
42+
LND_DATA_DIR: ${{ env.LND_DATA_DIR }}
43+
44+
- name: Wait for LND to create macaroon
45+
run: |
46+
for i in $(seq 1 30); do
47+
if [ -f "$LND_DATA_DIR/data/chain/bitcoin/regtest/admin.macaroon" ]; then
48+
echo "LND macaroon found"
49+
break
50+
fi
51+
echo "Waiting for LND macaroon... ($i/30)"
52+
sleep 2
53+
done
4154
env:
4255
LND_DATA_DIR: ${{ env.LND_DATA_DIR }}
4356

@@ -51,6 +64,6 @@ jobs:
5164

5265
- name: Run LND integration tests
5366
run: LND_CERT_PATH=$LND_DATA_DIR/tls.cert LND_MACAROON_PATH=$LND_DATA_DIR/data/chain/bitcoin/regtest/admin.macaroon
54-
RUSTFLAGS="--cfg lnd_test" cargo test --test integration_tests_lnd -- --exact --show-output
67+
RUSTFLAGS="--cfg lnd_test" cargo test --test integration_tests_lnd -- --show-output --test-threads=1
5568
env:
5669
LND_DATA_DIR: ${{ env.LND_DATA_DIR }}

docker-compose-cln.yml

Lines changed: 0 additions & 73 deletions
This file was deleted.

docker-compose-lnd.yml

Lines changed: 0 additions & 86 deletions
This file was deleted.

docker-compose.yml

Lines changed: 79 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
version: '3'
2-
31
services:
42
bitcoin:
53
image: blockstream/bitcoind:27.2
@@ -14,11 +12,15 @@ services:
1412
"-rpcuser=user",
1513
"-rpcpassword=pass",
1614
"-fallbackfee=0.00001",
17-
"-rest"
15+
"-rest",
16+
"-zmqpubrawblock=tcp://0.0.0.0:28332",
17+
"-zmqpubrawtx=tcp://0.0.0.0:28333"
1818
]
1919
ports:
2020
- "18443:18443" # Regtest REST and RPC port
2121
- "18444:18444" # Regtest P2P port
22+
- "28332:28332" # ZMQ block port
23+
- "28333:28333" # ZMQ tx port
2224
networks:
2325
- bitcoin-electrs
2426
healthcheck:
@@ -41,10 +43,83 @@ services:
4143
"--cookie=user:pass",
4244
"--network=regtest",
4345
"--daemon-rpc-addr=bitcoin:18443",
44-
"--http-addr=0.0.0.0:3002"
46+
"--http-addr=0.0.0.0:3002",
47+
"--electrum-rpc-addr=0.0.0.0:50001"
4548
]
4649
ports:
4750
- "3002:3002"
51+
- "50001:50001"
52+
networks:
53+
- bitcoin-electrs
54+
55+
cln:
56+
image: blockstream/lightningd:v25.09.3
57+
platform: linux/amd64
58+
profiles: ["cln"]
59+
depends_on:
60+
bitcoin:
61+
condition: service_healthy
62+
command:
63+
[
64+
"--bitcoin-rpcconnect=bitcoin",
65+
"--bitcoin-rpcport=18443",
66+
"--bitcoin-rpcuser=user",
67+
"--bitcoin-rpcpassword=pass",
68+
"--regtest",
69+
"--experimental-anchors",
70+
"--experimental-splicing",
71+
"--experimental-onion-messages",
72+
]
73+
ports:
74+
- "19846:19846"
75+
- "9937:9937"
76+
networks:
77+
- bitcoin-electrs
78+
79+
lnd:
80+
image: lightninglabs/lnd:v0.20.1-beta
81+
container_name: ldk-node-lnd
82+
profiles: ["lnd"]
83+
depends_on:
84+
bitcoin:
85+
condition: service_healthy
86+
volumes:
87+
- ${LND_DATA_DIR:-/tmp/lnd-data}:/root/.lnd
88+
ports:
89+
- "8081:8081"
90+
- "9735:9735"
91+
command:
92+
- "--noseedbackup"
93+
- "--trickledelay=5000"
94+
- "--alias=ldk-node-lnd-test"
95+
- "--externalip=lnd:9735"
96+
- "--bitcoin.active"
97+
- "--bitcoin.regtest"
98+
- "--bitcoin.node=bitcoind"
99+
- "--bitcoind.rpchost=bitcoin:18443"
100+
- "--bitcoind.rpcuser=user"
101+
- "--bitcoind.rpcpass=pass"
102+
- "--bitcoind.zmqpubrawblock=tcp://bitcoin:28332"
103+
- "--bitcoind.zmqpubrawtx=tcp://bitcoin:28333"
104+
- "--accept-keysend"
105+
- "--rpclisten=0.0.0.0:8081"
106+
- "--tlsextradomain=lnd"
107+
- "--tlsextraip=0.0.0.0"
108+
networks:
109+
- bitcoin-electrs
110+
111+
eclair:
112+
image: acinq/eclair:latest
113+
platform: linux/amd64
114+
profiles: ["eclair"]
115+
depends_on:
116+
bitcoin:
117+
condition: service_healthy
118+
ports:
119+
- "8080:8080"
120+
- "9736:9736"
121+
environment:
122+
- JAVA_OPTS=-Declair.chain=regtest -Declair.server.port=9736 -Declair.api.enabled=true -Declair.api.binding-ip=0.0.0.0 -Declair.api.port=8080 -Declair.api.password=eclairpassword -Declair.bitcoind.host=bitcoin -Declair.bitcoind.rpcuser=user -Declair.bitcoind.rpcpassword=pass -Declair.bitcoind.rpcport=18443 -Declair.bitcoind.wallet=eclair -Declair.bitcoind.zmqblock=tcp://bitcoin:28332 -Declair.bitcoind.zmqtx=tcp://bitcoin:28333
48123
networks:
49124
- bitcoin-electrs
50125

0 commit comments

Comments
 (0)