Discover millions of ebooks, audiobooks, and so much more with a free trial

Only €10,99/month after trial. Cancel anytime.

Practical Blockchain Uses
Practical Blockchain Uses
Practical Blockchain Uses
Ebook400 pages3 hours

Practical Blockchain Uses

Rating: 0 out of 5 stars

()

Read preview

About this ebook

Practical Blockchain Uses provides comprehensive knowledge on blockchain technology, exploring its concepts from the ground up. We cover essential blockchain principles, offering detailed descriptions for better understanding. Each chapter includes references for further reading, enabling readers to delve deeper into the subject.
We present case studies with code samples, focusing on major concepts and technical considerations in blockchain applications. This book is designed for software engineers, architects, developers, CIOs, researchers, and students.
Our book offers insights into the architecture of blockchain systems, serving as a tutorial and guide for assessing blockchain suitability and designing applications. We explore various architectural designs and trade-offs, providing examples of blockchain-based applications and platforms. Clear diagrams explain the concepts, making them accessible to all readers.

LanguageEnglish
Release dateJan 3, 2025
ISBN9789361529900
Practical Blockchain Uses

Read more from Ekaling Jain

Related to Practical Blockchain Uses

Related ebooks

Computers For You

View More

Reviews for Practical Blockchain Uses

Rating: 0 out of 5 stars
0 ratings

0 ratings0 reviews

What did you think?

Tap to rate

Review must be at least 10 words

    Book preview

    Practical Blockchain Uses - Ekaling Jain

    Practical Blockchain Uses

    Practical Blockchain Uses

    Ekaling Jain

    Practical Blockchain Uses

    Ekaling Jain

    ISBN - 9789361529900

    COPYRIGHT © 2025 by Educohack Press. All rights reserved.

    This work is protected by copyright, and all rights are reserved by the Publisher. This includes, but is not limited to, the rights to translate, reprint, reproduce, broadcast, electronically store or retrieve, and adapt the work using any methodology, whether currently known or developed in the future.

    The use of general descriptive names, registered names, trademarks, service marks, or similar designations in this publication does not imply that such terms are exempt from applicable protective laws and regulations or that they are available for unrestricted use.

    The Publisher, authors, and editors have taken great care to ensure the accuracy and reliability of the information presented in this publication at the time of its release. However, no explicit or implied guarantees are provided regarding the accuracy, completeness, or suitability of the content for any particular purpose.

    If you identify any errors or omissions, please notify us promptly at educohackpress@gmail.com & sales@educohackpress.com We deeply value your feedback and will take appropriate corrective actions.

    The Publisher remains neutral concerning jurisdictional claims in published maps and institutional affiliations.

    Published by Educohack Press, House No. 537, Delhi- 110042, INDIA

    Email: educohackpress@gmail.com & sales@educohackpress.com

    Cover design by Team EDUCOHACK

    Preface

    A blockchain is a list that has records stored and recorded in the components of the blockchain known as the blockchain. The blocks in the blockchain contain a timestamp or what is known as the cryptographic hash on them, which connects them to the previous block, and thus, maintains the chain in the network. The blockchain also comprises of the transaction data that are processed and executed in the network. Blockchain technology is gaining acceptance and is being adopted rapidly and quickly on a world platform.

    Satoshi Nakamoto was an individual or a group of people who came up with the concept of the blockchain. It is a distributed ledger which works on various concepts such as the cryptocurrency and the digital currency, transactions, consensus, wallets, and others. The blockchain technology can be utilized for the public as well as for private types of transactions. It a simple, secure and convenient technology used daily by organizations and companies all over the world. Some of the platforms that are based on the blockchain technology and are currently in existence are the Bitcoin, the Ethereum and the Hyperledger Fabric and several other blockchain networks and platforms.

    Table of Contents

    1 Introduction to Blockchain 1

    1.1 What is Blockchain and Why it is Important for Us 1

    1.2 Applications based on Blockchain Technology 3

    1.2.1 Industry and Enterprise 4

    1.2.2 Financial Services 5

    1.2.3 Government Services 7

    1.3 Blockchain Functionality 7

    1.3.1 Blockchain as Data Storage 8

    1.3.2 Blockchain as a Computational Infrastructure 10

    1.4 Blockchain and its Non-functional Properties 10

    1.4.1 Non-functional Properties and Requirements

    of the Blockchain 10

    1.4.2 Non-functional Properties of the Blockchain 11

    1.5 Blockchain Architecture Design 12

    1.5.1 Software Architecture: Design and Analysis 12

    1.5.2 Designing Blockchain-based Application 12

    1.6 Summary 14

    1.7 References 14

    2 Existing Blockchain Platforms 16

    2.1 Bitcoin 16

    2.1.1 Bitcoin Transactions 18

    2.1.2 Script 19

    2.1.3 Mining 19

    2.1.4 Accounts and States 20

    2.1.5 Nakamoto Consensus 21

    2.1.6 Deflationary Cryptocurrency 21

    2.1.7 Wallets 22

    2.1.8 Exchanges 22

    2.2 Ethereum 22

    2.2.1 Ethereum Protocol 23

    2.2.2 Ethereum Transactions 23

    2.2.3 Smart Contract 24

    2.2.4 Paying Fees in ‘Gas’ 24

    2.2.5 Decentralized Applications (dapp) 25

    2.3 Hyperledger Fabric 25

    2.3.1 Permissioned Blockchain 26

    2.3.2 Chaincode as the Smart Contract 27

    2.3.3 Nodes 27

    2.3.4 Transactions 27

    2.3.5 Consensus 28

    2.4 Other Representative Blockchain Platforms 28

    2.5 References 29

    3 Varieties of Blockchains 30

    3.1 Blockchain Fundamental Properties 30

    3.2 Configuration of Block 37

    3.3 Auxiliary Blockchains 39

    3.4 References 42

    4 Agricultural Supply Chain 44

    4.1 Introduction 44

    4.2 Conventional Technology 45

    4.2.1 The Methodology of Supply Chain 45

    4.2.2 The Blockchain Solution 46

    4.2.3 Discussion of Requirements and Properties

    Which are Non-functional 47

    4.3 Open Data Registry 47

    4.3.1 Conventional Technology 48

    4.3.2 The blockchain Solution 49

    4.3.3 Discussion of Requirements and Properties

    Which are Non-functional 49

    4.4 International Money Transfers 50

    4.4.1 Conventional Methods 51

    4.4.2 Blockchain Method 52

    4.4.3 Discussion of Requirements and Properties

    Which are Non-functional 53

    4.5 Continuous Reporting and Electricity Contract Selection 54

    4.5.1 Non-functional Requirements of the Key 54

    4.5.2 Conventional Technologies 55

    4.5.3 Blockchain Solution and Design 55

    4.5.4 Non-functional Properties 56

    4.6 References 56

    5 Blockchain in Software Architecture 58

    5.1 Introduction 58

    5.2 Blockchain as an Architectural Element 59

    5.3 Blockchain as a Storage Element 60

    5.3.1 Comparing with Centralized Databases 61

    5.3.2 Comparing with Peer-to-Peer Data Storage 62

    5.3.3 Comparing with Cloud Services 62

    5.3.4 Comparing with Replicated State Machines 63

    5.4 Blockchain as a Computational Element 63

    5.5 Blockchain as a Communication Mechanism 64

    5.5.1 Data Communication 65

    5.5.2 Computation Communication 66

    5.6 Blockchain as an Asset Management and Control Mechanism 67

    5.7 Integration of Blockchain into a System as a Component 68

    5.8 Summary 70

    5.9 References 70

    6 Designing Process for Application on Blockchain 72

    6.1 Introduction 72

    6.2 Suitability Evaluation 73

    6.2.1 Multi-party 73

    6.2.2 Trustworthy Authority 74

    6.2.3 Immutability of Data and Non-repudiation 75

    6.2.4 Operation 76

    6.2.5 High-level Performance 76

    6.2.6 Transparency 77

    6.3 Examples for Suitability Evaluation 77

    6.3.1 Example 1: Electronic Health Records (EHR) 78

    6.3.2 Example 2: Chain of Supply 78

    6.3.3 Example 3: Stock Market 79

    6.3.4 Example 4: Identity Management 80

    6.4 Design Process for Blockchain Systems 80

    6.4.1 Trade-off Analysis 81

    6.4.2 Decentralization 82

    6.4.3 Off-chain Vs. On-chain Transactions 83

    6.5 Summary 84

    6.6 References 84

    7 Patterns of Blockchain 86

    7.1 Introduction 86

    7.2 Patterns on Interaction with the External World 87

    7.2.1 Oracle 87

    7.2.2 Reverse Oracle 89

    7.2.3 Legal and Smart Contract 90

    7.3 Data Management Patterns 91

    7.3.1 On-chain Data Encryption 91

    7.3.2 Tokenization 93

    7.3.3 Off-chain Data Storage 94

    7.3.4 State Channel 95

    7.4 Security Patterns 96

    7.5 Multiple Authorization 96

    7.5.1 Off-chain Secret Dynamic Authorization 97

    7.6 Contract Structural Pattern 98

    7.6.1 Registration of Contract 98

    7.6.2 Data Contract 99

    7.6.3 Embedded Permission 99

    7.6.4 Execution of Incentive 99

    7.7 References 100

    8 Model Driven Engineering for Blockchain Applications 101

    8.1 Introduction 101

    8.2 Model Driven Generation of Smart Contract Code for Collaborative Business Processes 103

    8.3 Model Driven Registry Generation for Blockchain 109

    8.4 Summary 114

    8.5 References 115

    9 Cost 116

    9.1 Introduction 116

    9.2 On-chain Data Cost 117

    9.3 Smart Contract Cost 119

    9.4 Cost Models 120

    9.5 Using and Evaluating the Cost Model 126

    9.6 Discussion 130

    9.7 Summary 131

    9.8 References 131

    10 Performance 133

    10.1 Introduction 133

    10.2 Performance Characteristics of Blockchain 133

    10.3 Architectural Process Modeling 136

    10.4 Prediction of the Latency of Blockchain-Based Systems 136

    10.5 Architectural Decision Making 143

    10.6 Summary 147

    10.7 References 148

    11 Blockchain Applications and its Security and Dependability 151

    11.1 Confidentiality 151

    11.2 Integrity 153

    11.3 Reliability and Availability 154

    11.4 Safety 156

    11.5 Maintainability 157

    11.6 Blockchain Transaction Inclusion and its Variation 159

    11.7 Retrying and Aborting Transactions of Blockchain 161

    11.8 Summary 162

    11.9 References 163

    12 AgriDigital Case Study 164

    12.1 Supply Chains for Agriculture and its Blockchain Solution 164

    12.1.1 Agricultural Supply Chains Worldwide 165

    12.1.2 Agriculture and Blockchain 166

    12.2 Vision for AgriDigital Sector 167

    12.3 AgriDigital Vision’s Pillars of Digital Trust 169

    12.3.1 Blockchain Solution for AgriDigital Industry 169

    12.4 Business Use Case Designs 170

    12.5 Case Study: Pilot Components 172

    12.5.1 Scenarios for Pilot 172

    12.5.2 Decisions for Design 173

    12.6 Summary 176

    12.7 References 177

    13 Blockchain Voting 178

    13.1 Introduction 178

    13.2 The Minimum Viable Product (MVP) Prototype 180

    13.3 Construction of Tokenvote 183

    13.4 Details of the Secure Vote system 186

    13.5 Summary 189

    13.6 References 190

    14 Blockchain Traceability 192

    14.1 Introduction 192

    14.2 OriginChain Architecture 194

    14.3 Analysis 199

    14.4 Discussion 202

    14.5 Summary 204

    14.6 References 204

    Index 206

    Chapter

    1 Introduction to Blockchain

    1.1 What is Blockchain and Why it is Important for Us

    The term Blockchain may be defined as a data block that is recorded over some time. It is grouped and linked to the previous data set cryptographically and forms a chain of events. It acts as a backbone technology of Digital Cryptocurrency; Bitcoin. It is a record of all the digital events and all the transactions that are carried out by the participating groups and parties. The transactions are verified and approved by the participants, and it comprises a detailed record of all the transactions. Bitcoin is an example of the blockchain and is the most famous cryptocurrency.

    Satoshi Nakamoto was a group of individuals. Satoshi Nakamoto published a paper on Bitcoin in 2008, and it is in this paper that we were first introduced to the concept of a Blockchain Technology. The transactions in the Blockchain Technology are recorded in a digital log or register, which is shared in the entire network, and this makes the Blockchain incorruptible. Important things like the Cars, Bonuses, and assets related to land and others can be recorded in a blockchain in the form of transactions.

    A lot of people get confused between a Blockchain and a Bitcoin, and assume that it is the same thing. However, the two are different, and the Bitcoin is an example of the Blockchain. Blockchain is a collection of blocks. These blocks consist of four parts, which are the Previous Hash, the Timestamp, Nonce, and the Merkel tree root.

    https://cdncontribute.geeksforgeeks.org/wp-content/uploads/block.png

    Figure 1.1: Blocks in a blockchain

    Blockchain is important for us, or one should pay attention to a Blockchain because they provide many advantages and are usually implemented by the business firms. If one uses the blockchain, one may not require a third person or party for carrying out any transactions or for any other purpose. This practice is time-saving as there is no interruption by any external element or party. This practice is also economical as it eliminates intermediate costs. The records are saved in the distributed ledger, and there is no need to trust a third person or party, and one is also saved from frauds, cybercrimes and the possibility of meddling with the data and records due to its indelible nature.

    1.2 Applications based on Blockchain Technology

    The Bitcoin has been operative since the year 2009. Bitcoin`s digital currency witnessed a maximal commercial capitalization in the year 2017 in December, which was estimated to be around US$335 billion. After Bitcoin, Ethereum is the biggest blockchain which had a commercial capitalization of around US$138 billion during the same period. There are other public and private blockchains as well, which make use of their own specific digitalized currencies. Private Blockchains are widely utilized in the industries as well as big enterprises.

    Several banks also make use of the Blockchain technology such as the Ripple and R3 firms, and this technology is utilized in finance as well as in the case of cross-border settlements. All kinds of transactions can be stored and verified on a blockchain, and it is not restricted to financial transactions. The digital tokens of a blockchain are beneficial for the management of the supply chain, to detect fraud or tempering and in case of academic features. Public blockchains facilitate reorganization and innovation, which is disruptive for the implementation of redistributed applications. Blockchains provide the option of removing an intermediate element or party. This is advantageous in the case where the third party cannot be trusted completely as there is a distributed ledger, which ensures that the action performed previously and the records stored previously are not changed or repudiated.

    There are two different categories, in case of blockchain applications, which are (1) whether the blockchain holds the default origin of the truth; and (2) whether it holds a view of reality? Cryptocurrency is a case of the first category. The first category of the blockchain application consists of database entries, like those of companies, patents, and land ownership rights, etc. The second type or category of blockchain application has records of physical assets and the state of these assets, such as those of temperature, location, and quality, etc.

    1.2.1 Industry and Enterprise

    The first use of blockchains was in cryptocurrency, but in today`s time, they are being utilized for other purposes as well. Blockchain technology can be applied and made use of in various sectors like the industrial sector inclusive of transport, education, agriculture, mining, healthcare, tourism, media, utilities and others (Sharples, & Domingue, 2016, September). These sectors have generic applications of the blockchain which can be enlisted as the following:

    ◊ Data management: A metadata (a set of data that provides descriptive information and other types of information about the stored data) layer can be generated for sharing and analysis of the data. A blockchain can facilitate the discovery and integration of analytical data services and also of the databases, even though databases that are usually large are not easily stored on it.

    ◊ Supply chain: Often, changes are made in proprietorship and certain important events and agreements, and these are usually made when one is looking for physical assets. These can be recorded and also conveyed with the help of the data that is stored in the blockchain. The outcome of this is that one is provided with original statistics and information related to goods, which facilitates the provision of enhanced logistics visibility as well as supply chain quality. Other major events that are a part of the supply chain related to automated payments by using smart contracts.

    ◊ Digital rights and IP management: The blockchain enables one to manage, assign and also transfer access as well as rights information for media assets and other intellectual and academic assets. But one important thing that we all need to keep in mind is that it is not necessary that the media assets are stored in the blockchain, and it is likely that metadata and cryptographic hashes that are stored on that particular blockchain might be combined or joined with communication technologies and the majority of the off-chain storehouse of data stored within the blockchain.

    ◊ Attestation and evidence of the fact: A blockchain can be utilized for the recording of the proof or the evidence of the existence of the files and the statistics. This is done by creating a timestamp of a cryptographic hash that is related to and is created with the use of the contents of that file or the document. Intermediate third parties can then combine these with the attested records and with corresponding physical documents. However, the non-existence of these documents can only be demonstrated if there is a strict format of their contents, which is accepted on a large scale.

    ◊ Interdivisional accounting: Often, multinational organizations and big enterprises that have different business units require governance needs to keep track and manage their internal accounting and, at the same time, communicate this information to the other divisions. A shared distributed ledger of interdivisional accounting at the link between these divisions can be made with the help of blockchain technologies on a shared private network.

    ◊ Corporate affairs: The blockchain also allows one to record voting authorities of board members or the shareholders in an organization or the company. This record can be used to examine the votes conducted on the blockchain for particular motions. These blockchain transactions may or may not be confidential, and thus, there may be a need for cryptographic mechanisms to avoid unwanted voting behavior.

    1.2.2 Financial Services

    Blockchain technologies can be used in financial service applications in the following ways:

    ◊ (International) payments: In the past years, there has been a constant rise in international trade and global transactions and businesses, which has increased international payments. These international payments account for about 40% of international payments. According to McKinsey, these payment flows were over $135 trillion. However, there are certain loopholes in the current system, such as the non-fixation of exchange rate till the time the funds arrive. Furthermore, many financial institutions complicate the procedures and this result in inaccuracy and delays. Blockchain offers immediate cross-border payments at an economical rate, and this is more reliable, trustworthy and secure way.

    ◊ Digital currency: Blockchain facilitates the transfer of digital currency between two or more parties, and most of the time, these transfers are not recorded by payment services and banks. Implementation and execution of new forms of currency can be done on blockchains. These can also act as incentive models to aid the coherence of several blockchain systems.

    ◊ Settlement of securities: The blockchain technology can help change the current ineffective way of settling securities. This can be utilized by the businessmen as well as the consumers. Blockchain is more efficient as well as is cost-saving, and it provides secured transactions to be carried out to settle the payment securities and without the use of intermediaries, which reduces any kind of friction and also is economical on the whole. The use of blockchain technology to settle securities is also time-saving. This also increases audibility, and the settlement also involves transparency when blockchain technology is utilized (Cocco, Pinna, & Marchesi, 2017).

    ◊ Markets: The distributed ledger technology is being adopted by the firms in the market to carry out their transactions as well as to record their transactions safely and securely. The exploitation of the blockchain feature prevents low penetration by the banks in the emerging markets. Solutions based on the blockchain technology can boost up the growth and economic development of the markets being set up today. However, one disadvantage is that these days the blockchain technology cannot be used in the case of low latency trading in the market.

    ◊ Trade finance: One can make use of the blockchain to evidence the documents and files and the data that is related to the trade, which helps in the reduction of risks in lending and to improvise the access to funds for the industry. Blockchain`s smart contracts can manage the inter-organizational process and its execution track the delays with transparency. This assures the counterparties of avoidance of risk and also any unwanted practices being carries out by the intermediating parties.

    1.2.3 Government Services

    Agencies within the government can make use of the blockchain to facilitate coordination, processing and sharing of information, and thus, improve the delivery of services provided by the government.

    Identity Management

    Any asset, like the cryptocurrencies or vehicles, or any other asset, all of these need to be furnished digitally to be transacted on the blockchain. However, the individual who is carrying out the transaction will be unable

    Enjoying the preview?
    Page 1 of 1