From 0d8946cb7f5618a96626c99ef37335b3449e381e Mon Sep 17 00:00:00 2001 From: Lakshya Singh Date: Tue, 17 Sep 2024 22:50:02 +0530 Subject: [PATCH 1/2] compose: add healthy constraint for txoo txoo needs to have all attestations before node starts otherwise it will fail to provide them to signer and fail Signed-off-by: Lakshya Singh --- docker-compose.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 5b45542..1cea04d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -52,6 +52,8 @@ services: condition: service_healthy txoo-server: condition: service_started + txoo: + condition: service_healthy environment: - BITCOIND_RPC_URL=http://rpcuser:VLSsigner1@bitcoind:18332 - TXOO_SOURCE_URL=http://txoo-server:80 @@ -148,6 +150,8 @@ services: lss: condition: service_started required: false + txoo: + condition: service_healthy environment: - LSS_REMOTE_URL - VLS_NETWORK=testnet From e20e7f2a6152f23384c0a5b01f37b165dceb184e Mon Sep 17 00:00:00 2001 From: Lakshya Singh Date: Thu, 29 Aug 2024 21:42:56 +0530 Subject: [PATCH 2/2] docs: first chain sync run only bitcoin-core and txoo until full chain sync is achieved Signed-off-by: Lakshya Singh --- README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/README.md b/README.md index deefe8b..af2777a 100644 --- a/README.md +++ b/README.md @@ -135,6 +135,31 @@ docker compose -f docker-compose.yml -f $DOCKER_COMPOSE_OVERRIDE up --build Above command will run `bitcoind`, `lightningd` and `txood` services on a single node. +### First Time Chain Sync + +It's quite possible that while syncing for the first time `bitcoind` would be unresponsive to rpc calls made by `core-lightning`, `vls`, etc. To remedy such scenario where other containers would fail to start we can instead start with just `bitcoind` and `txood` +```bash +docker compose --profile vls stop +docker compose -f docker-compose.yml -f docker-compose.testnet.yml up bitcoin-core txoo -d +``` + +Let the chain sync you can check its progress using `bitcoin-cli` or by checking status of docker container's health +```bash +docker container exec bitcoind-test bitcoin-cli getblockchaininfo +docker ps +``` + +Also, given there is a dependency of `core-lightning` on `txoo` it is a good idea to wait sometime so that all attestations are available for it to retrieve and `txoo` is healthy. `txoo` container health can be checked using `docker` +```bash +docker ps +``` + +After the chain sync has completed we can stop the containers and restart the whole system again +```bash +docker compose --profile vls stop +docker compose --profile vls -f docker-compose.yml -f docker-compose.testnet.yml up -d +``` + ## Interacting with Containers We can use the `docker container exec ` command to interact with containers and interact with setup using command line tools like `bitcoin-cli`, `lightning-cli`, `vls-cli`, etc.