Lightning Network¶
The Lightning Network turns the two-party payment channel mechanism introduced in Bitcoin Scaling into an actual, usable network, letting Alice pay Carol through Bob's channel, without Alice needing a direct channel with Carol, and without needing to trust Bob at all. This section covers exactly how that works: funding, the revocation mechanism that keeps channel counterparties honest, HTLCs (the specific construction that makes multi-hop routing trust-minimized), and the practical realities of running a node, liquidity, watchtowers, and channel capacity.
What you need to know first¶
Payment Channels (the general, two-party mechanism), Multisig, Timelocks, and Commitments, HTLCs specifically combine the timelock and commitment concepts from those two chapters into one mechanism.
Lightning invoices, briefly¶
Before the chapters below, one piece of everyday vocabulary worth defining up front: a Lightning invoice is a request for payment, generated by the recipient, encoding the amount, a description, an expiration time, and (critically, per HTLCs) the payment hash the sender's HTLCs will need to satisfy along the route. Invoices are typically shared as a QR code or a long, Bech32-encoded string (beginning lnbc... on mainnet) that wallet software decodes and displays before the sender confirms payment.
Chapters¶
- Payment Channels: the revocation mechanism, in full: why broadcasting an old state is a losing strategy
- Funding Transactions: the one on-chain transaction that opens a channel
- Commitment Transactions: why each party holds a different, asymmetric version
- HTLCs: the mechanism that makes multi-hop routing trust-minimized, worked through step by step
- Routing Payments: source-based routing, onion privacy, and why routes can fail
- Liquidity: inbound versus outbound, and why a funded channel can't always receive
- Channel Capacity: the fixed ceiling, distinguished carefully from liquidity
- Watchtowers: how a channel stays protected while you're offline, without trusting a custodian
- Lightning Nodes: the major implementations, and the Bitcoin full node every one of them depends on
Next¶
This completes the book's Bitcoin-focused chapters. Continue to Ethereum, a different blockchain, built on a different transaction model (accounts, not UTXOs), with its own approach to scaling covered in depth in Layer 2 later in this book.