Unit 2
Unit 2
Unit 2 1
eliminating the need for intermediaries. In the supply chain, it can improve
traceability and transparency, reducing the chances of counterfeit goods and
fraud.
In the healthcare sector, blockchain can enhance data security, privacy,
interoperability and consent management in health information exchanges. For the
energy sector, blockchain could enable innovative and efficient ways of energy
distribution like peer-to-peer energy trading.
Furthermore, understanding blockchain technology is not complete without
discussing Smart Contracts. These are self-executing contracts with the terms of
the agreement directly written into code. They automatically execute transactions
when pre-set conditions are met, reducing the need for intermediaries and
increasing efficiency.
In summary, blockchain technology offers a decentralized, transparent, and
immutable method of recording data, making it a groundbreaking technology with
the potential to disrupt many sectors of the economy. As with any technology, it
comes with its own challenges and limitations, such as scalability and privacy
issues, but its potential benefits make it a very promising field of study and
development.
What is Blockchain?
The blockchain is a distributed database of records of all transactions or digital
events that have been executed and shared among participating parties. Each
transaction is verified by the majority of participants of the system.
It contains every single record of each transaction. Bitcoin is the most popular
cryptocurrency an example of the blockchain. Blockchain Technology first came
to light when a person or group of individuals name ‘Satoshi Nakamoto’ published
a white paper on “BitCoin: A peer-to-peer electronic cash system” in 2008.
Unit 2 2
Blockchain Technology Records Transaction in Digital Ledger which is distributed
over the Network thus making it incorruptible. Anything of value like Land Assets,
Cars, etc. can be recorded on Blockchain as a Transaction.
Unit 2 3
Blockchain Decentralization
There is no Central Server or System which keeps the data of the Blockchain. The
data is distributed over Millions of Computers around the world which are
connected to the Blockchain. This system allows the Notarization of Data as it is
present on every Node and is publicly verifiable.
Unit 2 4
Blockchain nodes
A node is a computer connected to the Blockchain Network. Node gets connected
with Blockchain using the client. The client helps in validating and propagating
Unit 2 5
transactions onto 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.
The need for a third party for verification and execution of Transactions makes
the process complex.
If the Central Server like Banks is compromised, the whole system is affected
including the participants.
Organizations doing validation charge high process thus making the process
expensive.
Unit 2 6
you don’t need to when operating on a Blockchain network. Blockchain builds
trust through the following five attributes:
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.
Flexible: Smart Contracts which are executed based on certain conditions can
be written into the platform. Blockchain Networks can evolve in pace with
business processes.
Collaboration: It permits every party to interact directly with one another while
not requiring third-party negotiation.
Unit 2 7
Application of Blockchain
Leading Investment Banking Companies like Credit Suisse, JP Morgan Chase,
Goldman Sachs, and Citigroup have invested in Blockchain and are
experimenting to improve the banking experience and secure it.
Following the Banking Sector, the Accountants are following the same path.
Accountancy involves extensive data, including financial statements
spreadsheets containing lots of personal and institutional data. Therefore,
accounting can be layered with blockchain to easily track confidential and
sensitive data and reduce human error and fraud. Industry Experts from
Deloitte, PwC, KPMG, and EY are proficiently working and using blockchain-
based software.
Booking a Flight requires sensitive data ranging from the passenger’s name,
credit card numbers, immigration details, identification, destinations, and
sometimes even accommodation and travel information. So sensitive data can
be secured using blockchain technology. Russian Airlines are working towards
the same.
Barclays uses Blockchain to streamline the Know Your Customer (KYC) and
Fund Transfer processes while filling patents against these features.
Unilever uses Blockchain to track all their transactions in the supply chain and
maintain the product’s quality at every stage of the process.
Walmart has been using Blockchain Technology for quite some time to keep
track of their food items coming right from farmers to the customer. They let
the customer check the product’s history right from its origin.
Unit 2 8
DHL and Accenture work together to track the origin of medicine until it
reaches the consumer.
The government of Dubai looking forward to making Dubai the first-ever city
to rely on entirely and work using blockchain, even in their government office.
Along with the above organizations, leading tech companies like Google,
Microsoft, Amazon, IBM, Facebook, TCS, Oracle, Samsung, NVIDIA,
Accenture, and PayPal, are working on Blockchain extensively.
Is Blockchain Secure?
Nowadays, as the blockchain industry is increasing day by day, a question arises
is Blockchain safe? or how safe is blockchain? As we know after a block has been
added to the end of the blockchain, previous blocks cannot be changed. If a
change in data is tried to be made then it keeps on changing the Hash blocks, but
with this change, there will be a rejection as there are no similarities with the
previous block.
Just imagine there is a who hacker runs a node on a blockchain network, he wants
to alter a blockchain and steal cryptocurrency from everyone else. With a change
in the copy, they would have to convince the other nodes that their copy was
valid.
They would need to control a majority of the network to do this and insert it at just
the right moment. This is known as a 51% attack because you need to control
more than 50% of the network to attempt it.
Timing would be everything in this type of attack—by the time the hacker takes
any action, the network is likely to have moved past the blocks they were trying to
alter.
Unit 2 9
2. Security: Transactions on a blockchain are secured through cryptography,
making them virtually immune to hacking and fraud.
5. Trust: The transparent and secure nature of blockchain technology can help to
build trust between parties in a transaction.
6. Overall, the advantages of blockchain technology are significant and have the
potential to revolutionize many industries. However, there are also several
challenges and disadvantages that must be addressed before the technology
can reach its full potential.
SN Blockchain Database
Unit 2 10
charge.
Unit 2 11
common point of view in an environment where people can behave maliciously or
people can crash the work in a faulty way, is the main difficulty. So under this kind
of distributed environment, our objective is to ensure reliability which means to
ensure correct operation in the presence of faulty individuals.
Features :
Examples –
Commit a transaction in a database, State machine replication, Clock
synchronization.
How to achieve distributed consensus :
There are some conditions that need to be followed in order to achieve distributed
consensus.
Validity – Every non-faulty process must begin and ends with the same value.
Integrity – Every correct individual decides at most one value, and the
decided value must be proposed by some individual.
Safety Property – It ensures that you will never converge to an incorrect value
or correct individuals in a network will never converge to an incorrect value.
Unit 2 12
terminate.
Scalability – The protocol must be able to scale to handle large networks and
increasing numbers of nodes without sacrificing safety, liveness, or fault
tolerance. This ensures that the protocol can be used in real-world scenarios
with a large number of participants.
Unit 2 13
Fault tolerance: Distributed consensus protocols can provide fault tolerance in
distributed systems by allowing nodes to recover from crashes or network
partitions.
Complex transactions require more gas and thus enhancement in the gas limit. If
you want to learn in detail regarding the whole transactional scenario around the
ETH chain, you need to know the answer to ‘what is a gas limit?’. Without further
ado, let’s find out about the cryptocurrency gas limit.
Table of Contents
• What is Gas Limit?
•
What is the Purpose of Gas Limit?
•
How do Gas Limits Work?
•
What is the Transaction Gas Limit?
◦
Do I get my Gas back for a Failed Transaction (out of gas)?
•
Why are Ethereum Transaction Fees so High?
•
Calculating Ethereum Gas Costs
•
Unit 2 14
Conclusion
◦
Popular Searches
Unit 2 15
Source: Blockgeeks / What is a crypto gas limit in blockchain: purpose of
cryptocurrency block limit
Gas fees provide each node involved some incentive to add a new block to the
chain and execute a transaction. Now, they may charge very high depending upon
the traffic on the chain. The gas limit controls the users over how much they
spend on executing a transaction. A simulator suggests average gas fees to the
users, who can then decide whether they want to keep the gas limit equal to the
average, higher, or lower. A higher gas limit will get your transaction processed
faster since the designated node would get to charge more. A lower gas limit will
keep you in the queue until any willing node decides to execute the transaction.
Usually, people keep the cryptocurrency gas limit equal to the average gas fees.
Unit 2 16
higher than or equal to the gas fees mandated by the authorized nodes means the
transaction will be successful. If the transaction gas limit is lower than the gas
fees, the transaction fails.
Conclusion
Unit 2 17
In conclusion, the cryptocurrency gas limit is very important in deciding whether
an ETH block will have your transaction added. Ethereum’s recent
transformation to a proof of stake protocol from a proof of work one has many
plans to deal with issues PoW Ethereum was facing. However, the gas fees haven’t
come much lower yet. What the blockchain does to eradicate the high gas fees
issue still remains to be seen.
1. First, Sourav gets Suraj’s wallet address (a wallet in the blockchain is a digital
wallet that allows users to manage their transactions). Using this information,
he creates a new transaction for 1 bitcoins from his wallet and includes a
transaction fee of 0.003 bitcoin.
2. Next, he verifies the information and sends the transaction. Each transaction
that is initiated is signed by a digital signature of the sender that is basically
the private key of the sender. This is done in order to make the transaction
more secure and to prevent any fraud.
3. Sourav’s wallet then starts the transaction signing algorithm which signs his
transaction using his private key.
4. The transaction is now broadcasted to the memory pool within the network.
Unit 2 18
5. This transaction is eventually accepted by the miners. These miners, group
this transaction into a block, find the Proof of Work, and assign this block
a hash value to be mapped into the blockchain.
Unit 2 19
the hash value of its child nodes labels. This article focuses on discussing the
following topics in detail:
3. Blockchain Structure
4. Block Structure
8. Proof of Membership
9. Merkle Proofs
Unit 2 20
From the above picture, it is clear that even the slightest change in an alphabet
in the input sentence can drastically change the hash obtained. Therefore
hashes can be used to verify integrity.
Consider there is a text file with important data. Pass the contents of the text
file into a hash function and then store the hash in the phone. A hacker
manages to open the text file and changes the data.
Now when you open the file again, you can compute the hash again and
compare this hash with the one stored previously on the phone.
It will be clearly evident that the two hashes do not match and hence the file
has been tampered with.
Blockchain Structure
Unit 2 21
The blockchain is a proficient combination of two hash-based data structures-
1. Linked list: This is the structure of the blockchain itself, which is a linked
list of hash pointers. A regular linked list consists of nodes. Each node has 2
parts- data and pointer. The pointer points to the next node. In the blockchain,
simply replace the regular pointer with a hash pointer.
2. Merkle tree: A Merkle tree is a binary tree formed by hash pointers, and
named after its creator, Ralph Merkle.
Block Structure
1. Block header: The header data contains metadata of the block, i.e information
about the block itself. The contents of the block header include-
Timestamp.
Cryptographic nonce.
Merkle root.
Unit 2 22
2. Merkle tree: A Merkle tree is a binary tree formed by hash pointers, and named
after its creator, Ralph Merkle.
This is a huge overhead and can reduce the efficiency of the blockchain. Now,
this is where the Merkle tree comes into the picture. Merkle tree is a per-block
tree of all the transactions that are included in the block. It allows us to have a
hash/digest of all transactions and provides proof of membership in a time-
efficient manner.
Unit 2 23
Merkle Tree Structure
Root node: The root of the Merkle tree is known as the Merkle root and this
Merkle root is stored in the header of the block.
Unit 2 24
Leaf node: The leaf nodes contain the hash values of transaction data. Each
transaction in the block has its data hashed and then this hash value (also
known as transaction ID) is stored in leaf nodes.
Non-leaf node: The non-leaf nodes contain the hash value of their respective
children. These are also called intermediate nodes because they contain the
intermediate hash values and the hash process continues till the root of the
tree.
4. Bitcoin uses the SHA-256 hash function to hash transaction data continuously
till the Merkle root is obtained.
5. Further, a Merkle tree is binary in nature. This means that the number of leaf
nodes needs to be even for the Merkle tree to be constructed properly. In case
there is an odd number of leaf nodes, the tree duplicates the last hash and makes
the number of leaf nodes even.
Hence, by comparing the Merkle tree structure to a regular binary tree data
structure, one can observe that Merkle trees are actually inverted down.
Unit 2 25
Example: Consider a block having 4 transactions- T1, T2, T3, T4. These four
transactions have to be stored in the Merkle tree and this is done by the following
steps-
Step 1: The hash of each transaction is computed.
H1 = Hash(T1).
Step 2: The hashes computed are stored in leaf nodes of the Merkle tree.
Step 3: Now non-leaf nodes will be formed. In order to form these nodes, leaf
nodes will be paired together from left to right, and the hash of these pairs will be
calculated. Firstly hash of H1 and H2 will be computed to form H12. Similarly, H34
is computed. Values H12 and H34 are parent nodes of H1, H2, and H3, H4
respectively. These are non-leaf nodes.
Step 4: Finally H1234 is computed by pairing H12 and H34. H1234 is the only hash
remaining. This means we have reached the root node and therefore H1234 is the
Merkle root.
Unit 2 26
Merkle tree works by hashing child nodes again and again till only one hash
remains.
Key Points:
In order to check whether the transaction has tampered with the tree, there is
only a need to remember the root of the tree.
One can access the transactions by traversing through the hash pointers and
if any content has been changed in the transaction, this will reflect on the hash
stored in the parent node, which in turn would affect the hash in the upper-
level node and so on until the root is reached.
Hence the root of the Merkle tree has also changed. So Merkle root which is
stored in the block header makes transactions tamper-proof and validates the
integrity of data.
With the help of the Merkle root, the Merkle tree helps in eliminating duplicate
or false transactions in a block.
Let us consider a scenario where blockchain does not have Merkle trees. In
this case, every node in the network will have to keep a record of every single
transaction that has occurred because there is no central copy of the
information.
This means that a huge amount of information will have to be stored on every
node and every node will have its own copy of the ledger. If a node wants to
validate a past transaction, requests will have to be sent to all nodes,
requesting their copy of the ledger. Then the user will have to compare its own
copy with the copies obtained from several nodes.
Unit 2 27
Any mismatch could compromise the security of the blockchain. Further on,
such verification requests will require huge amounts of data to be sent over
the network, and the computer performing this verification will need a lot of
processing power for comparing different versions of ledgers.
Without the Merkle tree, the data itself has to be transferred all over the
network for verification.
Proof of Membership
A very interesting feature of the Merkle tree is that it provides proof of
membership.
Example: A miner wants to prove that a particular transaction belongs to a Merkle
tree Now the miner needs to present this transaction and all the nodes which lie
on the path between the transaction and the root. The rest of the tree can be
ignored because the hashes stored in the intermediate nodes are enough to verify
the hashes all the way up to the root.
Unit 2 28
Proof of membership: verifying the presence of transactions in blocks using the
Merkle tree.
If there are n nodes in the tree then only log(n) nodes need to be examined. Hence
even if there are a large number of nodes in the Merkle tree, proof of membership
can be computed in a relatively short time.
Merkle Proofs
A Merkle proof is used to decide:
2. To prove data belongs to a set without the need to store the whole set.
3. To prove a certain data is included in a larger data set without revealing the
larger data set or its subsets.
Unit 2 29
Let us say we need to prove that transaction ‘a’ is part of this Merkle tree.
Everyone in the network will be aware of the hash function used by all Merkle
trees.
3. Finally hash of Hab and Hcd will give Habcd. This is the Merkle root obtained
by us.
4. By comparing the obtained Merkle root and the Merkle root already available
within the block header, we can verify the presence of transaction ‘a’ in this
block.
From the above example, it is clear that in order to verify the presence of ‘a’, ‘a’
does not have to be revealed nor do ‘b’, ‘c’, ‘d’ have to be revealed, only their
hashes are sufficient. Therefore Merkle proof provides an efficient and simple
method of verifying inclusivity, and is synonymous with “proof of inclusion”.
A sorted Merkle tree is a tree where all the data blocks are ordered using an
ordering function. This ordering can be alphabetical, lexicographical, numerical,
etc.
Proof of Non-Membership:
Unit 2 30
It is also possible to test non-membership in logarithmic time and space using
a sorted Merkle tree. That is, it is possible to show that a given transaction
does not belong in the Merkle tree.
If these two elements in the tree are sequential, this proves that the item in
issue is not included or else it would have to go between the two things shown
if it was included, but there is no room between them because they are
sequential.
Coinbase Transaction:
A coinbase transaction is a unique Bitcoin transaction that is included in the
Merkle tree of every block in the blockchain. It is responsible for creating new
coins and also consists of a coinbase parameter that can be used by miners to
insert arbitrary data into the blockchain.
This copy of headers is stored in the SPV wallet and this wallet uses the SPV
client to link a transaction to a Merkle branch in a block. SPV client
requests proof of inclusion(Merkle proof), in the form of a Merkle branch.
The fact that the transaction can be linked to a Merkle branch is proof that the
transaction exists.
Now by assessing the blocks which are being mined on top of the
transaction’s block, the client can also conclude that majority of the nodes
have built more blocks on top of this chain by using consensus mechanisms
like Proof of Work, and hence this is the longest, valid blockchain.
Unit 2 31
1. Efficient verification: Merkle trees offer efficient verification of integrity and
validity of data and significantly reduce the amount of memory required for
verification. The proof of verification does not require a huge amount of data
to be transmitted across the blockchain network. Enable trustless transfer of
cryptocurrency in the peer-to-peer, distributed system by the quick
verification of transactions.
2. No delay: There is no delay in the transfer of data across the network. Merkle
trees are extensively used in computations that maintain the functioning of
cryptocurrencies.
3. Less disk space: Merkle trees occupy less disk space when compared to
other data structures.
4. Unaltered transfer of data: Merkle root helps in making sure that the blocks
sent across the network are whole and unaltered.
Since the transactions are stored in a Merkle tree which stores the hash of
each node in the upper parent node, any changes in the details of the
transaction such as the amount to be debited or the address to whom the
payment must be made, then the change will propagate to the hashes in
upper levels and finally to the Merkle root.
The miner can compare the Merkle root in the header with the Merkle root
stored in the data part of a block and can easily detect this tampering.
Blockchain Forks
Unit 2 32
The decentralized nature of public blockchains (for example, Bitcoin and
Ethereum) means that participants on the network must be able to come to an
agreement as to the shared state of the blockchain(shared public ledger and
blocks and the blockchain protocol). Unanimous consensus amongst the
network nodes results in a single blockchain that contains verified
data(transactions) that the network asserts to be correct. However, many
times, the nodes in the network can’t come in a unanimous consensus
regarding the future state of the blockchain. This event leads to forks (like a
tuning fork used in experimental science), meaning that point in which the
ideal ‘single’ chain of blocks is split into two or more chains which are all valid.
FORKS IN BLOCKCHAIN:
In simple terms, Forks in blockchain means copying the code and modifying it
to create a new software or product. In open-source projects Forks are very
common and used widely. So, cryptocurrencies like Ethereum and Bitcoin are
decentralized and open software so that anyone can contribute. As they are
open-sources they rely on their communities to make the software more
secure and reliable. Also open source with the help of fork can make user
interface more interactive and look good, helping in gaining more users
worldwide. In open source the code is visible to everyone, anyone can modify,
edit, access there is no copyright claims for such actions.
Unit 2 33
An example GeeksforGeeks blockchain fork
Moving Ahead:
TYPES OF FORKS
Basically forks are divided into two categories i.e. Codebase Fork and Live
Blockchain Fork. And then Live Blockchain Fork is divided into further two
parts i.e. Intentional Fork and Accidental Fork, as you can see in the above
Unit 2 34
mentioned figure the Intentional fork is then further divided into two parts
i.e. Soft Fork and Hard Fork.
TYPES OF FORKS:
CODEBASE FORK: In codebase blockchain fork you can copy the entire code
of a particular software. Let us take BITCOIN as an example, so suppose you
copied the whole blockchain code and modified it according to your need, say
that you decreased the block creation time, made some crucial changes and
created a faster software than BITCOIN and publish / launch it has a new
whole software named against you, by completing the whole white paper work
process. So in these way a new BLOCKCHAIN will be created from an empty
blank ledger. It’s a fact that many of these ALT COINS which are now running
on the blockchain are been made in these way only by using the codebase
fork i.e. they have made little up and down changes in the code of BITCOIN
and created their whole new ALT COIN.
LIVE BLOCKCHAIN FORK: Live Blockchain fork means a running blockchain is
been divided further into two parts or two ways. So in live blockchain at a
specific page the software is same and from that specific point the chain is
divided into two parts. So in context to this fork the Live Blockchain Fork can
occur because of two reasons :
Unit 2 35
INTENTIONAL FORK: In intentional fork the rules of the blockchain are
been changed, knowing the code of the software and by modifying it
intentionally. This gives rise to two types of forks which can occur based
on the backwards-compatibility of the blockchain protocol and the time
instant at which a new block is mined. So Intentional fork can be of two
types:
Unit 2 36
Ethereum Blockchain in which the consensus protocol will change from a
type of Proof of Work (PoS) to a type of Proof of Stake (PoS). The nodes
which install the Casper update will use the new consensus protocol. Full
nodes that do not choose to install the Casper update will become
incompatible with the full nodes that do.
Reverse transactions: The community can actually void all the transaction
of a specific period if they are found to be breached and malicious.
One possibility is that we may see more soft forks in the future, as they are
generally less disruptive to the network and require less consensus to
implement. Soft forks can be used to add new features to the blockchain
or to improve its efficiency, without creating a new cryptocurrency.
Another possibility is that we may see more contentious hard forks in the
future, as different groups within the community have different opinions on
the direction of the blockchain. This could lead to more splits in the
Unit 2 37
community, as some users choose to continue using the old version of the
blockchain while others switch to the new version.
In recent years, there has also been a trend towards the development of
interoperability protocols and multi-chain architectures, which may reduce
the need for forks. These solutions aim to make it easier for different
blockchain networks to communicate with each other and share data,
without the need for a hard fork.
What is a fork?
Forks represent an upgrade to the blockchain’s underlying protocols initiated
by the blockchain community. Forks divide the blockchain into two chains.
Sometimes, the two chains are compatible, resulting in a soft fork. Other
times, the changes in the protocols are so significant that the two chains are
not compatible anymore, resulting in a hard fork.
Unit 2 38
The types of forks
Unit 2 39
chain (the one of the two chains in which the most number
of blocks are added after the natural fork).
Updating to the new protocol is optional Updating to the new protocol is compulsory
Soft fork
A soft fork is considered to be the most reasonable of the two. It is an
intentional fork usually used to update the protocols slightly while ensuring
that the new protocol remains backward compatible with blocks formed prior
to the fork. This means that updating the new protocol is optional for nodes,
resulting in only one chain.
Unit 2 40
A soft fork
Hard fork
The hard fork is usually an intentional fork resulting in the chains being
incompatible. The chains continue following different paths from the point of
the fork. One chain follows the new protocol, while the other continues to
follow the old protocols.
Unit 2 41
A hard fork
Hard forks have been used previously to add functionalities, improve the
network’s speed, and decrease gas fees. The most famous examples of hard
forks are Bitcoin cash which was hard forked from the Bitcoin blockchain in
2017. Bitcoin cash increased the speed of the transactions and lowered the
gas fee as intended.
However, the hard fork is not performed at all times to add functionalities.
Sometimes, it is used to rectify security risks and hacks. The most famous
example is the decentralized autonomous organization (DAO) hack. Due to this
hack, Ether worth millions of dollars were stolen from the smart contracts of
DAO due to a security flaw caused by a bug in the smart contracts deployed
on the Ethereum network. Following the attack, Ethereum went through a hard
fork resulting in the Ethereum that we know today and Ethereum classic. The
hard fork enabled the network’s history to be reset to the pre-hack, therefore
nullifying the hack. However, Ethereum classic continued mining the original
chain where the hacker still possessed the stolen Ether.
Types of Blockchain
The basic application of the blockchain is to perform transactions in a secure
network. That’s why people use blockchain and ledger technology in different
scenarios. One can set up multichain to prevent unauthorized access to
sensitive data. It is not available to the public, and can only be available to
authorized entities in the organization. It depends on the organization which
type it requires to choose for their work.
By using blockchain we can track orders and payments from end to end.
4. Improve Speed.
Unit 2 42
6. It provides immutable records.
7. Smart contracts
3. The owner cannot access the private key again if they forget or lose it.
3. In healthcare management.
5. NFT marketplace.
9. Internet of Things
Permissionless Blockchain
It is also known as trustless or public blockchains, are available to everyone to
participate in the blockchains process that use to validate transactions and
data. These are used in the network where high transparency is required.
Characteristics:
Unit 2 43
Heavy use of tokens.
Advantages:
Disadvantages:
Permissioned Blockchain
These are the closed network only a set of groups are allowed to validate
transactions or data in a given blockchain network. These are used in the
network where high privacy and security are required.
Characteristics:
Advantages:
Unit 2 44
As few nodes are involved performance and scalability are increased.
Disadvantages:
Anytime owner and operator can change the rules as per their need.
Types of Blockchain
There are 4 types of blockchain:
Public Blockchain.
Private Blockchain.
Hybrid Blockchain.
Consortium Blockchain.
Unit 2 45
1. Public Blockchain
These blockchains are completely open to following the idea of
decentralization. They don’t have any restrictions, anyone having a computer
and internet can participate in the network.
As the name is public this blockchain is open to the public, which means it
is not owned by anyone.
All the computer in the network hold the copy of other nodes or block
present in the network
Advantages:
Disadvantages:
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.
Unit 2 46
Use Cases: Public Blockchain is secured with proof of work or proof of stake
they can be used to displace traditional financial systems. The more advanced
side of this blockchain is the smart contract that enabled this blockchain to
support decentralization. Examples of public blockchain are Bitcoin, Ethereum.
2. Private Blockchain
These blockchains are not as decentralized as the public blockchain only
selected nodes can participate in the process, making it more secure than the
others.
Advantages:
Speed: The rate of the transaction is high, due to its small size. Verification
of each node is less time-consuming.
Scalability: We can modify the scalability. The size of the network can be
decided manually.
Balanced: It is more balanced as only some user has the access to the
transaction which improves the performance of the network.
Disadvantages:
Count- Since there are few nodes if nodes go offline the entire system of
blockchain can be endangered.
Unit 2 47
Use Cases: With proper security and maintenance, this blockchain is a great
asset to secure information without exposing it to the public eye. Therefore
companies use them for internal auditing, voting, and asset management. An
example of private blockchains is Hyperledger, Corda.
3. Hybrid Blockchain
It is the mixed content of the private and public blockchain, where some part is
controlled by some organization and other makes are made visible as a public
blockchain.
Advantages:
Cost: Transactions are cheap as only a few nodes verify the transaction.
All the nodes don’t carry the verification hence less computational cost.
Disadvantages:
Unit 2 48
Ecosystem: Due to its closed ecosystem this blockchain lacks the
incentives for network participation.
4. Consortium Blockchain
It is a creative approach that solves the needs of the organization. This
blockchain validates the transaction and also initiates or receives transactions.
Advantages:
Speed: A limited number of users make verification fast. The high speed
makes this more usable for organizations.
Disadvantages:
Approval: All the members approve the protocol making it less flexible.
Since one or more organizations are involved there can be differences in
the vision of interest.
Unit 2 49
Vulnerability: If few nodes are getting compromised there is a greater
chance of vulnerability in this blockchain
Use Cases: It has high potential in businesses, banks, and other payment
processors. Food tracking of the organizations frequently collaborates with
their sectors making it a federated solution ideal for their use. Examples of
consortium Blockchain are Tendermint and Multichain.
Difference between Public and Private blockchain :
Basis of
S.no Public BlockChain Private BlockChain
Comparison
Network Actors
2. Don’t know each other Know each other
–
Decentralized
A public blockchain is A private blockchain
3. Vs Centralized
decentralized. is more centralized.
–
Transaction per
Transactions per second
Transactions second is more as
7. are lesser in a public
pre second – compared to public
blockchain.
blockchain.
Unit 2 50
decentralization and hacks, risks, and
active participation. Due data breaches/
to the higher number of manipulation. It is
nodes in the network, it is easy for bad actors
nearly impossible for ‘bad to endanger the
actors’ to attack the entire network.
system and gain control Hence, it is less
over the consensus secure.
network.
A public blockchain
consumes more energy
than a private blockchain
Private blockchains
Energy as it requires a significant
9. consume a lot less
Consumption – amount of electrical
energy and power.
resources to function and
achieve network
consensus.
Proof of Elapsed
Time (PoET), Raft,
Some are proof of work,
Consensus and Istanbul BFT
10. proof of stake, proof of
algorithms – can be used only in
burn, proof of space etc.
case of private
blockchains.
In a public blockchain, no
In a private
one knows who each
blockchain, there is
validator is and this
no chance of minor
increases the risk of
collision. Each
potential collision or a
11. Attacks – validator is known
51% attack (a group of
and they have the
miners which control
suitable credentials
more than 50% of the
to be a part of the
network’s computing
network.
power.).
Unit 2 51
servers or system admins documents handling
radically. Hence reducing and getting rid of
the cost of creating and semi manual
running decentralized compliance
application (dApps). mechanisms.
Bitcoin, Ethereum,
R3 (Banks), EWF
Monero, Zcash, Dash,
13. Examples – (Energy), B3i
Litecoin, Stellar, Steemit
(Insurance), Corda.
etc.
Unit 2 52