logo资料库

Blockchain基础(英文书).pdf

第1页 / 共246页
第2页 / 共246页
第3页 / 共246页
第4页 / 共246页
第5页 / 共246页
第6页 / 共246页
第7页 / 共246页
第8页 / 共246页
资料共246页,剩余部分请下载后查看
Contents
Intro
Terminology & Technical Foundations
1: Thinking in Layers and Aspects
The Metaphor
Layers of a Software System
Application vs. Implementation
Functional vs. Nonfunctional Aspects
Considering Two Layers at the Same Time
Integrity
Outlook
Summary
2: Seeing the Big Picture
The Metaphor
A Payment System
Two Types of Software Architecture
The Advantages of Distributed Systems
Higher Computing Power
Cost Reduction
Higher Reliability
Ability to Grow Naturally
The Disadvantages of Distributed Systems
Coordination Overhead
Communication Overhead
Dependencies on Networks
Higher Program Complexity
Security Issues
Distributed Peer-to-Peer Systems
Mixing Centralized and Distributed Systems
Identifying Distributed Systems
The Purpose of the Blockchain
Outlook
Summary
3: Recognizing the Potential
The Metaphor
How a Peer-to-Peer System Changed a Whole Industry
The Potential of Peer-to-Peer Systems
Terminology and the Link to the Blockchain
The Definition of a Peer-to-Peer System
Architecture of Peer-to-Peer Systems
The Link Between Peer-to-Peer Systems and the Blockchain
The Potential of the Blockchain
Outlook
Summary
Why Blockchain s needed
4: Discovering the Core Problem
The Metaphor
Trust and Integrity in Peer-to-Peer Systems
Integrity Threats in Peer-to-Peer Systems
Technical Failures
Malicious Peers
The Core Problem to Be Solved by the Blockchain
Outlook
Summary
5: Disambiguating the Term
The Term
A Data Structure
An Algorithm
A Suite of Technologies
An Umbrella Term for Purely Distributed Peer-to-Peer Systems with a Common Application Area
The Usage of the Term in This Book
Provisional Definition
The Role of Managing Ownership
The Application Area of the Blockchain in This Book
Outlook
Summary
6: Nature of Ownership
The Metaphor
Ownership and Witnesses
Foundations of Ownership
A Short Detour to Security
Identification
Authentication
Authorization
Purposes and Properties of a Ledger
Ownership and the Blockchain
Outlook
Summary
7: Spending Money Twice
The Metaphor
The Double Spending Problem
The Term
Double Spending as a Problem of Copying Digital Goods
Double Spending as a Problem of Distributed Peer-to-Peer Systems of Ledgers
Double Spending as an Example of Violated Integrity in Distributed Peer-to-Peer Systems
How to Solve the Double Spending Problem
Solving Double Spending as a Problem of Copying Digital Goods
Solving Double Spending as a Problem of a Distributed Peer-to-Peer System of Ledgers
Solving Double Spending as an Example of Violated Integrity in Distributed Peer-to-Peer Systems
The Usage of Double Spending in This Book
Outlook
Summary
How Blockchain works
8: Planning the Blockchain
The Goal
Starting Point
The Path to Follow
Task 1: Describing Ownership
Task 2: Protecting Ownership
Task 3: Storing Transaction Data
Task 4: Preparing Ledgers to Be Distributed in an Untrustworthy Environment
Task 5: Distributing the Ledgers
Task 6: Adding New Transactions to the Ledgers
Task 7: Deciding Which Ledgers Represent the Truth
Outlook
Summary
9: Documenting Ownership
The Metaphor
The Goal
The Challenge
The Idea
A Short Detour to Inventory and Transaction Data
How It Works
Describing the Transfer of Ownership
Maintaining the History of Transfers
Why It Works
Importance of Ordering
Integrity of the Transaction History
Formal Correctness
Semantic Correctness
Authorization
Outlook
Summary
10: Hashing Data
The Metaphor
The Goal
How It Works
Providing Hash Values for Any Data Quickly
Deterministic
Pseudorandom
One-Way Function
Collision Resistant
Trying It Out Yourself
Patterns of Hashing Data
Independent Hashing
Repeated Hashing
Combined Hashing
Sequential Hashing
Hierarchical Hashing
Outlook
Summary
11: Hashing in the Real World
Comparing Data
The Goal
The Idea
How It Works
Why It Works
Detecting Changes in Data
The Goal
The Idea
How It Works
Why It Works
Referring to Data in a Change-Sensitive Manner
The Goal
The Idea
How It Works
A Schematic Illustration
Why It Works
Storing Data in a Change-Sensitive Manner
The Goal
The Idea
How It Works
The Chain
The Tree
Why It Works
Causing Time-Consuming Computations
The Goal
The Idea
How It Works
An Illustrative Example
The Difficulty Level
Why It Works
Usage of Hashing in the Blockchain
Outlook
Summary
12: Identifying & Protecting Accounts
The Metaphor
The Goal
The Challenge
The Idea
A Short Detour to Cryptography
The Major Idea of Cryptography
Terminology2
Symmetric Cryptography
Asymmetric Cryptography
Asymmetric Cryptography in the Real World
Creating and Distributing the Keys
Using the Keys
Public to Private
Private to Public
Asymmetric Cryptography in the Blockchain
Identifying Accounts
Authorizing Transactions
Outlook
Summary
13: Authorizing Transactions
The Metaphor
The Goal
The Challenge
The Idea
A Short Detour to Digital Signatures
Creating a Signature
Verifying Data by Using the Signature
Identifying Fraud by Using the Signature
How It Works
Signing a Transaction
Verifying a Transaction
Why It Works
Outlook
Summary
14: Storing Transaction Data
The Metaphor
The Goal
The Challenge
The Idea
Transforming a Book into a Blockchain-Data-Structure
Starting Point: A Book
Transformation 1: Making Page Dependency Explicit
Transformation 2: Outsourcing the Content
Transformation 3: Replacing Page Numbers
Transformation 4: Creating Reference Numbers
Transformation 5: Getting Rid of the Book Spine
Goal Achieved: Appreciating the Result
The Blockchain-Data-Structure
The Mental Unit of a Page of the Ordering Catalog and Its Corresponding Content Page
Ordering Catalog
Content Pages
Catalog Page Reference Numbers
Content Reference Numbers
Storing Transactions in the Blockchain-Data-Structure
Outlook
Summary
15: Using the Data Store
The Metaphor
Adding New Transactions
Detecting Changes
Changing the Content of Transaction Data
Changing a Reference in the Merkle Tree
Replacing a Transaction
Changing the Merkle Root
Changing a Block Header Reference
Changing Data Orderly
Intended vs. Unintended Changes
Outlook
Summary
16: Protecting the Data Store
The Metaphor
The Goal
The Challenge
The Idea
A Short Detour to Immutability
How It Works: The Big Picture
Making Manipulations Stand Out
Enforcing Rewriting the History for Embedding Changes
Making Adding Data Computationally Expensive
How It Works: The Details
Compulsory Data
The Process of Creating A New Block
Validation Rules
Why It Works
The Costs of Manipulating the Blockchain-Data-Structure
The Immutable Data Store in the Real World
Outlook
Summary
17: Distributing the Data Store among Peers
The Metaphor
The Goal
The Challenge
The Idea
How It Works: The Overview1
How It Works: The Details
Keeping Existing Connections Alive
Establishing New Connections
Distributing New Information
Why It Works
Outlook
Summary
18: Verif ying & Adding Transactions
The Metaphor
Consequences
The Goal
The Challenge
The Idea
How It Works: The Building Blocks
Validation Rules
Validation Rules for Transaction Data
Validation Rules for Block Headers
Reward
Punishment
Competition
Speed Competition
Quality Competition
Peer Control
How It Works: The Skeleton
How It Works: The Details
Why It Works
Dealing with Dishonest Behavior
Outlook
Summary
19: Choosing a Transaction History
The Metaphor
The Goal
The Challenge
The Idea
How It Works
The Longest-Chain-Criterion
The Heaviest-Chain-Criterion
Consequences of Selecting One Chain
Orphan Blocks
Reclaimed Reward
Clarifying Ownership
Reprocessing of Transactions
A Growing Common Trunk
Eventual Consistency
Robustness Against Manipulations
Threats to the Voting Schema
The Role of the Hash Puzzle
Why It Works
Outlook
Summary
20: Paying for Integrity
The Metaphor
The Role of Fees Within the Blockchain
Impact on the Integrity of the System
Impact on the Openness of the System
Impact on the Distributed Nature of the System
Impact on the Philosophy of the System
Desirable Properties of an Instrument of Payment for Compensating Peers
A Detour to the Emergence of Cryptographic Currencies
Outlook
Summary
21: Bringing the Pieces Together
Reviewing Concepts and Technologies
What Is the Blockchain?
The Purpose of the Blockchain: Functional Aspects of the Application Layer
Clarifying Ownership
Transferring Ownership
Properties of the Blockchain: Nonfunctional Aspects
Highly Available
Censorship Proof
Reliable
Open
Pseudoanonymous
Secure
Resilient
Eventually Consistent
Keeping Integrity
Internal Functioning: Functional Aspects of the Implementation Layer
Ownership Logic
Transaction Security
Transaction Processing Logic
Storage Logic
Peer-to-Peer Architecture
Consensus Logic
Gaining Abstraction
Outlook
Summary
Limitations
22: Seeing the Limitations
The Challenge
Technical Limitations of the Blockchain
Lack of Privacy
The Security Model
Limited Scalability
High Costs
Hidden Centrality
Lack of Flexibility
Critical Size
Nontechnical Limitations of the Blockchain
Lack of Legal Acceptance
Lack of User Acceptance
Overcoming the Limitations
Technical Limitations
Nontechnical Limitations
Outlook
Summary
23: Reinventing the Blockchain
The Metaphor
Conflicting Goals of the Blockchain
Transparency vs. Privacy
Security vs. Speed
The Roots of the Conflicts
Solving the Conflicts
Deciding on Transparency vs. Privacy
Deciding on Security vs. Speed
Four Versions of the Blockchain
Consequences
The Peer-to-Peer Architecture
The Distributed Nature
Purpose
Reviewing the Purpose of the Blockchain
The Usage of the Term Blockchain in the Remainder of This Book
Outlook
Summary
Using Blockchain, Summary & Outlook
24: Using the Blockchain
The Metaphor
Characteristics of the Blockchain
Generic Application Patterns
Proof of Existence
Proof of Nonexistence
Proof of Time
Proof of Order
Proof of Identity
Proof of Authorship
Proof of Ownership
Specific Use Cases
Analyzing Blockchain Applications
Are the Requirements for Using the Blockchain Fulfilled?
What Kind of Blockchain Is Used?
What Is the Added Value of Using the Purely Peer-to-Peer System?
What Is the Application Idea?
What Is the Business Case?
How Are Peers Compensated for Contributing Resources to the System and Maintaining Integrity?
Outlook
Summary
25: Summarizing and Going Further
The Metaphor
Further Developments and Alternatives
Minor Technical Improvements and Variations
Improving Scalability
Conceptual Evolutions
Access Rights
Privacy
Consensus
Transactions
Inventory Data
Data Structure
Major Accomplishments of the Blockchain
Disintermediation
Automation
Standardization
Streamlining Processes
Increased Processing Speed
Cost Reduction
Shift Toward Trust in Protocols and Technology
Making Trust a Commodity
Increased Technology Awareness
Possible Disadvantages
Lack of Privacy
Loss of Responsibility
Loss of Jobs
Reintermediation
The Future
Limited Enthusiast Projects
Large-Scale Commercial Usage
Governmental Projects
Outlook
Summary
Index
BLOCKCHAIN BASICS A NON-TECHNICAL INTRODUCTION IN 25 STEPS Daniel Drescher
Blockchain Basics: A Non-Technical Introduction in 25 Steps Daniel Drescher Frankfurt am Main, Germany ISBN-13 (pbk): 978-1-4842-2603-2 DOI 10.1007/978-1-4842-2604-9 Library of Congress Control Number: 2017936232 Copyright © 2017 by Daniel Drescher ISBN-13 (electronic): 978-1-4842-2604-9 This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illus- trations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed. Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights. While the advice and information in this book are believed to be true and accurate at the date of publication, neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or omissions that may be made. The publisher makes no warranty, express or implied, with respect to the material contained herein. Managing Director: Welmoed Spahr Editorial Director: Todd Green Acquisitions Editor: Susan McDermott Development Editor: Laura Berendson Technical Reviewer: Laurence Kirk Coordinating Editor: Rita Fernando Copy Editor: Mary Bearden Compositor: SPi Global Indexer: SPi Global Artist: SPi Global Distributed to the book trade worldwide by Springer Science+Business Media New York, 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-ny@springer-sbm.com, or visit www.springeronline.com. Apress Media, LLC is a California LLC and the sole member (owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation. For information on translations, please e-mail rights@apress.com, or visit http://www.apress.com/rights-permissions. Apress titles may be purchased in bulk for academic, corporate, or promotional use. eBook versions and licenses are also available for most titles. For more information, reference our Print and eBook Bulk Sales web page at http://www.apress.com/bulk-sales. Any source code or other supplementary material referenced by the author in this book is available to readers on GitHub via the book’s product page, located at www.apress.com/9781484226032. For more detailed information, please visit http://www.apress.com/source-code. Printed on acid-free paper
Contents About the Author                                             vii About the Technical Reviewer                                      ix Introduction                                                     xi Stage 1: Terminology and Technical Foundations                   1 Step 1: Thinking in Layers and Aspects                          3 Seeing the Big Picture                                 9 Step 2: Step 3: Recognizing the Potential                              19 Stage I1: Why the Blockchain Is Needed                         27 Discovering the Core Problem                          29 Step 4: Step 5: Disambiguating the Term                              33 Understanding the Nature of Ownership                 39 Step 6: Step 7: Spending Money Twice                                49 Stage III: How the Blockchain Works                            55 Planning the Blockchain                               57 Step 8: Step 9: Documenting Ownership                              63 Step 10: Hashing Data                                        71 Step 11: Hashing in the Real World                             81 Step 12: Identifying and Protecting User Accounts                93 Step 13: Authorizing Transactions                             103 Step 14: Storing Transaction Data                             111 Step 15: Using the Data Store                                123 Step 16: Protecting the Data Store                            135 Step 17: Distributing the Data Store Among Peers               145 Step 18: Verif ying and Adding Transactions                      153 Step 19: Choosing a Transaction History                       165
vi Contents Step 20: Paying for Integrity                                  183 Step 21: Bringing the Pieces Together                          189 Stage IV: Limitations and How to Overcome Them               203 Step 22: Seeing the Limitations                               205 Step 23: Reinventing the Blockchain                           213 Stage V: Using the Blockchain, Summary, and Outlook            221 Step 24: Using the Blockchain                                 223 Step 25: Summarizing and Going Further                       235 Index                                                       249
Introduction This introduction answers the most important question that every author has to answer: Why should anyone read this book? Or more specifically: Why should anyone read another book about the blockchain? Continue reading and you will learn why this book was written, what you can expect from this book, what you cannot expect from this book, for whom the book was writ- ten, and how the book is structured. Why Another Book About the Blockchain? The blockchain has received a lot of attention in the public discussion and in the media. Some enthusiasts claim that the blockchain is the biggest invention since the emergence of the Internet. Hence, a lot of books and articles have been written in the past few years about the blockchain. However, if you want to learn more about how the blockchain works, you may find yourself lost in a universe of books that either quickly skim over the technical details or that discuss the underlying technical concepts at a highly formal level. The former may leave you unsatisfied because they miss to explain the technical details necessary to understand and appreciate the blockchain, while the latter may leave you unsatisfied because they already require the knowledge you want to acquire. This book fills the gap that exists between purely technical books about the blockchain, on the one hand, and the literature that is mostly concerned with specific applications or discussions about its expected economic impact or visions about its future, on the other hand. This book was written because a conceptual understanding of the technical foundations of the blockchain is necessary in order to understand specific blockchain applications, evaluate business cases of blockchain startups, or fol- low the discussion about its expected economic impacts. Without an appre- ciation of the underlying concepts, it will be impossible to assess the value or the potential impact of the blockchain in general or understand the added value of specific blockchain applications. This book focuses on the underlying concepts of the blockchain since a lack of understanding of a new technology can lead to being carried away with the hype and being disappointed later on because of unrealistic unsubstantiated expectations.
xii This book teaches the concepts that make up the blockchain in a nontechnical fashion and in a concise and comprehensible way. It addresses the three big questions that arise when being introduced to a new technology: What is it? Why do we need it? How does it work? What You Cannot Expect from This Book The book is deliberately agnostic to the application of the blockchain. While cryptocurrencies in general and Bitcoin in particular are prominent applica- tions of the blockchain, this book explains the blockchain as a general tech- nology. This approach has been chosen in order to highlight generic concepts and technical patterns of the blockchain instead of focusing on a specific and narrow application case. Hence, this book is: • Not a text specifically about Bitcoin or any other cryptocurrency • Not a text solely about one specific blockchain application • Not a text about proofing the mathematical foundations of the blockchain • Not a text about programming a blockchain • Not a text about the legal consequences and implications of the blockchain • Not a text about the social, economic, or ethical impacts of the blockchain on our society or humankind in general However, some of these points are addressed to some extent at appropriate points in this book. What You Can Expect from This Book This book explains the technical concepts of the blockchain such as transactions, hash values, cryptography, data structures, peer-to-peer systems, distributed systems, system integrity, and distributed consensus in a nontechnical fashion. The didactical approach of this book is based on four elements: • Conversational style • No mathematics and no formulas • • Use of metaphors and analogies Incremental steps through the problem domain Introduction
xiii Conversational Style This book is deliberately written in a conversational style. It does not use mathematical or computer science jargon in order to avoid any hurdle for nontechnical readers. However, the book introduces and explains the nec- essary terminology needed to join the discussion and to understand other publications about the blockchain. No Mathematics and No Formulas Major elements of the blockchain such as cryptography and algorithms are based on complex mathematical concepts, which in turn come with their own demanding and sometimes frightening mathematical notation and formulas. However, this book deliberately does not use any mathematical notation or formulas in order to avoid any unnecessary complexity or hurdle for nontech- nical readers. Incremental Steps Through the Problem Domain The chapters in this book are called steps for a good reason. These steps form a learning path that incrementally builds the knowledge about the blockchain. The order of the steps was chosen carefully. They cover the fundamentals of software engineering, explain the terminology, point out the reason why the blockchain is needed, and explain the individual concepts that make up the blockchain as well as their interactions. Calling the individual chapters steps highlights their dependence and their didactical purpose. They form a logical sequence to be followed instead of being chapters that could be read independently. Use of Metaphors and Analogies Each step that introduces a new concept starts with a pictorial explanation by referring to a situation from real life. These metaphors serve four major purposes. First, they prepare the reader for introduction to a new technical concept. Second, by connecting a technical concept to an easy-to-understand real-world scenario, the metaphors reduce the mental hurdle to discover a new territory. Third, metaphors allow learning new concepts by similarities and analogies. Finally, metaphors provide rules of thumb for memorizing new concepts. Introduction
xiv How This Book Is Organized This book consists of 25 steps grouped into five major stages that all together form a learning path, which incrementally builds your knowledge of the block- chain. These steps cover some fundamentals of software engineering, explain the required terminology, point out the reasons why the blockchain is needed, explain the individual concepts that make up the blockchain as well as their interactions, consider applications of the blockchain, and mention areas of active development and research. Stage I: Terminology and Technical Foundations Steps 1 to 3 explain major concepts of software engineering and set the ter- minology necessary for understanding the succeeding steps. By the end of Step 3, you will have gained an overview of the fundamental concepts and an appreciation of the big picture in which the blockchain is located. Stage II: Why the Blockchain Is Needed Steps 4 to 7 explain why the blockchain is needed, what problem it solves, why solving this problem is important, and what potential the blockchain has. By the end of Step 7, you will have gained a good understanding of the problem domain in which the blockchain is located, the environment in which it pro- vides the most value, and why it is needed in the first place. Stage III: How the Blockchain Works The third stage is the centerpiece of this book since it explains how the block- chain works internally. Steps 8 to 21 guide you through 15 distinct technical concepts that all together make up the blockchain. By the end of Step 21, you will have reached an understanding of all the major concepts of the block- chain, how they work in isolation, and how they interact in order to create the big machinery that is called the blockchain. Stage IV: Limitations and How to Overcome Them Steps 22 to 23 focus on major limitations of the blockchain, explain their rea- sons, and sketch possible ways to overcome them. By the end of Step 23, you will understand why the original idea of the blockchain as explained in the pre- vious steps may not be suitable for large-scale commercial applications, what changes were made to overcome these limitations, and how these changes altered the properties of the blockchain. Introduction
分享到:
收藏