PLEBNET-PLAYGROUND / plebnet-playground-docker

Docker package which allows users to use and test bitcoin and lightning technologies without the financial risk involved with running on the mainnet chain. Multiple GUI interfaces are included.
MIT License
65 stars 16 forks source link
bitcoin lightning-network lnd nostr nostr-docker nostr-rs-relay plebnet signet

create lnd wallet image

Plebnet Playground Sandbox Docker Package

plebnet-playground

This package will setup a bitcoind, lnd, and tor daemon that will connect to the Plebnet Playground Sandbox (Signet) Chain. This allows users to use and test bitcoin and lightning technologies without the financial risk involved with running on the mainnet chain. RTL (Ride The Lightning) and ThunderHub Web UI is also include to provide a more user friendly experience.

Donate to Project


If you already have virtualenv installed, great. If not, and you are new to using Python, see this article about why its recommended to use a virtualenv

git clone https://github.com/PLEBNET-PLAYGROUND/plebnet-playground-docker --config core.autocrlf=input
cd plebnet-playground-docker
pip3 install virtualenv 
python3 -m venv venv 
source venv/bin/activate
pip3 install -r requirements.txt

Follow these instructions to install the docker compose subcommand on your system (Mac, Windows, Windows Server 2016, or Linux systems).

Supported System Architectures

Architecture TRIPLET build-arg
Intel x64 x86_64-linux-gnu
OSX 64-bit aarch64-linux-gnu
ARM64 linux aarch64-linux-gnu

Services

Service Description
bitcoind Bitcoin Core Daemon
lnd Lightning Labs LND Daemon
clightning Blockstream lightningd Daemon
tor tor network daemon
rtl Ride The Lightning Daemon
thunderhub Thunderhub Lightning UI
docs MKDocs documentation
notebook Jupyter Notebook environment setup for lightning development
dashboard Jupyter Dashboard
lndg lndg Dashboard (available on port 8889)

Install and start all services (will autodetect platform)


./install.sh   

Install and start just the bitcoind,lnd services (comma separate them)

services=bitcoind,lnd ./install.sh   

Start containers


docker-compose up -d

Stop containers


docker-compose stop

Full removal of Plebnet Playground (this deletes all data out of volumes directory)


./uninstall.sh

Make Command

Ubuntu Linux

apt install make

MacOS

Change default shell to bash

cat /etc/shells
chsh -s /bin/bash

Install Homebrew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install make docker-compose
brew install --cask docker
open /Applications/Docker.app

Play Command

make
make init
make install (non-destructive)
make install reset=true (destructive)
play help
play-bitcoin help
play-lnd help

Aliases

alias lncli='docker exec -it playground-lnd lncli --macaroonpath /root/.lnd/data/chain/bitcoin/signet/admin.macaroon '

alias change-password-playground='docker exec -it playground-lnd lncli --macaroonpath /root/.lnd/data/chain/bitcoin/signet/admin.macaroon changepassword'

alias connect-playground='docker exec -it playground-lnd lncli --macaroonpath /root/.lnd/data/chain/bitcoin/signet/admin.macaroon connect 03ee9d906caa8e8e66fe97d7a76c2bd9806813b0b0f1cee8b9d03904b538f53c4e@104.131.10.218:9735'

alias lightning-cli='docker exec -it playground-cln lightning-cli'

alias connect-playground-cln='docker exec -it playground-cln lightning-cli connect 03ee9d906caa8e8e66fe97d7a76c2bd9806813b0b0f1cee8b9d03904b538f53c4e@104.131.10.218:9735'

alias logs-bitcoind='docker logs playground-bitcoind'

alias logs-lnd='docker logs playground-lnd'

alias logs-cln='docker logs playground-cln'

alias logs-tor='docker logs playground-tor'

alias logs-rtl='docker logs playground-rtl'

alias logs-thub='docker logs playground-thub'

alias restart-bitcoind='docker restart playground-bitcoind'

alias restart-lnd='docker restart playground-lnd'

alias restart-cln='docker restart playground-cln'

alias restart-tor='docker restart playground-tor'

alias restart-rtl='docker restart playground-rtl'

alias restart-thub='docker restart playground-thub'

alias bos="docker run -it --rm -v $PWD/volumes/bos_datadir:/home/node/.bos:rw --network plebnet-playground-docker_default alexbosworth/balanceofsatoshis"

Your first playground LND wallet


The wallet will automatically be made for you and use the default password is 12345678 You can change the password with the change-password-playground alias. If you do change your password make sure to update the unlock.password file with your new password.

Make your first peer with the seed node for Plebnet Playground Signet


Get some coins

Install requirements pip3 install -r requirements.txt Run the ./getcoins.py script and you will get 1tBTC put into your lightning on-chain wallet.

RTL Setup


ThunderHub Setup


How to setup Balance of Satoshis (BOS)


You may install bos only after you have generated an lnd wallet with create-lnd-wallet.

sudo python3 ./install_bos.py

If you created the bos alias above, you should be good to go

bos --version
10.9.2

How to setup plebnet dashboard

The interactive dashboard is an experimental visualization engine for viewing theoretical payment paths through the lightning network. If you used the docker compose up -d command above, then the dashboard will run on http://localhost:8050

By default only the playground nodes are visualized. However, you can also visualize real lightning network data by placing a describegraph.json file in the repo's dashboard/ directory, then restart the dashboard setting environment variable USE_TEST_DATA=TRUE:

USE_TEST_DATA=TRUE docker compose up dashboard

Plebnet Dashboard

The shortest 10 paths are shown. Features supported by a given node is revealed on hover

Additional reference material

Links

Contributors