0% found this document useful (0 votes)
10 views89 pages

BlockChain All Unit 1-5

The document 'Blockchain Architecture Design' by Mohit Kumar Saxena provides a comprehensive overview of blockchain technology, including its architecture, design primitives, consensus mechanisms, and various applications in sectors like finance and government. It discusses different types of blockchain networks, the role of distributed ledgers, and essential cryptographic concepts. The document also explores specific use cases, particularly in financial software systems and supply chain management.

Uploaded by

abhitripathi0419
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views89 pages

BlockChain All Unit 1-5

The document 'Blockchain Architecture Design' by Mohit Kumar Saxena provides a comprehensive overview of blockchain technology, including its architecture, design primitives, consensus mechanisms, and various applications in sectors like finance and government. It discusses different types of blockchain networks, the role of distributed ledgers, and essential cryptographic concepts. The document also explores specific use cases, particularly in financial software systems and supply chain management.

Uploaded by

abhitripathi0419
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 89

Blockchain Architecture Design (KIT-061)

by
Mohit Kumar Saxena
Contents

1 Introduction to Blockchain 5
1.1 Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.1.1 Centralized Network Systems . . . . . . . . . . . . . . 5
1.1.2 Decentralized Network System . . . . . . . . . . . . . . 6
1.1.3 Distributed Network Systems . . . . . . . . . . . . . . 6
1.2 Introduction to Blockchain . . . . . . . . . . . . . . . . . . . . 7
1.3 Digital Money . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.3.1 Types of Digital Money . . . . . . . . . . . . . . . . . 8
1.3.2 Advantages of Digital Money . . . . . . . . . . . . . . 8
1.4 Distributed Ledgers . . . . . . . . . . . . . . . . . . . . . . . . 8
1.4.1 Types of Distributed Ledger Technology . . . . . . . . 9
1.5 Design Primitives of a Blockchain . . . . . . . . . . . . . . . . 9
1.5.1 Design Primitives of Blockchain (Protocols) . . . . . . 10
1.5.1.1 Hyperledger . . . . . . . . . . . . . . . . . . . 10
1.5.1.2 Multichain . . . . . . . . . . . . . . . . . . . 11
1.5.1.3 Enterprise Ethereum . . . . . . . . . . . . . . 12
1.5.1.4 Corda . . . . . . . . . . . . . . . . . . . . . . 13
1.5.1.5 Quorum . . . . . . . . . . . . . . . . . . . . . 13
1.5.2 Design Primitives of Blockchain (Security ) . . . . . . . 13
1.5.3 Design Primitives of Blockchain (Consensus) . . . . . . 14
1.5.4 Design Primitives of Blockchain (Permissions) . . . . . 16
1.5.5 Design Primitives of Blockchain (Privacy) . . . . . . . 16
1.6 Blockchain Architecture and Design . . . . . . . . . . . . . . . 16
1.6.1 Types of Blockchain Architectures . . . . . . . . . . . . 16
1.6.1.1 Public blockchain networks . . . . . . . . . . 17
1.6.1.2 Private blockchain networks . . . . . . . . . . 18
1.6.1.3 Hybrid blockchain networks . . . . . . . . . . 19
1.6.1.4 Consortium blockchain networks . . . . . . . 20
1.6.2 How Does Blockchain Work . . . . . . . . . . . . . . . 21
1.6.2.1 Authentication . . . . . . . . . . . . . . . . . 22

1
1.6.2.2 Authorisation . . . . . . . . . . . . . . . . . . 22
1.6.3 Terms Related to Blockchain . . . . . . . . . . . . . . . 23
1.6.4 Key Characteristics of Blockchain . . . . . . . . . . . . 23
1.7 Basic Crypto Primitives . . . . . . . . . . . . . . . . . . . . . 24
1.7.1 One-Way Hash Function . . . . . . . . . . . . . . . . . 25
1.7.1.1 Properties of Cryptographic Hash Functions . 25
1.7.1.2 Types of Cryptographic Hash Functions . . . 26
1.7.1.3 Uses of Hash Functions in Blockchain . . . . . 27
1.7.2 Digital signatures . . . . . . . . . . . . . . . . . . . . . 28
1.7.2.1 The Role of Digital Signatures in Blockchain . 28
1.7.2.2 How Digital Signatures Work . . . . . . . . . 28
1.7.2.3 Electronic Signatures Vs. Digital Signatures: . 30
1.7.2.4 Use Cases . . . . . . . . . . . . . . . . . . . . 30
1.8 Hashchain to Blockchain . . . . . . . . . . . . . . . . . . . . . 31
1.9 Basic Consensus Mechanisms . . . . . . . . . . . . . . . . . . 32
1.9.1 How Does Consensus Work? . . . . . . . . . . . . . . . 32

2 Consensus 33
2.1 Requirements for the Consensus Protocols . . . . . . . . . . . 33
2.1.1 Types of Consensus Mechanisms . . . . . . . . . . . . . 34
2.1.1.1 Proof of Work . . . . . . . . . . . . . . . . . . 34
2.1.1.2 Proof of Stake . . . . . . . . . . . . . . . . . 34
2.1.1.3 Delegated Proof of Stake . . . . . . . . . . . . 35
2.1.1.4 Proof of Capacity . . . . . . . . . . . . . . . . 35
2.1.1.5 Proof of Elapsed Time . . . . . . . . . . . . . 35
2.1.1.6 Proof of Identity . . . . . . . . . . . . . . . . 35
2.1.1.7 Proof of Authority . . . . . . . . . . . . . . . 36
2.1.1.8 Proof of Activity . . . . . . . . . . . . . . . . 36
2.1.1.9 Byzantine Fault Tolerance (BFT) . . . . . . . 36
2.2 Scalability Aspects of Blockchain Consensus Protocols . . . . . 36
2.2.1 Factors Influencing Performance of Blockchain . . . . . 37
2.2.2 Scalable Consensus Mechanisms . . . . . . . . . . . . . 38
2.3 Permissioned Blockchains . . . . . . . . . . . . . . . . . . . . 39
2.3.1 Design Goals . . . . . . . . . . . . . . . . . . . . . . . 39
2.4 Consensus Protocols for Permissioned Blockchains . . . . . . . 40
2.4.1 The Right Consensus Protocol for PermissionedBlockchain 42
2.4.2 Advantages of Permissioned Blockchain . . . . . . . . . 43
2.4.3 Disadvantages of Permissioned Blockchain . . . . . . . 44
2.5 Why Permissioned Blockchains are Ideal . . . . . . . . . . . . 44
2.5.1 Use Case Examples . . . . . . . . . . . . . . . . . . . . 45

2
3 Hyperledger Fabric 46
3.1 Hypeledger . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
3.1.1 Hypeledger Architecture . . . . . . . . . . . . . . . . . 47
3.1.1.1 Hypeledger Framework . . . . . . . . . . . . . 47
3.1.1.2 Hypeledger Tools . . . . . . . . . . . . . . . . 48
3.1.1.3 Objectives of the Hyperledger Project . . . . 48
3.2 Hyperledger Fabric . . . . . . . . . . . . . . . . . . . . . . . . 49
3.2.1 Hyperledger Fabric Transaction Flow . . . . . . . . . . 49
3.3 Consensus in Hyperledger Fabric . . . . . . . . . . . . . . . . 50
3.3.1 Solo Consensus Algorithm in Hyperledger Fabric . . . . 52
3.3.2 Kafka Consensus Algorithm in Hyperledger Fabric . . . 53
3.3.3 Consensus Properties . . . . . . . . . . . . . . . . . . . 53
3.4 Hyperledger Fabric - Components Overview . . . . . . . . . . 53
3.4.1 Peer Node . . . . . . . . . . . . . . . . . . . . . . . . . 53
3.4.2 Orderer . . . . . . . . . . . . . . . . . . . . . . . . . . 55
3.4.3 Membership service provider (MSP) . . . . . . . . . . . 55
3.4.4 Ledger . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
3.4.5 Chaincode . . . . . . . . . . . . . . . . . . . . . . . . 57
3.4.6 Consensus Algorithm . . . . . . . . . . . . . . . . . . . 57
3.4.7 Channels . . . . . . . . . . . . . . . . . . . . . . . . . . 58
3.5 Beyond Chaincode: fabric SDK . . . . . . . . . . . . . . . . . 59
3.5.1 Hyperledger Fabric SDK . . . . . . . . . . . . . . . . . 59
3.5.2 Hyperledger Fabric SDK for Java . . . . . . . . . . . . 60
3.6 Hyperledger Composer . . . . . . . . . . . . . . . . . . . . . . 61
3.6.1 Key Concepts in Hyperledger Composer . . . . . . . . 62
3.6.2 Architecture of Hyperledger Composer . . . . . . . . . 64

4 Use case 1 66
4.1 Blockchain in Financial Software and Systems (FSS) . . . . . 66
4.1.1 Settlements . . . . . . . . . . . . . . . . . . . . . . . . 68
4.1.2 KYC . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
4.1.2.1 KYC Blockchain Implementation . . . . . . . 68
4.1.2.2 Blockchain and KYC: Current Challenges . . 70
4.1.3 Capital Markets . . . . . . . . . . . . . . . . . . . . . . 71
4.1.4 Blockchain in Insurance . . . . . . . . . . . . . . . . . 73
4.2 Blockchain in Trade/Supply Chain . . . . . . . . . . . . . . . 74
4.2.1 Efficiency . . . . . . . . . . . . . . . . . . . . . . . . . 75
4.2.2 Transparency . . . . . . . . . . . . . . . . . . . . . . . 75
4.2.3 Blockchain in supply chain use cases . . . . . . . . . . 75
4.2.4 Provenance of Goods . . . . . . . . . . . . . . . . . . . 76
4.2.5 Blockchain in Supply Chain Finance . . . . . . . . . . 77

3
4.2.6 Invoice Management Discounting . . . . . . . . . . . . 77
4.2.6.1 Invoice Discounting on Blockchain . . . . . . 77
4.2.6.2 Benefits of Blockchain in Invoice Discounting 78

5 Use case 3 79
5.1 Blockchain for Government . . . . . . . . . . . . . . . . . . . . 79
5.1.1 Digital Identity . . . . . . . . . . . . . . . . . . . . . . 79
5.1.2 Application of Blockchain Technology in Land Records 81
5.1.2.1 Concept of Smart Contracts . . . . . . . . . . 81
5.1.3 Public Distribution System Social Welfare Systems . . 84
5.1.3.1 Role of Blockchain . . . . . . . . . . . . . . . 85
5.2 Cryptography in Blockchain . . . . . . . . . . . . . . . . . . . 85
5.2.1 Symmetric-key cryptography . . . . . . . . . . . . . . . 86
5.2.2 Asymmetric-key Encryption . . . . . . . . . . . . . . . 87

4
Chapter 1

Introduction to Blockchain

1.1 Network
A network can be described as a group of two or more computer systems that
are connected and communicate through sharing files or other resources.

1.1.1 Centralized Network Systems


A centralized network is a network where the nodes don’t directly communi-
cate with each other. A single server handles the major part of the network’s
processing system in this system. The central server owns all the resources.

Figure 1.1: Centralized Network Systems

If any nodes want to gain access to any other resources, they get it via the
central system.

5
Figure 1.2: Decentralized Network System

1.1.2 Decentralized Network System


A decentralized network distributes workload among several servers without
having a single central server to manage network activity. Each of these
servers can act as an independent central server.
Centralization and decentralization refer to levels of control.

1.1.3 Distributed Network Systems


Distribution refers to differences in location. In a distributed network system,
the processing power is spread evenly across the network. This system can
often seem similar to a decentralized system. In a distributed system, all
parts of the system are located in different physical locations. The processing
is spread across multiple nodes, but decision-making can be centralised or
decentralised.

Figure 1.3: Network Systems

6
1.2 Introduction to Blockchain
Blockchain technology is an advanced database mechanism that allows trans-
parent information sharing. A blockchain is a distributed database that
maintains a continuously growing list of ordered records called blocks. These
blocks are linked using cryptography. Each block contains a cryptographic
hash of the previous block, a timestamp, and transaction data. Blockchain is
a distributed digital ledger of immutable records. The meaning of immutable
is that the data cannot be altered once it is recorded. Blockchain is com-
posed of cryptographically linked blocks like a linked list of a data structure
and hash as a pointer. That is, there is a chain of blocks in blockchain in
chronological order. The term blockchain was first described back in 1991. A
group of researchers wanted to create a tool to timestamp digital documents
so that they could not be backdated or changed. Further, the technique was
adapted and reinvented by Satoshi Nakamoto. In 2008, Nakamoto created
the first cryptocurrency, the blockchain-based project called Bitcoin.Satoshi
Nakamoto or a group of people with alias who developed bitcoin. He/they
authored a bitcoin white paper titled ‘Bitcoin: A Peer-to-Peer Electronic
Cash System’.

Figure 1.4: Blockchain technology

1.3 Digital Money


Digital money, or digital currency, is any form of money or payment that
exists only in electronic form. Digital money is not physically tangible like a
dollar bill or a coin. It is accounted for and transferred using online systems.
One well-known form of digital money is the crypto currency. Digital money
is exchanged using technologies such as smartphones, credit cards, and online
cryptocurrency exchanges. In some cases, it can be converted into physical
cash through the use of an ATM. A variant of digital money is already present
in society today in the form of cash held in online bank accounts. This cash
can be sent to others or received from them. It can also be used for online

7
transactions. A blockchain allows a person to safely send money to another
person without going through a bank or financial services provider.

1.3.1 Types of Digital Money


• Central bank digital currencies (CBDCs) are currencies issued by the
central bank of a country.

• Cryptocurrencies are digital currencies designed using cryptography.


The most popular cryptocurrencies are Bitcoin and Ethereum.

• Stablecoins are a variation of cryptocurrencies and were developed to


counter the price volatility of regular cryptocurrencies. Stablecoins can
be likened to a form of private money.

1.3.2 Advantages of Digital Money


Digital money eliminates the need for physical storage and safekeeping. Dig-
ital money simplifies accounting and record-keeping for transactions through
technology. It has already shortened the amount of time and the cost required
to transfer money across borders.

1.4 Distributed Ledgers


A distributed ledger is a database that is consensually shared and synchro-
nized across multiple sites, institutions, or geographies, accessible by multiple
people. It allows transactions to have public "witnesses." The participant at
each node of the network can access the recordings shared across that net-
work and can own an identical copy of it. Any changes or additions made to
the ledger are reflected and copied to all participants in a matter of seconds
or minutes. A distributed ledger stands in contrast to a centralized ledger,
which is the type of ledger that most companies use. A centralized ledger
is more prone to cyber attacks and fraud, as it has a single point of failure.
DLT uses cryptography to securely store data, cryptographic signatures and
keys to allow access only to authorized users. Blockchain is a type of DLT in
which transactions are recorded with an immutable cryptographic signature
called a hash.

8
1.4.1 Types of Distributed Ledger Technology
• Permissioned DLT: Nodes have to take permission from a central
authority to access or make any changes in the network. Mostly these
types of permissions include identity verification.

• Permissionless DLT: There is no central authority to validate trans-


actions, rather existing nodes are collectively responsible for validating
the transactions. Various consensus mechanisms are used to validate
transactions based on predefined algorithms. In the case of bitcoin
proof of work consensus mechanism is used.

• Hybrid DLT: It is combined with both permissionless and permis-


sioned DLTs and can benefit from both of them.

Figure 1.5: Distributed Ledger Technology

1.5 Design Primitives of a Blockchain


Design primitives of a blockchain refer to the fundamental building blocks
or basic components that are used to construct the underlying structure of a
blockchain system. These primitives typically include the following elements:

• protocols,

• security,

9
• consensus,

• permissions,

• privacy.

1.5.1 Design Primitives of Blockchain (Protocols)


In computer science, a protocol is a set of rules or procedures that govern
the transfer of data establishing how, in order for computers to exchange
information, the information must be structured and how each party will
send and receive it. A blockchain is a network of multiple devices (nodes) all
equally important connected to each other through the internet. Essentially,
a blockchain is a ledger which stores the record of what has come in and gone
out in a distributed p2p manner after the transaction has been verified by all
participating nodes. This distributed ledger works on pre-defined rules which
are agreed upon by all the participating nodes (the peers) in the network.
Protocols define the way that data must be structured to be accepted into a

Figure 1.6: Protocols

system, and they establish safeguards to prevent malicious users from causing
damage. Five major protocols are most significant:

1.5.1.1 Hyperledger
Hyperledger is an open-source collaborative effort created to advance cross-
industry blockchain technologies. It is not a single protocol, but rather a
collection of blockchain protocols and tools developed by the Linux Foun-
dation. The goal of Hyperledger is to create modular, flexible, and scalable

10
blockchain technologies that can be used for a wide range of applications
across various industries. Hyperledger protocols are designed to be highly
configurable and customizable to meet the needs of different use cases. They
also prioritize security, privacy, and interoperability, making them suitable
for enterprise applications. Some of the most well-known Hyperledger pro-
tocols include:
• Hyperledger Fabric: A permissioned blockchain framework that al-
lows multiple parties to transact on a shared ledger without the need
for a central authority.
• Hyperledger Sawtooth: A modular blockchain platform that sup-
ports various consensus mechanisms and allows for the creation of cus-
tom transaction families.
• Hyperledger Besu: An Ethereum-compatible client for building enterprise-
grade blockchain applications.
• Hyperledger Indy: A decentralized identity management system
that allows individuals to control their own digital identities.
• Hyperledger Burrow: A smart contract engine that supports the
Ethereum Virtual Machine (EVM) and allows for the execution of
Ethereum-based smart contracts on a permissioned blockchain network.
Hyperledger protocols and tools are used by businesses and organizations
around the world to build blockchain solutions for a wide range of use cases,
including supply chain management, identity verification, and financial trans-
actions.

1.5.1.2 Multichain
MultiChain is an open-source blockchain platform that enables the creation
and deployment of private, permissioned blockchain networks. It was first
released in 2015 by Coin Sciences Ltd. Unlike public blockchains like Bitcoin
and Ethereum, which are open to anyone, permissioned blockchains require
permission to access and participate. This makes them more suitable for use
cases where privacy, scalability, and governance are important, such as supply
chain management, asset tracking, and financial transactions. MultiChain is
designed to be easy to use and customize, with a simple command-line inter-
face and a flexible API. It also supports a wide range of features, including:
• Custom assets: MultiChain allows users to create and manage their
own digital assets, such as tokens, stocks, and bonds, on the blockchain.

11
• Permissions: MultiChain enables users to control who can access and
participate in the blockchain network, allowing for greater privacy and
security.

• Data streams: MultiChain supports the creation and management of


real-time data streams, which can be used to track events and transac-
tions on the blockchain.

• Smart contracts: MultiChain includes a simple programming lan-


guage that allows users to create and execute smart contracts on the
blockchain.

• Mining: MultiChain does not require mining, which means that it is


more energy-efficient and scalable than proof-of-work blockchains like
Bitcoin.

Overall, MultiChain is a versatile and user-friendly blockchain platform that


is well-suited for businesses and organizations that want to build private,
permissioned blockchain networks.

1.5.1.3 Enterprise Ethereum


Enterprise Ethereum is a blockchain protocol based on the Ethereum blockchain
that is specifically designed for enterprise use cases. It is an open-source,
public blockchain that allows for the creation of decentralized applications
(dApps) that can be used for a wide range of applications, including supply
chain management, identity verification, and financial transactions. Enter-
prise Ethereum is designed to be scalable, secure, and flexible, with features
that are tailored to meet the needs of businesses and organizations. Some of
the key features of Enterprise Ethereum include:

• Private transactions: Enterprise Ethereum allows for the creation


of private transactions that are only visible to authorized parties, pro-
viding greater privacy and security.

• Permissioned networks: Enterprise Ethereum can be used to create


private, permissioned networks that allow organizations to control who
can access and participate in the blockchain network.

• Smart contracts: Enterprise Ethereum supports the creation and


execution of smart contracts, which are self-executing agreements that
can automate processes and enforce rules on the blockchain.

12
• Consensus mechanisms: Enterprise Ethereum supports a range of
consensus mechanisms, including proof-of-work (PoW), proof-of-stake
(PoS), and Byzantine fault tolerance (BFT).

• Interoperability: Enterprise Ethereum is designed to be interopera-


ble with other blockchain platforms, allowing for seamless integration
with existing systems and networks.

Overall, Enterprise Ethereum is a powerful blockchain protocol that is well-


suited for enterprise use cases. It combines the flexibility and security of the
Ethereum blockchain with features that are tailored to meet the needs of
businesses and organizations.

1.5.1.4 Corda
Corda is a competitor of Multichain that offers a protocol designed for enter-
prises. Most applications that have been developed with Corda have been in
the finance and banking field. However, a wide range of custom Blockchain
solutions can make use of Corda’s technology. Corda is accredited by the R3
banking consortium.

1.5.1.5 Quorum
As with many of the leading protocols, Quorum aims to help businesses in the
finance sector. Quorum is significant because it has strong backing from the
financial community. For instance, J.P. Morgan Chase is a primary financial
backer of the protocol, and it has received additional resources from other
leading banks. However, Quorum has managed to remain as an open-source
project that can be utilized by anyone. Quorum is also strongly associated
with Ethereum since the project started by modifying the Ethereum code.

1.5.2 Design Primitives of Blockchain (Security )


Blockchains are secured through a variety of mechanisms that include ad-
vanced cryptographic techniques and mathematical models of behaviour and
decision-making. The blockchain is constructed to ensure a number of inher-
ent security attributes, such as consistency, tamper-resistant, resistance to a
Distributed Denial-of-Service (DDoS) attack, pseudonymity, and resistance
to double-spending attack.
Consistency: The concept of consistency in the context of blockchain as a
distributed global ledger refers to the property that all nodes have the same
ledger at the same time. Within a blockchain network system, the strong

13
consistency model means that all nodes have the same ledger at the same
time.
Tamper-Resistance: Tamper-resistance of blockchain means that any trans-
action information stored in the blockchain cannot be tampered with during
and after the process of block generation.

1.5.3 Design Primitives of Blockchain (Consensus)


Consensus mechanism is a fundamental concept in blockchain technology.
It refers to the process by which transactions are validated and added to
the blockchain ledger in a decentralized network. Consensus mechanisms are
necessary to ensure that all nodes in the network agree on the state of the
blockchain and prevent fraudulent transactions. In a blockchain network,
consensus is achieved through a process called mining or validation. Min-
ers (or validators) use computational power to solve complex mathematical
problems, which helps to verify transactions and create new blocks in the
blockchain. The first miner to solve the problem is rewarded with newly
created cryptocurrency tokens as an incentive for participating in the net-
work. There are several types of consensus mechanisms used in blockchain
technology, each with its own advantages and disadvantages. Some of the
most well-known consensus mechanisms include:

• Proof of Work (PoW): In a PoW consensus mechanism, miners use


computational power to solve complex mathematical problems, and
the first miner to solve the problem is rewarded with newly created
cryptocurrency tokens. This mechanism is used in Bitcoin and other
cryptocurrencies.

Figure 1.7: Proof of Work (PoW)

14
• Proof of Stake (PoS): In a PoS consensus mechanism, validators
are selected based on the number of tokens they hold, and they are
responsible for validating transactions and creating new blocks in the
blockchain. This mechanism is used in Ethereum and other cryptocur-
rencies.

Figure 1.8: Proof of Stake (PoS)

• Delegated Proof of Stake (DPoS): In a DPoS consensus mecha-


nism, token holders vote for delegates who are responsible for validating
transactions and creating new blocks in the blockchain. This mecha-
nism is used in EOS and other cryptocurrencies.

• Byzantine Fault Tolerance (BFT): In a BFT consensus mechanism,


validators are chosen based on their reputation and are responsible for
reaching a consensus on the state of the blockchain. This mechanism is
used in Hyperledger Fabric and other enterprise blockchain platforms.

• Proof of Elapsed Time (PoET): is a consensus mechanism used


in some blockchain networks, including Hyperledger Sawtooth. PoET
is a variation of the Proof of Work (PoW) consensus mechanism, but
instead of relying on computational power to validate transactions, it
uses a random lottery system that is based on time. PoET is designed
to be more energy-efficient than PoW because it doesn’t require miners
to use large amounts of computational power to solve complex mathe-
matical problems. Instead, it relies on a random lottery system that is
based on time, which can be executed on a low-power device such as a
smartphone or embedded system.

Overall, consensus mechanisms are an essential component of blockchain


technology, ensuring the security and integrity of the blockchain network.
The choice of consensus mechanism depends on the specific use case and the
needs of the blockchain network.

15
1.5.4 Design Primitives of Blockchain (Permissions)
The blockchain needs permission to participate in network and interact with
it. In public blockchain anyone can participate as open source clients and at-
tach to the network. Once the necessary synchronization done with rest of the
network then it gives the copy of ledgers. The permissioned blockchain works
differently where participant needs permission to join the network. This per-
mission is granted by the rest of the participants of network where they com-
pare the signer’s identity against permissioning policy. This permissioning
policy applies on both peer to peer networking. It is used to propagate trans-
actions as well as blocks with other functional messages. The permissioning
policy can be locally maintained by each of the operator or administrator.
The administrator will decide who will interact with the network.

1.5.5 Design Primitives of Blockchain (Privacy)


The network’s participants benefit from the privacy provided by the blockchain.
Confidentiality and anonymity are also part of this concept of privacy.

1.6 Blockchain Architecture and Design


A blockchain is designed as a decentralized network of millions of computers,
commonly referred to as nodes. It’s a distributed database architecture in
which each node plays the role of a network administrator who voluntarily
joins the network. Since there’s no centralized information in a blockchain
architecture, a blockchain is literally impossible to hack. Blockchain is a
decentralized, distributed ledger that comprises blocks. The Blocks are con-
nected to form a long chain. Each block comprises an address to the previous
block and some information. The address part is done with the help of hash-
ing. The information comprises data such as transactions and is encrypted.
Blockchain was first implemented in the year 2008 by a group of people
named Satoshi Nakamoto. Blockchain uses strong cryptographic methods to
manage the whole network.

1.6.1 Types of Blockchain Architectures


There are four main types of decentralized or distributed networks in the
blockchain

16
1.6.1.1 Public blockchain networks
These blockchains are completely open to following the idea of decentral-
ization. They don’t have any restrictions, anyone having a computer and
internet can participate in the network. Examples of public blockchain are
Bitcoin, Ethereum.

• As the name is public this blockchain is open to the public, which


means it is not owned by anyone.

• Anyone having internet and a computer with good hardware can par-
ticipate in this public blockchain.

• All the computers in the network hold the copy of other nodes or block
present in the network

• In this public blockchain, we can also perform verification of transac-


tions or records

Advantages:

• Trustable: There are algorithms to detect no fraud. Participants need


not worry about the other nodes in the network

• Secure: This blockchain is large in size as it is open to the public. In


a large size, there is greater distribution of records

• Anonymous Nature: It is a secure platform to make your transaction


properly at the same time, you are not required to reveal your name
and identity in order to participate.

• Decentralized: There is no single platform that maintains the net-


work, instead every user has a copy of the ledger.

Disdvantages:

• Processing: The rate of the transaction process is very slow, due to its
large size. Verification of each node is a very time-consuming process.

• Energy Consumption: Proof of work is high energy-consuming. It


requires good computer hardware to participate in the network

• Acceptance: No central authority is there so governments are facing


the issue to implement the technology faster.

17
1.6.1.2 Private blockchain networks
A single organization controls private blockchains, also called managed blockchains.
The authority determines who can be a member and what rights they have
in the network. Private blockchains are only partially decentralized because
they have access restrictions. Therefore companies use them for internal au-
diting, voting, and asset management. An example of private blockchains is
Hyperledger, Corda. Ripple, a digital currency exchange network for busi-
nesses, is an example of a private blockchain.

Figure 1.9: Types of Blockchain

Advantages:

• Speed: The rate of the transaction is high, due to its small size. Ver-
ification of each node is less time-consuming.

• Scalability: We can modify the scalability. The size of the network


can be decided manually.

• Privacy: It has increased the level of privacy for confidentiality reasons


as the businesses required.

18
• Balanced: It is more balanced as only some user has the access to the
transaction which improves the performance of the network.

Disdvantages:

• Security- The number of nodes in this type is limited so chances of


manipulation are there. These blockchains are more vulnerable.

• Centralized- Trust building is one of the main disadvantages due to


its central nature. Organizations can use this for malpractices.

• Count- Since there are few nodes if nodes go offline the entire system
of blockchain can be endangered.

1.6.1.3 Hybrid blockchain networks


Hybrid blockchains combine elements from both private and public networks.
Companies can set up private, permission-based systems alongside a pub-
lic system. In this way, they control access to specific data stored in the
blockchain while keeping the rest of the data public. They use smart con-
tracts to allow public members to check if private transactions have been
completed. For example, hybrid blockchains can grant public access to digi-
tal currency while keeping bank-owned currency private. Examples of Hybrid
Blockchain are Ripple network and XRP token.
Advantages:

• Ecosystem: Most advantageous thing about this blockchain is its hy-


brid nature. It cannot be hacked as 51

• Cost: Transactions are cheap as only a few nodes verify the transac-
tion. All the nodes don’t carry the verification hence less computational
cost. Architecture: It is highly customizable and still maintains in-
tegrity,

• security, and transparency.

• Operations: It can choose the participants in the blockchain and


decide which transaction can be made public.

Disdvantages:

• Efficiency: Not everyone is in the position to implement a hybrid


Blockchain. The organization also faces some difficulty in terms of
efficiency in maintenance.

19
• Transparency: There is a possibility that someone can hide informa-
tion from the user. If someone wants to get access through a hybrid
blockchain it depends on the organization whether they will give or
not.
• Ecosystem: Due to its closed ecosystem this blockchain lacks the
incentives for network participation.

1.6.1.4 Consortium blockchain networks


A group of organizations governs consortium blockchain networks. Prese-
lected organizations share the responsibility of maintaining the blockchain
and determining data access rights. Industries in which many organizations
have common goals and benefit from shared responsibility often prefer con-
sortium blockchain networks. For example, the Global Shipping Business
Network Consortium is a not-for-profit blockchain consortium that aims to
digitize the shipping industry and increase collaboration between maritime
industry operators.
Advantages:
• Speed: A limited number of users make verification fast. The high
speed makes this more usable for organizations.
• Authority: Multiple organizations can take part and make it decentral-
ized at every level. Decentralized authority, makes it more secure.
• Privacy: The information of the checked blocks is unknown to the
public view. but any member belonging to the blockchain can access
it.
• Flexible: There is much divergence in the flexibility of the blockchain.
Since it is not a very large decision can be taken faster.
Disdvantages:
• Approval: All the members approve the protocol making it less flex-
ible. Since one or more organizations are involved there can be differ-
ences in the vision of interest.
• Transparency: It can be hacked if the organization becomes corrupt.
Organizations may hide information from the users.
• Vulnerability: If few nodes are getting compromised there is a greater
chance of vulnerability in this blockchain

20
Figure 1.10: Comparisons between Private, Public and Consortium
Blockchain

1.6.2 How Does Blockchain Work


Before a transaction is added to the blockchain it must be authenticated and
authorised. There are several key steps a transaction must go through before
it is added to the blockchain. The working is a multistep process, but it
involves four phases: the creation of the block, verification of the block, the
addition of the block and updation of the database. The steps are as follows:

• An authentic user requests a transaction.

• A block is created in which the transaction or any other data is speci-


fied.

• The block is circulated all over the network. Blockchain protocols do


this.

• Miners verify the block. Upon successful verification, the miners get
incentives.

• After the successful transaction, the database is added.

21
Figure 1.11: How Does Blockchain Work

1.6.2.1 Authentication
The original blockchain was designed to operate without a central authority
(i.e. with no bank or regulator controlling who transacts), but transactions
still have to be authenticated. This is done using cryptographic keys, a
string of data (like a password) that identifies a user and gives access to their
“account” or “wallet” of value on the system. Each user has their own private
key and a public key that everyone can see. Using them both creates a secure
digital identity to authenticate the user via digital signatures and to ‘unlock’
the transaction they want to perform.

1.6.2.2 Authorisation
Once the transaction is agreed upon between the users, it needs to be ap-
proved or authorised before it is added to a block in the chain. For a public
blockchain, the decision to add a transaction to the chain is made by consen-
sus. This means that the majority of “nodes” (or computers in the network)
must agree that the transaction is valid. The people who own the computers
in the network are incentivised to verify transactions through rewards. This
process is known as ‘proof of work’.
Whereas public blockchains tend to be decentralized, private blockchains
are typically controlled by one entity, like an enterprise. Decentralized blockchains
using a mining consensus system like proof of work may lose their decentral-

22
ization if one miner (or group of miners) becomes more powerful than all the
others, leading to the threat of a 51% attack.

1.6.3 Terms Related to Blockchain


• Block: A block is the unit of blockchain that contains information in
encrypted form. The blocks are connected. It is also called an im-
mutable record as it cannot be reverted once created. There are three
types of Blocks: Genesis Block, Valid Block and Orphan Blocks. Gene-
sis Block is the first block that is created at the start of the blockchain.
Valid Blocks are the blocks validated by miners and added to the
blockchain. Orphan Blocks, as the name suggests, they are not added
to any blockchain.

• Miner: Blockchain Mining comprises of verification of transactions.


Since blockchain is highly decentralized, no authority can verify and
secure the transactions. Miners are the users of the technology who
verify the transactions. After successful verification, they get incen-
tives.

• Node: Nodes are devices in which blocks are stored. The nodes also
have a database that stores the history of transactions and is connected.

• Block Reward: A block reward is an incentive that is given to miners


when they participate in the validation of the blocking process. It has
two parts: block subsidy and transaction fees.

• Cryptography: It is a practice used in this technology to encode and


decode data. The aim is to protect data with the help of codes. The
techniques used are a part of security protocols to prevent unauthorized
access from third parties. The word is made up of two terms ‘Krypto’
means ‘hidden’ and ‘Graphy’ means ‘written’.

1.6.4 Key Characteristics of Blockchain


Blockchain architecture possesses a lot of benefits for businesses. Here are
several embedded characteristics:

• Cryptography - blockchain transactions are validated and trustwor-


thy due to the complex computations and cryptographic proof among
involved parties

23
Figure 1.12: Terms Related to Blockchain

• Immutability - any records made in a blockchain cannot be changed


or deleted

• Provenance - refers to the fact that it is possible to track the origin


of every transaction inside the blockchain ledger

• Decentralization - each member of the blockchain structure has ac-


cess to the whole distributed database. As opposed to the central-based
system, consensus algorithm allows for control of the network

• Anonymity- each blockchain network participant has a generated ad-


dress, not user identity. This keeps users’ anonymity, especially in a
public blockchain structure

• Transparency - the blockchain system cannot be corrupted. This


is very unlikely to happen, as it requires huge computing power to
overwrite the blockchain network completely

1.7 Basic Crypto Primitives


Cryptographic Primitives are the tools used to build security protocols, which
comprise low-level algorithms. Security protocols are nothing but algorithms
that are developed by Cryptographic designers using Cryptographic Primi-
tives as tools, and these protocols are executed when certain conditions are

24
met. Since Blockchain is highly decentralized in nature, the security of data
is of utmost importance. For example: Suppose two users want to exchange
information on a public Blockchain. In Public Blockchain, everybody can
see the transaction process. To secure the data, encryption algorithms are
used. For decrypting, the data decryption algorithms are used. These cryp-
tographic primitives are used to develop these high-level secured algorithms.
There are many cryptographic primitives, but we will discuss the most com-
monly used ones which are Hash and Signature.

1.7.1 One-Way Hash Function


It is a mathematical function which converts an input of any length to a
binary sequence of fixed length. Hashing is the process of converting an orig-
inal piece of data into a digest or hash. The process uses cryptographic hash
functions for the irreversible conversion of the message. It cannot be reverted,
which means the original string cannot be retrieved back from the hash. It
is to be noted that even a small change in the input can change the meaning
of the whole output. For example, SHA256 is a hash function. It generates
32-byte strings for any input. The hash function applies to the message in

Figure 1.13: One-Way Hash Function

order to generate a message digest which is a fixed-size hexadecimal output

• It takes an arbitrary size input as a message. INPUT M: The Message

• Uses a Cryptographic hash function H to encrypt the message M.

• Generates the output called Digest. H(M) = Digest

1.7.1.1 Properties of Cryptographic Hash Functions


The process of hashing not only secures the message but also makes the com-
putation easy. It compresses the message into hash/digest which is efficient
for computation as well as communication.

25
• Deterministic: Cryptographic hash functions are deterministic. It
always generates the same hash for the same input data.

• Avalanche Effect: This means for a small change in the input, the
output will change significantly.

• Puzzle Friendliness: This means even if one gets to know the first
200 bytes, one cannot guess or determine the next 56 bytes.

• Preimage resistance: Given a hash value h, it is difficult to find a


message.

• Second preimage resistance: Given a message m1, it is difficult to


find another message m2 such that hash(k, m1) = hash(k, m2)

1.7.1.2 Types of Cryptographic Hash Functions


There are several different classes of hash functions. Some of the popular
classes are:

• RACE Integrity Primitives Evaluation Message Digest (RIPEMD):


This set includes RIPEMD, RIPEMD-128, RIPEMD-160, RIPEMD-
256, RIPEMD-320. Out of these RIPEMD-160 is the most common.
The original RIPEMD-128 is based on the design principles used in
MD4. The RIPEMD-256 and 320 have fewer chances of accidental col-
lision but do not have higher levels of security as compared to RIPEMD-
128 and RIPEMD-160.

• Message-Digest Algorithm: This family comprises hash functions


MD2, MD4, MD5, and MD6. MD5 is the most widely used crypto-
graphic hash function. It is used to generate a 128-bit digest from a
512-bit string broken down into 16 words composed of 32 bits each.
Ronald Rivest designed this algorithm in 1991 to use for digital sig-
nature verification. These are no longer considered cryptographically
secure methods and should not be used for cryptographic authentica-
tion.

• BLAKE2: It was announced on December 21, 2012.BLAKE2 is a cryp-


tographic hash function based on BLAKE, designed with the aim to
replace MD5 and SHA-1 algorithms in applications requiring high per-
formance in software. It provides better security than SHA-2 and is
similar to that of SHS-3. It provides the following features:
• It provides immunity to length extensions.

26
• It removes the addition of constants to message words.
• It simplifies padding and reduces the number of rounds from 16 to
12.
• BLAKE3: It was announced on January 9, 2020. BLAKE3 is a cryp-
tographic function based on Bao and BLAKE2. It is a few times faster
than BLAKE2. This algorithm provides many features like parallelism,
XOF, KDF, etc.
• Whirlpool: It is a cryptographic hash function, first described in
2000. It is a modified version of the Advanced Encryption Standard
(AES). Whirlpool produces a hash of 512 bits.
• Secure Hashing Algorithm: The family of SHA comprises four SHA
algorithms: SHA-0, SHA-1, SHA-2, and SHA-3. SHA-0 is a 160-bit
hash function that was published by the National Institute of Standards
and Technology in 1993. SHA-1 was designed in 1995 to correct the
weaknesses of SHA-0. In 2005, a method was found to uncover collisions
in the SHA-1 algorithm due to which long-term employability became
doubtful. SHA-2 has the following SHA variants, SHA-224, SHA-256,
SHA-384, SHA-512, SHA-512/224, and SHA-512/256. It is a stronger
hash function and it still follows the design of SHA-1. In 2012, the
Keccak algorithm was chosen as the new SHA-3 standard. SHA-256 is
the most famous of all cryptographic hash functions because it’s used
extensively in blockchain technology. The SHA-256 Hashing algorithm
was developed by the National Security Agency (NSA) in 2001.

1.7.1.3 Uses of Hash Functions in Blockchain


The blockchain has a number of different uses for hash functions. Some of
the most common uses of the hash function in blockchain are:
• Merkle Tree: This uses hash functions to make sure that it is infea-
sible to find two Merkle trees with the same root hash. This helps to
protect the integrity of the block header by storing the root hash within
the block header and thus protecting the integrity of the transactions.
• Proof of Work Consensus: This algorithm defines a valid block as
the one whose block header has a hash value less than the threshold
value.
• Digital signatures: Hash functions are the vital part of digital sig-
natures that ensures data integrity and are used for authentication for
blockchain transactions.

27
• The chain of blocks: Each block header in a block in the blockchain
contains the hash of the previous block header. This ensures that it is
not possible to change even a single block in a blockchain without being
detected. As modifying one block requires generating new versions of
every following block, thus increasing the difficulty.

1.7.2 Digital signatures


Digital Signing in Blockchain is a process to verify the user’s impressions of
the transaction. It uses the private key to sign the digital transaction, and
its corresponding public key will help to authorize the sender.

1.7.2.1 The Role of Digital Signatures in Blockchain


Digital signatures are a fundamental building block in blockchains, used
mainly to authenticate transactions. When users submit transactions, they
must prove to every node in the system that they are authorized to spend
those funds, while preventing other users from spending them. Every node in
the network will verify the submitted transaction and check all other nodes’
work to agree on a correct state. Digital signatures also provide assurance
to recipients about the fact that messages have not been through any modi-
fications in transit. In simple terms, we may describe a digital signature as a
code that is attached to a message or document. After generated, the code
acts as proof that the message hasn’t been tampered with along its way from
sender to receiver.

1.7.2.2 How Digital Signatures Work


A transaction is just a message that contains information about the sender
and recipient and the amount of BTC to be transferred (including a trans-
action fee). When you want to send some bitcoins, your wallet creates a
“transaction” and sends it to a node on the Bitcoin network which then
broadcasts it to other nodes. When you initiate a Bitcoin transaction, you
must prove to every node in the Bitcoin network that you are authorized to
spend those funds.
Before sending out the message (the “transaction”), you’re required to
“sign” it. All transactions need to be “signed” before they are submitted to
the network. To do so, your wallet software does some fancy math magic
(hashing) to the transaction message and then after that, does some more
fancy math magic (encryption) with something known as a “private key”.
The result of all this math magic is a special piece of information called the

28
“digital signature”. It is this “digital signature” that proves to the Bitcoin
network that you are the true owner of the bitcoins that you wish to send.
In the context of cryptocurrencies, a digital signature system
often consists of three basic steps: hashing, signing, and verifying.
Hashing The Data: The first step is to hash the message or digital data.
This is done by submitting the data through a hashing algorithm so that a
hash value is generated (i.e., the message digest). As mentioned, the messages
can vary significantly in size, but when they are hashed, all their hash values
have the same length. This is the most basic property of a hash function.
However, hashing the data is not a must for producing a digital signature
because one can use a private key to sign a message that wasn’t hashed at
all. But for cryptocurrencies, the data is always hashed because dealing with
fixed-length digests facilitates the whole process.
Signing: After the information is hashed, the sender of the message needs
to sign it. This is the moment where public-key cryptography comes into play.
Essentially, the hashed message will be signed with a private key, and the
receiver of the message can then check its validity by using the corresponding
public key (provided by the signer). If the private key is not included when
the signature is generated, the receiver of the message won’t be able to use the
corresponding public key to verify its validity. Both public and private keys
are generated by the sender of the message, but only the public key is shared
with the receiver. It’s worth noting that digital signatures are directly related
to the content of each message. So unlike handwritten signatures, which tend
to be the same regardless of the message, each digitally signed message will
have a different digital signature.
Verifying: When Alice sends a document to Bob, she will follow certain
steps to digitally sign the document, these steps are as follows:

• Calculate the message digest of the document Alice wants to send to


Bob with a cryptographic hash function, usually MD5 or any SHA
algorithm.

• Encrypt the message digest with Alice’s private key, append the en-
crypted message digest to the original document, and send the com-
bined message out.

• Once Bob receives the combined message from Alice, he will separate
the encrypted message digest from the document itself. Bob will use
Alice’s public key to decrypt the encrypted message digest.

• At the same time, Bob will calculate the message digest of the received
document and compare the resulting message digest with the decrypted

29
Figure 1.14: Digital Signatures

message digest to see whether there is a match. If yes, Bob is assured


that the document originated from Alice without any tampering.
Bitcoin uses public-key cryptography to create digital signatures. Public-
key cryptography, or PKC, refers to a cryptographic system that makes use
of a pair of keys: one public key and one private key. The two keys are
mathematically related and can be used for both data encryption and digital
signatures.

1.7.2.3 Electronic Signatures Vs. Digital Signatures:


Simply, digital signatures relate to one particular kind of electronic signa-
tures - which refer to any electronic method of signing documents and mes-
sages. Thus, all digital signatures are electronic signatures, but the opposite
isn’t always true. The main difference between them is the authentication
method. Digital signatures deploy cryptographic systems, such as hash func-
tions, public-key cryptography, and encryption techniques.

1.7.2.4 Use Cases


Digital signatures can be applied to various kinds of digital documents and
certificates. As such, they have several applications. Some of the most
common use cases include:

30
Figure 1.15: Electronic Signatures Vs. Digital Signatures

• Information Technology. To enhance the security of Internet commu-


nication systems.
• Finance. Digital signatures can be implemented to audits, expense
reports, loan agreements, and much more.
• Legal. Digital signing of all sorts of business contracts and legal agree-
ments, including governmental papers.
• Healthcare. Digital signatures can prevent fraud of prescriptions and
medical records.
• Blockchain. Digital signature schemes ensure that only the rightful
owners of the cryptocurrencies are able to sign a transaction to move
the funds (as long as their private keys aren’t compromised).
Hash functions and public-key cryptography are at the core of digital signa-
ture systems, which are now applied to a wide range of use cases. If properly
implemented, digital signatures can increase security, ensure integrity, and
facilitate the authentication of all kinds of digital data. In the blockchain
realm, digital signatures are used to sign and authorize cryptocurrency trans-
actions. They are particularly important for Bitcoin because the signatures
ensure that coins can only be spent by the individuals that possess the cor-
responding private keys.

1.8 Hashchain to Blockchain


A hash chain is the successive application of a cryptographic hash function
to a piece of data. In computer security, a hash chain is a method to produce

31
many one-time keys from a single key or password. For non-repudiation a
hash function can be applied successively to additional pieces of data in order
to record the chronology of data’s existence. A hash chain is a successive
application of a cryptographic hash function to a string x.
For example, h(h(h(h(x)))), gives a hash chain of length 4, often denoted
h (x). A hash chain is a sequence of hashes of blocks. Each block consists
4

of the hash of the previous block, and (optionally) some data. These can be
seen a special case of a Merkle Tree, that is one with only a single branch. A
blockchain is a Merkle Tree with a consensus algorithm to determine which
branch is the "correct" one. Typically other branches get discarded, but not
always.

1.9 Basic Consensus Mechanisms


A consensus mechanism is a program used in blockchain systems to achieve
distributed agreement about the ledger’s state. Generally, it is implemented
in a network with many processes and users. Cryptocurrencies, blockchains,
and distributed ledgers benefit from their use because the consensus mecha-
nism replaces much slower human verifiers and auditing.
Consensus means achieving a state of a decision on which all network
participants agree. For example, a group of friends decides on a trip to Goa
without conflicts. Here, reaching a decision to visit Goa together is a state
of consensus or mutual agreement.
"The purpose of the Consensus mechanism in a decentralized
network is to allow a group of independent nodes to distribute
the right to update as well as validate the change in the network
equally. Therefore, decide on the next update of a decentralized
network." In a blockchain, each participant shares the exact same copy of
the network transactions, which helps them stay synchronized and connected.

1.9.1 How Does Consensus Work?


There is a number of consensus mechanisms to operate on a decentralized
network. Each algorithm has its own way of reaching a global agreement on
a network update.
Generally, consensus protocols form at least 51% of participants in the
network to agree on the upcoming change. If they agree, the network system
gets updated with the new change. Else, it rejects the change by mutual
agreement.

32
Chapter 2

Consensus

2.1 Requirements for the Consensus Protocols


A blockchain consensus protocol enables all the parties of the blockchain net-
work to come to a common agreement (consensus) on the present data state
of the ledger. This promotes trust among unknown peers in a distributed
computing environment. If any individual wants to add some information
to the blockchain, it is crucial for the distributed peers of the blockchain to
analyze and agree on all the additions before they are permanently incor-
porated into the blockchain. There are a number of consensus models that
are used to maintain transparency and fairness in a blockchain. However,
these models are different for permissioned and permissionless blockchains.
All consensus models are built on a foundation of certain objectives. These
include:

• Coming to an agreement: Each model aims to collect as many


agreements from the group as possible

• Collaboration: Every participating member in the blockchain aims


toward an agreement that considers the group’s interest as a whole.

• Co-operation: Every member will work together as a team while


putting their own interests aside.

• Equal Rights: The vote of each group member will have the same
value. This means that every person’s vote is important.

• Participation: Every individual in the blockchain must participate in


the voting.

33
• Activity: Each blockchain participant must remain equally active. No
one in the network will be given more responsibility than the other.

“The purpose of the Consensus mechanism in a decentralized net-


work is to allow a group of independent nodes to distribute the right
to update as well as validate the change in the network equally.
Therefore, decide on the next update of a decentralized network.”

2.1.1 Types of Consensus Mechanisms


Every blockchain network cannot use the same consensus mechanism as dif-
ferent outcomes are desirable with different applications. Blockchain consen-
sus mechanisms can be divided into 8 types:

2.1.1.1 Proof of Work


Proof of Work (POW) process is also called mining and the miners are known
as nodes. Miners solve complicated mathematical puzzles that require exten-
sive computational power. For this purpose, miners utilize multiple mining
methods like CPU mining, GPU mining, FPGA mining, mining pools, ASIC
mining, and many more. After solving mathematical puzzles, a miner receives
a block as reward if they are the first one to find the solution. Additionally,
the puzzles can only be solved with trial and error. Hence, miners require
an increasing amount of computational power for finding solutions quickly.
The level of difficulty for the puzzles changes according to the speed at which
the blocks are being mined. In case the blocks are created quickly, then the
puzzles would get more difficult and vice versa. However, Proof of Work
consensus mechanism consumes resources at a staggering rate. According
to sources, Bitcoin’s current estimated annual power consumption is 51.13
TWh. Hence, this approach can be expensive.

2.1.1.2 Proof of Stake


Proof of Stake (POS) uses a randomized process to figure out who gets a
chance to produce the next block. Blockchain users can lock up their tokens
for a certain time for becoming a validator. After becoming a validator,
users can be able to produce blocks. Validators can also be selected based
on the design of blockchain. Generally, the user who owns the biggest stake
or owns coins for the longest period of time has better odds of creating a
new block. Validators usually get rewarded for their work with all or part of
transaction fees of all the transactions carried out in the block they created.
With this approach, Proof of Stake method offers incentives to validators for

34
maintaining the blockchain network. Proof of Stake is more energy efficient
compared to other blockchain consensus mechanisms like Proof of Work.

2.1.1.3 Delegated Proof of Stake


In Delegated Proof of Stake process, users can stake their coins and vote for
a particular number of delegates. The weight of a user’s vote is based on
their stake. For instance, if a user ‘X’ stakes 20 coins for a delegate and
another user ‘Y’ stakes 2, then X’s vote will have more weight compared
to that of Y. The delegate that receives the highest number of votes gets a
chance to produce new blocks. Delegates get rewarded with transaction fees
or a specific amount of coins just like other blockchain consensus mechanisms
such as Proof of Stake. Delegated Proof of Stake (DPOS) mechanism is one
of the fastest blockchain consensus mechanisms. This mechanism can handle
a higher number of transactions compared to Proof of Work mechanism. Due
to its stake-weighted voting system, DPOS is often considered as a digital
democracy.

2.1.1.4 Proof of Capacity


In Proof of Capacity method, solutions to complex mathematical puzzles are
stored in digital storages such as hard disks. This entire process is called
plotting. After a storage device is filled with solutions for mathematical
puzzles, users can utilize it for producing blocks. Users who are fastest in
finding the solutions get a chance to create a new block. Hence, users with
the highest storage capacity will have to higher chances of producing a new
block.

2.1.1.5 Proof of Elapsed Time


Proof of Elapsed Time process randomly and fairly decides the producer of a
new block based on the time they have spent waiting. For this purpose, the
mechanism provides a random wait time for each user and the user whose wait
time finishes the earliest will produce a new block. This consensus mechanism
only works if the system can verify that no users can run multiple nodes and
the wait time is truly random.

2.1.1.6 Proof of Identity


Proof of Identity compares the private key of a user with an authorized
identity. Basically, Proof of Identity is a piece of cryptographic evidence for a
user’s private key that is cryptographically attached to a specific transaction.

35
Any identified user from a blockchain network can create a block of data
that can be presented to anyone in the network. Proof of Identity ensures
integrity and authenticity of created data. Additionally, smart cities can use
blockchain consensus mechanisms like Proof of Identity to verify the identity
of their citizens.

2.1.1.7 Proof of Authority


Proof of Authority mechanism is a modified version of Proof of Stake where
the identities of validators in the network are at stake. In this scenario, the
identity is the correspondence between validators’ personal identification and
their official documentation to help verify their identity. These validators
stake their reputation on the network. In Proof of Authority, the nodes
that become validators are the only ones allowed to produce new blocks.
Validators whose identity is at stake are incentivized to secure and preserve
the blockchain network. Also, the number of validators is fairly small (i.e.
25 or less).

2.1.1.8 Proof of Activity


Proof of Activity (PoA) combines PoW and PoS mechanisms. First, the
miners must do the heavy computation to add an empty block with header
information and reward address. Afterward, one empty block gets chosen
based on the number of coins they hold in their respective accounts. Then,
the miner of that empty block gets the chance to add its transactions to the
block. Moreover, the transactions are verified by network validators.

2.1.1.9 Byzantine Fault Tolerance (BFT)


BFT aims to resolve Byzantine Generals’ decisional puzzle. It’s based on the
communication problem generals of different armies might have to decide to
attack or retreat at the same time. BFT mechanism regulates the commu-
nication between nodes using hashes, digital signatures, and metadata. It
embraces the synchronization among nodes of a decentralized network.

2.2 Scalability Aspects of Blockchain Consen-


sus Protocols
Scalability refers to a computer system’s ability to manage an increasing
quantity of work (e.g., a database or search engine). A blockchain network

36
does not scale effectively or has low scalability with a huge amount of data.
Blockchain lacks sufficient efforts to alter the system to cope with the increas-
ing workload, data and resources (e.g., computing power, servers, or band-
width). Scalability has been identified as the most significant barrier to es-
tablishing public blockchains in many real-world commercial situations. The
scalability issue with Blockchain emerges mostly when the number of nodes
and transactions increases. This problem exists in major public blockchain
systems (Bitcoin and Ethereum) since each node must store and execute
a computational activity to validate each transaction. As a result, public
blockchains constantly need immense processing power, high-speed internet
connectivity, and vast storage space. Transaction throughput and latency
are the two commonly debated blockchain performance measures, and both
have yet to achieve a sufficient Quality-of-Service (QoS) level in many notable
recent public blockchains.

2.2.1 Factors Influencing Performance of Blockchain


• Consensus mechanism – The technique or mechanism by which
a transaction is propagated, validated and finalized in a blockchain
network is termed as the consensus protocol or algorithm. And this
consensus mechanism is also responsible for achieving a fine balance
between the degree of decentralization, scalability and security that a
blockchain network possesses. Hence, the choice of consensus mecha-
nism is directly related to how the blockchain network performs.

• Network Latency – In a distributed architecture this is the most im-


portant factor affecting the overall performance of the network. When
a transaction is to be validated it needs to be broadcast to all the
nodes and their response needs to be collated for majority-based con-
sensus. So, having a dedicated network bandwidth goes a long way in
minimizing the network delays and improving the overall throughput.

• Node Infrastructure – Blockchain nodes comprise of a runtime en-


gine and a database that is hosted on-premise or on cloud. In the
absence of dedicated infrastructure resources (i.e. CPU, memory, hard
disk) the node performance is most likely to get hampered. Thus, it is
imperative that infrastructure sizing and adequate IOPS (Input Output
operations Per Second) allocation is provisioned.

• Number of nodes – As the number of nodes increase, the longer it


takes for a transaction to be propagated and consensus to be achieved
the more it degrades the overall performance. Techniques to reduce

37
the communication overhead and allow nodes to rely on validation his-
tory of a leader node and/or other peer nodes are being introduced to
alleviate this problem.

• Smart contract complexity – Most of the benchmarking studies


or claims are based on tests conducted in a controlled lab environ-
ment for the simplest of transactions. As the complexity of smart
contracts increases in terms of the validation logic and the number of
reads and writes from/to the ledger increases, the processing latency
also increases thus impacting the overall performance.

• Node local storage: Typically, blockchain networks support key-


value pair datastores to maintain the transaction and state of the
ledger. There is a significant amount of read-write that occurs, and
the efficiency of the underlying database is a key factor in influencing
the performance of the entire network.

• Transaction pooling / queuing – While a blockchain network com-


prises of multiple nodes and collectively provides high availability but
the transaction handling capacity of each individual node determines
how many transactions are going to be accepted from the client ap-
plications for further processing. And this has a direct effect on the
overall throughput of the network.

2.2.2 Scalable Consensus Mechanisms


The scalability problem in the blockchain can be addressed through scalable
consensus techniques. Scalable consensus algorithms may provide greater
scalability and transaction throughput. The following are some significant
examples of scalable consensus processes that act as effective blockchain scal-
ability methods:

• Delegated Proof-of-Stake;

• Proof-of-Authority;

• Byzantine Fault Tolerance.

The ever-increasing demand for blockchain applications has resulted in sig-


nificant scalability challenges. More participants and transactions may clog
a blockchain network, limiting its ability to perform transactions.

38
2.3 Permissioned Blockchains
Permissioned blockchains are blockchains that are closed (i.e., not publicly
accessible) or have an access control layer. This additional layer of security
means that the blockchain can only be accessed by users with permission.
Permissioned users are only able to perform blockchain operations within
the strict confines of roles assigned to them by the ledger administrators
and require that they authenticate themselves through certificates or digital
identifier methods. In addition, the roles would dictate what information a
user would be able to access.

2.3.1 Design Goals


Permissioned blockchain is built to allow an organization or a consortium
of organizations to efficiently exchange information and record transactions.
Permissioned blockchains make it easy to share trusted information in a
secure context, and with the confidentiality that businesses need to operate
effectively. The primary incentive of permissioned blockchain participants is
to minimize the cost, time, and ease of sharing information. Some of the key
attributes of a permissioned blockchain system include:
• Decisions: Decisions are made by the owners of the network through
a central, pre-defined level.

• Security: Permissioned blockchains provide the operating organiza-


tion granular control over permissions, data access, and the scope of
user roles.

• Decentralization: Permissioned blockchains can either be fully cen-


tralized or partially decentralized. Its members typically decide on the
network’s level of decentralization and the mechanisms for consensus.

• Transparency: Unlike permissionless blockchains, permissioned blockchains


do not need to be transparent. Transparency is optional, as most per-
missioned blockchain networks are specifically intended to not be trans-
parent for security purposes. Levels of transparency usually depend on
the goals of the organization running the blockchain network. In the
meantime, the ledger maintains a record of every transaction and the
identities of the participating parties.

• Governance: Permissioned blockchains are designed to have a more


centralized governance structure than public blockchains. This is nec-
essary to ensure that the blockchain network operates according to the

39
rules and regulations set by its participants. Governance has very dif-
ferent semantics between permissionless and permissioned blockchains.
In the permissioned world, governance is largely decided and agreed
upon by the members of the blockchain business network. Economic
incentives, code quality, code changes, and power allocation among
peers are based on the business dynamics and the common purpose for
which the network has been designed and built. This allows companies
to move quickly and in ways that best fit their business needs.

• Tokens: Permissioned blockchains, especially the ones based on Hy-


perledger Fabric, generally don’t employ a cryptoeconomic model or
monetary tokens due to the nature of these business networks. How-
ever, a few companies are experimenting with utility tokens for ex-
changing intrinsic value in this type of ecosystem.

• Consensus Mechanisms: Because of the structure of permissioned


blockchains, they don’t use the same types of consensus protocols as
permissionless ones. Most commonly, organizations that deploy permis-
sioned blockchains use one (or more) of the following three protocols:
Practical Byzantine Fault Tolerance (PBFT), federated, or round-robin
consensus.

• Scalability and Performance: Permissioned blockchains use consen-


sus mechanisms that are computationally inexpensive (when compared
to proof-of-work). Therefore, they enjoy substantially better scalabil-
ity and performance against permissionless. Blockchains like Hyper-
ledger Fabric offer additional innovations with respect to the roles of
the nodes, including peers (that maintain state/ledger) and orderers
(that consent on the order of transactions included in the ledger).
Peers refer to the nodes or computers that perform the same tasks and
have the same power within a blockchain network.

2.4 Consensus Protocols for Permissioned Blockchains


Permissioned blockchains cannot use the same type of consensus models that
are seen in permisionless blockchains. The most popular ones that are being
implemented in many organizations around the world are:

• PBFT Consensus: Permissioned blockchains usually use pbft al-


gorithms. One of the models that is used to facilitate consensus in
blockchain is the practical byzantine fault tolerance algorithm (PBFT).

40
In this model, each node exists in an internal state, which means that
it will maintain an ongoing specific information or status). Each time a
node receives a message, they use the message with respect to their in-
ternal state to perform a computation or operation. Consequently, this
computation will send messages to other nodes to ask if the transaction
is valid. After receiving verification from all of the other nodes, the first
node will broadcast that decision with all the other participants in the
network. A consensus decision is achieved based on the total confir-
mations submitted by all the nodes. PBFT can be very beneficial for
low latency storage systems, This type of model is often used in digital
assets backed platforms that don’t need a great amount of capacity, but
carry out a large number of transactions. PBFT makes sure that the
transaction records within the network are accurate. A few examples
of permissioned blockchains that use this model are Hyperledger and
Chain.

• Federated Consensus: In Federated Consensus, each node in the


blockchain network puts their trust in a set of signers who help them
reach the consensus stage. In order to carry out the process in an
efficient manner, the block signers use a single block generator, which
receives, holds and filters all the transactions. The generator’s signature
is used to coordinate with the signers for the block validation process.
Each block signer will verify the block which is signed by the block
generator and which fulfills the certain conditions set by the network.
Once the block generator receives enough signatures from the network,
the block will get published to the network. This model guarantees
security and transparency . It is ideal for use cases such as cross border
remittance, real time KYC etc. Common examples of blockchains that
use this model are Stellar and Ripple.

• Round Robin Consensus: In Round Robin Consensus, validators


take part in the consensus process by signing votes for blocks. Usu-
ally, there are three main types of votes: a prevote, a precommit and a
commit. To receive more than two third of commits means to receive
commits from a two third majority of validators. A block is considered
to be committed by the network when a two third majority of validators
have signed and broadcasted commits for that block. At each height
of the blockchain a round-based protocol is run to determine the next
block. Each round consists of three steps (Propose, Prevote, and Pre-
commit), along with two special steps Commit and NewHeight. The
Propose, Prevote, and Precommit steps each take one third of the total

41
time allocated for that round. Each round is longer than the previous
round followed by a small fixed increase of time. This allows the net-
work to eventually achieve consensus in a limited concurrent network.
Round robin consensus process doesn’t rely on a single participant for
the block validation process. In this model, several nodes play a major
role in validating and signing transactions. which makes this process
more secure when compared to other consensus processes. There are
also lower chances of double spend attacks due to the voting power
distribution among trusted nodes. Round robin consensus mechanism
is ideal for the trade, finance and supply chain industries. Some well
known permissioned blockchains that use the Round Robin consensus
method include Multichain and Tendermint

2.4.1 The Right Consensus Protocol for Permissioned-


Blockchain
In a permissioned blockchain, choosing the right consensus protocol for per-
missioned blockchain depends on factors like the extent of decentralization
required (For example, how much the participants in a network trust each
other, the number of permissions that must be granted to all the partici-
pants to carry out important tasks on the network etc). Most of the time,
these types permissioned blockchains usually use pbft algorithms (Practical
byzantine fault tolerance) and its variants including voting and lottery-based
consensus as opposed to consensus models like the Proof-of-Work consensus.
To decide on the right consensus protocol for your blockchain, there are
some things that you should take into account. They include:

• The speed in which your blocks will need to be written into the blockchain?
Consensus formation can take time. If consensus is faster, the trust
guarantees will be much lower (and vice versa).

• What type of network will you be using? Is it synchronous, partially


synchronous, eventually synchronous or asynchronous?. For example,
the Internet does not guarantee message delivery and is generally con-
sidered to be eventually synchronous.

• How many miners, writers, or validators do you think you will need?
These special blockchain nodes are the ones which will select blocks to
write to the chain.

• How “final” does a block need to be? Banks and other financial institu-
tions most often expect any transactions to be immediately final (that

42
is, they cannot be rolled back). Some consensus protocols treat block
decisions to be conditional on future actions. In others, blocks may
eventually be final but are not immediately so.

• To what degree do you put your trust in the nodes/operators? Are you
trying to protect your blockchain from nodes that might crash, nodes
that might actively attempt to hack the blockchain, or both?

Figure 2.1: Electronic Signatures Vs. Digital Signatures

2.4.2 Advantages of Permissioned Blockchain


One of the most significant advantages of permissioned blockchains is the
high level of privacy and security they can provide. Without a verified set
of credentials and access, no user can access or alter transaction information
without permission.
Another advantage is flexibility when it comes to decentralization. It
can be incremental or fully centralized, giving businesses more freedom to
participate without having to worry about the risks associated with a highly
centralized network.
Permissioned blockchains are also highly customizable and can accommo-
date configurations and integrations based on an organization’s needs. And

43
with knowledge of every user and their actions on the network, a verifiable
chain of custody can be established for every transaction.
Lastly, these types of blockchains are both scalable and highly performant
due to the limited number of nodes needed to manage transaction verifica-
tions.

2.4.3 Disadvantages of Permissioned Blockchain


While lack of transparency can be a potential point of concern for permis-
sioned blockchains, the issue is usually mitigated by the implicit trust placed
in the governing authority. In a business context, consensus mechanisms and
the smart contracts that moderate transactions on the network are agreed
upon by the participating parties and maintained in secure, isolated con-
tainers. With this additional layer of computational security and measure
of implicit trust, a properly provisioned permissioned blockchain can offset
the security risk posed by bad actors. Many enterprise use cases require
performance characteristics that permissionless blockchain technologies are
presently unable to deliver because of limitations due to inefficiency and
scalability. Additionally, in instances where permissioned blockchains are
replacing existing secure, centralized networks, the identity of the partici-
pants is an essential requirement, such as in the case of financial transactions
where Know-Your-Customer (KYC), Anti-Money Laundering (AML), and
supply-chain provenance regulations must be followed.
In general, then, for a blockchain network to be ready for enterprise use,
it should possess the following requirements:

2.5 Why Permissioned Blockchains are Ideal


Many enterprise use cases require performance characteristics that permis-
sionless blockchain technologies are presently unable to deliver because of
limitations due to inefficiency and scalability. Additionally, in instances
where permissioned blockchains are replacing existing secure, centralized net-
works, the identity of the participants is an essential requirement, such as in
the case of financial transactions where Know-Your-Customer (KYC), Anti-
Money Laundering (AML), and supply-chain provenance regulations must
be followed.
In general, then, for a blockchain network to be ready for enterprise use,
it should possess the following requirements:

• Participants must be identified/identifiable

44
• Networks need to be permissioned

• High transaction throughput performance

• Low latency of transaction confirmation

• Privacy and confidentiality of transactions and data pertaining to busi-


ness transactions

2.5.1 Use Case Examples

45
Chapter 3

Hyperledger Fabric

3.1 Hypeledger
Hyperledger is an open source project created to support the development
of blockchain-based distributed ledgers. Hyperledger consists of a collabo-
rative effort to create the needed frameworks, standards, tools and libraries
to build blockchains and related applications. Since Hyperledger’s creation
by the Linux Foundation in 2016, the project has had contributions from
organizations such as IBM and Intel, Samsung, Microsoft, Visa, American
Express and blockchain startups such as Blockforce. In all, the collaboration
includes banking, supply chain management, internet of things (IoT), manu-
facturing and production-based fields. Hyperledger acts as a hub for different
distributed ledger frameworks and libraries. With this, a business could use
one of Hyperledger’s frameworks. Hyperledger works by providing the needed
infrastructure and standards for developing blockchain systems and applica-
tions. Developers use Hyperledger Greenhouse (the frameworks and tools
that makeup Hyperledger) to develop business blockchain projects. Network
participants know each other and can participate in consensus-making pro-
cesses. All Hyperledger projects follow a design philosophy that includes a
modular extensible approach, interoperability, an emphasis on highly secure
solutions, a token-agnostic approach with no native cryptocurrency, and the
development of a rich and easy-touse Application Programming Interface
(API). The Hyperledger Architecture has distinguished the following busi-
ness blockchain components:
• Consensus Layer - Responsible for generating an agreement on the
order and confirming the correctness of the set of transactions that
constitute a block.
• Smart Contract Layer - Responsible for processing transaction re-

46
quests and determining if transactions are valid by executing business
logic.

• Communication Layer - Responsible for peer-to-peer message trans-


port between the nodes that participate in a shared ledger instance.

• Data Store Abstraction - Allows different data-stores to be used


by other modules.

• Crypto Abstraction - Allows different crypto algorithms or modules


to be swapped out without affecting other modules.

• Identity Services - Enables the establishment of a root of trust dur-


ing setup of a blockchain instance, the enrollment and registration of
identities or system entities during network operation, and the man-
agement of changes like drops, adds, and revocations. Also, provides
authentication and authorization.

• Policy Services - Responsible for policy management of various poli-


cies specified in the system, such as the endorsement policy, consensus
policy, or group management policy. It interfaces and depends on other
modules to enforce the various policies.

• APIs - Enables clients and applications to interface to blockchains.

• Interoperation - Supports the interoperation between different blockchain


instances.

3.1.1 Hypeledger Architecture


Hyperledger has multiple projects, we can divide them to two: frameworks
and tools.

3.1.1.1 Hypeledger Framework


Under the Hyperledger project following frameworks have been unveiled so
far:
• Fabric

• Iroha

• Sawtooth

• Burrow

47
• Indy

The most famous in this, is fabric and the other one is from intel- Sawtooth.
Often people are confused with Hyperledger and Fabric termi-
nologies. The fabric is one of the protocols under the hyperledger
project and Hyperledger is the name of the project itself, not a
technology.

3.1.1.2 Hypeledger Tools


Under the Hyperledger project following frameworks have been unveiled so
far:

• Hyperledger composer

• Hyperledger cello

• Hyperledger quilt

• Hyperledger explorer

We use both tools and frameworks to build blockchain. Specifically, it is used


to make permissionless blockchain or private blockchain.
The project along with its participating technologies are often referred as
‘Hyperledger Umbrella’.

3.1.1.3 Objectives of the Hyperledger Project


• To enable its member organizations to build robust, enterprise-level ap-
plications, platforms and hardware systems based on blockchain tech-
nology.

• To advance the use of blockchain technology in business by developing


a cross-industry level, open-source development library.

• To facilitate building custom distributed ledger solutions for its mem-


bers.

• To integrate independent blockchain protocols.

48
3.2 Hyperledger Fabric
Hyperledger Fabric is a blockchain framework implementation initially devel-
oped by Digital Asset and IBM and now hosted by Linux Foundation under
the hyperledger project. Fabric joined the hyperledger project for incuba-
tion in the early 2016 and after 1 year of incubation, it became the first
project get into the ‘active’ state. On July 11, 2017, the hyperledger Tech-
nical Steering Committee announced their first production-ready distributed
ledger codebase, Hyperledger Fabric V1.0.
The fabric is a Private and Permissioned system which delivers a high
degree of confidentiality, resilience, flexibility, and scalability. It adopted a
modular architecture and supports pluggable implementations of different
components like consensus, membership services etc. Like other blockchain
technologies, Fabric has a ledger and smart contracts. The smart contract
in the fabric is known as chaincode and it is in the chaincode the business
logic is embedded. In a Fabric network, the “peer nodes” execute chaincode
(smart contracts), access ledger data, endorse transactions, and interface
with applications, whereas the “orderer nodes” handle the consistency of the
Blockchain and deliver the approved transactions to the peers of the network.
Unlike an open, permissionless system that allows unknown participants
to enter the network, Hyperledger Fabric enrolls members via a trusted mem-
bership service provider. Fabric is private blockchain and it has this
feature of getting subnets and we call them as channels. Since this
is a private network, to be a member of the network we need to
enroll through MSP (Membership Service Provider). A node can be
connected to multiple networks, so they will have multiple ledger [L1, L2].
Hyperledger Fabric’s ledger subsystem comprises of two components:

• The World State It describes the state of the ledger at a specific


point of time.

• The Transaction Log It records all transactions that have generated


the current value of the world state.

Therefore, a ledger is a combination of transaction log history and the world


state database.

3.2.1 Hyperledger Fabric Transaction Flow


• The transaction flow begins when a client application sends a transac-
tion proposal to peers in each organization for endorsement.

49
• The peers verify the submitting client’s identity and authority to sub-
mit the transaction. Next, they simulate the outcome of the proposed
transaction and if it matches what was expected, it sends an endorse-
ment signature back to the client.

• The client collects endorsements from peers, and once it receives the
proper number of endorsements defined in the endorsement policy, it
sends the transaction to the ordering service.

• Lastly, the ordering service checks to see if the transaction has the
proper number of endorsements to satisfy the endorsement policy. It
then chronologically orders and packages the approved transactions into
blocks, and sends these blocks to peer nodes in each organization. Peer
nodes receive new blocks of transactions from the ordering service, and
then do a final validation for transactions in that block. Once this is
complete, the new block is added to the ledger and the state of the
ledger is updated. The new transactions are now committed.

Figure 3.1: Hyperledger Fabric Transaction Flow

3.3 Consensus in Hyperledger Fabric


Consensus is the process by which a network of nodes provides a guaranteed
ordering of transactions and validates the block of transactions. Consensus
must provide the following core functionality:

• Confirms the correctness of all transactions in a proposed block, ac-


cording to endorsement and consensus policies.

50
• Agrees on order and correctness and hence on results of an execution
(implies agreement on the global state).

• Interfaces and depends on the smart-contract layer to verify the cor-


rectness of an ordered set of transactions in a block.

Most of the blockchain frameworks are permission-less frameworks with no


trust among their peers. Thus, in order to validate the transactions, there
is a need for consensus algorithms like proof of work, proof of elapsed time.
However, Hyperledger Fabric is a permissioned network with a certificate
authority that onboards every node with a specific digital certificate. Thus,
the purpose of consensus algorithms in Hyperledger Fabric is completely
different. Hyperledger Fabric follows a modular approach wherein different
consensus techniques can be plugged in as per the requirement. Consensus
in Hyperledger Fabric is broken out into 3 phases:

• Endorsement: Endorsement is driven by policy (eg: m out of n sig-


natures) upon which participants endorse a transaction.

• Ordering: Ordering phase accepts the endorsed transactions and agrees


to the order to be committed to the ledger.

• Validation: Validation takes a block of ordered transactions and val-


idates the correctness of the results, including checking endorsement
policy and double-spending.

The consensus layer uses the communication layer for communicating with
the client and other peers on the network.
Transaction Flow Representation of Consensus is given in Fig:(5.6), the
steps are given below:

• The client application requests a transaction;

• SDK application generates a transaction proposal and sends it to en-


dorsing peers.

• Endorsing peers verify:

– The transaction proposed is well in the form;


– Not submitted before;
– The signature is valid;
– The client is authorized to perform the concerned operation

51
Figure 3.2: Transaction Flow for a Visual Representation of Consensus

• The transaction proposal inputs as arguments are passed to chain code


or smart contract and further to SDK application.

• The application verifies the signature and compares the proposal re-
sponses to be the same.

• Application broadcasts the transaction containing read/write sets and


signature to order service.

• Ordering peers prepare the block and transmit it to all the peers.

• Each peer appends the block to the chain, and for each valid transac-
tion, the write sets are committed to the database.

Currently, Hyperledger Fabric uses Solo and Kafka to reach consensus,


which requires a node to validate a batch of transactions and add them as a
new block to the blockchain.

3.3.1 Solo Consensus Algorithm in Hyperledger Fabric


It is a Hyperledger Fabric ordering mechanism most typically used by de-
velopers experimenting with Hyperledger Fabric networks. SOLO involves a
single ordering node. It is not used in the production environment.

52
3.3.2 Kafka Consensus Algorithm in Hyperledger Fab-
ric
In Kafka, only the leader does the ordering and only the in-sync replicas
can be voted as a leader. This provides crash fault-tolerance and finality
happens in a matter of seconds. While Kafka is crash fault-tolerant, it is
not Byzantine fault-tolerant, which prevents the system from reaching an
agreement in the case of malicious or faulty nodes.

3.3.3 Consensus Properties


• Safety - Each node is guaranteed the same sequence of inputs and
results in the same output on each node. When the nodes receive an
identical series of transactions, the same state changes will occur on
each node.

• Liveliness - Each non-faulty node will eventually receive every sub-


mitted transaction.

3.4 Hyperledger Fabric - Components Overview


A Hyperledger Fabric network is comprised of unique organizations (or mem-
bers) that interact with each other on the network. For example, an orga-
nization could be a bank in a network comprised of financial institutions or
a shipping partner in a supply chain network. From a Fabric component
perspective, each organization has a Fabric certificate authority and one or
more peer nodes. A Fabric network also has an ordering service shared by all
organizations in the network, and this component helps process transactions
for the network.
One of the key design principles of Hyperledger Fabric is modularity and
extensibility. The platform is composed of several components that can be
customized and extended to meet the specific requirements of different ap-
plications and use cases. The following are some of the main components of
Hyperledger Fabric and their roles in the platform:

3.4.1 Peer Node


This is the main component of Hyperledger Fabric. It is responsible for
managing the ledger, executing smart contracts, and participating in the
consensus process. A peer node in Hyperledger Fabric is a server that runs
the Hyperledger Fabric software and is part of a network of peer nodes that

53
Figure 3.3: Transaction Flow for a Visual Representation of Consensus

make up a Hyperledger Fabric blockchain. Each peer node stores a copy of


the ledger and participates in the consensus process to validate and endorse
transactions, as well as maintain the state of the ledger. Peer nodes can also
run smart contracts, known as chaincode in Hyperledger Fabric, which define
the business logic of the blockchain network. There are 5 types of Peer nodes:
• Full node: A full node is a peer node that maintains a complete copy
of the blockchain, verifies transactions and blocks, and helps to secure
the network by participating in the consensus process.

• Lightweight node: A lightweight node is a peer node that does not


maintain a complete copy of the blockchain, but relies on other full
nodes to provide it with the necessary information to verify transactions
and blocks.

• Supernode: A supernode is a peer node that has a high amount of


computing power and bandwidth, and is responsible for processing and
verifying a large number of transactions and blocks.

• Mining node: A mining node is a peer node that uses its computing
power to solve complex mathematical problems and compete with other
nodes to add new blocks to the blockchain.

• Validating node: A validating node is a peer node that is responsible


for verifying the validity and authenticity of transactions and blocks,
and ensuring that they adhere to the network’s rules and regulations.

54
3.4.2 Orderer
In Hyperledger Fabric, an orderer is a component that is responsible for en-
suring the delivery of transactions to the appropriate peer nodes for validation
and endorsement. The orderer maintains an ordered log of all transactions
that have occurred on the network and provides a communication channel
for the peer nodes to reach a consensus on the order in which transactions
should be processed. The orderer does not validate or endorse transactions
but rather acts as a mediator to facilitate communication between the dif-
ferent peer nodes. There are 5 types of Orderer:

• Solo orderer: A solo orderer is a single node that is responsible for


maintaining the ledger and ordering transactions in the network. This
type of orderer is typically used in small or test networks.

• Kafka orderer: A Kafka orderer is a cluster of orderer nodes that use


the Apache Kafka distributed messaging system to order transactions
and maintain the ledger. This type of orderer is typically used in large
or complex networks.

• Raft orderer: A Raft orderer is a cluster of orderer nodes that use


the Raft consensus algorithm to order transactions and maintain the
ledger. This type of orderer is typically used in networks that require
high performance and low latency.

• SNS orderer: An SNS orderer is a cluster of orderer nodes that use the
Amazon Simple Notification Service (SNS) to order transactions and
maintain the ledger. This type of orderer is typically used in networks
that are hosted on Amazon Web Services (AWS).

• CouchDB orderer: A CouchDB orderer is a cluster of orderer nodes that


use the Apache CouchDB database to store and order transactions in
the network. This type of orderer is typically used in networks that
require high availability and scalability.

3.4.3 Membership service provider (MSP)


In Hyperledger Fabric, a Membership Service Provider (MSP) is a component
that defines the rules for identity management and authentication within a
Hyperledger Fabric network. MSPs are used to verify the identity of partic-
ipants in the network, such as users, applications, and peer nodes. They do
this by managing the certificates and cryptographic materials that are used
to identify and authenticate entities on the network. MSPs play a crucial

55
role in ensuring the security and integrity of the Hyperledger Fabric network
by ensuring that only authorized entities are able to access the network and
participate in transactions. There are several types of membership service
providers (MSPs) in Hyperledger, including:

• Local MSP: This type of MSP is designed for development and test-
ing purposes and is used to manage the identities of local users and
applications.

• File-based MSP: This type of MSP uses a file system to store the iden-
tity information of users and applications.

• Certificate Authority-based MSP: This type of MSP uses a certificate


authority (CA) to issue and manage the digital certificates that are
used to identify users and applications.

• Database-based MSP: This type of MSP uses a database to store the


identity information of users and applications.

• External Identity Provider-based MSP: This type of MSP uses an ex-


ternal identity provider, such as a corporate LDAP server or an external
CA, to manage the identities of users and applications.

3.4.4 Ledger
In Hyperledger Fabric, the ledger is a distributed database that records all
of the transactions that occur on the network. Each peer node maintains a
copy of the ledger, and the ledger is updated whenever a new transaction is
endorsed and committed to the network. The ledger is composed of two parts:
the world state, which stores the current state of all assets on the network,
and the transaction log, which stores a record of all transactions that have
occurred on the network. The ledger is used to provide an immutable record
of all transactions and to ensure the consistency and integrity of the data on
the network. There are several types of ledgers in Hyperledger, including:

• Fabric: This is a permissioned blockchain platform that uses a mod-


ular architecture to support pluggable components, such as consensus
algorithms, membership services, and smart contract languages.

• Sawtooth: This is a permissioned blockchain platform that uses a


unique consensus algorithm called “Proof of Elapsed Time” (PoET)
to ensure efficient and secure transaction processing.

56
• Iroha: This is a simple and easy-to-use blockchain platform that is
designed for the rapid development and deployment of applications.

• Indy: This is a decentralized identity platform that uses blockchain


technology to provide individuals and organizations with a secure and
verifiable way to manage their digital identities.

• Besu: This is an open-source Ethereum client that can be used to


build and deploy decentralized applications on the Ethereum public
blockchain.

3.4.5 Chaincode
n Hyperledger Fabric, chaincode is the term used to refer to smart contracts.
Chaincode is written in Go and defines the business logic of a Hyperledger
Fabric network. It specifies the rules for updating the ledger and determines
which transactions are valid. When a transaction is submitted to the net-
work, it is sent to the appropriate peer nodes for endorsement. The chaincode
is then executed on the endorsing peer nodes, and the endorsed transaction is
sent back to the client for ordering and finally commit to the ledger. Chain-
code is an important part of the Hyperledger Fabric architecture, as it allows
users to define the specific rules and functionality of their blockchain net-
work. In Hyperledger, chaincode refers to the smart contract code that is
written in a programming language, such as Go or Java, and deployed on the
blockchain network. There are two types of chaincode in Hyperledger Fabric:

• System chaincode: This type of chaincode is deployed and managed


by the network administrator and is used to manage the operations of
the blockchain network, such as adding new members or modifying the
network configuration.

• User chaincode: This type of chaincode is deployed and managed by


the users of the network and is used to implement the business logic of
the applications that run on the network.

3.4.6 Consensus Algorithm


In Hyperledger Fabric, the consensus algorithm is the mechanism by which
the peer nodes in a network reach an agreement on the order and validity
of transactions. The consensus algorithm is an important part of the overall
architecture of a Hyperledger Fabric network, as it ensures the integrity and
consistency of the ledger by ensuring that all peer nodes have a consistent

57
view of the state of the network. Hyperledger Fabric supports several differ-
ent consensus algorithms, including the Practical Byzantine Fault Tolerance
(PBFT) algorithm and the Kafka-based consensus algorithm. The specific
consensus algorithm used by a Hyperledger Fabric network can be configured
and customized to meet the needs of the specific application. The main Con-
sensus Algorithm are Proof of Work (PoW), Proof of Stake (PoS), Practical
Byzantine Fault Tolerance (PBFT), Federated Byzantine Agreement (FBA),
Delegated Proof of Stake (DPoS).

3.4.7 Channels
In Hyperledger Fabric, a channel is a private “subnet” within a Hyperledger
Fabric network that allows a group of participants to execute transactions
and share data in a confidential manner. Each channel has its own separate
ledger, and the participants on a channel can only see the transactions that
are submitted to that channel. This allows different groups of participants
within a Hyperledger Fabric network to have their own private, confidential
interactions without revealing sensitive information to the other participants
on the network. Channels provide an additional layer of security and privacy
within a Hyperledger Fabric network. In Hyperledger Fabric, there are three
types of channels:

• Application channels: These channels are created by the organizations


that are part of a consortium on the network. They are used for con-
ducting transactions and sharing data among the members of the con-
sortium.

• System channels: These channels are created by the network adminis-


trator and are used for deploying and updating the network’s shared
ledger and other system-level components.

• Private channels: These channels are created by members of the con-


sortium and are used for conducting private transactions between two
or more specific organizations. Private channels allow organizations to
maintain the confidentiality of their transactions while still being able
to take advantage of the security and immutability of the shared ledger.

These components work together to provide a modular, extensible platform


for building blockchain applications. By customizing and extending these
components, developers can create applications that are tailored to the spe-
cific requirements of different industries and use cases.

58
3.5 Beyond Chaincode: fabric SDK
Hyperledger Fabric is a container-based blockchain framework used for de-
veloping decentralized applications using plug-and-play components aimed
at making it modular. The Hyperledger Fabric SDK allows applications to
interact with a Fabric blockchain network. It provides a simple API to sub-
mit transactions to a ledger or query the contents of a ledger with minimal
code. Hyperledger Fabric offers a number of SDKs for a wide variety of pro-
gramming languages. The first three delivered are the Node.js, Java, and Go
SDKs.

3.5.1 Hyperledger Fabric SDK


Some key features and capabilities of Hyperledger Fabric include:

• Modular architecture: Hyperledger Fabric has a modular architecture,


which allows developers to customize and extend the platform to meet
the specific needs of their application.

• Permissioned network: Hyperledger Fabric uses a permissioned network


model, which means that only authorized participants are able to access
and interact with the blockchain. This can provide an additional level
of security and control.

• Smart contracts: Hyperledger Fabric supports the use of smart con-


tracts, also known as chaincode, which are self-executing contracts with
the terms of the agreement between buyer and seller being directly writ-
ten into lines of code.

• Pluggable consensus: Hyperledger Fabric allows developers to choose


from a variety of consensus algorithms to ensure the integrity of trans-
actions on the blockchain.

• High performance: Hyperledger Fabric is designed to be scalable and


performant, with the ability to support a large number of transactions
per second.

Hyperledger Fabric SDK is a software development kit (SDK) that provides


a set of tools and libraries for building applications that interact with a
Hyperledger Fabric blockchain. The Hyperledger Fabric SDK is available
for a variety of programming languages, including Java, Go, Node.js, and
Python. The Hyperledger Fabric SDK provides developers with a range of
capabilities and features for building blockchain applications, including:

59
• APIs: The Hyperledger Fabric SDK provides a set of APIs that allow
developers to interact with a Hyperledger Fabric network. This in-
cludes functions for submitting transactions, querying the blockchain,
and managing network membership.

• Tools and utilities: The Hyperledger Fabric SDK includes a range of


tools and utilities that can be used to develop, test, and deploy Hy-
perledger Fabric applications. This can include tools for building and
deploying smart contracts, as well as utilities for managing the network
and its participants.

• Smart contracts: The Hyperledger Fabric SDK supports the use of


smart contracts, also known as chaincode, which are self-executing con-
tracts with the terms of the agreement between buyer and seller being
directly written into lines of code.

• Peer-to-peer communication: The Hyperledger Fabric SDK includes


support for peer-to-peer communication, which allows nodes on the
network to communicate directly with each other.

• Network membership services: The Hyperledger Fabric SDK includes


a set of network membership services that allow developers to manage
the participants on the network, including the ability to enroll new
members and revoke access for existing members.

3.5.2 Hyperledger Fabric SDK for Java


The Hyperledger Fabric SDK for Java is a set of Java libraries that provides a
Java API for interacting with a Hyperledger Fabric blockchain. It allows Java
developers to build applications that can interact with a Hyperledger Fabric
network, such as by submitting transactions or querying the blockchain.
Prerequisites: To use the Hyperledger Fabric SDK for Java, you will
need to have the following prerequisites installed:

• Java: You will need to have a recent version of the Java Development
Kit (JDK) installed on your machine. Maven: Maven is a build tool
for Java that is used to manage dependencies and build projects. You
will need to have Maven installed to use the Hyperledger Fabric SDK
for Java.

Approach: Once you have these prerequisites installed, you can start using
the Hyperledger Fabric SDK for Java by following these steps:

60
• Create a new project: Create a new Maven project in your preferred
Java development environment. In this example am using NetBeans.
Go to Create Project -> Java Application -> Project Name -> Finish.

• Add the Hyperledger Fabric dependencies: Add the necessary depen-


dencies to your project’s pom.xml file to include the Hyperledger Fabric
SDK for Java. Below are examples of pom.xml

• Import the Hyperledger Fabric classes: In your Java code, import the
necessary Hyperledger Fabric classes and interfaces to use in your ap-
plication.

• Set up a connection to the Hyperledger Fabric network: Use the Hy-


perledger Fabric API to establish a connection to the network and
authenticate with the necessary credentials.

• Interact with the Hyperledger Fabric network: Use the Hyperledger


Fabric API to submit transactions, query the blockchain, and perform
other actions on the network. The below example will illustrate this
point.

Overall, using the Hyperledger Fabric SDK for Java involves setting up a
project, importing the necessary dependencies, and using the API to inter-
act with a Hyperledger Fabric network. There are many resources available
online, including documentation and tutorials, that can help you get started
with the Hyperledger Fabric SDK for Java.

3.6 Hyperledger Composer


Hyperledger Composer is an open framework device to make blockchain pro-
grams efficient to a large extent. It linked the blockchain application with
the records of business systems. It allows the developers to create full-stack
blockchain application solutions. It uses the Hyperledger Fabric architecture
to enable the protocols and policies and to have verified transactions. The
current business network can be easily monitored by Hyperledger Composer
which can include the assets, services, property, etc.
On August 2021, Hyperledger Composer is deprecated and no
longer supported.
Key Points:

• Hyperledger Composer is an open-source platform that supports smart


contract development.

61
• The platform focuses on allowing users to create business networks by
means of making use of pre-built components.
• It’s designed for supporting blockchain applications in order to make
them compatible with other Hyperledger tools
• It’s developing and maintainable by different stakeholders at the same
time, not just a single entity.
• The platform’s development team aims to make the platform read-
ily available to developers, organizations, businesses, and associations
which are looking to utilize blockchain technologies like Hyperledger
Composer in order to conduct business operations.
• The platform focuses on cross-project code management for all stake-
holders involved in the development and deployment of their projects.
• Hyperledger Composer is a modular architecture that facilitates the
creation of components that can be incorporated and reused in order
to reduce complexity.
Hyperledger Composer focus on the creation of components that can be in-
corporated and reused in order to reduce complexity while ensuring secure
transactions. It’s also designed to support blockchain applications and is
capable of making them compatible with other Hyperledger tools. It’s devel-
oped and maintained by different stakeholders at the same time, not just a
single entity. It’s an open-source tool that facilitates the creation of business
networks through its modular architecture.

3.6.1 Key Concepts in Hyperledger Composer


• Blockchain State Storage: All transactions submitted through a
business network are stored on the blockchain ledger, and the cur-
rent state of assets and participants are stored in the blockchain state
database. The blockchain distributes the ledger and the state database
across a set of peers and ensures that updates to the ledger and state
database are consistent across all peers using a consensus algorithm.
• Connection Profiles: Hyperledger Composer uses Connection Pro-
files to define the system to connect to. A connection profile is a JSON
document the is part of a business network card. These profiles are
usually provided by the creator of the system they refer to and should
be used to create business network cards in order to be able to connect
to that system.

62
• Assets: Assets are tangible or intangible goods, services, or property,
and are stored in registries. Assets can represent almost anything in
a business network, for example, a house for sale, the sale listing, the
land registry certificate for that house, and the insurance documents for
that house may all be assets in one or more business networks. Assets
must have a unique identifier, but other than that, they can contain
whatever properties you define. Assets may be related to other assets
or participants.

• Participants: Participants are members of a business network. They


may own assets and submit transactions. Participant types are mod-
eled, and like assets, must have an identifier and can have any other
properties as required. A participant can be mapped to one or multiple
identities.

• Identities: An identity is a digital certificate and private key. Identi-


ties are used to transact on a business network and must be mapped
to a participant in the business network. A single identity is stored
in a business network card and if that identity has been mapped to a
participant, it allows the user of that business network card to transact
on a business network as that participant.

• Business Network cards: Business network cards are a combina-


tion of an identity, a connection profile, and metadata, the metadata
optionally containing the name of the business network to connect to.
Business network cards simplify the process of connecting to a business
network, and extend the concept of an identity outside the business net-
work to a ’wallet’ of identities, each associated with a specific business
network and connection profile.

• Transactions: Transactions are the mechanism by which participants


interact with assets. This could be as simple as a participant placing
a bid on a asset in an auction, or an auctioneer marking an auction
closed, automatically transferring ownership of the asset to the highest
bidder.

• Queries: Queries are used to return data about the blockchain world-
state. Queries are defined within a business network, and can include
variable parameters for simple customization. By using queries, data
can be easily extracted from your blockchain network. Queries are sent
by using the Hyperledger Composer API.

63
• Events: Events are defined in the business network definition in the
same way as assets or participants. Once events have been defined, they
can be emitted by transaction processor functions to indicate to exter-
nal systems that something of importance has happened to the ledger.
Applications can subscribe to emitted events through the composer-
client API.

• Access Control: Business networks may contain a set of access con-


trol rules. Access control rules allow fine-grained control over what
participants have access to what assets in the business network and
under what conditions. The access control language is rich enough to
capture sophisticated conditions declaratively, such as "only the owner
of a vehicle can transfer ownership of the vehicle".

• Historian registry: The historian is a specialised registry which


records successful transactions, including the participants and identities
that submitted them. The historian stores transactions as Historian-
Record assets, which are defined in the Hyperledger Composer system
namespace.

3.6.2 Architecture of Hyperledger Composer


• Yeoman code generator: This will help the user to create various
new projects. It executes with the specific commands in CLI in the
node. It includes testing, modification, and building process.

• Javascript Software development toolkit and framework like


Angular JS (JS SDK): JavaScript SDK contains Node JS APIs that
help developers to create an application that can be linked to the busi-
ness system networks. It can be divided into two parts: composer client
and composer admin.

• Command Line Interface(CLI): It permits creators to control or


execute business networks through instructions. Moreover, creators
can easily communicate with the OS and PC hardware associated with
the business network model.

• REST web servers and APIs: Refer to as a state of transfer that


is used to create a model of the business network.

• LoopBack Connector: It helps in exchanging business data and


transactions securely among the networks. It handles responses and
requests from source protocols.

64
Figure 3.4: Architecture of Hyperledger Composer

• Web User Interface: It helps in testing and managing the business


data and managing the supported runtime execution i.e, Hyperledger
Fabric. It also helps in interaction with the remotely running software
with the specific web server.

• Execution Runtimes: It consists of three parts: Hyperledger Fabric,


Web, and Node.js which perform different functions such as state will
be stored in browser local storage and particular ledger.

65
Chapter 4

Use case 1

4.1 Blockchain in Financial Software and Sys-


tems (FSS)
blockchain in financial services has been considered as the technology’s pri-
mary use case. The technology gained a lot of traction back in 2009 when it
was used for the cryptocurrency Bitcoin. The unique features of blockchain
have the potential to benefit the finance industry significantly. Blockchain in
Finance refers to the implementation of blockchain technology in the finance
industry. The development of blockchain solutions for financial services can
lead to several benefits for the industry. Blockchain in financial services has
also led to the introduction of decentralized finance,more commonly known as
DeFi. DeFi is a form of finance powered by blockchain technology that aims
at removing intermediaries from financial services by using smart contracts.
Over the last five years, the technology has matured for enterprise-grade use
demonstrating the following benefits:

• Security: Its distributed consensus based architecture eliminates sin-


gle points of failure and reduces the need for data intermediaries such
as transfer agents, messaging system operators and inefficient monop-
olistic utilities. Ethereum also enables implementation of secure appli-
cation code designed to be tamper-proof against fraud and malicious
third parties— making it virtually impossible to hack or manipulate.

• Transparency: It employs mutualized standards, protocols, and shared


processes, acting as a single shared source of truth for network partic-
ipants

• Trust: Its transparent and immutable ledger makes it easy for different

66
Figure 4.1: challenges faced by the finance industry

parties in a business network to collaborate, manage data, and reach


agreements
• Programmability: It supports the creation and execution of smart
contracts— tamper proof, deterministic software that automates busi-
ness logic – creating increased trust and efficiency.
• Privacy: It provides market-leading tools for granular data privacy
across every layer of the software stack, allowing selective sharing of
data in business networks. This dramatically improves transparency,
trust and efficiency while maintaining privacy and confidentiality.
• High-Performance: It’s private and hybrid networks are engineered
to sustain hundreds of transactions per second and periodic surges in
network activity.
• Scalability: It supports interoperability between private and public
chains, offering each enterprise solution the global reach, tremendous
resilience, and high integrity of the mainnet.

67
4.1.1 Settlements
Settlement means that the operation can no longer be reversed. In cryp-
tocurrency transactions, the settlement is done when the block with the
transaction data is added to the blockchain.

4.1.2 KYC
KYC is a process by which banks obtain information about the identity
and address of the purchasers. It’s a regulator governed process of perform-
ing due diligence for verifying the identity of clients. This process helps to
make sure that banks’ services aren’t misused. The banks are responsible
for completing the KYC procedure while opening accounts. Banks also are
required to periodically update their customers’ KYC details. KYC may
be a manual, time-consuming, and redundant across institutions. Sharing
KYC information on Blockchain would enable financial institutions to de-
liver better compliance outcomes, increase efficiency, and improve customer
experience.
Key Problem Areas and Solution Benefits

• Redundancy: Most large files use similar data and processes to verify
an equivalent client. The solution benefit is to eliminate the redundancy
documentations that got to be verified only once before the approval
information is shared.

• Inefficiency: Manual and time-consuming process to collect and verify


documentary evidence. The solution benefit is to extend automation
where documents and approvals are digitized and may be verified with-
out manual intervention.

• Lack of specificity: Requirements for due-diligence are often fuzzy,


creating uncertainty on compliance to avoid legal sanctions.The so-
lution benefit is to standardize process i.e. standardized, automated
KYC processes sanctioned by the regulators.

4.1.2.1 KYC Blockchain Implementation


In the traditional KYC system, each bank will conduct its identity check i.e.
each user is checked individually by an individual organization or govern-
ment structure. Hence, there is a waste of time for checking each identity
from scratch. The blockchain architecture and the DLT allow us to collect
information from various service providers into one cryptographically secure

68
and unchanging database that does not need a third party to verify the au-
thenticity of the knowledge. It makes it possible to form a system where
the user will only need to undergo the KYC procedure once to verify his/her
identity. The process is as follows:

Figure 4.2: Centrallized KYC Process

• For KYC procedure a user submits documents to one of the banks


where he wants to take a loan or use another service.

• Individual participants are responsible for collecting personal data(banks,


government agencies, companies, or users themselves) and stored in a
decentralized network.

• The bank checks and confirms the passage of KYC if everything is


normal.

• The bank is responsible for entering the data about the user into the
blockchain platform, to which other banks, organizations and state
structures have access. All parties can control and regulate the KYC
process. The system will monitor changes and updating of the user

69
Figure 4.3: Blockchain KYC Process

data, and if someone breaks the rules, it will become known to all
parties.

• When a user wants to use the services of another bank, this second
bank accesses the system and thus confirms the user’s identity.

• The access to user data will be based solely on its consent. The user
must log in with cryptocurrency transactions i.e. use the private key
to initiate the information exchange operation.

4.1.2.2 Blockchain and KYC: Current Challenges


The KYC practices vary by the institution as there are no global standards.
This leads to redundant work and limits the ability for different financial
institutions to collaborate to verify identity.

70
4.1.3 Capital Markets
there are four categories of market participants in capital markets for whom
blockchain-based solutions offer clear benefits:

• Issuers: Blockchain provides significant benefits to issuers by enabling


easier, cheaper, and faster access to capital through programmable dig-
ital assets and securities. New securities can be issued in minutes, with
their corresponding rights and obligations encoded and automated.
This allows issuers and facilitators of new issues to increase the ve-
locity of funding events.
The ability to program or encode terms and conditions into assets (in
the case of securities issuance, for example) provides greater flexibility
and customization than ever before. Blockchain technology can stream-
line KYC/AML processes and provide real-time updates and analytics
with a single interface for investors, increasing transparency and effi-
ciency.
One of the key advantages of digital assets is the ability to fractional-
ize each asset. Digital assets can be broken into more affordable and
transferable units that create an opportunity for greater liquidity and
investor diversity in certain markets. Moreover, the barriers to issue an
asset or security are significantly lowered opening up greater opportu-
nity for smaller issuers while existing issuers benefit from new markets
or forms of securities. Lastly, the entire lifecycle of an asset has the
potential to be automated from investor servicing to event handling in
the case of dividends.

• Fund Managers: Fundamentally, blockchain enables the peer-to-peer


trading of any asset on a verifiable ledger. Funds benefit from faster
and more transparent settlement and clearing which reduces default
risk or systemic risk in more opaque markets. Faster processing means
that funds and managers have less tied-up capital and are able to more
efficiently utilize and allocate their existing capital. Funds will reduce
costs from increased operational efficiencies like the simplification of
fund servicing, accounting, allocations, and administration. Fees paid
to third parties for services such as fund accounting and administration,
transfer agency, and even custody can be reduced or eliminated through
automated fund services.
Undoubtedly there will be numerous new types of financial products
and instruments created using blockchain technology which will create
novel asset classes for capital allocation. Although there will be an

71
explosion of financial products, most of these assets will share specific
programmed standards, thereby simplifying the structuring of new fi-
nancial products or instruments. The ability to issue digital assets and
fractionalize existing assets will create a broader investor pool, espe-
cially as newer investors are more comfortable with the idea of owning
a portfolio of digital assets.

• Investors: Blockchain technology significantly reduces the barrier to


issue new assets or financial products. As the cost of issuance of new
securities drops and the speed of issuance increases, issuers will be
able to tailor new instruments to the bespoke needs of each investor.
The enhanced ability to more exactly match investor desire for return,
time horizon, and appetite for risk with custom digital instruments
may profoundly impact the relationship between investor and issuer,
creating a direct bond between capital seekers and investors.
Investors aim to mitigate risk while increasing their potential returns.
One of the key drivers of risk is a lack of liquidity. This is addressed
by the programmable nature of digital assets and financial instruments
which allows for lower transaction costs, increasing the potential liq-
uidity of an asset and enabling more comprehensive risk management.
Combined with the increased connectivity and efficiencies across capi-
tal markets, investors will see greater liquidity and a decreased cost of
capital. Additionally, the transparent and distributed blockchain ledger
will enable more robust insights into asset quality with the potential
to enhance the due diligence process.

• Regulators: Regulators are often criticized for getting too involved in


capital markets or not getting involved fast enough, as in the case of the
2008 financial crisis. Government agencies and regulatory organizations
can benefit from a blockchain’s distributed ledger, which is transpar-
ent and verifiable at all moments of the day. The immutable nature
of blockchain—meaning transaction data cannot be altered—enables
regulators to automate functions such as auditing and compliance.
As multiple institutions use the same blockchain network to track their
holdings and asset lifecycle events, regulators will be able to devote
more time to analysis and risk prediction, rather than on learning the
idiosyncrasies of each firm’s system environment and bespoke trans-
action representations. The ability to reduce friction across various
labor and time-intensive processes will streamline the legal and regula-
tory process. The enhanced quality of data and disclosures enabled by

72
Figure 4.4: Blockchain in Capital Markets

blockchain’s ledger will reduce overhead costs and potentially prevent


specific types of systemic risk.

4.1.4 Blockchain in Insurance


Insurance is typically a binding contract between the two parties. The con-
tract involves series of steps like paying premiums, filing a claim, investiga-
tion, and final settlement of claims. Blockchain may change the way insur-
ance businesses deal with their clients. They may well replace legal contracts
with a smart contract by embedding the distributed ledger mechanism. Dig-
itally enabled settlements in blockchain create transparency, efficiency and
responsive in managing the claims of the customers. Potentially these chained
contracts help reduce fake claims.
Insurance contracts are most difficult to understand as it uses a different
language to address the legal terms, blockchain can be adaptive and penetrate
any line of business, and it is on the move to make radical changes in the
traditional way of working.
Another essential contribution blockchain can make into the insurance
sector is helping them to settle life insurance files that are unclaimed. The
blockchain registry will help connect the dots when the beneficiary is un-
known or difficult to trace. Hence the technology while retaining the privacy
improves the security concerns and helps the rightful claimant to access the
funds when the policy matures.
Blockchains can streamline the subrogate claims where the insurance com-

73
Figure 4.5: Blockchain in Insurance Markets

pany fulfills the loss suffered by the insured in the first place and reclaims the
loss from the third party (fault-party). These claims are difficult to validate
due to the fear of fraud. With a powerful technology such as blockchain,
fraudulent claims can be reduced to the minimum, and it will be also easier
to know whether the insurer of the faulty party has a ‘waiver of subrogation’.
Waiver means the insurance company may not be able to seek reimburse-
ment; in that case, the company may refuse to compensate the insured. The
insured and the insurance company may be benefitted as the blockchain reg-
istry holds transparency and a better auditability in all aspects.
Mutual trust between both parties is what makes the insurance company
sells its policies in the market. If blockchain can boost trust and faith in
the insurance company, it may create a plan in devising the technology in
its various lines of business and products. And take the lead in creating
more transparency in its operations resulting in increased numbers of people
enrolling in the policy

4.2 Blockchain in Trade/Supply Chain


The fundamentals of reliability and integrity in supply chains – efficiency and
transparency – are provided by blockchain technology.

74
4.2.1 Efficiency
Blockchain makes global supply chains more efficient by allowing companies
to complete transactions directly and without third parties. It also facilitates
increased integration of financial and logistics services, enabling greater data
collaboration between stakeholders. Integrated payment solutions reduce the
time between ordering and payment processing, ensuring the proper, timely
movement of products. In addition, blockchain and smart contracts help
companies enhance compliance, reduce legal fees and fines for late payment
of taxes, and curb counterfeiting and fraud.

4.2.2 Transparency
As records on the blockchain can’t be erased, it makes for a transparent
supply chain. Also, each step in the supply chain is logged securely, which
means that logistics issues can be easily tracked to their source. The same
goes for sourcing components or raw materials, which can be traced back
to their origin, increasing accountability and transparency, and mitigating
illegal activity.18
One study estimates that blockchain’s ability to help prove product prove-
nance could boost global GDP by $962 billion.19 Providing more information
about a product’s manufacturer, origin, transfer, and use can establish trust
and confidence in the supply chain.

4.2.3 Blockchain in supply chain use cases


• In the food industry, having solid records to trace products to their
sources is becoming non-negotiable. For example, Walmart uses IBM’s
blockchain-based Food Trust to keep track of their products along every
step of the chain. Nestlé, Tyson Foods, Carrefour, and Raw Seafoods,
among others, also use Food Trust for this purpose

• Australian car manufacturer Tomcar uses Bitcoin to pay some of its


suppliers and accepts the cryptocurrency for payments from three clients
in Israel and Taiwan. This process eliminates the need for international
payment fees.

• Project Proton, a blockchain pilot implemented by PepsiCo, automated


elements of the company’s programmatic ads supply chain through
smart contracts. The project used these contracts to reconcile ad im-
pressions from numerous data sources, facilitating payments through

75
digital tokens in real-time and resulting in a 28 percent increase in
efficiency

• South African paper company Sappi and Indian fabric producer Birla
Cellulose partnered to create GreenTrack, which tracks fabric products
from sustainable forests through to production. The platform has been
adopted by more than 250 supply chain partners, including Walmart
and Marks & Spencer

• Diamond giant De Beers uses blockchain technology to track stones


from where they’re mined, right up to when they’re sold to customers.
The technology ensures the company avoids ‘conflict’ or ‘blood’ dia-
monds and reassures their customers that they buy the real deal

4.2.4 Provenance of Goods


Provenance - a fundamental concept necessary for understanding Transparent
Supply data input and output.
With respect to the world of supply chain, provenance is the validated
history of ownership, custody and origin of a specific product instance such
as a lot, a batch, or a serial number. It also applies to a pallet which may
contain more than one product as well. In the heart of Transparent Supply is
a provenance engine. It processes supply chain data input, analyzes the data,
and constructs the supply chain traceability paths. The following sequence
illustrates the steps:

• When company X submits data to Transparent Supply that it sends


50 lbs of broccoli - lot 111 - from farm ABC to a packing house XYZ.
Transparent Supply stores it on Blockchain.

• When a company Y submits data that it receives 50 lbs of broccoli


from company X, sent from farm ABC, at its packing house XYZ,
Transparent Supply stores the data on Blockchain.

• In addition, since Transparent Supply finds the matching product and


lot, and sending and receiving destinations, it establishes the connec-
tion between the 2 activities.

• These activities are usually called events. More explanation can be


found in the Key supply chain concept section.

76
4.2.5 Blockchain in Supply Chain Finance
Buyer, supplier, lender have sight of each block in the chain. Here’s a sim-
plified example:
• Global Retail places an order for cardboard boxes with ABC Cartons
– a box manufacturer.
• The order is inserted into a blockchain established to manage the trans-
action.
• ABC asks their bank to fund the cost of raw materials to produce the
boxes. The bank agrees and they enter a new block in the chain. The
action is also visible to Global.
• ABC receives the funds and makes the boxes. They ship them to Global
along with the invoice. The bank has sight of the shipping and billing,
which are new blocks in the chain.
• Global receives the boxes and pays ABC. Two more blocks are added
to the digital ledger. ABC and the bank see these actions.
• ABC repays the bank, and the bank closes the loan record. (Two more
blocks).
• Global closes the chain. (Final block).

4.2.6 Invoice Management Discounting


Invoice discounting is a process in which a business sells an invoice to a fi-
nancing company to access cash tied in unpaid invoices. Discounting invoices
allows businesses to get future cash flow discounted at today’s value.

4.2.6.1 Invoice Discounting on Blockchain


• The client carries out works, as soon as the P.O.D is uploaded to the
blockchain
• Invoices are raised to Blockchain.
• No verification required as all of the above visible as blocks on the chain
are independently verified via end customer and client communication
on the blockchain.
• Instant funding a smart contract could be set up to pre-pay invoices
once verified & when criteria are met.

77
4.2.6.2 Benefits of Blockchain in Invoice Discounting
• Automated documentation – Blockchain eliminates the manual labor
involved in the invoice discounting process and the transaction becomes
paperless.

• Real-time settlement of transaction – Client can transfer invoices to


the blockchain network, smart contract rules can be triggered meaning
invoices are discounted and funds disbursed to the Client real-time.

• Real-time tracking of the transaction – With the transaction being on


the blockchain network, all involved relevant parties can view and verify
the processes. There is only one source of truth and transactions cannot
be processed further unless all relevant parties agree to authenticate it.

• Fraud Proof – Blockchains Distributed ledger technology means all rel-


evant parties can view and verify processes, that makes the process
fraud-proof.

• Risk profiling of clients – Due to every transaction stored on the blockchain


it can be used alongside artificial intelligence to identify payment pro-
files and risks of end debtors.

• Distributed ledger technology means that all parties have access to real-
time and share the transaction view. However, they can be limited to
seeing the parts they need to make their contribution.

78
Chapter 5

Use case 3

5.1 Blockchain for Government


Blockchains can reduce the time, cost and risks of managing sensitive in-
formation by providing an immutable and transparent audit trail for regu-
latory compliance, contract management, identity management and citizen
services. On a blockchain-based government model, individuals, businesses,
and governments share resources over a distributed ledger secured using cryp-
tography. This structure eliminates a single point of failure and inherently
protects sensitive citizen and government data.

5.1.1 Digital Identity


A decentralised identity approach using distributed ledger technologies (DLT)
is gathering pace, standardised by W3C and the Decentralised Identity Foun-
dation (DIF), and backed by companies such as IBM and Microsoft. The
underlying distributed ledger infrastructure could potentially be used to fa-
cilitate an exchange of assets.
Decentralised identity is an emerging concept that gives back control of
identity to consumers through the use of an identity wallet in which they
collect verified information about themselves from certified issuers (such as
the Government). By controlling what information is shared from the wallet
to requesting 3rd parties (e.g., when registering for a new online service),
the user is able to better manage their identity online and their privacy –
for example, only presenting proof that they’re over 18 without needing to
reveal their actual Date of Birth.
Traditionally, a user needs to register for an account and a username
& password for every Service Provider they wish to engage with. In such

79
systems, the user’s identity is managed by each Service Provider. In a de-
centralised identity framework, the user receives credentials proving their
identity from multiple Issuers (e.g., Government, Employer, University etc.)
and stores them in a digital wallet. The user (aka Holder) can then present

Figure 5.1: Blockchain based ID

proofs of their identity to any company that requests it (Verifiers), and these
companies can verify that the proofs are true via a Blockchain-based ledger.
Rather than a central authority managing the user’s identity, a blockchain-
based distributed ledger acts as the source of truth. The identity information
itself is not held on the ledger but within a wallet managed by the user.

80
Figure 5.2: Blockchain based ID

5.1.2 Application of Blockchain Technology in Land Records


The Blockchain in the land registry is used for secure transfer of land prop-
erty. The transparent nature of Blockchain enables to track the changes made
in land documents. Advent of Blockchain technology in the land registry is
playing a very beneficial role in this developing era. It is helping in uplifting
the poor, and marginalized section of the society in fighting illegal authoriza-
tion of land. The current system for land registration is full of duplicity and
inefficiencies, due to which the land records are not protected, and citizens
are the one those have to bear the most of it. Similarly, there are thousands
of people who face such a crisis. With the help of Blockchain, all the records
are preserved all the time, are easily accessible, none can ever doubt the orig-
inality of the records, records are fed in the system permanently. Therefore,
no one can ever manipulate it, and the records can be seen by any participant
anytime.

5.1.2.1 Concept of Smart Contracts


For the validation or proof of this blockchain technology in the land registry,
the concept of the smart contract is followed. A smart contract is the legal
proof of ownership and contain the history of the property. The buyer is

81
confident for land bought, that it is original without any duplicity, and the
seller is the lawful owner of the land, which abandons the probabilities for
any disputes later. The use of smart contracts gears up the procedure of land
titling by updating the record automatically. If the parties that are indulged

Figure 5.3: Applications of Blockchain Technology in maintaining land


records

in the purchase of the property have all the correct data at the required time,
then decisions could be made faster, hence making the whole process smooth
and transparent. With the use of Blockchain and smart contract, the cer-
tainty about the ownership of property is assured. This technology built the
trust between parties, as transactions is in the form of transparent contract.
It makes the business faster and more organized [16]. It improves data secu-
rity and ensures the originality of the land records. Figure 4 clearly explains
the role of Blockchain Technology in land Records. The main merit of using

82
public blockchain technology is the impossibility of making any changes in
the blockchain. Thus, it helps in providing a level of trust to the buyers and
the sellers. In the hybrid land registration block chain process, only a lim-
ited number of entities are part of the blockchain. When the current Land
Registry system would be replaced by using a hybrid blockchain, used by the
current stakeholders in the chain of real estate transfer, there could be a role
for both the Registrar and the Notaries, bailiffs and other parties, who are
sending official documents to be recorded in the Land Register. Benefits

Figure 5.4: Applications of Blockchain Technology in maintaining land


records

Blockchain Technology in Maintaining Land Records

• The availability of data in a central location that can be accessed by


all departments would enable faster disposal of requests for subsidy,
mutation,

• There would be no need for trusted authority like notaries to provide


attested copies of documents.

• The farmers will be assured that their land ownership cannot be changed
by spurious persons.

83
• The farmers can obtain loans quickly. The updation of the details
related to liabilityin the Record of Rights can be done as soon as the
farmer repays the loan. This is facilitate the farmer to avail other
benefits / services.

• Blockchain data of the property registration will be made available in


the work flow system of the Registration software as well as the public
for verification. This will provide the complete details of the property
chain right from the first purchaser to latest one. The Purchaser need
not depend on any non-reliable personnel/agency to verify the authen-
ticity of the document provided by the seller.

• A repository of a transparent, trusted and a tamper proof Property


Registration documents would be available for use by citizens & the
registration department.

• Citizens can verify the ownership details & complete history of the
property before going in for purchase of the property

• The availability of document chain will eliminate registration based on


bogus

5.1.3 Public Distribution System Social Welfare Sys-


tems
The Public Distribution System (PDS) evolved as a system of management
of scarcity through distribution of foodgrains at affordable prices. Over the
years, PDS has become an important part of Government’s policy for man-
agement of food economy in the country. Subsidised ration distribution takes
place each month to the ration card holders across the state under public
distribution system (PDS). PDS involves procurement from the farmers till
distribution to ration card beneficiaries comprising different entities in be-
tween such as central and state agencies, millers, transporters, shop owners
and then finally to the beneficiaries.
A major feature of the PDS is the general lack of accountability down
the entire supply chain, leaving the leakages that occur at different points
completely unaccounted. Blockchain technology can be useful in managing
supply chain effectively using distributed ledger technology. Entire supply
chain starting from procurement till disbursement can be part of blockchain.

84
5.1.3.1 Role of Blockchain
Use of blockchain can remove at least delay in payment to the farmers based
on procurement done by the miller. Since miller is responsible for the col-
lection and stock initially unless the transaction is approved by the farmer,
miller cannot register the quantity collected. This makes each transaction
Non-repudiation.
Since calculation and payment must happen based on this initial data,
data provenance (recording history of data) can be sealed using blockchain
technology. The decentralized distributed ledger makes all the stake holders
refer to their local copy of the ledger to make decisions and act accordingly.
Certain activities such as payment to farmers can be done without waiting
for the miller to hull them. Since the procurement season is defined for each
commodity, payment can start immediately without waiting for the other
actors to complete their process.
This makes each transaction as non-time critical and thus eligible to be
part of blockchain technology. Since farmer only interacts with the gov-
ernment identified millers it needs not be part of a public chain where in
transporter is participating in the network.
A social welfare system offers assistance to individuals and families
in need, with such programs as health care assistance, food stamps, and
unemployment compensation. Lesser known parts of a social welfare system
include disaster relief and educational assistance. By creating a transparent
record of these transactions, blockchain can help to reduce fraud and ensure
that assistance goes to those who need it most. Additionally, this data can
be used to measure the overall effectiveness of social welfare programs.

5.2 Cryptography in Blockchain


Blockchain security is built on two concepts Cryptography and Hashing.
Cryptography is a method of securing data from unauthorized access. In the
blockchain, cryptography is used to secure transactions taking place between
two nodes in a blockchain network. As discussed above, in a blockchain there
are two main concepts cryptography and hashing. Cryptography is used to
encrypt messages in a P2P network and hashing is used to secure the block
information and the link blocks in a blockchain.
Cryptography primarily focuses on ensuring the security of participants,
transactions, and safeguards against double-spending. It helps in securing
different transactions on the blockchain network. It ensures that only the
individuals for whom the transaction data is intended can obtain, read and

85
process the transaction.

• In the blockchain, cryptography is mainly used to protect user privacy


and transaction information and ensure data consistency.

• The core technologies of cryptography include symmetric encryption


and asymmetric encryption.

• Asymmetric cryptography uses digital signatures for verification pur-


poses, every transaction recorded to the block is signed by the sender
by digital signature and ensures that the data is not corrupted.

Cryptography is a technique or a set of protocols that secure information


from any third party during a process of communication. It is also made up
of two Greek terms, Kryptos term meaning “hidden” and Graphein, a term
meaning “to write”. Some terminologies related to Cryptography:
• Encryption: Conversion of normal text to a random sequence of bits.

• Key: Some amount of information is required to get the information of


the cryptographic algorithm.

• Decryption: The inverse process of encryption, conversion of a Random


sequence of bits to plaintext.

• Cipher: The mathematical function, i.e. a cryptographic algorithm


which is used to convert plaintext to ciphertext(Random sequence of
bits).

5.2.1 Symmetric-key cryptography


It focuses on a similar key for encryption as well as decryption. Most im-
portantly, the symmetric key encryption method is also applicable to secure
website connections or encryption of data. It is also referred to as secret-key
cryptography. The only problem is that the sender and receiver exchange
keys in a secure manner. The popular symmetric-key cryptography system
is Data Encryption System(DES). The cryptographic algorithm utilizes the
key in a cipher to encrypt the data and the data must be accessed. A person
entrusted with the secret key can decrypt the data. Examples: AES, DES,
etc.
• It is also known as Secret key cryptography.

• Both parties have the same key to keeping secrets.

86
Figure 5.5: Symmetric-key cryptography

• It is suited for bulk encryptions.

• It requires less computational power and faster transfer.

5.2.2 Asymmetric-key Encryption


This cryptographic method uses different keys for the encryption and decryp-
tion process. This encryption method uses public and private key methods.
This public key method help completely unknown parties to share informa-
tion between them like email id. private key helps to decrypt the messages
and it also helps in the verification of the digital signature. The mathematical
relation between the keys is that the private key cannot be derived from the
public key, but the public key can be derived from the private key. Example:
ECC,DSS etc.

• It is also known as Public-key cryptography.

• It is often used for sharing secret keys of symmetric cryptography.

• It requires a long processing time for execution.

• Plays a significant role in website server authenticity.

87
Figure 5.6: Asymmetric-key cryptography

88

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy