This repository contains the deployment files of LND node and subscriber container which saves gossip messages from the BTC Lightning Network in the MySQL database.
This stack Collects LN Gossip Messages:
- Channel Update
- Node Update
Before starting this project you need to install into your system:
sudo apt update
sudo apt install -y docker.io
sudo curl -L https://github.com/docker/compose/releases/download/v2.26.1/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
git clone https://github.com/kaunofakultetas/lnd-subscriber.git
cd lnd-subscriber
./runUpdateThisStack.sh
Open favorite browser and go to DBGate database browser which was started together with the stack:
http://<server ip address>:8091/
sudo docker exec lnd-subscriber-lnd lncli --rpcserver=localhost:10009 --macaroonpath=/root/.lnd/data/chain/bitcoin/mainnet/admin.macaroon listpeers | grep address
sudo docker exec lnd-subscriber-mysql mysql -u lnd_data -plnd_data lnd_data -ss -e "SELECT MAX(timestamp) FROM channel_updates;" 2>/dev/null
Feel free to submit issues and pull requests.