Architecture for Blockchain Applications
Book information
Description
Foreword......Page 3 Contents......Page 11 --- Blockchain in Software Architecture......Page 15 1.1 What Is Blockchain and Why Should I Care?......Page 16 1.1.1 Defining Blockchain......Page 18 1.1.2 Smart Contracts and Decentralized Applications......Page 20 1.1.3 Cryptocurrencies and Tokens......Page 21 1.2 Blockchain-Based Applications......Page 22 1.2.1 Enterprise and Industry......Page 23 1.2.2 Financial Services......Page 24 1.2.3 Government Services......Page 26 1.3 Blockchain Functionality......Page 27 Transactions......Page 28 Digital Assets......Page 30 1.3.2 Blockchain as a Computational Infrastructure......Page 31 1.4.2 Non-functional Properties of Blockchain......Page 32 1.5.2 Designing Blockchain-Based Applications......Page 34 1.7 Further Reading......Page 37 2.1 Bitcoin......Page 39 2.1.1 Bitcoin Transactions......Page 40 2.1.2 Script......Page 41 2.1.3 Mining......Page 42 2.1.4 Accounts and State......Page 43 2.1.5 Nakamoto Consensus......Page 45 2.1.7 Wallets......Page 46 2.2.1 Ethereum Protocol......Page 47 2.2.2 Ethereum Transactions......Page 48 2.2.3 Smart Contract......Page 49 2.2.5 Decentralized Application (dapp)......Page 51 2.3 Hyperledger Fabric......Page 52 2.3.3 Nodes......Page 53 2.3.4 Transactions......Page 54 2.3.5 Consensus......Page 55 2.5 Further Reading......Page 56 3.1 Fundamental Properties of Blockchain......Page 57 3.2 Decentralization......Page 58 3.2.1 Permission......Page 60 3.2.2 Deployment......Page 61 3.3 Ledger Structure......Page 62 3.4 Consensus Protocol......Page 63 3.5 Block Configuration......Page 65 3.6 Auxiliary Blockchains......Page 66 3.7 Anonymity......Page 69 3.10 Further Reading......Page 70 4.1 Agricultural Supply Chains......Page 72 4.1.1 Key Non-functional Requirements......Page 73 4.1.2 Conventional Technology......Page 74 4.1.4 Non-functional Property Discussion......Page 75 4.2 Open Data Registry......Page 78 4.2.1 Key Non-functional Requirements......Page 79 4.2.3 A Blockchain Solution......Page 80 4.2.4 Non-functional Property Discussion......Page 81 4.3 International Money Transfers......Page 82 4.3.2 Conventional Technologies......Page 83 4.3.4 Non-functional Property Discussion......Page 85 4.4 Electricity Contract Selection and Continuous Reporting......Page 86 4.4.3 A Blockchain Solution......Page 87 4.5 Further Reading......Page 89 --- Architecting Blockchain Applications......Page 91 5.1 Blockchain as an Architectural Element......Page 92 5.2 Blockchain as Storage Element......Page 93 5.2.1 Comparison with Centralized Databases......Page 94 5.2.3 Comparison with Peer-to-Peer Data Storage......Page 95 5.2.4 Comparison with Replicated State Machines......Page 96 5.3 Blockchain as Computational Element......Page 97 5.4.1 Data Communication......Page 98 5.5 Blockchain as an Asset Management and Control Mechanism......Page 99 5.6 Integrating Blockchain into a System as a Component......Page 100 5.8 Further Reading......Page 101 6.1 Evaluation of Suitability......Page 102 6.1.1 Multiparty......Page 103 6.1.2 Trusted Authority......Page 104 6.1.4 Data Immutability and Non-repudiation......Page 105 6.1.5 High Performance......Page 106 6.1.6 Transparency......Page 107 6.2.1 Use Case 1: Supply Chain......Page 109 6.2.2 Use Case 2: Electronic Health Records (EHRs)......Page 111 6.2.3 Use Case 3: Identity Management......Page 112 6.3 Design Process for Blockchain-Based Systems......Page 113 6.3.1 Trade-Off Analysis......Page 114 6.3.3 On-Chain vs. Off-Chain......Page 115 Data......Page 116 Other Considerations......Page 118 6.3.5 Deployment and Operation......Page 119 6.5 Further Reading......Page 120 7 Blockchain Patterns......Page 121 7.1.1 Pattern 1: Oracle......Page 123 7.1.2 Pattern 2: Reverse Oracle......Page 125 7.1.3 Pattern 3: Legal and Smart Contract Pair......Page 127 7.2.1 Pattern 4: Encrypting On-Chain Data......Page 129 7.2.2 Pattern 5: Tokenization......Page 132 7.2.3 Pattern 6: Off-Chain Data Storage......Page 134 7.2.4 Pattern 7: State Channel......Page 136 7.3.1 Pattern 8: Multiple Authorization......Page 139 7.3.2 Pattern 9: Off-Chain Secret Enabled Dynamic Authorization......Page 141 7.3.3 Pattern 10: X-Confirmation......Page 143 7.4.1 Pattern 11: Contract Registry......Page 145 7.4.2 Pattern 12: Data Contract......Page 148 7.4.3 Pattern 13: Embedded Permission......Page 150 7.4.4 Pattern 14: Factory Contract......Page 152 7.4.5 Pattern 15: Incentive Execution......Page 154 7.5 Summary......Page 155 7.6 Further Reading......Page 156 8.1 Introduction......Page 157 8.2.1 Motivation......Page 158 8.2.2 Challenges of Collaborative Business Process Execution......Page 159 8.2.3 Blockchain-Based Collaborative Process Execution......Page 160 Design Time: Translator......Page 162 Runtime Environment: Executing Processes as Smart Contracts......Page 163 8.2.4 Discussion......Page 168 8.3 Model-Driven Registry Generation for Blockchain......Page 170 8.3.1 Registries on Blockchain......Page 171 8.3.2 A Tool for Registry Generation: Regerator......Page 172 Smart Contract Generator......Page 173 Registry of Registries on Blockchain......Page 174 8.3.3 Exemplar Case Study: Open Data Registry......Page 175 Implementation......Page 176 Discussion......Page 177 8.4 Summary......Page 178 8.5 Further Reading......Page 179 --- Quality Impact of Blockchain......Page 181 9 Cost......Page 182 9.1 On-Chain Data Cost......Page 183 9.3 Cost Models......Page 185 9.3.1 Ethereum Blockchain Cost Model......Page 186 9.3.2 Amazon SWF Cost Model......Page 188 9.4.1 Experiment Setup, Methodology, and Benchmarking......Page 191 VM Throughput Measurements......Page 192 9.4.2 Blockchain Results......Page 193 9.4.3 Amazon SWF Results......Page 194 9.4.4 Completeness, Correctness, and Comparative Analysis......Page 195 9.4.5 On the Volatility of Cryptocurrency to Fiat Currency Exchange Rate......Page 197 9.5.1 Cost of Distrust......Page 199 9.5.3 Scaling Triggers for Blockchain and SWF......Page 200 9.6 Summary......Page 201 9.7 Further Reading......Page 202 10.1 Performance Characteristics of Blockchain......Page 203 10.3 Predicting Latency for Blockchain-Based Systems......Page 205 10.3.1 Benchmarking Transaction Inclusion and Commit Times......Page 206 10.3.2 Blockchain-Based System Performance Modelling......Page 208 Component Repository Model......Page 209 Usage Model......Page 210 10.3.3 Using Simulation for System-Level Latency Predictions......Page 212 Applying Simulation to Other Systems......Page 213 10.4.1 Choice of Inter-Block Time......Page 214 10.4.2 Choice of Number of Confirmation Blocks......Page 215 10.5 Summary......Page 216 10.6 Further Reading......Page 217 11 Dependability & Security......Page 219 11.1 Confidentiality......Page 220 11.2 Integrity......Page 221 11.3 Safety......Page 222 11.4 Maintainability......Page 223 11.5 Availability and Reliability......Page 224 11.6 Variation in Blockchain Transaction Inclusion......Page 225 11.6.1 Variation in Bitcoin Transaction Commit Time......Page 226 11.6.2 Variation in Ethereum Transaction Commit Time......Page 229 11.7 Aborting and Retrying Blockchain Transactions......Page 235 11.7.2 Aborting and Retrying Transactions in Bitcoin......Page 236 11.7.3 Experiments for Aborting Transactions in Ethereum......Page 237 11.9 Further Reading......Page 240 --- Case Studies......Page 242 12.1.1 Global Agricultural Supply Chains......Page 243 12.1.2 Blockchain and Agriculture......Page 244 12.2.1 Building Digital Trust......Page 245 12.2.2 AgriDigital's Blockchain Solution......Page 246 12.2.4 Pilots and Proof-of-Concept Overview......Page 248 12.3.1 Overview......Page 251 12.3.2 Pilot Scenarios......Page 252 12.3.3 Design Decisions......Page 254 12.4 Summary......Page 258 13.1 Introduction and Background......Page 260 13.2 The MVP Prototype......Page 262 13.3 Building Tokenvote......Page 264 Planned Architecture......Page 265 Final Architecture......Page 267 Qualities and Trade-offs......Page 269 13.4.1 Indexing and Externally Accessing Data......Page 270 13.4.2 Splitting Up Contracts......Page 272 Adding a Backend Smart Contract......Page 273 Using Libraries......Page 274 Replacing Smart Contracts......Page 275 SecureVote's First Upgrade......Page 276 Atomic Upgrades and Tokenvote......Page 278 13.4.4 Reducing Complexity and Cost......Page 280 13.6 Further Reading......Page 281 14.1 Introduction and Background......Page 282 14.1.1 Traceability Process......Page 283 14.2.2 On-Chain vs. Off-Chain......Page 285 14.2.3 Design of Smart Contracts......Page 287 14.2.5 Permission Control and Blockchain Management......Page 289 14.3.1 Qualitative Analysis: Adaptability......Page 290 14.3.2 Quantitative Analysis: Latency of Writing and Reading......Page 293 14.4.1 Architectural Design of Blockchain-Based Systems......Page 294 14.5 Summary......Page 295 Epilogue......Page 297 Refs......Page 300 Index......Page 306
Similar books
Architecture for Blockchain Applications
2019 · PDF
Responsible AI: Best Practices for Creating Trustworthy AI Systems
2023 · RAR
Responsible AI: Best Practices for Creating Trustworthy AI Systems
2023 · EPUB
Responsible AI: Best Practices for Creating Trustworthy AI Systems
2023 · PDF
M8.0 Wenchuan Earthquake (Lecture Notes in Earth Sciences, 123)
2010 · PDF
Earthquake Geology and Tectonophysics around Eastern Tibet and Taiwan
2021 · PDF
Business Process Management: Blockchain and Central and Eastern Europe Forum: BPM 2019 Blockchain and CEE Forum, Vienna, Austria, September 1–6, 2019, Proceedings
2019 · PDF
Business Process Management Forum: BPM Forum 2018, Sydney, NSW, Australia, September 9-14, 2018, Proceedings
2018 · PDF