Week 2

Building on lightning

Prerequisites

  • LND should be installed and ready

  • Developer environment from week 1 should be available. Having Polar installed and functional is essential! It requires Docker to be installed.

Goals

  • Understand how the lightning network operates

    • Why it is thought of as a bitcoin "layer 2"

    • Where the trust in the system lies

    • What security assumptions it makes

    • How the various "layers" of the network fit together

    • Risks and benefits of using Lightning transactions

  • Be familiar with sending and receiving lightning payments

  • Understand how BOLT11 invoices work and what information they contain

  • Understanding about BOLT12 offers, what the costs and benefits are, what alternatives are there?

  • Thinking about how the bitcoin fee market can affect lightning channels

  • Building an application on top of the lightning network

Exercises

Mornings

Monday morning presentation: "Introduction to Lightning".

The mornings will be split between reading 2 chapters of the Mastering Lightning book, and answering discussion questions in small groups.

A web-reader-friendly hosted version of Mastering Lightning can be found at lnbook.256k1.dev, which can be accessed for educational purposes using username and password qala:lightning.

Assigned groups and discussion questions are here and the book should be read in the following order:

If you finish your chapter(s) for the day early, feel free to move on to the next day's chapter(s), as repetition is key when it comes to absorbing so much knowledge.

If you finish all the chapters from this week, you can get a head start on the chapters in week 3.

Afternoons

The afternoons will be spent continuing your project-building, with focus shifting towards lightning-based programs and applications.

Choose a project from the projects page and get started on it, following the instructions on the project page.

We are looking for you to push your code to GitHub every day, even if it is only a work in progress, not working at all, or just a skeleton of libraries and project layout. Getting in the habit of regular updates is going to be really useful when we come to show off our proof of work later.

Some of the goals for the week, in addition to the project work include:

  • Run LND from source

  • Run the LND test suite (if a few tests fail this is OK, they fail on GitHub too -- don't worry!)

  • Open a lightning channel on signet

  • Request an invoice and make a payment

  • BONUS: Repeat previous exercise programmatically (RPC)

  • Have a go at making a lightning app using LND on signet

Last updated