𝔖 Scriptorium
✦   LIBER   ✦

📁

Introducing Blockchain Applications: Understand and Develop Blockchain Applications Through Distributed Systems

✍ Scribed by Joseph Thachil George


Publisher
Apress
Year
2021
Tongue
English
Leaves
462
Edition
1
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Synopsis


Deepen your understanding of blockchain technology and develop your own blockchain applications. This book provides a thorough review of distribution-based systems on blockchain technology, starting from the fundamental concepts that underlie it, all the way through the implementation of a blockchain network for business purposes. 

Author Joseph Thachil George begins by introducing you to blockchain and some basic concepts of technology, including distributed systems, systems of systems, cyber-physical systems, the Byzantine Consensus, the CAP theorem, and cryptographic techniques. Next, he analyzes the structure of blocks and smart contracts and the mother of all blockchain platforms, Bitcoin. That sets the stage for an examination of transaction structure, validation, and flow, from creation to registration in the ledger and structure of the blocks, the Nakamoto consensus, and finally forks. From there, you’ll experience a deep dive into Ethereum; including the concepts of Gas and Message, smart contracts and the Ethereum virtual machine. From there, you’ll learn about the Ethereum consensus protocol, Ethereum Casper, and the Ethereum Proof-of-Stake algorithm. You’ll then see how blockchain can be connected to a distributed system, followed by a demonstration of how you can model a distributed system using Blockly4SoS and Kilobots. The concluding chapters offer a practical example that combines distributed systems with blockchain technology. 

After reading this book, you will understand how to implement blockchain technology in a distributed system and be able to leverage this knowledge in your own projects. 

What You Will Learn

  • Learn the concept of blockchains by way of a practical example  
  • Grasp the connection between distributed systems and blockchain technology
  • Learn the design of blockchain with hyperledger fabric
  • Learn the design of cyber-physical systems in a distributed environment 

Who Is This Book For

Developers who are enthusiastic about the design and implementation of distributed systems.

✦ Table of Contents


Table of Contents
About the Author
About the Technical Reviewer
Acknowledgments
Chapter 1: Introducing Blockchain Applications Through Distributed Systems
1.1 Blockchain Use Cases
1.2 What This Book Covers
Chapter 2: An Introduction to Blockchain
2.1 A Short History of Blockchain
2.2 Applications Using Blockchain
2.3 Why Blockchain Matters
2.4 Summary
Chapter 3: Bitcoin
3.1 The History of Bitcoin
3.1.1 Linked Timestamping and the Merkle Tree
3.1.2 Distributed Consensus
3.2 Proof of Work
3.2.1 Nakamoto’s Genius
3.3 Key and Address
3.3.1 Private Key
3.3.2 Public Key
3.3.3 Bitcoin Address
3.3.4 Digital Signature
3.3.4.1 Verifying a Digital Signature
3.3.4.2 Understanding the ECDSA Sign/Verify Math
3.4 The Transaction
3.4.1 The Unspent Transaction Output (UTXO)
3.4.2 Input and Output (I&O)
3.4.3 Pay to Public Key Hash (P2PKH)
3.4.4 Looking at the Output Side
3.4.5 Looking at the Input Side
3.4.6 Validation Process
3.4.7 Transaction Structure
3.4.8 Transaction Fee
3.5 Transaction Flow
3.6 The Block
3.6.1 The Structure of a Block
3.6.2 The Block Header
3.7 The Nakamoto Consensus
3.7.1 Miner
3.7.2 Coinbase Transaction
3.7.3 Developing the Block Header
3.7.4 Difficulty Target
3.7.5 Proof of Work
3.7.6 Validating a New Block
3.7.7 The Blockchain Forks
3.8 Summary
Chapter 4: Ethereum
4.1 Blockchain as a State Transition System
4.2 Ethereum Account
4.2.1 The Account State
4.2.2 Externally Owned Accounts (EOAs)
4.2.3 Contract Accounts
4.2.4 Differences Between Externally Owned and Contract Accounts
4.2.5 Storing Key: Encrypted Keystore
4.3 World State
4.3.1 Trie
4.3.2 The Radix Tree
4.3.3 Patricia Trie
4.3.4 Ethereum Modified Merkle Patricia Trie
4.3.5 Storage Root
4.3.6 Why Merkle Trees?
4.4 Ethereum Virtual Machine
4.5 What Is a Gas?
4.5.1 Gas for Storing
4.5.2 The Purpose of Gas
4.6 Transactions and Messages
4.6.1 Transaction Structure
4.6.2 Transaction Digital Signature Flow
4.6.3 Recovery Public Key from Digital Signature
4.6.4 Three Types of Transactions
4.6.5 Messages
4.7 Ethereum State Transition Function
4.8 Transaction Flow in Ethereum Blockchain
4.9 Transaction State
4.10 Block Structure
4.10.1 Transaction Receipts
4.10.2 Ommer Blocks
4.11 Ethereum Simplified Ghost
4.12 Ethereum Consensus
4.12.1 The Proof of Work Algorithm (PWA)
4.13 Ethereum 2.0
4.14 Summary
Chapter 5: Proof of Stake: Consensus of the Future
5.1 Chain-Based Proof of Stake
5.1.1 Committee-Based PoS
5.1.2 The Nothing at Stake Theory
5.1.2.1 Slasher
5.1.2.2 Dunkle
5.1.3 BFT-Based Proof of Stake
5.2 Ethereum Casper
5.3 Casper Implementation
5.4 Summary
Chapter 6: Hyperledger Fabric
6.1 High-Level Perspective
6.2 Assets
6.3 Chaincode
6.4 Characteristics of the Ledger
6.5 Privacy
6.6 Identity
6.6.1 Infrastructure with Public Keys (PKI)
6.6.2 Digital Certificates
6.7 Certificate Authorities
6.8 Membership Service Provider (MSP)
6.8.1 Local MSP
6.8.2 Channel MSP
6.8.3 Storing MSP Data
6.9 Peers
6.9.1 Peers and Organizations
6.9.2 Peers and Identity
6.9.3 Peer, Consensus, and Order
6.10 Hyperledger Fabric Consensus
6.10.1 Stage 1: Proposal
6.10.2 Stage 2: Transactions Are Ordered and Packaged in Blocks
6.11 Ledger
6.11.1 Blockchain
6.11.2 Transaction
6.11.3 World State
6.12 Ordering Service Implementations
6.13 Summary
Chapter 7: Consensus Algorithms for Blockchains
7.1 Consensus Algorithms and Cryptocurrency
7.2 Objectives of Consensus Models
7.3 Different Types of Consensus Algorithms
7.4 Types of Blockchain Consensus Algorithms
7.4.1 Proof-of-Work (PoW)
7.4.2 Proof of Stake (PoS)
7.4.2.1 Proof of Stake Delegated (PoSD)
7.4.2.2 Leased Proof of Stake (LPoS)
7.4.3 Byzantine Fault Tolerance (BFT)
7.4.4 Practical-BFT
7.4.5 Delegated Byzantine Fault Tolerance (dBFT)
7.4.6 Direct Acyclic Graph (DAG)
7.4.7 Proof of Capacity (PoC)
7.4.8 Proof-of-Burn (PoB)
7.4.9 Proof-of-Identity (PoI)
7.4.10 Proof-of-Activity (PoA)
7.4.11 Proof-of-Elapsed Time (PoET)
7.4.12 Proof-of-Importance (PoI)
7.5 Consensus in Distributed Systems and Blockchain Technology
7.6 Review Questions
7.7 Review Answers
7.8 Summary
Chapter 8: The Consensus Algorithms for Blockchains Project
8.1 Starting the Project
8.2 The Python Code
8.3 Example 2: Using Flask in Python
8.3.1 Step 1: Create a Simple Proof of Work
8.3.2 Step 2: Create an API Endpoint for Blockchain
8.3.3 Step 3: Create a Blockchain Miner
8.3.4 Step 4: Run Your Blockchain Project
8.4 Review Questions
8.5 Review Answers
8.6 Summary
Chapter 9: Real-Time Systems
9.1 Understanding Real-Time Systems
9.2 Real-Time System Reference Model
9.2.1 Fail-Safe vs. Fail-Operational Systems
9.2.2 Guaranteed Timeliness vs. Best Effort Systems
9.3 RT System Categorization
9.3.1 Resource Adequacy
9.3.2 Predictability in Rare Event Situations
9.3.3 The State and Event
9.3.4 Time Triggered vs. Event Triggered Systems
9.4 Temporal Requirements
9.5 Classification of the Scheduling Algorithm
9.5.1 Hard Real-Time and Soft Real-Time Scheduling
9.5.2 Dynamic and Static Schedulers
9.5.3 Scheduler With/Without Preemption
9.5.4 Static Scheduling
9.5.5 Dynamic Scheduling
9.5.6 Independent Task Scheduling
9.6 Review Questions
9.7 Review Answers
9.8 Summary
Chapter 10: Scheduling in Real-Time Systems
10.1 The Concept of Scheduling
10.2 Types of Constraints
10.2.1 Independent Task Scheduling Constraints
10.2.2 Scheduling Dependent Tasks
10.3 Review Questions and Answers
10.3.1 Review Questions
10.3.2 Answers
10.4 Summary
Chapter 11: Engineering Based on Models
11.1 Model-Driven Approach to Blockchain
11.2 Model-Driven Development
11.2.1 The Blockchain Layer Model
11.2.2 Models and Metamodels
11.2.3 The Model
11.2.4 The Metamodel
11.3 Building the Metamodel and Model
11.4 A Modeling Language’s Category
11.5 Designing a Metamodel for CPSs
11.6 CPS Metamodel Examples
11.6.1 Meta-Object Facility
11.7 Review Questions
11.8 Review Answers
11.9 Summary
Chapter 12: BLOCKLY 4SOS
12.1 SOS Modeling
12.2 Environment for SoS Behavior Simulation
12.3 Review Questions
12.4 Review Answers
12.5 Summary
Chapter 13: Cyber-Physical Systems Project
13.1 Using Kilobots
13.1.1 The Kilobots Movements
13.2 Project Requirements
13.2.1 Architecture
13.2.2 Project Communication
13.2.3 Time
13.2.4 Dynamicity
13.2.5 Dependability
13.3 Blockly4SoS Model
13.4 Implementing the Project
13.5 Executing the Project
13.6 Project Code
13.7 Summary
Chapter 14: Using a MATLAB Smart Farm Project
14.1 Description of the Smart Farm Project
14.1.1 Project Requirements
14.1.2 Solution Hints
14.2 Implementing the Project
14.2.1 Environment Models
14.2.2 Sensor Models
14.2.3 Multi-Robot Lidar Sensor
14.3 The System Architecture
14.4 System Modeling
14.4.1 Robot Visualizer and Lidar Sensor
14.4.2 Obstacle Avoidance Logic and 2 PC Protocol Concept
14.4.3 Architecture of North and South Farm and Storehouse
14.5 Implementing the Two-Phase Commit Protocol
14.5.1 Requirements
14.5.2 Problems Encountered
14.6 Summary
Chapter 15: The Platoon Project
15.1 The Game Environment
15.1.1 SoS Organization
15.1.2 CS-Level
15.1.3 SOS-Level
15.1.4 Viewpoint Emergence
15.1.5 Viewpoint Dynamicity
15.1.6 Viewpoint Time
15.2 The Cyber-Physical Systems
15.3 Kilobot Source Code
15.4 Kilobots Movement
15.5 Cyber-Physical Modeling
15.6 Summary
Chapter 16: Blockchain Technology and Distributed System Future Scope and B-Coin Project
16.1 Blockchain and IoT Security
16.1.1 Blockchain Implementations and Use Cases in IoT
16.1.2 Challenges with Integrating Blockchain Into IoT
16.2 Safety Recommendations
16.3 Blockchain Security and Privacy
16.4 The Future Scope
16.4.1 Blockchain Architecture: Private, Public, or Hybrid-Public Blockchain Design
16.4.2 Inducement
16.4.3 Data Privacy
16.5 Having Realistic Expectations of Blockchain
16.6 Food Certification
16.7 Smart Contracts and Notaries
16.7.1 Applying Blockchain Technology to Smart Contracts
16.7.2 Developing Blockchain in the Market
16.7.3 The Geopolitics of the Blockchain
16.7.4 Books, Whitepapers, and Blockchains
16.8 Bitcoin (B-Coin) Sample Project
16.8.1 The Project Code
16.8.2 Changing the Blockchain into Cryptocurrency
16.8.3 GET
16.8.4 POST
16.9 Functions of the Nodes
16.9.1 Create a New Candidate Block by Combining Valid Transactions
16.9.2 Computing Power on the Defensive Wall (Hash Rate)
16.10 Creating New Bitcoins
16.10.1 The Concept of Decentralization
16.11 Summary
Chapter 17: AI and Blockchain Monitoring Autonomous Vehicles Management Project
17.1 The Connection Between Blockchain and Artificial intelligence
17.1.1 AI and Blockchain in Applications
17.1.2 AI’s Role in Making Real-Time Intelligent and Decision-Making Machines
17.2 Blockchain for Information Sharing and Exchange
17.3 Dependability and Safety
17.4 Tracking the System
17.5 Motivation and Goal of This Work
17.6 Automotive Applications
17.6.1 Autonomous Cars as Cyber-Physical Systems
17.7 Safety and Self-Controlled Vehicles
17.8 Controller: The Problem with the Checker
17.9 System Analysis Method
17.9.1 Preliminary Rounds and Introduction
17.10 The Experimental Method
17.10.1 Controller Test
17.10.2 Monitor or Observation Testing
17.10.3 Controller Retraining
17.11 Method Implementation and Results
17.12 The Tools and Software
17.12.1 CARLA Simulator
17.12.2 Controller Settings
17.12.3 Safety Monitor Implementation
17.13 Experimental Activity
17.14 Results
17.14.1 Testing the Controller (Phase 1)
17.14.2 Monitor Assessment (Phase 2)
17.14.3 Retraining and Rechecking (Phase 3)
17.15 Summary
Chapter 18: Summary
18.1 Blockchain in the Policy Context
18.1.1 Avoiding the Tragedy of the Commons
18.2 Transforming Industry and Markets
18.2.1 Government and the Public Sector
18.2.2 Data Management
18.3 Secure Recommendations
18.3.1 Privacy Policy
18.3.2 Smart Contracts
18.3.3 Distributed Computing Systems
18.3.4 Distributed Information Systems
18.3.5 Distributed Pervasive Systems
18.4 Client and Server Anatomy
18.4.1 Client
18.4.2 Server
18.5 Questions About Distributed Systems
18.5.1 What Is the Role of Middleware in a Distributed System?
18.5.2 What Is Meant By Transparency (of Distribution)?
18.5.3 Why Is it Sometimes Difficult to Hide the Occurrence of a Failure and Its Recovery in a Distributed System?
18.5.4 Is It Okay to Have Two Different Programming Languages for the Development of Distributed Systems?
18.5.5 What Is the Difference Between Cache and Replication?
18.5.6 When Is It Appropriate To Use a Cluster Rather Than a Grid Computer?
18.5.7 How Do You Differentiate Between Different Types of Distributed Systems?
18.6 Advantages and Disadvantages of Blockchain
18.7 Blockchain Technology and Cost Cutting
18.8 Summary
Index


📜 SIMILAR VOLUMES


Introducing Blockchain Applications: Und
✍ Joseph Thachil George 📂 Library 📅 2021 🏛 Apress 🌐 English

<p>Deepen your understanding of blockchain technology and develop your own blockchain applications. This book provides a thorough review of distribution-based systems on blockchain technology, starting from the fundamental concepts that underlie it, all the way through the implementation of a blockc

Practical Blockchains and Cryptocurrenci
✍ Karan Singh Garewal 📂 Library 📅 2020 🏛 Apress 🌐 English

<p><p></p><p>Create cryptocurrency and blockchain applications by examining the key algorithms and concepts pertaining to blockchains, transaction processing, mining, distributed consensus, and anonymous currencies. In this book, you’ll develop a fully functional cryptocurrency from scratch in the P

Learn Bitcoin and Blockchain: understand
✍ Kulkarni, Kirankalyan 📂 Library 📅 2018 🏛 Packt Publishing 🌐 English

<p><b>Get up and running with the fundamentals of Bitcoin and blockchain</b><p><b>Key Features</b><li>Learn quick, effective, and easy ways to master blockchain and Bitcoin<li>Understand the impact of decentralization and discover ways to tackle it<li>Explore the future of Bitcoin and blockchain and

Rust For Blockchain Application Developm
✍ Akhil Sharma 📂 Library 📅 2024 🏛 Packt Publishing Pvt Ltd 🌐 English

Before Rust, blockchain developers didn’t have a systems programming language that was type-safe, fast, and, at the same time, had stable and easy memory management. Rust proved to be a boon for developers and works as the perfect solution for not only blockchain and protocol development but also dA

Distributed Computing to Blockchain: Arc
✍ Rajiv Pandey; Sam Goundar; Shahnaz Fatima 📂 Library 📅 2023 🏛 Academic Press/Elsevier 🌐 English

Distributed Computing to Blockchain: Architecture, Technology, and Applications provides researchers, computer scientists, and data scientists with a comprehensive and applied reference covering the evolution of distributed systems computing into blockchain and associated systems. Divided into three