AP Shah Blockchain Imp Notes
AP Shah Blockchain Imp Notes
AP Shah Blockchain Imp Notes
1
INTRODUCTON TO BLOCKCHAIN
• Disadvantages:
1. Consensus Mechanism: Some public blockchain like Bitcoin uses Proof of
Work consensus mechanism where the participants need to solve a
complex mathematical puzzle to validate a transaction.
2. It requires the consumption of a lot of resources which is a costly affair.
3. In public blockchains, one doesn’t need to prove his/her identity and just
commit your processing power to become a part of the network.
4. Speed: This is one of the biggest problems with some public blockchain like
bitcoin which process only 4.6 transactions per second whereas companies
like Visa process 1700 transactions per second.
2. Private Blockchain:
• A private blockchain is a restrictive or permission blockchain operative only
in a closed network.
• Private blockchains are usually used within an organization or enterprises
where only selected members are participants of a blockchain network.
• The level of security, authorizations, permissions, accessibility is in the
hands of the controlling organization. Thus, private blockchains are similar
in use as a public blockchain but have a small and restrictive network.
• Private blockchain networks are deployed for voting, supply chain
management, digital identity, asset ownership, etc. Examples of private
blockchains are; Multichain and Hyperledger projects (Fabric, Sawtooth),
Corda, etc.
• Advantages:
1. Higher Transactions Per Second (TPS)
Private blockchains can process much higher TPS when compared to public
blockchains, because of the existence of a few authorized participants in
the network.
2. Scalability:
As only a few nodes are authorized and efficient for managing data in
private blockchains, transactions can be processed at a much higher speed.
Also, the decision-making process is much faster as compared to the public
blockchain.
• Disadvantages:
• Centralized: Private blockchain is more centralized as it is generally utilized
by smaller groups such as businesses and enterprises.
• Security: When it comes to security, private blockchains are more prone to
security threats and other vulnerabilities because it has fewer nodes; thus,
bad actors can gain access quickly.
• Needs Trust: Private blockchain requires trust as authorized nodes must be
trusted to verify and validate authentic transactions, unlike public
blockchain.
3. Consortium Blockchain
• A consortium blockchain is a semi-decentralized type where more than one
organization manages a blockchain network.
• This is contrary to what we saw in a private blockchain, which is managed by
only a single organization. More than one organization can act as a node in this
type of blockchain and exchange information or do mining.
• Consortium blockchains are typically used by banks, government
organizations, etc.
• Examples of consortium blockchain are; Energy Web Foundation, R3, etc.
4. Hybrid Blockchain:
• A hybrid blockchain is a combination of the private and public blockchain.
• Only a selected section of data or records from the blockchain can be
allowed to go public keeping the rest as confidential in the private network.
• The hybrid system of blockchain is flexible so that users can easily join a
private blockchain with multiple public blockchains.
• The public blockchains increase the hashing and involve more nodes for
verification. This enhances the security and transparency of the blockchain
network.
• Example of a hybrid blockchain is Dragon chain.
3. Limited Scalibility:
• Scalability is one of the significant limitations in the blockchain network
since each of the nodes needs to verify the transactions processed in the
system.
• Because of this, the speed of-processing a transaction gets limited.
• Experts continue to work on distributed ledger technology, which is based
on blockchain like Hyperledger fabric to overcome scalability issues.
• There are three aspects of blockchain that have to be addressed —
scalability, security, and decentralization.
4. Limited Privacy:
• It is possible to link the user identity with that address and can get
information about the user.
• Blockchain transactions are not aligned with one's status as anyone can
create a new anonymously and transact through that wallet.
• Identity verification data like security numbers cannot be openly stored in
public smart contracts.
• Credential management is another factor that is not managed in an open,
ultimately unsecured smart contract.
2. Complexity:
• The technology of blockchain is at its infancy in terms of maturity; this has
many new processes, standards, and technical aspects.
• Also, another aspect of blockchain is that it relies on decentralization and
cryptography as the main backbone, which further adds to its complexity.
Because of this. various challenges arise in its functionalities, such as the
speed of transaction.
• The process the transaction, and the limits on data that can be sent or
received.
• To have a stable blockchain network, it needs to have many users and
nodes connected with a robust network algorithm.
3. Implementation and Operation Cost:
• There are additional inputs to consider, but the most influential are:
• Transaction volume
• Transaction Size
• Node hosting methods
• Consensus protocol.
• Each of these uses high computing power with an increase in the size of
blockchain with additional nodes and external integrations added. These all
add to the operating costs.
4. Storage Constraints:
• Under the blockchain, the data is stored by every full node in the network
indefinitely since the database in blockchain is append-only and immutable.
• Therefore, storage remains a considerable challenge for practical
applications that are built on the blockchain.
• To achieve fast transaction speed in blockchain, the data and the load on
the nodes have to be cut down, which is the main challenge. As of now,
each node has to store the entire data.
• So if the blockchain can have a mechanism that can allow the nodes to
store only the data that is mostly used or locally relevant data for
processing transactions, we can process transactions faster. Such solutions
can make blockchain more efficient, and there is a need to research on
such solutions to overcome the storage constraints.
• We’re going to apply to Bitcoin primarily because the usage of Merkle Trees
is essential to cryptocurrencies but also simple to understand. For example,
if Bitcoin didn’t have Merkle Trees, every node on the network would need
to maintain a full copy of every transaction that has ever happened on
Bitcoin.
• Any authentication request on Bitcoin would take an incredibly large packet
of data to be sent over the network, so you need to have it on your own to
verify the data.
• A computer used for validation would have to use a lot of processing power
to compare ledgers to ensure that there were no changes.
• Merkle Trees fix this problem. They hash records in the accounting, which
efficientlysegregates the data proof from the data itself.
• Proving that a transaction is valid only includes giving small amounts of
information across the network.
• It allows you to demonstrate that both variants of the ledger are the same
for titular amounts of computing power and network bandwidth.
➢ Advantages:
1. Efficient verification- Merkle trees offer efficient verification of integrity
and validity of dataand 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.
2. No delay- There is no delay in the transfer of data across the
network. Merkle trees areextensively 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.
Q.7. Distinguish between Public, Private and Hybrid Blockchain.
Ans.
Q.8. Difference between Public, Private and Consortium Blockchain.
Ans.
CHAPTER NO.2
CRYPTOCURRENCY
➢ Types of cryptocurrencies:
• Bitcoin
• Altcoin
• Tokens
➢ Bitcoin:
1. Bitcoin was introduced to the public in 2009 by an anonymous developer or
group of developers using the name Satoshi Nakamoto.
2. Bitcoin is a cryptocurrency, a virtual currency designed to act as money and
a form of payment outside the control of any one person, group, or entity,
and thus removing the need for third-party involvement in financial
transactions. It is rewarded to blockchain miners for the work done to
verify transactions and can be purchased on several exchanges.
3. It has since become the most well-known cryptocurrency in the world. Its
popularity has inspired the development of many other cryptocurrencies.
These competitors either attempt to replace it as a payment system or are
used as utility or security tokens in other blockchains and emerging
financial technologies.
➢ Altcoin:
1. Altcoins or coins are, in some instances, also referred to as 'currency
tokens' that should not be confused with the broader term of tokens.
2. The main features that are common to all altcoins are:
• They are peer-to-peer digital currencies that involve a mining process.
• They possess their independent blockchain.
• They possess the characteristics of money, i.e., they are fungible, divisible
and have limited supply, and typically meant to operate only as a means of
payment.
➢ Tokens:
1. Bitcoin was the coin that introduced us to the world of cryptocurrencies.
2. At the time, it was the only peer-to-peer transaction system for currencies.
3. Eventually, others types of coins came into existence which were called
altcoins, as they were created as an alternative to Bitcoin.
4. With time, many new and different types of cryptocurrencies were
invented to support different applications. The creation and growth of
Ethereum gave birth to the term “token” which soon became a universal
term for all currencies developed on the Ethereum blockchain.
5. Depending on the application and functions of different tokens, they were
further divided into different categories, as explained below.
• Utility Token
• Security Token
• Utility Token:
1. Utility tokens offer the holder the right or license to use a product or
service, e.g., ETH (Ethereum). Issued during an ICQ these tokens can, in the
future, be redeemed to access the product or services of the company or
project.
2. They are considered free of regulatory restrictions as they are not built to
function as an investment instrument, but to facilitate the funding of the
ICOs.
3. The token holder may have some rights within the ecosystem.
4. However, they do not have any decisioning power in the direction that the
company or project can move.
• Security Token:
1. Security tokens, also referred to as Equity tokens, entitle the holder to a
share or in the company/startup. In other words, they can be considered as
a digitized, tokenized form of the traditional securities.
2. Security tokens are issued during STO or Security Token Offering, which is a
variation of ICO with more regulatory and due diligence controls fostering
investor confidence.
3. They are seen as an investment opportunity. As the tokens represent
percentage ownership of the company, including voting rights and decision-
making power, they are subject to regulatory restrictions.
4. Tokens can be broadly classified as utility and security, there is the
emergence of hybrid tokens that takes the best of both worlds. It can
combine the advantages of both utility tokens and security tokens, as
incentives are distributed across all participants
Q.2. What are the characteristics of Cryptocurrency.
Ans.
1. Decentralized:
• Fiat currencies are issued by the government and regulated by the Central
Bank. Thus, government-issued policies and control of supply can affect the
value of the currency cryptocurrency, on the other hand, is not backed or
controlled by any bank or central government.
• All the nodes/computers in the network work together in mining or
processing a transaction. This decentralized feature means that no central
body can control or influence the value of the cryptocurrency.
2. Form Of Existence:
• While fiat can in both physical (coins and paper notes) and digital forms
that allow for electronic of money, cryptocurrency can only exist in digital
form.
• They are not tangible and are essentially developed by software code and
cryptographic algorithms.
3. Limited Supply:
• Another key feature of cryptocurrency is that the supply is limited.
• The maximum supply of cryptos that can ever be generated or mined is
defined when the genesis block is created.
4. Global Access:
• The decentralized nature of blockchain allows anyone to access and
transact in cryptocurrency irrespective of their geographical location so
long as they have access to the Internet.
• There are no cross-border restrictions and their use is not limited to only
those having access to banks. This allows for faster processing times and
very low transaction fees as third-party intervention is removed.
6. Impossible to Duplicate:
• The Underlying blockchain technology of the cryptocurrency is that of
decentralization.
• Cryptographic encryption and consensus protocols make counterfeiting
cryptocurrency impossible.
Q.3. What is the difference between Altcoin, Utility Token and Security Token.
Ans.
Origin They are built from scratch, They are built from They are built
either using the open source templates of an existing from templates of
code of an existing blockchain via smart an existing
cryptocurrency or using contract blockchain via
original code. They exist on smartcontract
their separate blockchain
Value Value is dictated by market Used as a utility and not Gives part
supply and demand linked to the ownership to the
performance of the token holders. Its
company. The users get value is directly
voting and other usage linked to the
rights within the specific valuation of the
blockchain it operates. company
Security Protection as strong as the Suspectable to ICO The strict
strength of the blockchain scams and frauds regulations aim to
network protocols and user protect investors
diligence from scams and
frauds.
➢ Types Of Wallet:
• Hot Wallet:
1. A hot wallet is designed for online day-to-day transactions. It is connected
to the internet at all times and hence a strong candidate for hackers. For
this very reason, it is not advisable to use a hot wallet for long-term
storage.
2. Based on their installation characteristics, they are differentiated into three
types as follows.
1. Desktop Wallets
2. Mobile Wallets
3. Online Wallets
1. Desktop Wallet:
• Desktop wallets, as the name suggests, can be downloaded and installed on
your desktop or laptop. As they are locally stored, the user has complete
control of the wallet.
• They come with a variety of features, including build-in exchange platforms,
multi-currency support, etc.
• The downside, however, is that the wallet is dependent on the security
features installed on your computer.
• Hence, if the computer gets hacked or is virus-infected, there is the risk of
losing all your funds.
2. Mobile Wallet:
• Mobile wallets are designed to operate on smartphone devices. Once
installed, the smartphone application operates just like its desktop
counterpart, but it may not have all the savvy features.
• However, it circumvents the constraints of the desktop wallet with its ease
of accessibility, as you can easily carry it with you wherever you go and
make purchases from merchants who accept cryptocurrency payments
using QR codes.
• However, they are more vulnerable to malicious apps and viruses than
desktop wallets.
• Hence, it is recommended that security features like wallet encryption are
installed on the mobile devices and adequate backup is provided for private
keys in case the smartphone is lost or broken.
3. Online Wallets:
• Online wallets are also called web wallets. They run on the cloud, and
hence the user does not need to download or install any application.
• They can be accessed from any computing device via a web browser.
• They are the most convenient of the hot wallets and preferred by fresh
cryptocurrency users.
• Online wallets are hosted and controlled by a third party and hence are the
most vulnerable. Though some service providers offer to manage your
private keys on your behalf, many web wallets have come with the option
where the user can take full control of the keys or share control via multiple
signatures. MyEtherWallet, GreenAddress, and MetaMask are examples of
online wallets.
4. Cold Wallet:
• A cold wallet is a digital wallet that is not connected to the internet. Unlike
hot wallets, they are not free.
• Being offline, they are more secure and used for long-term storage of
Cryptocurrencies. Hardware wallets and paper wallets are the two types of
cold wallets.
• Though more secure than hot wallets, they are less user-friendly and
difficult to access. Trezor and Ledger wallets are popular hardware wallets.
2. Cryptomining:
• A miner needs to have some level of technical knowledge and expertise in
setting up computing software and equipment. Blockchains vary in the
mining systems that they use.
• However, they all have some form of a consensus algorithm and an
incentive system.
3. Airdrop:
• Airdrops are a marketing strategy that crypto projects employ to incentivize
the use of their platform.
• New projects may airdrop crypto into your wallet as part of an initial
offering, or as a reward for promoting the brand. Airdrops are a way to
acquire digital currency without buying it.
3. Proof-Of-Burn [POB]:
• There are various versions of Proof of Burn in blockchain, with the most
acknowledged version being Iain Stewart’s algorithm.
• He’s also the inventor of the Proof of Burn consensus mechanism. Here, the
concept of “burning the coins” means investing the native coins in virtual
mining rigs (mining powers).
• It allows miners with the most virtual mining rigs or a miner who invested
the most coins – to add his new block of transactions to the network.
• Hence, the number of burnt coins shows miners’ commitment to the
network.
2. Healthcare:
• Blockchain can store the encoded health records of patients with a private
key. Only specific individuals would be granted access to the records for
privacy concerns. Similarly, research can be conducted confidentially
and securely using smart contracts.
• All hospital receipts of patients can be stored on the blockchain and
automatically shared with insurance companies as proof of service.
Moreover, the ledger can be used for different activities, such as
managing supplies, supervising drugs, and regulation compliance.
3. Supply chain:
4. Financial services:
• Smart contracts help in transforming traditional financial services in
multiple ways. In the case of insurance claims, they perform error
checking, routing, and transfer payments to the user if everything is
found appropriate.
• Smart contracts incorporate critical tools for bookkeeping and
eliminate the possibility of infiltration of accounting records. They
also enable shareholders to take part in decision making in a transparent
way. Also, they help in trade clearing, where the funds are transferred
once the amounts of trade settlements are calculated.
Ans.
1. Hardware Layer:
Blockchain are Peer-to-Peer (P2P) networks that allow clients to
connect with peer clients to make data sharing faster and easier.
It is nothing but a vast network of devices communicating with
each other and requesting data from one another.
2. Layer 0:
Layer 0 is the initial stage of blockchain that allows various
networks to function, such as Bitcoin, Ethereum.
It also provides blockchain with a facility of cross-chain
interoperability communication from top to different layers.
3. Layer 1:
Layer1 blockchain is an advancement in layer 0. Under this layer, the
blockchain network is maintained functionally.
Any changes and issues arising in the new protocol in layer 0 will also
affect layer 1. Example: Bitcoin, Ethereum, Ripple etc.
4. Layer 2:
Layer 0 has many interactions that have been removed by layer 2.
It works with third-party integration and removes the limitations of
layer 1.
5. Layer 3:
Layer 3 blockchain is also referred to as the “application layer”.
Here, the blockchain protocol is split into two significant sub-layers,
that being, application and execution.
1. Every Ethereum node runs an EVM and all the smart contracts run within
this virtual machine.
2. Client applications can connect to an Ethereum client using a web3j
SDK(s/w development kit).
3. It has to address smart contracts, Ether value that will be transferred to
the recipient, nonce, gas, gas limit, and signature.
4. Some of the Critical Ethereum components are:
(i) Mining Nodes: Mining nodes are responsible for writing all transactions
that have occurred in the Ethereum network in the block.
(iii) Ether: Ether is the transactional token that facilitates operations on the
Ethereum network. Ether is a form of payment for network participants to
execute their requested operations on the network.
(v) Transaction:
Ans.
Its main purpose is to compute the network's state and to run and
compile various types of smart contract code into a readable format
called 'Bytecode.'
During execution, the EVM maintains a transient memory (as a word-
addressed byte array), which does not persist between transactions.
Ethereum has the same approach as JVM but in a different smart
contract language called Solidity.
These contracts are then converted into bytecodes and uploaded on
the blockchain for execution on the EVM (Ethereum Virtual Machine)
running on various hardware platforms.
Q.5. Difference between Bitcoin and Ethereum.
Ans.
In the crowdfunding platform, there are mainly two parties which include the project proposes and
project funders. The project proposers propose the project to the funders, and if they are interested,
they will invest money in their project. The funders will release funds after the completion of a
certain job. In the above diagram, Alice and Bob are the two funders, and they are transferring
money after completing the proposed jobs by the proposers. Once the entire job is completed,
money will be transferred to them.
In the distributed setup, it may be possible that different users are communicating to different
servers. The servers get the client’s request independently. In our example, Alice and Bob are two
clients who are transferred their share of money via the distributed network. However, at this
moment, this information is locally stored in the connected servers. The end goal is to ensure that all
three servers reach the same state after a certain time. i.e., Each server must have information about
Alice and Bob have transferred their share of the money.
To achieve this, the state machine replication mechanism works in this principle that, individually,
all the servers propagate their state to others. However the problem is to understand ordering or
sequences in which requests came from the users.
This can be achieved using the timestamp concept. So, whenever Alice and Bob are making the
transactions, the transactions are associated with the timestamp. This way, information will be
executed in each server in that particular ordering algorithm. Consequently, all will execute in the
same order in which it was support to be executed. This way, all servers are reaching the same state.
Once execution is finished, then the states should be propagated in the entire network. It might be
possible that one of the servers was offline due to some failure. This way, all the servers will have a
state copy. So that update is done through synchronization of the state machine.
At the end, there will be certain outputs and those outputs will be updated to clients.
In the entire procedure, there are two glitches. The first one is that we need to maintain ordering in
service, and the second is that in the presence of failure, the system needs to ensure that all the
individual servers are on the same page. From our example, in the end, all the three servers must
know that Alice and Bob had shared their money, and money has been transferred to the recipient.
Why do we apply the state machine replication-based consensus algorithm in a
permissioned model compared to the challenge-response-based consensus algorithm in
the permissionless model?
There is a natural reason to use state machine replication-based consensus over permissioned
blockchains are there as follows:
The network is closed, the nodes know each other, so state replication is possible among the known
nodes.
Avoid mining overhead, do not need to spend anything like power, time, bitcoin other than message
passing.
However, the consensus is still required as machines can be faulty or behave maliciously.
Introduction
Whenever it comes to consensus discussion, the Byzantine general’s problem is one of the most complex
and controversial. In 2008, with the inception of Bitcoin, Satoshi Nakamoto claimed to solve the byzantine
problem with the proof of work (PoW) consensus mechanism. However, it was just the first step in
achieving consensus in a decentralized network. This article will explain the Byzantine problem
and Byzantine Fault Tolerance (BFT) Consensus Mechanism in Blockchain. It further goes through
a practical byzantine fault tolerance (pBFT) consensus approach to tackle the problem.
The problem states like a group of generals with their army are about to attack their enemy. They surrounded
the enemy’s castle from 4 different directions. Now how would they communicate the decision of attacking or
retreating at the same time?
Following are problems that may arise while sharing the decision from one general to another:
How can the system be sure that each general will attack at the same time from their designated location?
Is there no way but to trust each other completely?
Blockchain seems to resolve this problem with the Byzantine fault tolerance (BFT) consensus mechanism.
• All the troop generals need to agree on the next action of the plan.
• The generals should be trustworthy and loyal to the system.
• Generals must not get influenced to become network traitors.
• They need to follow the algorithm of the system.
• The group of generals needs to reach a consensus or decision, irrespective of the traitors’ actions.
• The system or network should not lead to a 51% attack at any point of action.
Byzantine Fault Tolerance (BFT) is a consensus approach that resists a system to get into the
Byzantine Generals’ problem. It also means the system should stay intact even if one of the nodes (or
general) fails. In addition, BFT aims to reduce the effect of malicious byzantine nodes (or general) on the
network.
The pBFT follows an asynchronous approach. The following are essential aspects of the pBFT
consensus algorithm:
In short, a pBFT system can handle ‘f’ faulty or byzantine nodes where there are 3f + 1 total number of
nodes on the network.
• Pre-prepare phase: The leader node sends out a pre-prepared message to each backup node.
• Prepare: After receiving the pre-prepared message from the leader, the backup nodes send the
prepared message as a reply to all other nodes including the leader. A node is considered
prepared only if it has received pre-prepared by the leader and seen (2f + 1) number of prepared
messages from other nodes.
• Commit: If the nodes are prepared, they send a commit message. If a node receives (f + 1) commit
messages, they carry out the client’s request.
The whole process of verification in a distributed system uses the concept of digital signatures. The
validity message and sender are ensured using sequence numbers and metadata.
Blockchain like Zilliqa, Hyperledger fabric, and Tendermint uses the Practical Byzantine Fault Tolerance
(pBFT) algorithm.
Benefits of PBFT
Following are the advantages of the pBFT consensus algorithm:
• A pBFT doesn’t require carrying out high mathematical computations like PoW.
• It is an energy-efficient consensus model.
• A block of transactions here does not need to follow multiple confirmations by each node. Hence, it
requires less time.
• As pBFT requires every node to participate and serves the client request, each node gets the
reward. Hence low reward variance between each node.
Limitations of PBFT
Following are the disadvantages of the pBFT consensus algorithm:
• pBFT has a high communication overhead that will increase with the number of nodes in the
network.
• It has scalability issues with more extensive networks.
• pBFT is susceptible to Sybil attacks in which one node controls or acts as multiple network nodes.
Raft Overview
The system starts up and has a set of follower nodes. The follower nodes look for a leader. If a timeout
happens, there is no leader, and there is a need to elect a leader in the system. A few candidates stand for a
leader in the election process, and the remaining nodes vote for the candidate. The candidates who receive
the majority votes become the leader. The leader proposes a proposal, and the followers can either vote for
or against that proposal.
These algorithms work in multiple rounds, and the term indicates a new voting round. If the last voting
finishes, then the next term will be old term number + 1; The index indicates committed transactions
available to the candidate. It is just like an increasing number to distinguish between already committed and
new transactions.
The node(i) receives the voting request. It compares the already seen team with the newly received team. If a
newly received team is less than the already seen team, then it discards because the node considers this
request as an old request.
The newly received team is greater than the already seen team. It checks for the newly received index
number with the already seen index number. If the newly received index number is greater than already
seen, it votes for the candidate; else, it declines.
After the timeout, one of the nodes will become a leader candidate, initiates a leader election, and becomes a
new leader with team 11 and commit index value 100. The new leader periodically sends the heartbeat
message to everyone to indicate his presence.
In the meantime, the old leader gets recovered, and he also receives a heartbeat message from the new
leader. The old leader understands that a new term has started. Then the old leader will change his status
from leader to follower. So this is the one way to handling a new leader by utilizing the team parameter.
There are two leader candidates, and both are sending voting request messages, at the same time, for round
(term) 21. Then, they look for the majority voting. In this example, the first candidate receives two votes,
and the second candidate receives one vote, so based on the majority voting, the first candidate is a winner.
The node which gets the majority votes send a heartbeat message to everyone. Another leader candidate also
received the heartbeat message from the winner, and this leader candidate falls back to a follower from the
leader candidate.
The leader proposes a new transaction, adds an entry log with term 10 and the new transaction index value
as 101. Further, the leader sends a message called append entries to all the followers, and they collectively
vote either for or against this transaction.
The leader receives the vote for this transaction index value 101. The followers’ node votes for or against
this transaction. If the majority says that they are fine with committing this particular log. Then, the leader
considers that the transaction log is approved by the followers.
After successful acceptance of the entry log, the leader sends an accept message based on the majority
voting to all the individual followers to update the committed index to 101.
Handling Failure
Multiple kinds of failures exist in the environment. However, Paxos and Raft consensus algorithms only
support Crash or Network fault. The followers may have crashed, but the system can tolerate up to N/2 -1,
where N is the total number of nodes in the environment, as it does not affect the system due to the majority
voting. This indicates that the majority of the followers are non-faulty, and they can send a vote. The leader
can take the majority decision whether to accept or reject a particular transaction.
Hyperledger
➢ Blockchains are IT projects with a twist of business built in and they do not need to be difficult.
Blockchains are revolutionary in some regards due to how disruptive they can be in some industries.
Because they have been disruptive does not mean they need to be disruptive in other ways such as
when migrating
➢ The Linux Foundation hosts Hyperledger and provides a governance structure and oversight to the
Hyperledger community. It is a global open-source project and the result of collaboration from
technology leaders.
➢ The Linux Foundation also embraces a modular umbrella approach to enterprise blockchains.
Hyperledger is an open-source software licensing model, which allows the user to model code and
distribute it in an appropriate manner.
➢ The umbrella strategy, also referred to as the greenhouse strategy, is a proven model that the Linux
Foundation has used repeatedly in the other projects it maintains. Historically, the Linux Foundation
provides excellent management and insight into how to manage an open source project for consortium
members.
Hyperledger Framework
Hyperledger Burrow:
It is a framework for executing smart contracts in permissioned blockchains. The goal of Hyperledger
burrow is to facilitate cross-industry applications for smart contracts. It is built around the BFT consensus
algorithm.
Hyperledger Fabric:
This is a kind of framework implementation which works for the development of blockchain applications. It
also stretches the support to modular architecture and produces various other solutions. The most distinguished
feature of this particular framework is that it allows some other components like consensus and membership
services. Another distinct feature is its induction of container technology in its core mechanism which helps
in hosting smart contracts. It is mainly called chaincode which is accountable for the applicability of the entire
system.
Some of its salient features are:
>Confidential information can be shared through private channels.
>It provides membership services and ordering service (pluggable consensus) as well. >Storage of world state
is enabled through CouchDB
Hyperledger Sawtooth:
It is an open-source project and used as an enterprise-level blockchain system used for creating and
operating distributed ledger applications. Hyperledger sawtooth supports a variety of consensus algorithms
like PBFT, and PoET.
Hyperledger Indy:
It is a project that is made for decentralized identity. It offers lots of libraries, tools, and reusable components
for creating decentralized identities.
Hyperledger Iroha:
It is a blockchain platform designed for infrastructure projects that need distributed ledger technology. It is
used to build identity management platforms like national IDs. It can integrate with Linux, macOS, and
Windows platforms.
Hyperledger Tools
1. Hyperledger Caliper
Caliper is a Blockchain tool hosted by the Linux Foundation. It lets you compute the performance of specific
Blockchain implementations by leveraging a set of predefined use cases. Caliper can also generate reports on
different performance factors, including resource utilization, transaction latency, and transactions per second
(TPS).
2. Hyperledger Cello
Cello is a Blockchain module toolkit. It is essentially an on-demand “as-a-service” deployment model
developed for the Blockchain ecosystem. Cello provides a multi-tenant chain service that can work on top of
multiple infrastructures, including container platforms and virtual machines. It reduces the efforts required to
build, maintain, and terminate blockchains.
3. Hyperledger Explorer
Hyperledger Explorer is a Blockchain module explicitly designed for developing user-driven web
applications. It can be used for viewing, deploying, invoking/querying blocks, network information,
transaction data, chaincodes, and other relevant data that is stored in a Blockchain ledger.
4. Hyperledger Composer
Composer is both a development framework and toolkit designed to make the development of Blockchain
applications and smart contracts more seamless and convenient. You can use Composer to develop and
deploy Blockchain applications rapidly. It leverages tools like Node.js, CLI, NPM, etc., to provide business-
focused abstractions, sample apps, and easy-to-test DevOps processes.
5. Hyperledger Quilt
Quilt is a one of the business Blockchain tools that aims to facilitate interoperability between ledger systems
by implementing the Interledger protocol (ILP), which is a payments protocol used for moving value across
both distributed and non-distributed ledgers. Thanks to ILP, Quilt can also enable atomic swaps between a
single account namespace for accounts and ledgers.
Hyperledger Fabric:
Hyperledger Fabric
Hyperledger Fabric is by far the most widely used of the frameworks.
The diagram below represents application communication viewpoint at key building
blocks of Hyperledger Fabric 1.0 architecture:
Following are some of the key building blocks of Hyperledger Fabric 1.0 Architecture:
Membership Services Provider: Enrolls the clients
Peers: Peer nodes can be endorser (endorse proposal for transaction) and committer nodes (write block of
transactions to ledger)
Chaincode: Smart contract written in Java/Go which is invoked by a transaction. Peer nodes having chaincode
becomes the endorser for that chaincode. ESCC (Endorser system chain code) executes the chaincode using
proposal and read-write set information.
Ledger: Ledger which holds the copy of transactions in form of blocks
Ordering service: Consenter service which validates the transaction using VSCC (Validation system
chaincode), orders the transaction in a block and sends it to peer nodes (endorsers & committers)
Step 1:
First a participant(client) in the member organization initiates a transaction request.
Step 2:
The transaction invocation request is broadcast to the Endorser peer by the client application.
Step 3:
The transaction is validated by the endorser peer reviewing the certificate details and others. Then it runs the
chaincode (i.e. Smart Contract) and gives the Client the Endorsement responses. As part of the endorsement
response, the endorse peer sends a message approving or rejecting the transaction.
Step 4:
The transaction in now by the client to the Ordered peer to be properly ordered and added to a block.
Step 5:
The transaction is added to a block by the Ordered node, which then sends the block on to the anchor nodes
of various organization that are members of the Hyperledger Fabric network.
Step 6:
The block was then broadcast by the anchor nodes to the peers within their own organization. The most recent
block is then added to the local ledger by each of these peers. Thus, the ledger is updated across the entire
block is then added to the local ledger by each of these peers. Thus, the ledger is updated across the entire
network.