Bc Module 1(Bcs613a)
Bc Module 1(Bcs613a)
MODULE 1
INTRODUCTION TO BLOCKCHAIN
1.1 Introduction
Blockchain is a buzzword in today’s technology and this technology is described as the most
disruptive technology of the decade. Thus, Blockchain is used for the secure transference of items like
money, contracts, property rights, stocks, and even networks without any requirement of Third Party
Intermediaries like Governments, banks, etc. Once the data is stored in the Blockchain it becomes
very difficult to manipulate the stored data. A Blockchain is a Network Protocol like SMTP. However,
Blockchain cannot be run without the Internet. BlockChain is useful in many areas like Banking,
Finance, Healthcare, Insurance, etc.
A blockchain is an open, distributed ledger that can record transactions between two parties efficiently
and in a verifiable and permanent way without the need for a central authority.
The following graph shows a broad-spectrum outline of the year-wise progression and adoption trends
of blockchain technology. The years shown on the x axis indicate the range of time in which a specific
phase of blockchain technology falls. Each phase has a name that represents the stage at which the
technology was reached, and this is shown on the x axis starting from the period of IDEAS AND
THOUGHTS in 2013 to eventually MATURITY AND FURTHER PROGRESS, expected in 2025.
The y axis shows the level of activity, involvement, and adoption of blockchain technology. The graph
shows that, by roughly 2025, blockchain technology is expected to become mature and have a high
number of users:
KeyCharacteristics:
Verifiable: Every one can check the validity of information because each node maintains a copy of
the transactions.
Permanent: Once a transaction is done, it is persistent and can’t be altered.
Blockchain can be defined as the Chain of Blocks that contain some specific Information. Thus, a
Blockchain is a ledger i.e file that constantly grows and keeps the record of all transactions
permanently. This process takes place in a secure, chronological and immutable way. Each time when
a block is completed in storing information, a new block is generated.
Distributed systems are a computing paradigm whereby two or more nodes work with each other in a
coordinated fashion to achieve a common outcome. It is modeled in such a way that end users see it as
a single logical platform. For example, Google's search engine is based on a large distributed system;
however, to a user, it looks like a single, coherent platform.
A node can be defined as an individual player in a distributed system. All nodes are capable of
sending and receiving messages to and from each other. There is no Central Server or System which
keeps the data of Blockchain. The data is distributed over Millions of Computers around the world
which are connected with the Blockchain. This system allows Notarization of Data as it is present on
every Node and is publicly verifiable. A node can be defined as an individual player in a distributed
system. All nodes are capable of sending and receiving messages to and from each other.
Nodes can be honest, faulty, or malicious and have their own memory and processor. A node that can
exhibit arbitrary behavior is also known as a Byzantine node. This arbitrary behavior can be
intentionally malicious, which is detrimental to the operation of the network. Generally, any
unexpected behavior of a node on the network can be categorized as Byzantine. This term arbitrarily
encompasses any behavior that is unexpected or malicious.
In 1982, a thought experiment was proposed by Lamport and others in their research paper, a
group of army generals who lead different parts of the Byzantine army are planning to attack
or retreat from a city. The only way of communicating among them is via a messenger. They
need to agree to strike at the same time in order to win. The issue is that one or more generals
might be traitors who could send a misleading message.
Therefore, there is a need for a viable mechanism that allows for agreement among the
generals, even in the presence of the treacherous ones, so that the attack can still take place
at the same time. As an analogy to distributed systems, the generals can be considered nodes,
the traitors as Byzantine (malicious) nodes, and the messenger can be thought of as a
channel of communication among the generals.
This problem was solved in 1999 by Castro and Liskov who presented the Practical Byzantine
Fault Tolerance (PBFT) algorithm, where consensus is reached after a certain number of
messages are received containing the same signed content.
A small-scale example of a distributed system is shown in the following diagram. This distributed
system has six nodes out of which one (N4) is a Byzantine node leading to possible data
inconsistency. L2 is a link that is broken or slow, and this can lead to partition in the network.
The main challenge in distributed system design is coordination between nodes and fault tolerance.
Even if some of the nodes become faulty or network links break, the distributed system should tolerate
this and should continue to work flawlessly in order to achieve the desired result. This has been an
area of active research for many years and several algorithms and mechanisms have been proposed to
overcome these issues.
A network of nodes: A node is a computer connected to the Blockchain Network. Node gets
connected with Blockchain using the client. Client helps in validating and propagates transaction on to
the Blockchain. When a computer connects to the Blockchain, a copy of the Blockchain data gets
downloaded into the system and the node comes in sync with the latest block of data on Blockchain.
The Node connected to the Blockchain which helps in the execution of a Transaction in return for an
incentive is called Miners.
Disadvantages of current transaction system:
● Need to third party for verification and execution of Transaction make the process complex.
● If the Central Server like Banks is compromised, whole System is affected including the
participants.
● Organization doing validation charge high process thus making the process expensive.
● Distributed: The distributed ledger is shared and updated with every incoming transaction among
the nodes connected to the Blockchain. All this is done in real-time as there is no central server
controlling the data.
● Secure: There is no unauthorized access to Blockchain made possible through Permissions and
Cryptography.
● Transparent: Because every node or participant in Blockchain has a copy of the Blockchain data,
they have access to all transaction data. They themselves can verify the identities without the need for
mediators.
● Consensus-based: All relevant network participants must agree that a transaction is valid. This is
achieved through the use of consensus algorithms.
● Flexible: SmartContracts which are executed based on certain conditions can be written into the
platform. Blockchain Network can evolve in pace with business processes.
Accountability is required to ensure that cash is spendable only once (double-spend problem) and that
it can only be spent by its rightful owner. Double spend problem arises when same money can be spent
twice. As it is quite easy to make copies of digital data, this becomes a big issue in digital currencies as
you can make many copies of same digital cash.
Anonymity is required to protect users' privacy. As with physical cash, it is almost impossible to trace
back spending to the individual who actually paid the money. David Chaum solved both of these
problems during his work in 1980s by using two cryptographic operations, namely blind signatures
and secret sharing.
For the moment, it is sufficient to say that blind signatures allow for signing a document without
actually seeing it, and secret sharing is a concept that enables the detection of double spending, that is
using the same e-cash token twice.
The various ideas that supported the invention of Bitcoin and blockchain
1.5 Blockchain
● In 2008, a groundbreaking paper entitled Bitcoin: A Peer-to-Peer Electronic Cash System was written
on the topic of peer-to-peer electronic cash under the pseudonym Satoshi Nakamoto.
● It introduced the term chain of blocks. No one knows the actual identity of Satoshi Nakamoto.
● After introducing Bitcoin in 2009, he remained active in the Bitcoin developer community until
2011. He then handed over Bitcoin development to its core developers and simply disappeared. Since
then, there has been no communication from him whatsoever, and his existence and identity are
shrouded in mystery. The term chain of blocks evolved over the years into the word blockchain.
● In 1991, researcher scientists named Stuart Haber and W. Scott Stornetta introduce Blockchain
Technology. These scientists wanted some Computational practical Solution for time-stamping the
digital documents so that they couldn’t be tempered or misdated. So both scientists together
developed a system with the help of Cryptography. In this System, the time-stamped documents are
stored in a Chain of Blocks.
● After that in 1992, Merkle Trees formed a legal corporation by using a system developed by Stuart
Haber and W. Scott Stornetta with some more features. Hence, Blockchain Technology became
efficient to store several documents to be collected into one block. Merkle used a Secured Chain of
Block which stores multiple data records in a sequence. However, this Technology became unused
when Patent came into existence in 2004.
● However, in the same year 2004, Cryptographic activist Hal Finney introduced a system for digital
cash known as “Reusable Proof of Work”.This step was the game-changer in the history of
Blockchain and Cryptography. This System helps others to solve the Double Spending Problem by
keeping the ownership of tokens registered on a trusted server.
● After that in 2008, Satoshi Nakamoto conceptualized the concept of “Distributed Blockchain”
under his white paper: ”A Peer to Peer Electronic Cash System”. He modified the model of Merkle
Tree and created a system that is more secure and contains the secure history of data exchange. His
System follows a peer-to-peer network of time stamping. His system became so useful that
Blockchain become the backbone of Cryptography.
● After that, the evolution of Blockchain is steady and promising and became a need in various fields.
Blockchain technology is so secure that the following surprising news will give proof about that. A
person named, James Howells was an IT worker in the United Kingdom, he starts mining bitcoins
which are part of Blockchain in 2009 and stopped this in 2013. He spends $17,000 on it and after he
stopped he sells the parts of his laptop on eBay and keep the drive with him so that when he needs to
work again on bitcoin he will utilize it but while cleaning his house in 2013,he thrashed his drive
with garbage and now his bitcoins cost nearly$127million.This money now remains unclaimed in the
Bitcoin system.
● The blockchain is the public ledger of all Bitcoin transactions that have ever been executed. It is
constantly growing as miners add new blocks to it (every 10 minutes). The blocks are added to the
blockchain in a linear, chronological order. Each full node (i.e., every computer connected to the
Bitcoin network using a client that performs the task of validating and relaying transactions) has a
copy of the blockchain, which is downloaded automatically when the miner joins the Bitcoin
network. The blockchain has complete information about addresses and balances from the genesis
block (the very first transactions ever executed) to the most recently completed block.
● One of the famous use of Blockchain is Bitcoin.The bitcoin is a cryptocurrency and is used to
Dept of CSE,CBIT Kolar Page 7
Blockchain Technology(BCS613A) Module 1
exchange digital assets online. Bitcoin uses cryptographic proof instead of third-party trust for two
parties to execute transactions over the internet. Each transaction protects through digital signature.
Blockchain defined
Layman's definition: Blockchain is an ever-growing, secure, shared record keeping system in which
each user of the data holds a copy of the records, which can only be updated if all parties involved in
a transaction agree to update.
Peer-to-peer
The first keyword in the technical definition is peer-to-peer. This means that there is no central
controller in the network, and all participants talk to each other directly. This property allows for cash
transactions to be exchanged directly among the peers without a third-party involvement, such as by a
bank.
Distributed ledger
Blockchain is a distributed ledger, which simply means that a ledger is spread across the network
among all peers in the network, and each peer holds a copy of the complete ledger.
Cryptographically-secure
ledger is cryptographically-secure, which means that cryptography has been used to provide security
services which make this ledger secure against tampering and misuse. These services include non-
repudiation, data integrity, and data origin authentication.
Append-only
Another property that we encounter is that blockchain is append-only, which means that data can only
be added to the blockchain in time-ordered sequential order. This property implies that once data is
added to the blockchain, it is almost impossible to change that data and can be considered practically
immutable.
There may be some legitimate reasons to change data in the blockchain once it has been added,
For all practical purposes, blockchain is indeed immutable and cannot be changed.
Finally, the most critical attribute of a blockchain is that it is updateable only via consensus. This is
what gives it the power of decentralization. In this scenario, no central authority is in control of
updating the ledger. Instead, any update made to the blockchain is validated against strict criteria
defined by the blockchain protocol and added to the blockchain only after a consensus has been
reached among all participating peers/nodes on the network. To achieve consensus, there are various
consensus facilitation algorithms which ensure that all parties are in agreement about the final state of
the data on the blockchain network and resolutely agree upon it to be true.
Blockchain can be thought of as a layer of a distributed peer-to-peer network running on top of the
internet, as can be seen in the following diagram. It is analogous to SMTP, HTTP, or FTP running on
top of TCP/IP.
• Address: Addresses are unique identifiers used in a blockchain transaction to denote senders and
recipients. An address is usually a public key or derived from a public key.
• Block: A block is composed of multiple transactions and other elements, such as the previous block
hash (hash pointer), timestamp, and nonce. A block is composed of a block header and a selection of
• A reference to a previous block is also included in the block unless it is a genesis block. This
reference is the hash of the header of the previous block. A genesis block is the first block in the
blockchain that is hardcoded at the time the blockchain was first started. The structure of a block is
also dependent on the type and design of a blockchain.
• A nonce is a number that is generated and used only once. A nonce is used extensively in many
cryptographic operations to provide replay protection, authentication, and encryption. In blockchain,
it's used in PoW consensus algorithms and for transaction replay protection. A block also includes the
nonce value.
• Merkle root is a hash of all of the nodes of a Merkle tree. In a blockchain block, it is the combined
hash of the transactions in the block. Merkle trees are widely used to validate large data structures
securely and efficiently. In the blockchain world, Merkle trees are commonly used to allow efficient
verification of transactions. Merkle root in a blockchain is present in the block header section of a
block, which is the hash of all transactions in a block. This means that verifying only the Merkle root
is required to verify all transactions present in the Merkle tree instead of verifying all transactions one
by one.
• In addition to the block header, the block contains transactions that make up the block body. A
transaction is a record of an event, for example, the event of transferring cash from a sender's account
to a beneficiary's account. A block contains transactions and its size varies depending on the type and
design of the blockchain. The following structure is a simple block diagram that depicts a block.
Peer-to-peer network
This is a network topology whereby all peers can communicate with each other and send and receive
messages.
Virtual machine
This is an extension of a transaction script. A virtual machine allows Turing complete code to be run
on a blockchain (as smart contracts) whereas a transaction script can be limited in its operation.
State machine
A blockchain can be viewed as a state transition mechanism whereby a state is modified from its
initial form to the next and eventually to a final form as a result of a transaction execution and
validation process by nodes.
Nodes
A blockchain node's functions depend on its role. It can propose and validate transactions, perform
mining, and ensure consensus using protocols like Proof of Work (PoW). Nodes may also serve as
lightweight nodes for payment verification, validators, or other roles depending on the blockchain
type.
Smart contracts
• These programs run on top of the blockchain and encapsulate the business logic to be executed when
certain conditions are met.The smart contract feature is not available in all blockchains but is now
becoming a very desirable feature due to the flexibility and power it provides to the blockchain
applications.
A high-level diagram of blockchain architecture highlighting the key elements mentioned previously
is shown as follows:
Nodes are either miners who create new blocks and mint cryptocurrency (coins) or block signers who
validate and digitally sign the transactions. A critical decision that every blockchain network has to
make is to figure out which node will append the next block to the blockchain. This decision is made
using a consensus mechanism.
A general scheme for creating blocks. This scheme is presented here to give you a general idea of how
blocks are generated and what the relationship is between transactions and blocks:
1. Transaction is initiated: A node starts a transaction by first creating it and then digitally
signing it with its private key. A transaction can represent various actions in a blockchain. Most
commonly, this is a data structure that represents the transfer of value between users on the
blockchain network. The transaction data structure usually consists of some logic of transfer of
value, relevant rules, source and destination addresses, and other validation information.
Transactions are usually either a cryptocurrency transfer (transfer of value) or smart contract
invocation that can perform any desired operation. A transaction occurs between two or more
parties.
3. Find new block: When the transaction is received and validated by special participants called
miners on the blockchain network, it is included in a block, and the process of mining starts.
This process is also sometimes referred to as "finding a new block." Here, nodes called miners
race to finalize the block they've created by a process known as mining.
4. New block found: Once a miner solves a mathematical puzzle (or fulfills the requirements of
the consensus mechanism implemented in a blockchain), the block is considered "found" and
finalized. At this point, the transaction is considered confirmed. Usually, in cryptocurrency
blockchains such as Bitcoin, the miner who solves the mathematical puzzle is also rewarded
with a certain number of coins as an incentive for their effort and the resources they spent in the
mining process.
5. Add new block to the blockchain: The newly created block is validated, transactions or smart
contracts within it are executed, and it is propagated to other peers. Peers also validate and
execute the block. It now becomes part of the blockchain (ledger), and the next block links itself
cryptographically back to this block. This link is called a hash pointer.
Distributed ledgers
a distributed ledger is distributed among its participants and spread across multiple sites or
organizations. This type of ledger can be either private or public.
The fundamental idea here is that, unlike many other blockchains, the records are stored contiguously
instead of being sorted into blocks. This concept is used in Ripple, which is a blockchain- and
cryptocurrency-based global payment network.
The terms distributed ledger or DLT have grown to be commonly used to describe blockchain in the
finance industry. Sometimes, blockchain and DLT are used interchangeably.
From a financial sector point of view, DLTs are permissioned blockchains that are used by
consortiums. DLTs usually serve as a shared database, with all participants known and verified. They
do not have a cryptocurrency and do not require mining to secure the ledger.
Public blockchains
As the name suggests, public blockchains are not owned by anyone. They are open to the public, and
anyone can participate as a node in the decision-making process. All users of these "permissionless"
or "un-permissioned" ledgers maintain a copy of the ledger on their local nodes and use a distributed
consensus mechanism to decide the eventual state of the ledger. Bitcoin and Ethereum are both
considered public blockchains.
Private blockchains
As the name implies, private blockchains are just that—private. That is, they are open only to a
consortium or group of individuals or organizations who have decided to share the ledger among
themselves. There are various blockchains now available in this category, such as Kadena and
Quorum.
Semi-private blockchains
With semi-private blockchains, part of the blockchain is private and part of it is public. With a semi-
private blockchain, the private part is controlled by a group of individuals, while the public part is
open for participation by anyone.
This hybrid model can be used in scenarios where the private part of the blockchain remains internal
and shared among known participants, while the public part of the blockchain can still be used by
anyone, optionally allowing mining to secure the blockchain. This way, the blockchain as a whole can
be secured using PoW, thus providing consistency and validity for both the private and public parts.
Sidechains
More precisely known as "pegged sidechains," this is a concept whereby coins can be moved from one
blockchain to another and then back again. Typical uses include the creation of new altcoins
(alternative cryptocurrencies) whereby coins are burnt as a proof of an adequate stake.
"Burnt" or "burning the coins" in this context means that the coins are sent to an address that is un-
spendable, and this process makes the "burnt" coins irrecoverable. This mechanism is used to
bootstrap a new currency or introduce scarcity, which results in the increased value of the coin.
This mechanism is also called "Proof of Burn" and is used as an alternative method for distributed
consensus to PoW and Proof of Stake (PoS).
The example provided previously for burning coins applies to a one-way pegged sidechain.
Dept of CSE,CBIT Kolar Page 15
Blockchain Technology(BCS613A) Module 1
The second type is called a two-way pegged sidechain, which allows the movement of coins from the
main chain to the sidechain and back to the main chain when required.
Rootstock is one of the leading examples of a sidechain, which enables smart contract development
for Bitcoin using this paradigm.
Permissioned ledger
A permissioned ledger is a blockchain where participants of the network are already known and
trusted. Permissioned ledgers do not need to use a distributed consensus mechanism; instead, an
agreement protocol is used to maintain a shared version of the truth about the state of the records on
the blockchain.
In this case, for verification of transactions on the chain, all verifiers are already preselected by a
central authority and, typically, there is no need for a mining mechanism.
By definition, there is also no requirement for a permissioned blockchain to be private, as it can be a
public blockchain but with regulated access control.
Shared ledger
This is a generic term that is used to describe any application or database that is shared by the public
or a consortium. Generally, all blockchains fall into the category of a shared ledger.
An example of this type of blockchain might be to allow for collaboration and the sharing of data
between various government departments. In that case, no complex consensus mechanism is required,
apart from simple SMR and an agreement protocol with known central validators.
Tokenized blockchains
These blockchains are standard blockchains that generate cryptocurrency as a result of a consensus
process via mining or initial distribution. Bitcoin and Ethereum are prime examples of this type of
blockchain.
Tokenless blockchains
These blockchains are designed in such a way that they do not have the basic unit for the transfer of
value. However, they are still valuable in situations where there is no need to transfer value between
nodes and only the sharing of data among various trusted parties is required.
This is similar to fully private blockchains, the only difference being that the use of tokens is not
required. Most of the permissioned blockchains can be seen as an example of tokenless blockchains,
for example, Hyperledger Fabric or Quorum.
Tokens can be built on these chains as an application, but intrinsically these blockchains do not have a
token associated with them.
1.10 Consensus
Consensus is a process of achieving agreement between distrusting nodes on the final state of
data. To achieve consensus, different algorithms are used.
It is easy to reach an agreement between two nodes (in client-server systems, for example), but
when multiple nodes are participating in a distributed system and they need to agree on a
single value, it becomes quite a challenge to achieve consensus.
This process of attaining agreement on a common state or value among multiple nodes despite
the failure of some nodes is known as distributed consensus.
Consensus mechanism
A consensus mechanism is a set of steps that are taken by most or all nodes in a blockchain to agree
on a proposed state or value.
There are various requirements for a consensus mechanism. The following describes these
requirements:
• Agreement: All honest nodes decide on the same value.
• Integrity: This is a requirement that no node can make the decision more than once in a single
consensus cycle.
Dept of CSE,CBIT Kolar Page 17
Blockchain Technology(BCS613A) Module 1
• Validity: The value agreed upon by all honest nodes must be the same as the initial value
proposed by at least one honest node.
• Fault tolerant: The consensus algorithm should be able to run correctly in the presence of faulty
or malicious nodes (Byzantine nodes).
• Termination: All honest nodes terminate the execution of the consensus process and eventually
reach a decision.
For example, the PoW mechanism used in Bitcoin falls into this category, where a miner who solves
the computational puzzle as proof of computational effort expended wins the right to add the next
block to the blockchain.
• Traditional fault tolerance-based: With no compute-intensive operations, such as partial hash
inversion (as in Bitcoin PoW), this type of consensus mechanism relies on a simple scheme of nodes
that publish and verify signed messages in a number of phases.
Eventually, when a certain number of messages are received over a period of rounds (phases), then an
agreement is reached.
To achieve fault tolerance, replication is used. This is a standard and widely used method to achieve
fault tolerance.
In general, there are two types of faults that a node can experience:
• Fail-stop faults: This type of fault occurs when a node merely has crashed. Fail-stop faults are
the easier ones to deal with of the two fault types. Paxos or the RAFT protocol, introduced earlier
in this chapter, are normally used to deal with this type of fault.
• Byzantine faults: The second type of fault is one where the faulty node exhibits malicious or
inconsistent behavior arbitrarily. This type is difficult to handle since it can create confusion due
to misleading information. This can be a result of an attack by adversaries, a software bug, or
data corruption. SMR protocols such as Practical Byzantine Fault Tolerance (PBFT) was
developed to address this second type of faults.
Many other implementations of consensus protocols have been proposed in traditional distributed
systems. Paxos is the most famous of these protocols. It was introduced by Leslie Lamport in
1989. With Paxos, nodes are assigned various roles such as Proposer, Acceptor, and Learner.
Nodes or processes are named replicas, and consensus is achieved in the presence of faulty nodes
by an agreement among a majority of nodes.
An alternative to Paxos is RAFT, which works by assigning any of three states; that is, Follower,
Candidate, or Leader to the nodes. A Leader is elected after a Candidate node receives enough
votes, and all changes then have to go through the Leader. The Leader commits the proposed
changes once replication on the majority of the follower nodes is completed.
As there is significant research being conducted in this area, new types of consensus mechanisms
are also emerging, such as the semi-decentralized type, which is used in the Ripple network.
There are also various other proposals out there, which are trying to find the right balance
between scalability and performance. Some notable projects include PBFT, Hybrid BFT,
BlockDAG, Tezos, Stellar, and GHOST.
The consensus algorithms available today, or that are being researched in the context of
blockchain, are presented as follows:
• Proof of Work (PoW): This type of consensus mechanism relies on proof that adequate
computational resources have been spent before proposing a value for acceptance by the network.
This scheme is used in Bitcoin, Litecoin, and other cryptocurrency blockchains.
Currently, it is the only algorithm that has proven to be astonishingly successful against any
collusion attacks on a blockchain network, such as the Sybil attack.
• Proof of Stake (PoS): This algorithm works on the idea that a node or user has an adequate
stake in the system; that is, the user has invested enough in the system so that any malicious
attempt by that user would outweigh the benefits of performing such an attack on the network.
This idea was first introduced by Peercoin, and it is going to be
used in the Ethereum blockchain version called Serenity. Another important concept in PoS is
coin age, which is a criterion derived from the amount of time and number of coins that have not
been spent.
• Delegated Proof of Stake (DPoS): This is an innovation over standard PoS, whereby each
node that has a stake in the system can delegate the validation of a transaction to other nodes by
voting. It is used in the BitShares blockchain.
• Proof of Elapsed Time (PoET): Introduced by Intel in 2016, PoET uses a Trusted Execution
Environment (TEE) to provide randomness and safety in the leader election process via a
guaranteed wait time
• Proof of Deposit (PoD): In this case, nodes that wish to participate in the network have to
make a security deposit before they can mine and propose blocks. This mechanism is used in the
Tendermint blockchain.
• Proof of Importance (PoI): This idea is significant and different from PoS. PoI not only relies
on how large a stake a user has in the system, but it also monitors the usage and movement of
tokens by the user in order to establish a level of trust and importance. It is used in the NEM coin
blockchain.
• Practical Byzantine Fault Tolerance (PBFT): This mechanism achieves SMR, which
provides tolerance against Byzantine nodes. Various other protocols, including PBFT, PAXOS,
RAFT, and Federated Byzantine Agreement (FBA), are also being used or have been proposed
for use in many different implementations of distributed systems and blockchains.
• Proof of Activity (PoA): This scheme is a combination of PoS and PoW, which ensures that a
stakeholder is selected in a pseudorandom but uniform fashion. This is a comparatively more
energy-efficient mechanism as compared to PoW.
In this scheme, PoW and PoS are combined together to achieve consensus and a good level of
security.
• Proof of Capacity (PoC): This scheme uses hard disk space as a resource to mine the blocks.
This is different from PoW, where CPU resources are used. In PoC, hard disk space is utilized for
mining and, as such, is also known as hard drive mining.
• Proof of Storage: This scheme allows for the outsourcing of storage capacity. This scheme is
based on the concept that a particular piece of data is probably stored by a node, which serves as
a means to participate in the consensus mechanism.
Several variations of this scheme have been proposed, such as Proof of Replication, Proof of
Data Possession, Proof of Space, and Proof of Space-time.
• Proof of Authority (PoA): This scheme utilizes the identity of the participants called validators
as a stake on the network. Validators are known and have the authority to propose new blocks.
Validators propose the new blocks and validate them as per blockchain rules. Commonly used
PoA algorithms are Clique and Aura.
1.13 CAPtheorem:
The CAP theorem, also known as Brewer's theorem, was introduced by EricBrewer in 1998 as a
conjecture. In 2002, it was proven as a theorem by Seth Gilbert and Nancy Lynch. The theorem states
that any distributed system cannot have consistency, availability, and partition tolerance
simultaneously:
● Consistency is a property that ensures that all nodes in a distributed system have a single, current,
and identical copy of the data. Consistency is achieved using consensus algorithms in order to
ensure that all nodes have the same copy of the data. This is also called statemachine replication.
● Availability means that the nodes in the system are up, accessible for use, and are accepting
incoming requests and responding with data without any failures as and when required. In otherwords,
data is available at each node and the nodes are responding.
● Partition tolerance ensures that if a group of nodes is unable to communicate with other nodes due
to network failures, the distributed system continues to operate correctly. This can occur due to
network and node failures.
The preceding diagram shows that only two properties at a time can be achieved. Either AP, CA, or CP.
In summary:
1. If we opt for CP (consistency and partition tolerance), we sacrifice availability.
2. If we opt for AP (availability and partition tolerance), we sacrifice consistency.
3. If we opt for AC (availability and consistency), we sacrifice partition tolerance.
Let's imagine that there is a distributed system with two nodes. Now, let's apply the three theorem
properties on this smallest of possible distributed systems only with two nodes:
• Consistency is achieved if both nodes have the same shared state; that is, they have the same up-to-
date copy of the data.
• Availability is achieved if both nodes are up and running and responding with the latest copy of
data.
• Partition tolerance is achieved if, despite communication failure or delay between nodes, the
network (distributed system) continues to operate.
Numerous benefits of blockchain technology are being discussed in the industry and proposed by
thought leaders around the world in blockchain space. The top 10 benefits are listed and discussed as
follows.
Decentralization:
This is a core concept and benefit of blockchain. There is no need for a trusted thirdparty or
intermediary to validate transactions; instead a consensus mechanism is used to agree on the validity
of transactions.
Immutability:
Once the data has been written to the blockchain, it is extremely difficult to change it back. It is not
truly immutable but, due to the fact that changing data is extremely difficult and almost impossible,
this is seen as a benefit to maintaining an immutable ledger of transactions.
High availability:
As the system is based on thousands of nodes in a peer-to-peer network, and the data is replicated and
updated on each and every node, the system becomes highly available. Even if nodes leave the
network or become inaccessible, the network as a whole continues to work, thus making it highly
available.
Highly secure:
All transactions on a blockchain are cryptographically secured and provide integrity.
interested parties, this can result in simplifying this model by reducing the complexity of managing
the separate systems maintained by each entity.
Faster dealings:
In the financial industry, especially in post-trade settlement functions, blockchain can play a vital role
by allowing the quicker settlement of trades as it does not require a lengthy process of verification,
reconciliation, and clearance because a single version of agreed upon data is already available on a
shared ledger between financial organizations.
Cost saving:
As no third party or clearing houses are required in the blockchain model , this can massively
eliminate overhead costs in the form of fees that are paid to clearing houses or trusted third parties.
As with any technology, some challenges need to be addressed in order to make a system more robust,
useful, and accessible. Blockchain technology is no exception. In fact, much effort is being made in
both academia and industry to overcome the challenges posed by blockchain technology.
• Adoption: Often, blockchain is seen as a nascent technology. Even though this perspective is rapidly
changing, there is still a long way to go before the mass adoption of this technology. The challenge
here is to allow blockchain networks to be easier to use so that adoption can increase. In addition,
several other challenges such as scalability (introduced previously) exist, which must be solved in
order to increase adoption.
• Regulation: Due to its decentralized nature, regulation is almost impossible on blockchain. This is
sometimes seen as a barrier toward adoption because, traditionally, due to the existence of regulatory
authorities, consumers have a certain level of confidence that if something goes wrong they can hold
someone accountable. However, in blockchain networks, no such regulatory authority and control
exists, which is an inhibiting factor for many consumers.
• Relatively immature technology: As compared to traditional IT systems that have benefited from
decades of research, blockchain is still a new technology and requires a lot of research to achieve
maturity.
• Privacy and confidentiality: Privacy is a concern on public blockchains such as Bitcoin where
everyone can see every single transaction. This transparency is not desirable in many industries such
as the financial, law, or medical sectors. This is also a known concern and a lot of valuable research
with some impeccable solutions has already been developed. However, further research is still
required to drive the mass adoption of blockchain.