SlideShare a Scribd company logo
Unit-1
Blockchain Technology
Blockchain Concepts
• • Blockchain
• • An immutable distributed database, i.e. a log of blocks,
• which are linked and replicated on full nodes
• • A block
• • Digital container for transactions, contracts, property titles,
• etc.
• • Transactions are secured using public key encryption
• • The code of each new block is built on that of the
• preceding block
• • Guarantees that it cannot be changed or tampered
• • The blockchain is viewed by all participants
• • Enables validating the entries in the blocks
• • Privacy: users are pseudonomyzed
Blockchain Concepts
• Blockchain Protocol (Nakamoto 2008)
• 0. Initialization (of a full node)
• • Synchronization with the network to obtain the
• blockchain (185 GB on Q3, 2018)
• 1. Two users agree on a transaction
• • Information exchange: wallet addresses, public keys, …
• 2. Grouping with other transactions in a block and
• validation of the block (and of the transactions)
• • Consensus using "mining"
• 3. Addition of the validated block in the blockchain
• and replication in the P2P network
• 4. Transaction confirmation
Blockchain Concepts
Blockchain Concepts
Blockchain Concepts
Blockchain:Definition
• 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.
• Technical definition: Blockchain is a peer-to-peer, distributed ledger that
is cryptographically-secure, append-only, immutable (extremely hard to
change), and updateable only via consensus or agreement among peers.
• Peer-to-peer
• Distributed ledger
• Cryptographically-secure
• Append-only
• Updateable via consensus
Transactions
•As with enterprise transactions today, Blockchain is a historical
archive of decisions and actions taken
•Proof of history, provides provenance(proof)
Immutable
•As with existing databases, Blockchain retains data via transactions
•The difference is that once written to the chain, the blocks can be
changed, but it is extremely difficult to do so. Requiring rework on all
subsequent blocks and consensus of each.
•The transaction is, immutable, or indelible
•In DBA terms, Blockchains are Write and Read only
•Like a ledger written in ink, an error would be be resolved with
another entry
Decentralized Peers
•Rather than the centralized “Hub and Spoke” type of network,
Blockchain is a decentralized peer to peer network. Where each
NODE has a copy of the ledger.
Legacy Network Blockchain Network
Centralized DB Distributed Ledgers
Consensus
•Ensures that the next block in a blockchain is the one and only version
of the truth
•Keeps powerful adversaries from derailing the system and
successfully forking the chain
•Many Consensus mechanisms, each with pros and cons
Smart Contracts
•Computer code
•Provides business logic layer prior to block submission
The network view of a Blockchain
The generic structure of a block
The various ideas that supported the invention of Bitcoin and
blockchain:
Generic elements of a blockchain
Elements of a generic blockchain are described here one by one.
•Address
•Transaction
•Block
•Peer-to-peer network
•Scripting or programming language
•Virtual machine
•Chain Virtual machine
•State machine
•Node
•Smart contract
Blockchain definition ,introduction ,types and mechanism used
What is meant by a distributed ledger '?
•Distributed ledger technology (DLT) is a digital system for
recording the transaction of assets in which the
transactions and their details are recorded in multiple
places at the same time. Unlike traditional databases,
distributed ledgers have no central data store or administration
functionality.
What is Distributed Ledger Technology
(DLT)?
• Distributed Ledger Technology (DLT) is centered around an encoded and distributed
database where records regarding transactions are stored. A distributed ledger is a
database that is spread across various computers, nodes, institutions, or countries
accessible by multiple people around the globe.
• Types of Distributed Ledger Technology
• The Distributed Ledgers can be categorized into three categories:
• Permissioned DLT: Nodes have to take permission from a central authority to access or
make any changes in the network. Mostly these types of permissions include identity
verification.
• Permissionless DLT: There is no central authority to validate transactions, rather existing
nodes are collectively responsible for validating the transactions. Various consensus
mechanisms are used to validate transactions based on predefined algorithms. In the case
of bitcoin proof of work consensus mechanism is used.
• Hybrid DLT: It is combined with both permissionless and permissioned DLTs and can
benefit from both of them.
Types of blockchain
• Public blockchains
• They are open to the public, and anyone can participate as a node in the decision-making process. Users
may or may not be rewarded for their participation. All users of these permissionless or unpermissioned
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
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
HydraChain and Quorum. Optionally, both of these blockchains can also run in public mode if required, but
their primary purpose is to provide
• Semiprivate blockchains
With semiprivate 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.
•Sidechains
More precisely known as pegged sidechains, this is a concept whereby coins can be moved from one blockchain
to another and moved back again.
•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.
•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.
•Fully private and proprietary blockchains
•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 full private blockchains, the only difference being that use of
tokens is not required. This can also be thought of as a shared distributed ledger used for
storing data. It does have its benefits when it comes to immutability, security, and
consensus driven updates but are not used for common blockchain application of value
transfer or cryptocurrency.
Consensus
• Consensus is a procedure to reach in a common agreement in a distributed or decentralized multi-agent platform.
• For example, there are 4 people who could make two decisions, A or B. Three people are in the favour of A and one person
in the favour of B. Then, decision A will be considered as majority of people are in its favour.
• Need for Consensus:
• Reliability and Fault tolerance in a distributed system. Even if there are certain faulty nodes present in the network,
correct operations can take place using consensus.
• Uses of Consensus:
• Commit transaction in a database: If you wish to transfer money from your bank branch to some other bank branch,
then all the bank branches need to reach consensus to decide the validity of transaction and then allow the transaction.
• State Machine Replication and Clock synchronization
• Types of Fault:
∙ Crash Fault: A node suddenly crashes or becomes unavailable in the
middle of a communication due to software or hardware failure.
∙ Network or Partitioned Fault: A network fault occurs (say the link
failure) and the network gets partitioned.
∙ Byzantine Fault:A node starts behaving maliciously.
• Properties of Distributed Consensus:
∙ Termination: Every correct node(non-faulty) decides some value at the end of the protocol.
∙ Validity: If all the individuals proposes the same value, then all correct individuals decide on that
value.
∙ Integrity: Every correct individual decides at most one value, and the decided value must be
proposed by some individuals.
∙ Agreement: Every correct individual must agree on the same value.
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 that must be met to provide the desired results in a
consensus mechanism.
• The following describes these requirements:
✔ Agreement: All honest nodes decide on the same value
✔ Termination: All honest nodes terminate execution of the consensus process and
eventually reach a decision
✔ 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 in the presence of
faulty or malicious nodes (Byzantine nodes)
✔ Integrity: This is a requirement that no node can make the decision more than
once in a single consensus cycle
Types of consensus mechanisms
• There are two general categories of consensus mechanisms. These categories deal with all types of faults (fail
stop type or arbitrary).
• These common types of consensus mechanisms are as follows:
• Traditional Byzantine Fault Tolerance (BFT)-based: With no compute-intensive
operations, such as partial hash inversion (as in Bitcoin PoW), this method relies
on a simple scheme of nodes that are publisher-signed messages. Eventually,
when a certain number of messages are received, then an agreement is reached.
• Leader election-based consensus mechanisms: This arrangement requires nodes
to compete in a leader-election lottery, and the node that wins proposes a final
value. For example, the PoW used in Bitcoin falls into this category.
Consensus in blockchain
• A blockchain is a decentralised, distributed, and public digital ledger that is used to record transactions.
• Each of these transactions is recorded as a ‘block’ of data, which needs to be independently verified by
peer-to-peer computer networks before they can be added to the chain.
• This system helps to secure the blockchain against fraudulent activity and addresses the problem of
‘double-spending’.
• Consensus is a distributed computing concept that has been used in blockchain in order to
provide a means of agreeing to a single version of the truth by all peers on the blockchain network.
• Proof of Work (PoW)
• Proof of Stake (PoS)
• Delegated Proof of Stake (DPoS)
• Proof of Importance (PoI)
• Proof of Capacity (PoC)
• Proof of Elapsed Time (PoET)
• Proof of Activity (PoA)
• Proof of Authority (PoA)
PoW(proof of Work):It is a consensus mechanism
in which computing power is used to verify
cryptocurrency transactions and add them on the
blockchain
• Proof of work (PoW) is a decentralized consensus mechanism that requires members of a network to
expend effort solving an arbitrary mathematical puzzle to prevent anybody from gaming the system.
• Proof of work is used widely in cryptocurrency mining, for validating transactions and mining new tokens.
• Due to proof of work, Bitcoin and other cryptocurrency transactions can be processed peer-to-peer in a
secure manner without the need for a trusted third party.
• Proof of work at scale requires huge amounts of energy, which only increases as more miners join the
network.
• Proof of Stake (POS) was one of several novel consensus mechanisms created as an alternative to proof of
work.
•
PoS(proof of stake): A cryptocurrency consensus
mechanism for processing transactions and
creating new blocks in a blockchain.
• With proof-of-stake (POS), cryptocurrency owners validate block
transactions based on the number of staked coins.
• Proof-of-stake (POS) was created as an alternative to Proof-of-work
(POW), the original consensus mechanism used to validate a blockchain
and add new blocks.
• While PoW mechanisms require miners to solve cryptographic puzzles,
PoS mechanisms require validators to hold and stake tokens for the
privilege of earning transaction fees.
• Proof-of-stake (POS) is seen as less risky regarding the potential for an
attack on the network, as it structures compensation in a way that makes
an attack less advantageous.
• The next block writer on the blockchain is selected at random, with higher
odds being assigned to nodes with larger stake positions.
PoC: proof of capacity
• Proof of capacity (PoC) is a consensus mechanism algorithm used in
blockchains that allows for mining devices in the network to use their
available hard drive space to decide mining rights and validate
transactions. This is in contrast to using the mining device’s
computational power (as in the proof of work algorithm) or the miner’s
stake in the cryptocurrencies (as in the proof of stake algorithm).
• Proof of capacity (PoC) authentication systems employ spare space
on a device's hard drive to store solutions to a cryptocurrency
hashing problem.
• The main benefit of a PoC system is its efficiency compared to
proof-of-work (PoW) and proof-of-stake (PoS) systems.
PoA: proof of activity
• Proof-of-activity (PoA) is a blockchain consensus algorithm used in
cryptocurrencies and similar systems.
• It is used to ensure that all transactions occurring on the blockchain are genuine,
as well as to ensure that all miners arrive at a consensus.
• PoA is a combination of two other blockchain consensus algorithms: proof-of-work
(PoW) and proof-of-stake (PoS).
• Proof-of-activity (PoA) is a blockchain consensus algorithm that is a combination of
two other blockchain consensus algorithms: proof-of-work (PoW) and
proof-of-stake (PoS).
• The PoA system is an attempt to combine the best aspects of both the PoW and
the PoS systems; the mining process begins like a PoW system, but after a new
block has been successfully mined, the system switches to resemble a PoS
system.
• Decred (DCR) is the most well-known cryptocurrency that uses the PoA
consensus mechanism.
PoB:proof of burn
• Proof of burn is one of the several consensus mechanism algorithms implemented by
a blockchain network to ensure that all participating nodes come to an agreement about the
true and valid state of the blockchain network. This algorithm is implemented to avoid the
possibility of any cryptocurrency coin double-spending.
• Proof of burn follows the principle of “burning” the coins held by the miners that grant them
mining rights.
• Cryptocurrencies use several methods to validate the data stored on their blockchains,
including a method called "proof of burn."
• Proof of burn is the third attempt at creating a system to deter fraudulent activity on a
blockchain, while also improving the functioning of the blockchain as a tool for transactions.
• Proof of work and proof of stake are also methods for preventing fraudulent activity on a
blockchain; proof of work is the system employed by the original and most popular
cryptocurrency, Bitcoin.
PoET:proof of elapsed time
• Proof of elapsed time (PoET) is a blockchain network consensus mechanism that prevents
high resource utilization and energy consumption; it keeps the process more efficient by
following a fair lottery system.
• Proof of elapsed time (PoET) is a consensus algorithm developed by Intel Corporation that
enables permissioned blockchain networks to determine who creates the next block.
• PoET follows a lottery system that spreads the chances of winning equally across network
participants, giving every node the same chance.
• The PoET algorithm generates a random wait time for each node in the blockchain network;
each node must sleep for that duration.
• The node with the shortest wait time will wake up first and win the block, thus being allowed
to commit a new block to the blockchain.
• The PoET workflow is similar to Bitcoin's proof of work (PoW) but consumes less power
because it allows a node to sleep and switch to other tasks for the specified time, thereby
increasing network energy efficiency.
•
Pos and DPoS
• Proof of Storage (PoS): 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.
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 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.
Federated consensus or federated Byzantine consensus: This mechanism is used
in the stellar consensus protocol. Nodes in this protocol retain a group of
publicly-trusted peers and propagate only those transactions that have been
validated by the majority of trusted nodes.
• Reputation-based mechanisms: As the name suggests, a leader is elected by the
reputation it has built over time on the network. It is based on the votes of other
members.
• PBFT: This mechanism achieves state machine replication, 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.
CAP Theorem:
CAP theorem, also known as Brewer's theorem, was introduced by Eric Brewer in 1998 as
conjecture. In 2002, it was proven as a theorem by Seth Gilbert and Nancy Lynch. The
theory states that any distributed system cannot have consistency, availability, and partition
tolerance simultaneously:
Tiers of Blockchain Technology
Blockchain 1.0:
• This tier was introduced with the invention of Bitcoin,
• primarily used for cryptocurrencies.
• Bitcoin was the first implementation of cryptocurrencies,
• It includes core applications such as payments and applications.
• This generation started in 2009 when Bitcoin was released and ended in early 2010.
Blockchain 2.0:
• This second blockchain generation is used by financial services and smart contracts.
• This tier includes various financial assets, such as
• derivatives, options, swaps, and bonds.
• Applications that go beyond currency, finance, and markets are incorporated at this tier.
• Ethereum, Hyperledger, and other newer blockchain platforms are considered part of Blockchain 2.0.
• This generation started when ideas related to using blockchain for other purposes
started to emerge in 2010.
Tiers of Blockchain Technology
Blockchain 3.0:
• This third blockchain generation is used to implement applications beyond the financial services industry and
is used in government,health, media, the arts, and justice.
• Again, as in Blockchain 2.0, Ethereum, Hyperledger, and newer blockchains with the ability to code smart
contracts are considered part of this blockchain technology tier.
• This generation of blockchain emerged around 2012 when multiple applications of blockchain technology in
different industries were researched.
Blockchain X.0:
• This generation represents a vision of blockchain singularity where one day there will be a public blockchain
service available that anyone can use just like the Google search engine.
• It will be a public and open distributed ledger with general-purpose rational agents (Machina economicus)
running on a blockchain, making decisions, and interacting with other intelligent autonomous agents on behalf
of people, and regulated by code instead of law or paper contracts.
• This does not mean that law and contracts will disappear, instead law and contracts will be implementable in
code.
Tiers of Blockchain Technology
Blockchain definition ,introduction ,types and mechanism used
Blockchain definition ,introduction ,types and mechanism used
Blockchain definition ,introduction ,types and mechanism used

More Related Content

DOCX
Blockchain tutorial
PDF
Blockchain Technology Overview
PDF
Introduction to Blockchain
PPTX
UNIT 1 (1).pptx of block chain technologies
PPTX
module-1.pptx
PDF
BlockchainRevolutioninBankingIndustry.pdf
PDF
Blockchain Computing: Prospects and Challenges for Digital Transformation  Pr...
PDF
Blockchain
Blockchain tutorial
Blockchain Technology Overview
Introduction to Blockchain
UNIT 1 (1).pptx of block chain technologies
module-1.pptx
BlockchainRevolutioninBankingIndustry.pdf
Blockchain Computing: Prospects and Challenges for Digital Transformation  Pr...
Blockchain

Similar to Blockchain definition ,introduction ,types and mechanism used (20)

PDF
Blockchain Technology Explained
PDF
Notes_116es_116es_116es_116es_1163_UNIT1.pdf
PDF
Understanding Blockchain: Distributed Ledger Technology
PPTX
B Tech BLOCKCHAIN TECHNOLOGY_UNIT-I.pptx
PDF
Block chains and crypto currencies - introduction
PPTX
Blockchain-SSM.pptx
PPTX
BCT.pptx
PPTX
Blockchain
PDF
Blockchain Presentation
PPT
Blockchian introduction
PDF
Blockchain Security and Demonstration
PPTX
Introduction to Blockchain ..................
PPTX
Blockchain Technology
PPTX
Distributed systems and blockchain technology
DOCX
UNIT I.docxcloud service management document anna university regulation 2021
PDF
20MCE22 - BLOCKCHAIN TECHNOLOGY_NOTES.pdf
DOCX
Blockchain based Banking System
PDF
Blockchain Technology Presentation (Delwar alam Security researcher at BugsBD)
PDF
Distributed ledger technical research in central bank of brazil
PDF
Blockchain: An Innovative Technology
Blockchain Technology Explained
Notes_116es_116es_116es_116es_1163_UNIT1.pdf
Understanding Blockchain: Distributed Ledger Technology
B Tech BLOCKCHAIN TECHNOLOGY_UNIT-I.pptx
Block chains and crypto currencies - introduction
Blockchain-SSM.pptx
BCT.pptx
Blockchain
Blockchain Presentation
Blockchian introduction
Blockchain Security and Demonstration
Introduction to Blockchain ..................
Blockchain Technology
Distributed systems and blockchain technology
UNIT I.docxcloud service management document anna university regulation 2021
20MCE22 - BLOCKCHAIN TECHNOLOGY_NOTES.pdf
Blockchain based Banking System
Blockchain Technology Presentation (Delwar alam Security researcher at BugsBD)
Distributed ledger technical research in central bank of brazil
Blockchain: An Innovative Technology
Ad

Recently uploaded (20)

PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
RMMM.pdf make it easy to upload and study
PPTX
Pharma ospi slides which help in ospi learning
PDF
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
Basic Mud Logging Guide for educational purpose
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
Pre independence Education in Inndia.pdf
PDF
01-Introduction-to-Information-Management.pdf
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PPTX
Cell Types and Its function , kingdom of life
PPTX
Institutional Correction lecture only . . .
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
Business Ethics Teaching Materials for college
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
RMMM.pdf make it easy to upload and study
Pharma ospi slides which help in ospi learning
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
Supply Chain Operations Speaking Notes -ICLT Program
Basic Mud Logging Guide for educational purpose
STATICS OF THE RIGID BODIES Hibbelers.pdf
Pre independence Education in Inndia.pdf
01-Introduction-to-Information-Management.pdf
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Microbial diseases, their pathogenesis and prophylaxis
Cell Types and Its function , kingdom of life
Institutional Correction lecture only . . .
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Business Ethics Teaching Materials for college
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Abdominal Access Techniques with Prof. Dr. R K Mishra
Ad

Blockchain definition ,introduction ,types and mechanism used

  • 2. Blockchain Concepts • • Blockchain • • An immutable distributed database, i.e. a log of blocks, • which are linked and replicated on full nodes • • A block • • Digital container for transactions, contracts, property titles, • etc. • • Transactions are secured using public key encryption • • The code of each new block is built on that of the • preceding block • • Guarantees that it cannot be changed or tampered • • The blockchain is viewed by all participants • • Enables validating the entries in the blocks • • Privacy: users are pseudonomyzed
  • 3. Blockchain Concepts • Blockchain Protocol (Nakamoto 2008) • 0. Initialization (of a full node) • • Synchronization with the network to obtain the • blockchain (185 GB on Q3, 2018) • 1. Two users agree on a transaction • • Information exchange: wallet addresses, public keys, … • 2. Grouping with other transactions in a block and • validation of the block (and of the transactions) • • Consensus using "mining" • 3. Addition of the validated block in the blockchain • and replication in the P2P network • 4. Transaction confirmation
  • 7. Blockchain:Definition • 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. • Technical definition: Blockchain is a peer-to-peer, distributed ledger that is cryptographically-secure, append-only, immutable (extremely hard to change), and updateable only via consensus or agreement among peers. • Peer-to-peer • Distributed ledger • Cryptographically-secure • Append-only • Updateable via consensus
  • 8. Transactions •As with enterprise transactions today, Blockchain is a historical archive of decisions and actions taken •Proof of history, provides provenance(proof)
  • 9. Immutable •As with existing databases, Blockchain retains data via transactions •The difference is that once written to the chain, the blocks can be changed, but it is extremely difficult to do so. Requiring rework on all subsequent blocks and consensus of each. •The transaction is, immutable, or indelible •In DBA terms, Blockchains are Write and Read only •Like a ledger written in ink, an error would be be resolved with another entry
  • 10. Decentralized Peers •Rather than the centralized “Hub and Spoke” type of network, Blockchain is a decentralized peer to peer network. Where each NODE has a copy of the ledger. Legacy Network Blockchain Network Centralized DB Distributed Ledgers
  • 11. Consensus •Ensures that the next block in a blockchain is the one and only version of the truth •Keeps powerful adversaries from derailing the system and successfully forking the chain •Many Consensus mechanisms, each with pros and cons
  • 12. Smart Contracts •Computer code •Provides business logic layer prior to block submission
  • 13. The network view of a Blockchain
  • 14. The generic structure of a block
  • 15. The various ideas that supported the invention of Bitcoin and blockchain:
  • 16. Generic elements of a blockchain
  • 17. Elements of a generic blockchain are described here one by one. •Address •Transaction •Block •Peer-to-peer network •Scripting or programming language •Virtual machine •Chain Virtual machine •State machine •Node •Smart contract
  • 19. What is meant by a distributed ledger '? •Distributed ledger technology (DLT) is a digital system for recording the transaction of assets in which the transactions and their details are recorded in multiple places at the same time. Unlike traditional databases, distributed ledgers have no central data store or administration functionality.
  • 20. What is Distributed Ledger Technology (DLT)? • Distributed Ledger Technology (DLT) is centered around an encoded and distributed database where records regarding transactions are stored. A distributed ledger is a database that is spread across various computers, nodes, institutions, or countries accessible by multiple people around the globe. • Types of Distributed Ledger Technology • The Distributed Ledgers can be categorized into three categories: • Permissioned DLT: Nodes have to take permission from a central authority to access or make any changes in the network. Mostly these types of permissions include identity verification. • Permissionless DLT: There is no central authority to validate transactions, rather existing nodes are collectively responsible for validating the transactions. Various consensus mechanisms are used to validate transactions based on predefined algorithms. In the case of bitcoin proof of work consensus mechanism is used. • Hybrid DLT: It is combined with both permissionless and permissioned DLTs and can benefit from both of them.
  • 21. Types of blockchain • Public blockchains • They are open to the public, and anyone can participate as a node in the decision-making process. Users may or may not be rewarded for their participation. All users of these permissionless or unpermissioned 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 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 HydraChain and Quorum. Optionally, both of these blockchains can also run in public mode if required, but their primary purpose is to provide • Semiprivate blockchains With semiprivate 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.
  • 22. •Sidechains More precisely known as pegged sidechains, this is a concept whereby coins can be moved from one blockchain to another and moved back again. •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. •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.
  • 23. •Fully private and proprietary blockchains •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 full private blockchains, the only difference being that use of tokens is not required. This can also be thought of as a shared distributed ledger used for storing data. It does have its benefits when it comes to immutability, security, and consensus driven updates but are not used for common blockchain application of value transfer or cryptocurrency.
  • 24. Consensus • Consensus is a procedure to reach in a common agreement in a distributed or decentralized multi-agent platform. • For example, there are 4 people who could make two decisions, A or B. Three people are in the favour of A and one person in the favour of B. Then, decision A will be considered as majority of people are in its favour. • Need for Consensus: • Reliability and Fault tolerance in a distributed system. Even if there are certain faulty nodes present in the network, correct operations can take place using consensus. • Uses of Consensus: • Commit transaction in a database: If you wish to transfer money from your bank branch to some other bank branch, then all the bank branches need to reach consensus to decide the validity of transaction and then allow the transaction. • State Machine Replication and Clock synchronization
  • 25. • Types of Fault: ∙ Crash Fault: A node suddenly crashes or becomes unavailable in the middle of a communication due to software or hardware failure. ∙ Network or Partitioned Fault: A network fault occurs (say the link failure) and the network gets partitioned. ∙ Byzantine Fault:A node starts behaving maliciously. • Properties of Distributed Consensus: ∙ Termination: Every correct node(non-faulty) decides some value at the end of the protocol. ∙ Validity: If all the individuals proposes the same value, then all correct individuals decide on that value. ∙ Integrity: Every correct individual decides at most one value, and the decided value must be proposed by some individuals. ∙ Agreement: Every correct individual must agree on the same value.
  • 26. 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 that must be met to provide the desired results in a consensus mechanism. • The following describes these requirements: ✔ Agreement: All honest nodes decide on the same value ✔ Termination: All honest nodes terminate execution of the consensus process and eventually reach a decision ✔ 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 in the presence of faulty or malicious nodes (Byzantine nodes) ✔ Integrity: This is a requirement that no node can make the decision more than once in a single consensus cycle
  • 27. Types of consensus mechanisms • There are two general categories of consensus mechanisms. These categories deal with all types of faults (fail stop type or arbitrary). • These common types of consensus mechanisms are as follows: • Traditional Byzantine Fault Tolerance (BFT)-based: With no compute-intensive operations, such as partial hash inversion (as in Bitcoin PoW), this method relies on a simple scheme of nodes that are publisher-signed messages. Eventually, when a certain number of messages are received, then an agreement is reached. • Leader election-based consensus mechanisms: This arrangement requires nodes to compete in a leader-election lottery, and the node that wins proposes a final value. For example, the PoW used in Bitcoin falls into this category.
  • 28. Consensus in blockchain • A blockchain is a decentralised, distributed, and public digital ledger that is used to record transactions. • Each of these transactions is recorded as a ‘block’ of data, which needs to be independently verified by peer-to-peer computer networks before they can be added to the chain. • This system helps to secure the blockchain against fraudulent activity and addresses the problem of ‘double-spending’. • Consensus is a distributed computing concept that has been used in blockchain in order to provide a means of agreeing to a single version of the truth by all peers on the blockchain network. • Proof of Work (PoW) • Proof of Stake (PoS) • Delegated Proof of Stake (DPoS) • Proof of Importance (PoI) • Proof of Capacity (PoC) • Proof of Elapsed Time (PoET) • Proof of Activity (PoA) • Proof of Authority (PoA)
  • 29. PoW(proof of Work):It is a consensus mechanism in which computing power is used to verify cryptocurrency transactions and add them on the blockchain • Proof of work (PoW) is a decentralized consensus mechanism that requires members of a network to expend effort solving an arbitrary mathematical puzzle to prevent anybody from gaming the system. • Proof of work is used widely in cryptocurrency mining, for validating transactions and mining new tokens. • Due to proof of work, Bitcoin and other cryptocurrency transactions can be processed peer-to-peer in a secure manner without the need for a trusted third party. • Proof of work at scale requires huge amounts of energy, which only increases as more miners join the network. • Proof of Stake (POS) was one of several novel consensus mechanisms created as an alternative to proof of work. •
  • 30. PoS(proof of stake): A cryptocurrency consensus mechanism for processing transactions and creating new blocks in a blockchain. • With proof-of-stake (POS), cryptocurrency owners validate block transactions based on the number of staked coins. • Proof-of-stake (POS) was created as an alternative to Proof-of-work (POW), the original consensus mechanism used to validate a blockchain and add new blocks. • While PoW mechanisms require miners to solve cryptographic puzzles, PoS mechanisms require validators to hold and stake tokens for the privilege of earning transaction fees. • Proof-of-stake (POS) is seen as less risky regarding the potential for an attack on the network, as it structures compensation in a way that makes an attack less advantageous. • The next block writer on the blockchain is selected at random, with higher odds being assigned to nodes with larger stake positions.
  • 31. PoC: proof of capacity • Proof of capacity (PoC) is a consensus mechanism algorithm used in blockchains that allows for mining devices in the network to use their available hard drive space to decide mining rights and validate transactions. This is in contrast to using the mining device’s computational power (as in the proof of work algorithm) or the miner’s stake in the cryptocurrencies (as in the proof of stake algorithm). • Proof of capacity (PoC) authentication systems employ spare space on a device's hard drive to store solutions to a cryptocurrency hashing problem. • The main benefit of a PoC system is its efficiency compared to proof-of-work (PoW) and proof-of-stake (PoS) systems.
  • 32. PoA: proof of activity • Proof-of-activity (PoA) is a blockchain consensus algorithm used in cryptocurrencies and similar systems. • It is used to ensure that all transactions occurring on the blockchain are genuine, as well as to ensure that all miners arrive at a consensus. • PoA is a combination of two other blockchain consensus algorithms: proof-of-work (PoW) and proof-of-stake (PoS). • Proof-of-activity (PoA) is a blockchain consensus algorithm that is a combination of two other blockchain consensus algorithms: proof-of-work (PoW) and proof-of-stake (PoS). • The PoA system is an attempt to combine the best aspects of both the PoW and the PoS systems; the mining process begins like a PoW system, but after a new block has been successfully mined, the system switches to resemble a PoS system. • Decred (DCR) is the most well-known cryptocurrency that uses the PoA consensus mechanism.
  • 33. PoB:proof of burn • Proof of burn is one of the several consensus mechanism algorithms implemented by a blockchain network to ensure that all participating nodes come to an agreement about the true and valid state of the blockchain network. This algorithm is implemented to avoid the possibility of any cryptocurrency coin double-spending. • Proof of burn follows the principle of “burning” the coins held by the miners that grant them mining rights. • Cryptocurrencies use several methods to validate the data stored on their blockchains, including a method called "proof of burn." • Proof of burn is the third attempt at creating a system to deter fraudulent activity on a blockchain, while also improving the functioning of the blockchain as a tool for transactions. • Proof of work and proof of stake are also methods for preventing fraudulent activity on a blockchain; proof of work is the system employed by the original and most popular cryptocurrency, Bitcoin.
  • 34. PoET:proof of elapsed time • Proof of elapsed time (PoET) is a blockchain network consensus mechanism that prevents high resource utilization and energy consumption; it keeps the process more efficient by following a fair lottery system. • Proof of elapsed time (PoET) is a consensus algorithm developed by Intel Corporation that enables permissioned blockchain networks to determine who creates the next block. • PoET follows a lottery system that spreads the chances of winning equally across network participants, giving every node the same chance. • The PoET algorithm generates a random wait time for each node in the blockchain network; each node must sleep for that duration. • The node with the shortest wait time will wake up first and win the block, thus being allowed to commit a new block to the blockchain. • The PoET workflow is similar to Bitcoin's proof of work (PoW) but consumes less power because it allows a node to sleep and switch to other tasks for the specified time, thereby increasing network energy efficiency. •
  • 35. Pos and DPoS • Proof of Storage (PoS): 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. 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.
  • 36. • 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. Federated consensus or federated Byzantine consensus: This mechanism is used in the stellar consensus protocol. Nodes in this protocol retain a group of publicly-trusted peers and propagate only those transactions that have been validated by the majority of trusted nodes. • Reputation-based mechanisms: As the name suggests, a leader is elected by the reputation it has built over time on the network. It is based on the votes of other members. • PBFT: This mechanism achieves state machine replication, 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.
  • 37. CAP Theorem: CAP theorem, also known as Brewer's theorem, was introduced by Eric Brewer in 1998 as conjecture. In 2002, it was proven as a theorem by Seth Gilbert and Nancy Lynch. The theory states that any distributed system cannot have consistency, availability, and partition tolerance simultaneously:
  • 38. Tiers of Blockchain Technology Blockchain 1.0: • This tier was introduced with the invention of Bitcoin, • primarily used for cryptocurrencies. • Bitcoin was the first implementation of cryptocurrencies, • It includes core applications such as payments and applications. • This generation started in 2009 when Bitcoin was released and ended in early 2010. Blockchain 2.0: • This second blockchain generation is used by financial services and smart contracts. • This tier includes various financial assets, such as • derivatives, options, swaps, and bonds. • Applications that go beyond currency, finance, and markets are incorporated at this tier. • Ethereum, Hyperledger, and other newer blockchain platforms are considered part of Blockchain 2.0. • This generation started when ideas related to using blockchain for other purposes started to emerge in 2010.
  • 39. Tiers of Blockchain Technology Blockchain 3.0: • This third blockchain generation is used to implement applications beyond the financial services industry and is used in government,health, media, the arts, and justice. • Again, as in Blockchain 2.0, Ethereum, Hyperledger, and newer blockchains with the ability to code smart contracts are considered part of this blockchain technology tier. • This generation of blockchain emerged around 2012 when multiple applications of blockchain technology in different industries were researched. Blockchain X.0: • This generation represents a vision of blockchain singularity where one day there will be a public blockchain service available that anyone can use just like the Google search engine. • It will be a public and open distributed ledger with general-purpose rational agents (Machina economicus) running on a blockchain, making decisions, and interacting with other intelligent autonomous agents on behalf of people, and regulated by code instead of law or paper contracts. • This does not mean that law and contracts will disappear, instead law and contracts will be implementable in code.
  • 40. Tiers of Blockchain Technology