BitCoin and cryptocurrencies OREILLY MASTERING BITCOIN 2014 RETAIL EBOOK ke

298 168 0
BitCoin and cryptocurrencies OREILLY MASTERING BITCOIN 2014 RETAIL EBOOK ke

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Mastering Bitcoin Bitcoin, the first successful decentralized digital currency, is still in its infancy and it’s already spawned a multi-billion dollar global economy This economy is open to anyone with the knowledge and passion to participate Mastering Bitcoin provides you with the knowledge you need (passion not included) This book includes: ■■ A broad introduction to bitcoin—ideal for non-tech users, investors, and business executives ■■ Technical foundations of bitcoin and cryptographic currencies for developers, engineers, and software and systems architects ■■ Details of the bitcoin decentralized network, peer-to-peer architecture, transaction lifecycle, and security principles ■■ Offshoots of the bitcoin and blockchain inventions, including alternative chains, currencies, and applications ■■ User stories, elegant analogies, examples, and code snippets illustrating key technical concepts E-COMMERCE US $34.99 asked 'but how does it really work?' Now I have a great answer for that question, because anybody who reads Mastering Bitcoin will have a deep understanding of how it works and will be well-equipped to write the next generation of amazing cryptocurrency applications ” —Gavin Andresen Chief Scientist, Bitcoin Foundation book will help “ Andreas' you join the software Bitcoin UNLOCKING DIGITAL CRYPTOCURRENCIES revolution in the world of finance ” Mastering —Naval Ravikant cofounder, AngelList Twitter: @oreillymedia facebook.com/oreilly Antonopoulos Andreas M Antonopoulos is a noted technologist and serial entrepreneur who has become one of the most well-known and well-respected figures in bitcoin An engaging public speaker, teacher, and writer, Andreas makes complex subjects accessible and easy to understand Andreas advises multiple technology startups and speaks regularly at conferences and community events around the world I talk about “ When Bitcoin, I am sometimes Mastering Bitcoin Want to join the technological revolution that’s taking the world of finance by storm? Mastering Bitcoin is your guide through the seemingly complex world of bitcoin, providing the requisite knowledge to help you participate in the internet of money Whether you’re building the next killer app, investing in a startup, or simply curious about the technology, this practical book is essential reading CAN $36.99 ISBN: 978-1-449-37404-4 Andreas M Antonopoulos Mastering Bitcoin Bitcoin, the first successful decentralized digital currency, is still in its infancy and it’s already spawned a multi-billion dollar global economy This economy is open to anyone with the knowledge and passion to participate Mastering Bitcoin provides you with the knowledge you need (passion not included) This book includes: ■■ A broad introduction to bitcoin—ideal for non-tech users, investors, and business executives ■■ Technical foundations of bitcoin and cryptographic currencies for developers, engineers, and software and systems architects ■■ Details of the bitcoin decentralized network, peer-to-peer architecture, transaction lifecycle, and security principles ■■ Offshoots of the bitcoin and blockchain inventions, including alternative chains, currencies, and applications ■■ User stories, elegant analogies, examples, and code snippets illustrating key technical concepts E-COMMERCE US $34.99 asked 'but how does it really work?' Now I have a great answer for that question, because anybody who reads Mastering Bitcoin will have a deep understanding of how it works and will be well-equipped to write the next generation of amazing cryptocurrency applications ” —Gavin Andresen Chief Scientist, Bitcoin Foundation book will help “ Andreas' you join the software Bitcoin UNLOCKING DIGITAL CRYPTOCURRENCIES revolution in the world of finance ” Mastering —Naval Ravikant cofounder, AngelList Twitter: @oreillymedia facebook.com/oreilly Antonopoulos Andreas M Antonopoulos is a noted technologist and serial entrepreneur who has become one of the most well-known and well-respected figures in bitcoin An engaging public speaker, teacher, and writer, Andreas makes complex subjects accessible and easy to understand Andreas advises multiple technology startups and speaks regularly at conferences and community events around the world I talk about “ When Bitcoin, I am sometimes Mastering Bitcoin Want to join the technological revolution that’s taking the world of finance by storm? Mastering Bitcoin is your guide through the seemingly complex world of bitcoin, providing the requisite knowledge to help you participate in the internet of money Whether you’re building the next killer app, investing in a startup, or simply curious about the technology, this practical book is essential reading CAN $36.99 ISBN: 978-1-449-37404-4 Andreas M Antonopoulos Praise for Mastering Bitcoin “When I talk about bitcoin to general audiences, I am sometimes asked but how does it really work? Now I have a great answer for that question, because anybody who reads Mastering Bitcoin will have a deep understanding of how it works and will be well-equipped to write the next generation of amazing cryptocurrency applications.” — Gavin Andresen Chief Scientist Bitcoin Foundation “Bitcoin and blockchain technologies are becoming fundamental building blocks for the next generation internet Silicon Valley’s best and brightest are working on it Andreas’ book will help you join the software revolution in the world of finance.” — Naval Ravikant Cofounder AngelList “Mastering Bitcoin is the best technical reference available on bitcoin today And bitcoin is likely to be seen in retrospect as the most important technology of this decade As such, this book is an absolute must-have for any developer, especially those interested in building applications with the bitcoin protocol Highly recommended.” — Balaji S Srinivasan (@balajis) General Partner Mastering Bitcoin Andreas M Antonopoulos Mastering Bitcoin by Andreas M Antonopoulos Copyright © 2015 Andreas M Antonopoulos LLC All rights reserved Printed in the United States of America Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472 O’Reilly books may be purchased for educational, business, or sales promotional use Online editions are also available for most titles (http://safaribooksonline.com) For more information, contact our corporate/ institutional sales department: 800-998-9938 or corporate@oreilly.com Editors: Mike Loukides and Allyson MacDonald Production Editor: Melanie Yarbrough Copyeditor: Kim Cofer Proofreader: Carla Thornton December 2014: Indexer: WordCo Indexing Services Cover Designer: Karen Montgomery Interior Designer: David Futato Illustrator: Rebecca Demarest First Edition Revision History for the First Edition: 2014-12-01: First release See http://oreilly.com/catalog/errata.csp?isbn=9781449374044 for release details The O’Reilly logo is a registered trademark of O’Reilly Media, Inc Mastering Bitcoin, the cover image, and related trade dress are trademarks of O’Reilly Media, Inc Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks Where those designations appear in this book, and O’Reilly Media, Inc was aware of a trademark claim, the designations have been printed in caps or initial caps While the publisher and the author have used good faith efforts to ensure that the information and instruc‐ tions contained in this work are accurate, the publisher and the author disclaim all responsibility for errors or omissions, including without limitation responsibility for damages resulting from the use of or reliance on this work Use of the information and instructions contained in this work is at your own risk If any code samples or other technology this work contains or describes is subject to open source licenses or the intel‐ lectual property rights of others, it is your responsibility to ensure that your use thereof complies with such licenses and/or rights ISBN: 978-1-449-37404-4 [LSI] Table of Contents Preface xi Quick Glossary xix Introduction What Is Bitcoin? History of Bitcoin Bitcoin Uses, Users, and Their Stories Getting Started Quick Start Getting Your First Bitcoins Sending and Receiving Bitcoins 10 How Bitcoin Works 15 Transactions, Blocks, Mining, and the Blockchain Bitcoin Overview Buying a Cup of Coffee Bitcoin Transactions Common Transaction Forms Constructing a Transaction Getting the Right Inputs Creating the Outputs Adding the Transaction to the Ledger Bitcoin Mining Mining Transactions in Blocks Spending the Transaction 15 16 16 18 20 21 22 23 24 25 27 28 The Bitcoin Client 31 Bitcoin Core: The Reference Implementation Running Bitcoin Core for the First Time 31 31 v Compiling Bitcoin Core from the Source Code Using Bitcoin Core’s JSON-RPC API from the Command Line Getting Information on the Bitcoin Core Client Status Wallet Setup and Encryption Wallet Backup, Plain-text Dump, and Restore Wallet Addresses and Receiving Transactions Exploring and Decoding Transactions Exploring Blocks Creating, Signing, and Submitting Transactions Based on Unspent Outputs Alternative Clients, Libraries, and Toolkits Libbitcoin and sx Tools pycoin btcd 33 38 40 41 42 42 44 48 49 56 56 57 58 Keys, Addresses, Wallets 61 Introduction Public Key Cryptography and Cryptocurrency Private and Public Keys Private Keys Public Keys Elliptic Curve Cryptography Explained Generating a Public Key Bitcoin Addresses Base58 and Base58Check Encoding Key Formats Implementing Keys and Addresses in Python Wallets Nondeterministic (Random) Wallets Deterministic (Seeded) Wallets Mnemonic Code Words Hierarchical Deterministic Wallets (BIP0032/BIP0044) Advanced Keys and Addresses Encrypted Private Keys (BIP0038) Pay-to-Script Hash (P2SH) and Multi-Sig Addresses Vanity Addresses Paper Wallets 61 62 63 63 65 65 68 70 72 76 81 84 85 85 86 87 97 97 98 99 104 Transactions 109 Introduction Transaction Lifecycle Creating Transactions Broadcasting Transactions to the Bitcoin Network vi | Table of Contents 109 109 110 110 Propagating Transactions on the Bitcoin Network Transaction Structure Transaction Outputs and Inputs Transaction Outputs Transaction Inputs Transaction Fees Adding Fees to Transactions Transaction Chaining and Orphan Transactions Transaction Scripts and Script Language Script Construction (Lock + Unlock) Scripting Language Turing Incompleteness Stateless Verification Standard Transactions Pay-to-Public-Key-Hash (P2PKH) Pay-to-Public-Key Multi-Signature Data Output (OP_RETURN) Pay-to-Script-Hash (P2SH) 111 111 112 113 115 118 119 120 121 122 123 126 126 126 127 128 129 130 132 The Bitcoin Network 137 Peer-to-Peer Network Architecture Nodes Types and Roles The Extended Bitcoin Network Network Discovery Full Nodes Exchanging “Inventory” Simplified Payment Verification (SPV) Nodes Bloom Filters Bloom Filters and Inventory Updates Transaction Pools Alert Messages 137 138 139 142 145 146 147 150 155 156 157 The Blockchain 159 Introduction 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 Simplified Payment Verification (SPV) 159 160 160 161 162 163 164 170 Table of Contents | vii Mining and Consensus 173 Introduction Bitcoin Economics and Currency Creation Decentralized Consensus Independent Verification of Transactions Mining Nodes Aggregating Transactions into Blocks Transaction Age, Fees, and Priority The Generation Transaction Coinbase Reward and Fees Structure of the Generation Transaction Coinbase Data Constructing the Block Header Mining the Block Proof-Of-Work Algorithm Difficulty Representation Difficulty Target and Retargeting Successfully Mining the Block Validating a New Block Assembling and Selecting Chains of Blocks Blockchain Forks Mining and the Hashing Race The Extra Nonce Solution Mining Pools Consensus Attacks 173 174 176 177 179 179 180 182 183 184 185 187 188 188 194 195 197 197 198 199 204 206 207 210 Alternative Chains, Currencies, and Applications 215 A Taxonomy of Alternative Currencies and Chains Meta Coin Platforms Colored Coins Mastercoin Counterparty Alt Coins Evaluating an Alt Coin Monetary Parameter Alternatives: Litecoin, Dogecoin, Freicoin Consensus Innovation: Peercoin, Myriad, Blackcoin, Vericoin, NXT Dual-Purpose Mining Innovation: Primecoin, Curecoin, Gridcoin Anonymity-Focused Alt Coins: CryptoNote, Bytecoin, Monero, Zerocash/ Zerocoin, Darkcoin Noncurrency Alt Chains Namecoin Bitmessage viii | Table of Contents 216 216 217 218 218 218 219 220 221 223 225 226 226 228 ... Cryptography and Cryptocurrency Private and Public Keys Private Keys Public Keys Elliptic Curve Cryptography Explained Generating a Public Key Bitcoin Addresses Base58 and Base58Check Encoding Key Formats... What Is Bitcoin? History of Bitcoin Bitcoin Uses, Users, and Their Stories Getting Started Quick Start Getting Your First Bitcoins Sending and Receiving Bitcoins 10 How Bitcoin Works ... the bitcoin protocol Highly recommended.” — Balaji S Srinivasan (@balajis) General Partner Mastering Bitcoin Andreas M Antonopoulos Mastering Bitcoin by Andreas M Antonopoulos Copyright © 2015 Andreas

Ngày đăng: 06/03/2019, 10:36

Từ khóa liên quan

Mục lục

  • Copyright

  • Table of Contents

  • Preface

    • Writing the Bitcoin Book

    • Intended Audience

    • Why Are There Bugs on the Cover?

    • Conventions Used in This Book

    • Code Examples

    • Using Code Examples

    • Safari® Books Online

    • How to Contact Us

    • Acknowledgments

      • Early Release Draft (GitHub Contributions)

      • Quick Glossary

      • Chapter 1. Introduction

        • What Is Bitcoin?

        • History of Bitcoin

        • Bitcoin Uses, Users, and Their Stories

        • Getting Started

          • Quick Start

          • Getting Your First Bitcoins

          • Sending and Receiving Bitcoins

          • Chapter 2. How Bitcoin Works

            • Transactions, Blocks, Mining, and the Blockchain

              • Bitcoin Overview

              • Buying a Cup of Coffee

Tài liệu cùng người dùng

Tài liệu liên quan