Skip to content

Commit

Permalink
Merge branch 'main' into feat/bitcoin
Browse files Browse the repository at this point in the history
  • Loading branch information
lesterli authored Oct 20, 2024
2 parents 0cc8a63 + 6e3344f commit 05f34f1
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# babylon-deployment

## Start Bitcoin node
## Setup Bitcoin node

1. Copy the `.env.bitcoin.example` file to `.env.bitcoin` and set the variables

Expand Down Expand Up @@ -34,3 +34,31 @@
```bash
docker compose -f docker/docker-compose-bitcoin.yml logs -f bitcoind
```

## Troubleshooting

1. BTC staker balance null or no unspent outputs

After running `verify-bitcoin-sync-balance.sh`, the BTC staker wallet should be loaded to bitcoind. If not, you will run into null balance or no unspent outputs errors when running `create-btc-delegations.sh`.

To check the wallet balance:

```
docker exec bitcoind /bin/sh -c "bitcoin-cli -signet -rpcuser=rpcuser -rpcpassword=rpcpass -rpcwallet=btcstaker listunspent"
```
To check unspent outputs:
```
docker exec bitcoind /bin/sh -c "bitcoin-cli -signet -rpcuser=rpcuser -rpcpassword=rpcpass -rpcwallet=btcstaker getbalance"
```
If your wallet balance is 0 or you have no unspent outputs, you may need to re-load the wallet:
```
docker exec bitcoind /bin/sh -c "bitcoin-cli -signet -rpcuser=rpcuser -rpcpassword=rpcpass -rpcwallet=btcstaker unloadwallet btcstaker"

docker exec bitcoind /bin/sh -c "bitcoin-cli -signet -rpcuser=rpcuser -rpcpassword=rpcpass -rpcwallet=btcstaker loadwallet btcstaker"
```
Now recheck the balance and unspent outputs.

0 comments on commit 05f34f1

Please sign in to comment.