1 option
Mastering the Lightning Network.
- Format:
- Book
- Author/Creator:
- Antonopoulos, Andreas M.
- Language:
- English
- Subjects (All):
- Blockchains (Databases).
- Electronic funds transfers.
- Bitcoin.
- Physical Description:
- 1 online resource (466 pages)
- Edition:
- 1st ed.
- Place of Publication:
- Sebastopol : O'Reilly Media, Incorporated, 2021.
- Summary:
- The Lightning Network (LN) is a rapidly growing second-layer payment protocol that works on top of Bitcoin to provide near-instantaneous transactions between two parties. With this practical guide, authors Andreas M. Antonopoulos, Olaoluwa Osuntokun, and Rene Pickhardt explain how this advancement will enable the next level of scale for Bitcoin, increasing speed and privacy while reducing fees. Ideal for developers, systems architects, investors, and entrepreneurs looking to gain a better understanding of LN, this book demonstrates why experts consider LN a critical solution to Bitcoin's scalability problem. You'll learn how LN has the potential to support far more transactions than today's financial networks. This book examines: How the Lightning Network addresses the challenge of blockchain scaling The Basis of Lightning Technology (BOLT) standards documents The five layers of the Lightning Network Protocol Suite LN basics, including wallets, nodes, and how to operate one Lightning payment channels, onion routing, and gossip protocol Finding paths across payment channels to transport Bitcoin off-chain from sender to recipient.
- Contents:
- Intro
- Copyright
- Table of Contents
- Preface
- Intended Audience
- Conventions Used in This Book
- Code Examples
- Using Code Examples
- References to Companies and Products
- Addresses and Transactions in This Book
- O'Reilly Online Learning
- How to Contact Us
- Contacting Andreas
- Contacting René
- Contacting Olaoluwa Osuntokun
- Acknowledgments by Andreas
- Acknowledgments by René
- Acknowledgments by Olaoluwa Osuntokun
- Contributions
- Sources
- Part I. Understanding the Lightning Network
- Chapter 1. Introduction
- Lightning Network Basic Concepts
- Trust in Decentralized Networks
- Fairness Without Central Authority
- Trusted Protocols Without Intermediaries
- A Fairness Protocol in Action
- Security Primitives as Building Blocks
- Example of the Fairness Protocol
- Motivation for the Lightning Network
- Scaling Blockchains
- The Lightning Network's Defining Features
- Lightning Network Use Cases, Users, and Their Stories
- Conclusion
- Chapter 2. Getting Started
- Alice's First Lightning Wallet
- Lightning Nodes
- Lightning Explorers
- Lightning Wallets
- Testnet Bitcoin
- Balancing Complexity and Control
- Downloading and Installing a Lightning Wallet
- Creating a New Wallet
- Responsibility with Key Custody
- Mnemonic Words
- Storing the Mnemonic Safely
- Loading Bitcoin onto the Wallet
- Acquiring Bitcoin
- Receiving Bitcoin
- From Bitcoin to Lightning Network
- Lightning Network Channels
- Opening a Lightning Channel
- Buying a Cup of Coffee Using the Lightning Network
- Bob's Cafe
- A Lightning Invoice
- Chapter 3. How the Lightning Network Works
- What Is a Payment Channel?
- Payment Channel Basics
- Routing Payments Across Channels
- Payment Channels
- Multisignature Address
- Funding Transaction
- Commitment Transaction
- Cheating with Prior State.
- Announcing the Channel
- Closing the Channel
- Invoices
- Payment Hash and Preimage
- Additional Metadata
- Delivering the Payment
- The Peer-to-Peer Gossip Protocol
- Pathfinding and Routing
- Source-Based Pathfinding
- Onion Routing
- Payment Forwarding Algorithm
- Peer-to-Peer Communication Encryption
- Thoughts About Trust
- Comparison with Bitcoin
- Addresses Versus Invoices, Transactions Versus Payments
- Selecting Outputs Versus Finding a Path
- Change Outputs on Bitcoin Versus No Change on Lightning
- Mining Fees Versus Routing Fees
- Varying Fees Depending on Traffic Versus Announced Fees
- Public Bitcoin Transactions Versus Private Lightning Payments
- Waiting for Confirmations Versus Instant Settlement
- Sending Arbitrary Amounts Versus Capacity Restrictions
- Incentives for Large Value Payment Versus Small Value Payments
- Using the Blockchain as a Ledger Versus as a Court System
- Offline Versus Online, Asynchronous Versus Synchronous
- Satoshis Versus Millisatoshis
- Commonality of Bitcoin and Lightning
- Monetary Unit
- Irreversibility and Finality of Payments
- Trust and Counterparty Risk
- Permissionless Operation
- Open Source and Open System
- Chapter 4. Lightning Node Software
- Lightning Development Environment
- Using the Command Line
- Downloading the Book Repository
- Docker Containers
- Bitcoin Core and Regtest
- Building the Bitcoin Core Container
- The c-lightning Lightning Node Project
- Building c-lightning as a Docker Container
- Setting Up a Docker Network
- Running the bitcoind and c-lightning Containers
- Installing c-lightning from Source Code
- Installing Prerequisite Libraries and Packages
- Copying the c-lightning Source Code
- Compiling the c-lightning Source Code
- The Lightning Network Daemon Node Project
- The LND Docker Container.
- Running the bitcoind and LND Containers
- Installing LND from Source Code
- Copying the LND Source Code
- Compiling the LND Source Code
- The Eclair Lightning Node Project
- The Eclair Docker Container
- Running the bitcoind and Eclair Containers
- Installing Eclair from Source Code
- Copying the Eclair Source Code
- Compiling the Eclair Source Code
- Building a Complete Network of Diverse Lightning Nodes
- Using docker-compose to Orchestrate Docker Containers
- docker-compose Configuration
- Starting the Example Lightning Network
- Opening Channels and Routing a Payment
- Chapter 5. Operating a Lightning Network Node
- Choosing Your Platform
- Why Is Reliability Important for Running a Lightning Node?
- Types of Hardware Lightning Nodes
- Running in the "Cloud"
- Running a Node at Home
- What Hardware Is Required to Run a Lightning Node?
- Switching Server Configuration in the Cloud
- Using an Installer or Helper
- RaspiBlitz
- Mynode
- Umbrel
- BTCPay Server
- Bitcoin Node or Lightweight Lightning
- Operating System Choice
- Choose Your Lightning Node Implementation
- Installing a Bitcoin or Lightning Node
- Background Services
- Process Isolation
- Node Startup
- Node Configuration
- Network Configuration
- Security of Your Node
- Operating System Security
- Node Access
- Node and Channel Backups
- Hot Wallet Risk
- Sweeping Funds
- Lightning Node Uptime and Availability
- Tolerate Faults and Automate
- Monitoring Node Availability
- Watchtowers
- Channel Management
- Opening Outbound Channels
- Getting Inbound Liquidity
- Closing Channels
- Rebalancing Channels
- Routing Fees
- Node Management
- Ride The Lightning
- lndmon
- ThunderHub
- Part II. The Lightning Network in Detail
- Chapter 6. Lightning Network Architecture
- The Lightning Network Protocol Suite.
- Lightning in Detail
- Chapter 7. Payment Channels
- A Different Way of Using the Bitcoin System
- Bitcoin Ownership and Control
- Diversity of (Independent) Ownership and Multisig
- Joint Ownership Without Independent Control
- Preventing "Locked" and Un-Spendable Bitcoin
- Constructing a Payment Channel
- Node Private and Public Keys
- Node Network Address
- Node Identifiers
- Connecting Nodes as Direct Peers
- Constructing the Channel
- Peer Protocol for Channel Management
- Channel Establishment Message Flow
- The Funding Transaction
- Generating a Multisignature Address
- Constructing the Funding Transaction
- Holding Signed Transactions Without Broadcasting
- Refund Before Funding
- Constructing the Presigned Refund Transaction
- Chaining Transactions Without Broadcasting
- Solving Malleability (Segregated Witness)
- Broadcasting the Funding Transaction
- Sending Payments Across the Channel
- Splitting the Balance
- Competing Commitments
- Cheating with Old Commitment Transactions
- Revoking Old Commitment Transactions
- Asymmetric Commitment Transactions
- Delayed (Timelocked) Spending to_self
- Revocation Keys
- The Commitment Transaction
- Advancing the Channel State
- The commitment_signed Message
- The revoke_and_ack Message
- Revoking and Recommitting
- Cheating and Penalty in Practice
- The Channel Reserve: Ensuring Skin in the Game
- Closing the Channel (Cooperative Close)
- The Shutdown Message
- The closing_signed Message
- The Cooperative Close Transaction
- Chapter 8. Routing on a Network of Payment Channels
- Routing a Payment
- Routing Versus Pathfinding
- Creating a Network of Payment Channels
- A Physical Example of "Routing"
- Fairness Protocol
- Implementing Atomic Trustless Multihop Payments
- Revisiting the Tipping Example.
- On-Chain Versus Off-Chain Settlement of HTLCs
- Hash Time-Locked Contracts
- HTLCs in Bitcoin Script
- Payment Preimage and Hash Verification
- Extending HTLCs from Alice to Dina
- Back-Propagating the Secret
- Signature Binding: Preventing Theft of HTLCs
- Hash Optimization
- HTLC Cooperative and Timeout Failure
- Decrementing Timelocks
- Chapter 9. Channel Operation and Payment Forwarding
- Local (Single Channel) Versus Routed (Multiple Channels)
- Forwarding Payments and Updating Commitments with HTLCs
- HTLC and Commitment Message Flow
- Forwarding Payments with HTLCs
- Adding an HTLC
- The update_add_HTLC Message
- HTLC in Commitment Transactions
- New Commitment with HTLC Output
- Alice Commits
- Bob Acknowledges New Commitment and Revokes Old One
- Bob Commits
- Multiple HTLCs
- HTLC Fulfillment
- HTLC Propagation
- Dina Fulfills the HTLC with Chan
- Bob Settles the HTLC with Alice
- Removing an HTLC Due to Error or Expiry
- Making a Local Payment
- Chapter 10. Onion Routing
- A Physical Example Illustrating Onion Routing
- Selecting a Path
- Building the Layers
- Peeling the Layers
- Introduction to Onion Routing of HTLCs
- Alice Selects the Path
- Alice Constructs the Payloads
- Key Generation
- Wrapping the Onion Layers
- Fixed-Length Onions
- Wrapping the Onion (Outlined)
- Wrapping Dina's Hop Payload
- Wrapping Chan's Hop Payload
- Wrapping Bob's Hop Payload
- The Final Onion Packet
- Sending the Onion
- The update_add_htlc Message
- Alice Sends the Onion to Bob
- Bob Checks the Onion
- Bob Generates Filler
- Bob De-Obfuscates His Hop Payload
- Bob Extracts the Outer HMAC for the Next Hop
- Bob Removes His Payload and Left-Shifts the Onion
- Bob Constructs the New Onion Packet
- Bob Verifies the HTLC Details
- Bob Sends the update_add_htlc to Chan.
- Chan Forwards the Onion.
- Notes:
- Description based on publisher supplied metadata and other sources.
- ISBN:
- 9781492054818
- 149205481X
- 9781492054832
- 1492054836
- 9781492054856
- 1492054852
- OCLC:
- 1289816509
The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.