Skip to content
Lightning Network Protocol Development Curriculum
Branch: master
Clone or download
adamjonas Merge pull request #4 from ysangkok/patch-1
Correct Electrum link, add two other implementations in development
Latest commit ce32a4f Sep 20, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information. Amend implementations Sep 19, 2019

What is this?

While planning the Chaincode Residency, we put considerable effort into finding the best resources and creating a curriculum around Lightning protocol development.

Lightning is still a nascent technology, and so we expect maintenance of this document to be an ongoing task. We could use your help. Please consider opening a pull-request to keep this document relevant.

There are three portions to this curriculum:

  1. Study Groups designed to provide bite-sized grouped subjects that you can either complete bookclub style or alone.
  2. Seminar Videos recorded during the Summer 2019 Chaincode Residency.
  3. Lightning Syllabus a collection of resources grouped by subjects.

Seminar Videos

Session Topic Link
How pieces fit together Overall picture
How pieces fit together Update
How pieces fit together Transfer
How pieces fit together Multihop
How pieces fit together And the others that are worth mentioning but not exploring (base and transport)
Update layer Trampoline Payments
Update layer Eltoo and the Far Future
Onion Routing Atomic multi-path payments (AMP)
Onion Routing Keysend (formally known as spontaneous payments)
Update layer - limitations Fee management
Onion Routing Deep Dive
Update layer - limitations Incentive problems in the network
Onion Routing- limitations Routing failures
Update layer Gossip Protocol/Path Finding
Limitations Payment UX
Limitations Limitations of lightweight clients
Limitations Running Lightning in Production
Limitations Failure modes in action
Submarine swaps/ Loops
Attack vectors Attack vector intro
Privacy Gossip protocol and privacy/How much do watchtowers need to know?/ Minimizing what is broadcasted to the base layer
Privacy Channel probing attack for channel balance,
1.1 and the far future Network Topology creation/maintenance
1.1 and the far future Splicing
1.1 and the far future Multi-party channels/Channel factories
1.1 and the far future Rendezvous Routing
1.1 and the far future Dual funded channels

Lightning Syllabus

Subjects Topics Sub-topics Sources
What is Lightning? The Bitcoin Lightning Network: Scalable Off-Chain Instant Payments, What is the Lightning Network and how can it help Bitcoin scale?, The Lightning Network Evolving Bitcoin into a layered system, Understanding the Lightning Network, Part 1: Building a Bidirectional Bitcoin Payment Channel, Understanding the Lightning Network, Part 2: Creating the Network, Understanding the Lightning Network, Part 3: Completing the Puzzle and Closing the Channel, Reaching The Ground With Lightning, Scaling Bitcoin to Billions of Transactions Per Day, 2015, Lightning Network Deep Dive with Laolu "Roasbeef" Osuntokun, The #Bitcoin #Lightning Spec, Lightning Network Glossary
What is Lightning? Introduction Lightning Layers How the Lightning Layers Fit Together, A Lightning Application Design Perspective
What is Lightning? Introduction History of LN History of the Lightning Network, The Future of Bitcoin: What Lightning Could Look Like, The History of Lightning: From Brainstorm to Beta
What is Lightning? Lightning ≈ Bitcoin Lightning ≈ Bitcoin
What is Lightning? Lightning ≈ Bitcoin Revisting tx malleability SF Bitcoin Devs Seminar: Transaction Malleability: Threats and Solutions
Transfer Payment channel General concept Payment Channel
Transfer Payment channel Public channel Do the channel balances get publicly announced in real-time on Lightning Network?, The open_channel Message
Transfer Payment channel Private channel Exploring Lightning Network Routing
Transfer Payment channel Channel balance (local/remote)
Transfer Payment channel Exhausted channels
Transfer Payment channel Channel reserve Rationale
Transfer Transactions BOLT BOLT #3: Bitcoin Transaction and Script Formats
Transfer Transactions Funding Transaction Funding Transactions as a Generalized Design Pattern for Offchain Protocols, Funding Transaction Output, The funding_created Message
Transfer Transactions Commitment Transaction Commitment transactions, Commitment Transaction
Transfer Transactions Closing Transaction Closing a Channel in Lighting Network, Closing Transaction
Transfer Transactions Penalty Transaction Lightning Network ‘Penalty Scenario’ Works in Old State Channel Incident, Revoked Transaction Close Handling
Transfer Transactions Mutual Close Distinguishing mutual and unilateral channel closing in the Bitcoin blockchain, Mutual Close Handling
Transfer Transactions Unilateral Close Unilateral Close Handling: Local Commitment Transaction
Transfer Transactions Fee negotiation BOLT #2: Peer Protocol for Channel Management
Transfer HTLC Overview What Are Hashed Timelock Contracts (HTLCs)? Application In Lightning Network & Payment Channels,Lightning Networks Part II: Hashed Timelock Contracts (HTLCs)
Transfer HTLC Hashlock HTLC implementation Bitcoin Core
Transfer HTLC Timelocks Bitcoin’s Time Locks, Timelock,Bitcoin Timelocks in a nutshell
Transfer HTLC Revocation Key Lightning Networks Part I: Revocable Transactions
Transfer HTLC Relative Locktime/CLTV BIP 65
Transfer HTLC Hash Pre-image What is a hash pre-image as it is used for the breach remedy?,Offered HTLC Outputs
Transfer HTLC payment basepoint/revocation basepoint Key Derivation
Transfer HTLC Per-commit secret/Commitment number Key Derivation
Transfer HTLC HTLC fulfillment/failure Removing an HTLC: update_fulfill_htlc, update_fail_htlc, and update_fail_malformed_htlc
Transfer Payment Invoice
Transfer Payment Payment Request
Update Invoices Bolt11 encoding BOLT #11: Invoice Protocol for Lightning Payments
Update Gossip Gossip Protocol BOLT #7: P2P Node and Channel Discovery
Update Transactions LN-Penalty
Update Transactions Eltoo payment channels eltoo: A Simple Layer2 Protocol for Bitcoin
Multihop Sphinx Overview Sphinx Packet, Using Sphinx to Improve Onion Routing Circuit Construction (short paper)⋆, Sphinx: A Compact and Provably Secure Mix Format, Security Analysis of the Lightning Network
Multihop Onion Routing Overview Sphinx and Onion routing, Onion Routing with HTLCs on the Lightning Network explained! - Beginner / Experts
Multihop Onion Routing Public vs. Private channel Do the channel balances get publicly announced in real-time on Lightning Network?,Exploring Lightning Network Routing
Multihop Onion Routing Channel announcements BOLT #2: Peer Protocol for Channel Management
Multihop Onion Routing Routing fees The Lightning Network (Part 2) – Routing Fee Economics
Multihop Onion Routing Expiry delta cltv_expiry_delta Selection
Multihop Onion Routing Route hints Exploring Lightning Network Routing
Base Framing and feature negotiation
Transport Noise Protocol Framework Overview The Noise Protocol Framework, The Noise Protocol Framework (video)
Transport Noise Protocol Framework Noise XK Handshake patterns, Noise Explorer
Atomic Swaps Introduction Overview What are Atomic Swaps? A Beginner’s Guide,Atomic Swaps: How the Lightning Network Extends to Altcoins, Atomic Swaps, Atomic Swaps on the Lightning Network
Atomic Swaps Submarine swaps vs. reverse swaps Overview Onboarding the Masses: Submarine Swaps, Submarine Swaps on the Lightning Network
Atomic Swaps Loops Overview Announcing Lightning Loop Alpha: An Easier Way to Receive on Lightning,Loop Out In-depth
Current Limitations Lightning Network 2.0, Major Limitations of the Lightning Network
BOLTs 1.1 and the future Proposal States Lightning Specification 1.1 Proposal States, Lightning User Experience: A Day in the Life of Carol
BOLTs 1.1 and the future Liquidity Splicing Channel top-up, Splicing Proposal
BOLTs 1.1 and the future Liquidity Dual Funded channels Proposal for Advertising Channel Liquidity
BOLTs 1.1 and the future Payments AMP AMP: Atomic Multi-Path Payments over Lightning, Base AMP
BOLTs 1.1 and the future Routing Rendezvous routing Rendez vous mechanism on top of Sphinx
The Far Future Routing Just in time routing Just in Time Routing (JIT-Routing) and a channel rebalancing heuristic as an add on for improved routing success in BOLT 1.0
The Far Future Onboarding Multiparty channels / channel factories What are Channel Factories and how do they work?, Onboarding the Masses: Channel Factories
The Far Future Payments Decorelation Payment Decorrelation
The Far Future Payments Streaming Payments BOLT 11, real time micro payments, and route redundancy
The Far Future Payments Refunds
The Far Future Payments Fast Failure
The Far Future Scripts Scriptless Scripts with ECDSA Scriptless Scripts with ECDSA
Privacy considerations How the Lightning Network Layers Privacy on Top of Bitcoin
Privacy considerations Watchtowers Incentivizing payment channel watchtower,Trustless Watchtowers, Architecture of LND Watchtowers Incentivizing Payment Channel Watchtowers
Privacy considerations Channel probing attack for channel balance On the Difficulty of Hiding the Balance of Lightning Network Channels
Privacy considerations Decorrelation of lightning payments Decorrelation of Lightning Payments
Privacy considerations SNARKs Better privacy with SNARKs
Security/Attack Vectors Denial of Service attacks State of the Crypto: Lightning Network DDoS’d, Payment channel congestion via spam-attack
Considerations Desired topology of a high functional network Autopilot Improving the autopilot of bitcoin’s lightning network, Autopilot PR in c-lightning
Considerations Desired topology of a high functional network Channel management Lightning network topology Considerations, Rebalancing in the lightning network: Analysis and implications
Considerations Desired topology of a high functional network Cyclic Superhubs Cyclic Superhubs as Solution Towards Reasonable Lightning Network Topology
Considerations Neutrino Exploring Neutrino, Neutrino: The Lighter Side of Lightning
Considerations Pitfalls of concurrent requests
Considerations Broadcasting channel updates What is the status of the Lightning Network?
Implementations LND Lightning Network Daemon
Implementations ptarmigan Ptarmigan
Implementations electrum Electrum Implementation in Python, see electrum/ln*.py
Implementations rust-lightning Incomplete implementation Rust-Lightning
Implementations c-lightning c-lightning — a Lightning Network implementation in C
Implementations Eclair Eclair - A scala implementation of the Lightning Network
Implementations DotNetLightning Incomplete implementation Lightning network daemon with F#
Implementations geelightning Incomplete implementation geelightning in Rust
Setting up a node Bitcoin Lightning Network #1: Can I compile and run a node?, Beginner’s Guide to ️Lightning️ on a Raspberry Pi, My Lightning Node setup with c-lightning, Fastest and cheapest way to get your own Lightning Node running - on a RaspberryPi with a nice LCD


Special thanks to Fabian Jahr, Christian Decker, Fabrice Drouin, René Pickhardt, and Alex Bosworth for their help in putting together the above resources.

You can’t perform that action at this time.