Workshop: The Lightning Network

Slides, links and tutorials used for the workshop on the Lightning Network.

Links to slides:

Task 1: Install Lightning Network wallet

In this first task we are going to install one of the already many software wallets that exist for the Lightning Network.

For the workshop we are going to focus on these three options even if there are others available. So please choose one, preferably based on your skill.

Option 1 (easy, Android only): Eclair Wallet Testnet

Option 2 (advanced, GUI): Zap desktop wallet

Requirements:

Once you have installed the tools mentioned above continue here:

Option 3 (advanced, CLI): Docker container

Create a directory where the data for the lnd process will be stored. For the example we will assume that the directory is /tmp/lnd

Run the following command to pull and run a docker image:

docker run -d \
  -v /tmp/lnd:/root/.lnd \
  --restart=unless-stopped \
  --name=lnd \
  --entrypoint= \
  guggero/lnd \
  lnd \
  --noencryptwallet \
  --logdir="/root/.lnd" \
  --bitcoin.active \
  --bitcoin.testnet \
  --bitcoin.node=neutrino \
  --neutrino.connect=btcd0.lightning.computer:18333 \
  --autopilot.active \
  --debuglevel=debug

This should start lnd in a container. The log can be viewed with docker logs -f lnd

To use the command line tool that comes with lnd, use the following command (for example, to get the node info with getinfo):

docker exec -ti lnd lncli getinfo

To get an overview of all available commands, run:

docker exec -ti lnd lncli help

To get a wallet address, run the following command:

docker exec -ti lnd lncli newaddress p2wpkh

This might take a while if the wallet is not yet synced to the chain. But finally an address starting with 2… should be printed.

Go to testnet.manu.backend.hamburg/faucet and send yourself some Testnet Bitcoins!

Task 2: Open a Payment Channel