Blockchain for Dummies® Published By: John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030-5774
Total Page:16
File Type:pdf, Size:1020Kb
Blockchain Blockchain by Tiana Laurence Blockchain For Dummies® Published by: John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030-5774, www.wiley.com Copyright © 2017 by John Wiley & Sons, Inc., Hoboken, New Jersey Published simultaneously in Canada No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without the prior written permission of the Publisher. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at http://www.wiley.com/go/ permissions. Trademarks: Wiley, For Dummies, the Dummies Man logo, Dummies.com, Making Everything Easier, and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc. and may not be used without written permission. All other trademarks are the property of their respective owners. John Wiley & Sons, Inc. is not associated with any product or vendor mentioned in this book. LIMIT OF LIABILITY/DISCLAIMER OF WARRANTY: THE PUBLISHER AND THE AUTHOR MAKE NO REPRESENTATIONS OR WARRANTIES WITH RESPECT TO THE ACCURACY OR COMPLETENESS OF THE CONTENTS OF THIS WORK AND SPECIFICALLY DISCLAIM ALL WARRANTIES, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE. NO WARRANTY MAY BE CREATED OR EXTENDED BY SALES OR PROMOTIONAL MATERIALS. THE ADVICE AND STRATEGIES CONTAINED HEREIN MAY NOT BE SUITABLE FOR EVERY SITUATION. THIS WORK IS SOLD WITH THE UNDERSTANDING THAT THE PUBLISHER IS NOT ENGAGED IN RENDERING LEGAL, ACCOUNTING, OR OTHER PROFESSIONAL SERVICES. IF PROFESSIONAL ASSISTANCE IS REQUIRED, THE SERVICES OF A COMPETENT PROFESSIONAL PERSON SHOULD BE SOUGHT. NEITHER THE PUBLISHER NOR THE AUTHOR SHALL BE LIABLE FOR DAMAGES ARISING HEREFROM. THE FACT THAT AN ORGANIZATION OR WEBSITE IS REFERRED TO IN THIS WORK AS A CITATION AND/OR A POTENTIAL SOURCE OF FURTHER INFORMATION DOES NOT MEAN THAT THE AUTHOR OR THE PUBLISHER ENDORSES THE INFORMATION THE ORGANIZATION OR WEBSITE MAY PROVIDE OR RECOMMENDATIONS IT MAY MAKE. FURTHER, READERS SHOULD BE AWARE THAT INTERNET WEBSITES LISTED IN THIS WORK MAY HAVE CHANGED OR DISAPPEARED BETWEEN WHEN THIS WORK WAS WRITTEN AND WHEN IT IS READ. For general information on our other products and services, please contact our Customer Care Department within the U.S. at 877-762-2974, outside the U.S. at 317-572-3993, or fax 317-572-4002. For technical support, please visit https://hub.wiley.com/community/support/dummies. Wiley publishes in a variety of print and electronic formats and by print-on-demand. Some material included with standard print versions of this book may not be included in e-books or in print-on-demand. If this book refers to media such as a CD or DVD that is not included in the version you purchased, you may download this material at http://booksupport.wiley.com. For more information about Wiley products, visit www.wiley.com. Library of Congress Control Number: 2017936813 ISBN 978-1-119-36559-4 (pbk); ISBN 978-1-119-36561-7 (ebk); ISBN 978-1-119-36560-0 (ebk) Manufactured in the United States of America 10 9 8 7 6 5 4 3 2 1 Contents at a Glance Introduction. .1 Part 1: Getting Started with Blockchain. ..5 CHAPTER 1: Introducing Blockchain . .7 CHAPTER 2: Picking a Blockchain. ..17 CHAPTER 3: Getting Your Hands on Blockchain . .25 Part 2: Developing Your Knowledge. .39 CHAPTER 4: Beholding the Bitcoin Blockchain. .41 CHAPTER 5: Encountering the Ethereum Blockchain. .51 CHAPTER 6: Regarding the Ripple Blockchain. .65 CHAPTER 7: Finding the Factom Blockchain. .75 CHAPTER 8: Digging into DigiByte . .89 Part 3: Powerful Blockchain Platforms. .97 CHAPTER 9: Getting Your Hands on Hyperledger. ..99 CHAPTER 10: Applying Microsoft Azure . 109. CHAPTER 11: Getting Busy on IBM Bluemix. 119. Part 4: Industry Impacts. 129. CHAPTER 12: Financial Technology . 131. CHAPTER 13: Real Estate. 141. CHAPTER 14: Insurance. 151. CHAPTER 15: Government. 159. CHAPTER 16: Other Industries . 171. Part 5: The Part of Tens. 179. CHAPTER 17: Ten Free Blockchain Resources. 181. CHAPTER 18: The Ten Rules to Never Break on the Blockchain. 185. CHAPTER 19: Ten Top Blockchain Projects. 193. Index. 201. Table of Contents INTRODUCTION . ..1 About This Book. 1. Foolish Assumptions. 2. Icons Used in This Book. 2. Beyond the Book. 3. Where to Go from Here. 3. PART 1: GETTING STARTED WITH BLOCKCHAIN . .5 CHAPTER 1: Introducing Blockchain. .7 Beginning at the Beginning: What Blockchains Are. 7. What blockchains do. 8. Why blockchains matter. 9. The Structure of Blockchains. 10. Blockchain Applications. 11. The Blockchain Life Cycle. 11. Consensus: The Driving Force of Blockchains. 12. Blockchains in Use. 14. Current blockchain uses. 14. Future blockchain applications. 15. CHAPTER 2: Picking a Blockchain. ..17 Where Blockchains Add Substance. 17. Determining your needs. 18. Defining your goal. 19. Choosing a Solution . 19. Drawing a blockchain decision tree. 21. Making a plan. 22. CHAPTER 3: Getting Your Hands on Blockchain. .25 Diving into the Bitcoin Blockchain. 25. Creating your first Bitcoin wallet. 26. Creating a second Bitcoin wallet. 27. Generating a Bitcoin vanity address. 27. Transferring your vanity address . 28. Making an entry into the Bitcoin blockchain. 29. Reading a blockchain entry in Bitcoin . .29 Using Smart Contracts with Bitcoin . 30. Building your first smart bond . .31 Checking the status of your contract. 33. Table of Contents vii Building a Private Blockchain with Docker and Ethereum . 34. Preparing your computer. 34. Building your blockchain . 36. PART 2: DEVELOPING YOUR KNOWLEDGE. ..39 CHAPTER 4: Beholding the Bitcoin Blockchain . ..41 Getting a Brief History of the Bitcoin Blockchain. 42. Debunking Some Common Bitcoin Misconceptions. 45. Bitcoin: The New Wild West. 47. Fake sites . 47. No, you first!. 47. Get-rich-quick schemes . 48. Mining for Bitcoins . 48. Making Your First Paper Wallet. 49. CHAPTER 5: Encountering the Ethereum Blockchain . ..51 Exploring the Brief History of Ethereum. 52. Ethereum: The Open-Source World Wide Computer. 53. Decentralized applications: Welcome to the future. 54. The power of decentralized autonomous organizations. 54. Hacking a Blockchain . 57. Understanding smart contracts . 58. Discovering the cryptocurrency Ether . 58. Getting Up and Running on Ethereum. 59. Mining for ether. 59. Setting up your Ethereum wallet. 60. Building Your First Decentralized Autonomous Organization. 60. Test net and congress. 61. Governance and voting . .62 Uncovering the Future of DAOs . 63. Putting money in a DAO. 63. Building smarter smart contracts. 64. Finding bugs in the system . 64. CHAPTER 6: Regarding the Ripple Blockchain. .65 Getting a Brief History of the Ripple Blockchain. 66. Ripple: It’s All About Trust . 67. Seeing How Ripple Differs from Other Blockchains. 68. Unleashing the Full Power of Ripple. 71. Exercising Caution with Ripple . 72. viii Blockchain For Dummies CHAPTER 7: Finding the Factom Blockchain. .75 A Matter of Trust. 76. The purpose of the Factom blockchain: Publishing anything. 77. Incentives of federation. 78. Building on Factom. 81. Authenticating documents and building identities using APIs. 81. Getting to know the Factoid: Not a normal token . 81. Anchoring your application. 82. Publishing on Factom. 82. Building transparency in the mortgage industry . 84. Verifying physical documents: dLoc with Factom. 86. CHAPTER 8: Digging into DigiByte. ..89 Getting Familiar with DigiByte: The Fast Blockchain . 90. Mining on DigiByte . 91. Signing Documents on DigiByte’s DiguSign. 94. Earning DigiBytes While Gaming. 95. PART 3: POWERFUL BLOCKCHAIN PLATFORMS. ..97 CHAPTER 9: Getting Your Hands on Hyperledger. .99 Getting to Know Hyperledger: Dreams of a Hyper Future . 100. Focusing on Fabric. 101. Building your system in Fabric . .102 Diving into chaincode development. 102. Investigating the Iroha Project . .104 Introducing Sumeragi: The new consensus algorithm . .104 Developing mobile apps. 105. Diving into Sawtooth Lake. 106. Exploring the consensus algorithm: Proof of Elapsed Time. 107. Deploying Sawtooth . 107. CHAPTER 10: Applying Microsoft Azure . 109. Bletchley: The Modular Blockchain Fabric. 109. Cryptlets for encrypting and authenticating. 111. Utility and Contract Cryptlets and CrytoDelegates. 112. Building in the Azure Ecosystem. 113. Getting Started with Chain on Azure . 114. Installing Chain’s distributed ledger. 115. Creating your own private network . 115. Using financial services on Azure’s Chain . 116. Table of Contents ix Deploying Blockchain Tools on Azure . 116. Exploring Ethereum on Azure. ..