Mastering Bitcoin

by Andreas M. Antonopoulos, David A. Harding

Blockchain

Book Details

Book Title

Programming the Open Blockchain

Author

Andreas M. Antonopoulos, David A. Harding

Publisher

O′Reilly

Publication Date

2023

ISBN

1098150090

Number of Pages

403

Language

English

Format

PDF

File Size

6.30MB

Subject

Development in Decentralized Blockchains

Table of Contents

  • Cover
  • Copyright
  • Table of Contents
  • Preface
  • Chapter 1. Introduction
  • History of Bitcoin
  • Getting Started
  • Chapter 2. How Bitcoin Works
  • Bitcoin Overview
  • Buying from an Online Store
  • Bitcoin Transactions
  • Constructing a Transaction
  • Bitcoin Mining
  • Spending the Transaction
  • Chapter 3. Bitcoin Core: The Reference Implementation
  • From Bitcoin to Bitcoin Core
  • Bitcoin Development Environment
  • Compiling Bitcoin Core from the Source Code
  • Running a Bitcoin Core Node
  • Configuring the Bitcoin Core Node
  • Bitcoin Core API
  • Alternative Clients, Libraries, and Toolkits
  • Chapter 4. Keys and Addresses
  • Public Key Cryptography
  • Output and Input Scripts
  • IP Addresses: The Original Address for Bitcoin (P2PK)
  • Legacy Addresses for P2PKH
  • Base58check Encoding
  • Compressed Public Keys
  • Legacy Pay to Script Hash (P2SH)
  • Bech32 Addresses
  • Advanced Keys and Addresses
  • Chapter 5. Wallet Recovery
  • Independent Key Generation
  • A Wallet Technology Stack in Detail
  • Chapter 6. Transactions
  • A Serialized Bitcoin Transaction
  • Version
  • Extended Marker and Flag
  • Inputs
  • Outputs
  • Witness Structure
  • Lock Time
  • Coinbase Transactions
  • Weight and Vbytes
  • Legacy Serialization
  • Chapter 7. Authorization and Authentication
  • Transaction Scripts and Script Language
  • Scripted Multisignatures
  • Pay to Script Hash
  • Data Recording Output (OP_RETURN)
  • Scripts with Flow Control (Conditional Clauses)
  • Complex Script Example
  • Merklized Alternative Script Trees (MAST)
  • Pay to Contract (P2C)
  • Scriptless Multisignatures and Threshold Signatures
  • Taproot
  • Tapscript
  • Chapter 8. Digital Signatures
  • How Digital Signatures Work
  • Schnorr Signatures
  • ECDSA Signatures
  • The Importance of Randomness in Signatures
  • Segregated Witness’s New Signing Algorithm
  • Chapter 9. Transaction Fees
  • Who Pays the Transaction Fee?
  • Fees and Fee Rates
  • Estimating Appropriate Fee Rates
  • Replace By Fee (RBF) Fee Bumping
  • Child Pays for Parent (CPFP) Fee Bumping
  • Package Relay
  • Transaction Pinning
  • CPFP Carve Out and Anchor Outputs
  • Adding Fees to Transactions
  • Timelock Defense Against Fee Sniping
  • Chapter 10. The Bitcoin Network
  • Node Types and Roles
  • The Network
  • Compact Block Relay
  • Private Block Relay Networks
  • Network Discovery
  • Full Nodes
  • Exchanging “Inventory”
  • Lightweight Clients
  • Bloom Filters
  • Compact Block Filters
  • Lightweight Clients and Privacy
  • Encrypted and Authenticated Connections
  • Mempools and Orphan Pools
  • Chapter 11. The Blockchain
  • Structure of a Block
  • Block Header
  • Block Identifiers: Block Header Hash and Block Height
  • The Genesis Block
  • Linking Blocks in the Blockchain
  • Merkle Trees
  • Merkle Trees and Lightweight Clients
  • Bitcoin’s Test Blockchains
  • Using Test Blockchains for Development
  • Chapter 12. Mining and Consensus
  • Bitcoin Economics and Currency Creation
  • Decentralized Consensus
  • Independent Verification of Transactions
  • Mining Nodes
  • Constructing the Block Header
  • Mining the Block
  • Median Time Past (MTP)
  • Successfully Mining the Block
  • Validating a New Block
  • Assembling and Selecting Chains of Blocks
  • Mining and the Hash Lottery
  • Hashrate Attacks
  • Changing the Consensus Rules
  • Chapter 13. Bitcoin Security
  • Security Principles
  • User Security Best Practices
  • Chapter 14. Second-Layer Applications
  • Building Blocks (Primitives)
  • Applications from Building Blocks
  • Colored Coins
  • Payment Channels and State Channels
  • Routed Payment Channels (Lightning Network)
  • Appendix A. The Bitcoin Whitepaper by Satoshi Nakamoto
  • Bitcoin - A Peer-to-Peer Electronic Cash System
  • License
  • Appendix B. Errata to the Bitcoin Whitepaper
  • Abstract
  • Transactions
  • Proof of Work
  • Reclaiming Disk Space
  • Simplified Payment Verification
  • Privacy
  • Calculations
  • Appendix C. Bitcoin Improvement Proposals
  • Index
  • About the Authors
  • Colophon