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.