@@ -241,12 +241,15 @@ services:
241241 - ' -debug=1'
242242 - ' -zmqpubrawblock=tcp://0.0.0.0:${ZMQ_BLOCK_PORT}'
243243 - ' -zmqpubrawtx=tcp://0.0.0.0:${ZMQ_TX_PORT}'
244+ - ' -zmqpubhashblock=tcp://bitcoin:${ZMQ_HASHBLOCK_PORT}'
244245 - ' -txindex=1'
245246 - ' -dnsseed=0'
246247 - ' -upnp=0'
247248 - ' -rpcbind=0.0.0.0'
248249 - ' -rpcallowip=0.0.0.0/0'
250+ - ' -whitelist=0.0.0.0/0'
249251 - ' -rpcport=${RPC_PORT}'
252+ - ' -deprecatedrpc=signrawtransaction'
250253 - ' -rest'
251254 - ' -listen=1'
252255 - ' -listenonion=0'
@@ -262,6 +265,8 @@ services:
262265 volumes :
263266 - bitcoin:/home/bitcoin/.bitcoin
264267 labels :
268+ CLI : " bitcoin-cli"
269+ CLI_ARGS : " -chain=regtest -rpcport=${RPC_PORT} -rpcuser=${RPC_USER} -rpcpassword=${RPC_PASS}"
265270 ofelia.enabled : " true"
266271 ofelia.job-exec.minecron.schedule : " @every 1m"
267272 ofelia.job-exec.minecron.command : >
@@ -270,12 +275,12 @@ services:
270275 command bitcoin-cli -chain=regtest -rpcport=${RPC_PORT} -rpcuser=${RPC_USER} -rpcpassword=${RPC_PASS} "$$@"
271276 }
272277 blockcount=$$(bitcoin-cli getblockcount 2>/dev/null)
273- nodes=(${SN_LND_ADDR} ${LND_ADDR} ${CLN_ADDR})
278+ nodes=(${SN_LND_ADDR} ${LND_ADDR} ${CLN_ADDR} ${ECLAIR_ADDR} )
274279 if (( blockcount <= 0 )); then
275280 echo "Creating wallet and address..."
276281 bitcoin-cli createwallet ""
277282 nodes+=($$(bitcoin-cli getnewaddress))
278- echo "Mining 100 blocks to sn_lnd, lnd, cln..."
283+ echo "Mining 100 blocks to sn_lnd, lnd, cln, eclair ..."
279284 for addr in "$${nodes[@]}"; do
280285 bitcoin-cli generatetoaddress 100 $$addr
281286 echo "Mining 100 blocks to a random address..."
@@ -341,6 +346,10 @@ services:
341346 - ' --allow-circular-route'
342347 - ' --bitcoin.defaultchanconfs=1'
343348 - ' --maxpendingchannels=10'
349+ - ' --gossip.sub-batch-delay=1s'
350+ - ' --protocol.custom-message=513'
351+ - ' --protocol.custom-nodeann=39'
352+ - ' --protocol.custom-init=39'
344353 expose :
345354 - " 9735"
346355 ports :
@@ -363,6 +372,32 @@ services:
363372 fi
364373 "
365374 cpu_shares : " ${CPU_SHARES_MODERATE}"
375+ sn_lndk :
376+ build :
377+ context : ./docker/lndk
378+ container_name : sn_lndk
379+ restart : unless-stopped
380+ profiles :
381+ - payments
382+ depends_on :
383+ sn_lnd :
384+ condition : service_healthy
385+ restart : true
386+ env_file : *env_file
387+ command :
388+ - ' lndk'
389+ - ' --grpc-host=0.0.0.0'
390+ - ' --address=https://sn_lnd:10009'
391+ - ' --cert-path=/home/lnd/.lnd/tls.cert'
392+ - ' --macaroon-path=/home/lnd/.lnd/data/chain/bitcoin/regtest/admin.macaroon'
393+ ports :
394+ - " ${SN_LNDK_GRPC_PORT}:7000"
395+ volumes :
396+ - sn_lnd:/home/lnd/.lnd
397+ labels :
398+ CLI : " lndk-cli --macaroon-path=/home/lnd/.lnd/data/chain/bitcoin/regtest/admin.macaroon"
399+ CLI_USER : " lndk"
400+ cpu_shares : " ${CPU_SHARES_MODERATE}"
366401 lnd :
367402 build :
368403 context : ./docker/lnd
@@ -524,6 +559,63 @@ services:
524559 fi
525560 "
526561 cpu_shares : " ${CPU_SHARES_MODERATE}"
562+ eclair :
563+ build :
564+ context : ./docker/eclair
565+ args :
566+ - LN_NODE_FOR=stacker
567+ container_name : eclair
568+ profiles :
569+ - payments
570+ restart : unless-stopped
571+ depends_on :
572+ << : *depends_on_bitcoin
573+ environment :
574+ << : *env_file
575+ JAVA_OPTS :
576+ -Declair.printToConsole
577+ -Dakka.loglevel=DEBUG
578+ -Declair.server.port=9735
579+ -Declair.server.public-ips.0=eclair
580+ -Declair.api.binding-ip=0.0.0.0
581+ -Declair.api.enabled=true
582+ -Declair.api.port=8080
583+ -Declair.api.password=pass
584+ -Declair.node-alias=eclair
585+ -Declair.chain=regtest
586+ -Declair.bitcoind.host=bitcoin
587+ -Declair.bitcoind.rpcport=${RPC_PORT}
588+ -Declair.bitcoind.rpcuser=${RPC_USER}
589+ -Declair.bitcoind.rpcpassword=${RPC_PASS}
590+ -Declair.bitcoind.zmqblock=tcp://bitcoin:${ZMQ_HASHBLOCK_PORT}
591+ -Declair.bitcoind.zmqtx=tcp://bitcoin:${ZMQ_TX_PORT}
592+ -Declair.bitcoind.batch-watcher-requests=false
593+ -Declair.features.option_onion_messages=optional
594+ -Declair.features.option_route_blinding=optional
595+ -Declair.features.keysend=optional
596+ -Declair.channel.accept-incoming-static-remote-key-channels=true
597+ -Declair.tip-jar.description=bolt12
598+ -Declair.tip-jar.default-amount-msat=100000000
599+ -Declair.tip-jar.max-final-expiry-delta=1000
600+ volumes :
601+ - eclair:/data
602+ expose :
603+ - " 9735"
604+ labels :
605+ CLI : " eclair-cli"
606+ CLI_USER : " root"
607+ CLI_ARGS : " -p pass"
608+ ofelia.enabled : " true"
609+ ofelia.job-exec.eclair_channel_cron.schedule : " @every 1m"
610+ ofelia.job-exec.eclair_channel_cron.command : >
611+ bash -c "
612+ if [ $$(eclair-cli -p pass channels | jq 'length') -ge 3 ]; then
613+ exit 0
614+ else
615+ eclair-cli -p pass connect --uri=$SN_LND_PUBKEY@sn_lnd:9735
616+ eclair-cli -p pass open --nodeId=$SN_LND_PUBKEY --fundingFeerateSatByte=1 --fundingSatoshis=1000000 --pushMsat=500000000 --announceChannel=true
617+ fi
618+ "
527619 channdler :
528620 image : mcuadros/ofelia:latest
529621 container_name : channdler
@@ -665,3 +757,4 @@ volumes:
665757 nwc_send :
666758 nwc_recv :
667759 tordata :
760+ eclair:
0 commit comments