docs: first chain sync

run only bitcoin-core and txoo until full chain sync is achieved
Signed-off-by: Lakshya Singh <lakshay.singh1108@gmail.com>
This commit is contained in:
Lakshya Singh 2024-08-29 21:42:56 +05:30
parent 0d8946cb7f
commit e20e7f2a61
No known key found for this signature in database
GPG Key ID: 6491470634BAE613

View File

@ -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 <CONTAINER_NAME> <COMMAND>` command to interact with containers and interact with setup using command line tools like `bitcoin-cli`, `lightning-cli`, `vls-cli`, etc.