0% found this document useful (0 votes)
14 views36 pages

consensus algorithms.pptx

The document discusses various consensus algorithms used in blockchain technology, including Proof of Work (PoW), Proof of Stake (PoS), and Practical Byzantine Fault Tolerance (pBFT). It highlights the objectives, advantages, and disadvantages of these algorithms, as well as the challenges of achieving security, scalability, and decentralization in blockchain systems. Additionally, it explores alternative architectures and scaling solutions to improve blockchain performance.

Uploaded by

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

consensus algorithms.pptx

The document discusses various consensus algorithms used in blockchain technology, including Proof of Work (PoW), Proof of Stake (PoS), and Practical Byzantine Fault Tolerance (pBFT). It highlights the objectives, advantages, and disadvantages of these algorithms, as well as the challenges of achieving security, scalability, and decentralization in blockchain systems. Additionally, it explores alternative architectures and scaling solutions to improve blockchain performance.

Uploaded by

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

Consensus Algorithms

1
Hashing and Digital Signature in Blockchain &
2
Generic terms used in Blockchain
Hashing and Digital Signature in Blockchain &
3
Generic terms used in Blockchain
Hashing and Digital Signature in Blockchain &
4
Generic terms used in Blockchain
Objectives of Consensus Protocol
● Unified Agreement
● Fault Tolerant
● Collaborative and participative
● Egalitarian
● Incentivization
● Prevent double spend

Hashing and Digital Signature in Blockchain &


5
Generic terms used in Blockchain
Hashing and Digital Signature in Blockchain &
6
Generic terms used in Blockchain
● Used by first blockchain, bitcoin in 2009 by satoshi
● Miner Releases work to other miners for verification to reach consensus
● First miner gets the reward
● Disadvantages:Time consuming, High energy consumption and 51% risk
Hashing and Digital Signature in Blockchain &
7
Generic terms used in Blockchain
Disadvantages
● The search space is 2^256, meaning that in the worst-case
scenario, that is for the lowest target, a miner has to
perform 2^256 hash operations.
● Due to large number of computations, a lot of power
(current) is wasted in finding the nonce.
● Many miners will compete to produce a new block, but
only one will succeed. Thereby wasting all the power.
● 51% attack

8
● Miners called forger or validator
● An algorithm selects forger randomly based on
the availability of stake with the miner

● requires little specialized hardware or software resources to mine cryptocurrencies since it


doesn't involve solving complex computational problems.
● diluting the mechanism and reducing the system's decentralization property.

Hashing and Digital Signature in Blockchain &


9
Generic terms used in Blockchain
Delegated PoS
● Variation of POS
● more efficient and democratic version of PoS.
● Delegates and validators, delegates or witnesses elects validators
● Participants use their crypto to vote for the validators
● Validators responsible for validating TX and maintaining ledger
● Democratic system( more coins or tokens more voting power

● Equal distribution of wealth, better security.


10
● More decentralized than POW and POS.
● More secure than PoS.
● more scalable mechanism than PoW.
● suitable for logistical applications such as supply chains or trade networks.

Hashing and Digital Signature in Blockchain &


11
Generic terms used in Blockchain
● consumes much less computational energy.
● doesn't require computational resources or hardware. miners "burn" or invest coins in th
blockchain to achieve consensus.
● Decrease supply of coins
Hashing and Digital Signature in Blockchain &
12
Generic terms used in Blockchain
PoET
• consensus algorithm developed by Intel Corporation (2016)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.
• Permissioned Blockchain network to decide on the mining rights or block
winner.
• A code generates a wait time for all nodes.
• Miner who completes task wait for designated time, then broadcast relevant
info on the n/w.
• the node that has waited the longest is eligible to propose the next block.
• Intel SGX enabled CPU prevents running of multiple instances of wait time.
• prevents high resource utilization and energy consumption.
• Disadv:Vulnerable to attacks such as foreshadow, attacks secure enclave of SGX.
13
What is Byzantine Fault Tolerance?

Byzantine Fault Tolerance(BFT) is the feature of a distributed network to


reach consensus (agreement on the same value) even when some of the
nodes in the network fail to respond or respond with incorrect
information.

14
Practical Byzantine Fault Tolerance

2f+1

Hashing and Digital Signature in Blockchain &


15
Generic terms used in Blockchain
Hashing and Digital Signature in Blockchain &
16
Generic terms used in Blockchain
● Advantages: Energy efficient, Faster transaction finality,Low reward variance
● Limitations: Sybil attacks, Scalability
● Platforms using pBFT variants:
○ Zilliqa – pBFT in combination with PoW consensus
○ Hyperledger Fabric – permissioned version of pBFT
○ Tendermint – pBFT + DPoS(Delegated Proof-of-Stake)

17
Hashing and Digital Signature in Blockchain &
18
Generic terms used in Blockchain
Hashing and Digital Signature in Blockchain &
19
Generic terms used in Blockchain
Hashing and Digital Signature in Blockchain &
20
Generic terms used in Blockchain
Hashing and Digital Signature in Blockchain &
21
Generic terms used in Blockchain
Blockchain Trilemma

● The Blockchain Trilemma refers to the trade-off between three critical aspects of
blockchain technology: Security, Scalability, and Decentralization.
● Bitcoin and Ethereum prioritize decentralization and security, making scalability a
challenge.
● Public blockchains can typically only achieve two out of the three benefits at any given
time.
● Efforts are ongoing to overcome this hurdle and achieve balance.

22
Decentralization

● A decentralized network means no central authority controls the blockchain.


● Factors influencing decentralization:
○ Number of miners/validators.
○ Geographical distribution of nodes.
○ Number of full nodes and developers.
● Why is it important?
○ Protects against censorship and control.
● Trade-off:A highly decentralized network reduces scalability as transactions take
longer to confirm

23
Security

● Security ensures resistance against tampering and malicious attacks.


● Centralized systems ensure security through gatekeeping.
● Decentralized systems rely on cryptography and consensus mechanisms.
● Example:
○ Bitcoin uses Proof-of-Work (PoW).
○ Ethereum uses Proof-of-Stake (PoS).
● Why is it important?
○ Ensures immutability and prevents fraud.
● Trade-off:
○ Increasing security (e.g., higher mining difficulty) may reduce decentralization.

24
Scalability

● Scalability is the ability to handle high transaction volumes efficiently.


● Challenges:
○ Slow transaction processing.
○ High fees due to network congestion.
● Why is it important?
○ A scalable blockchain can support widespread adoption and rival
traditional payment networks (e.g., Visa processes 24,000 TPS).
● Trade-off:
○ Increasing scalability often reduces decentralization or security.

25
blockchain scalability without compromising decentralization is a significant challenge

These solutions involve modifying the fundamental blockchain protocol to enhance scalability.

Layer-1 Solutions (On-Chain Scaling)


a) Sharding

● The blockchain is divided into smaller partitions (shards), each capable of processing its own transactions.
● Ethereum 2.0 is implementing sharding to distribute the network load among multiple chains.
● Maintains decentralization by ensuring that each shard remains secure and verified by the network.

b) Optimized Consensus Mechanisms

● Proof-of-Stake (PoS) and its variations (e.g., Delegated PoS, Nominated PoS) reduce the computational power
required for validation while maintaining decentralization.
● Proof-of-Space and Time (PoST), used by Chia, ensures decentralization without excessive energy
consumption.
● Hybrid PoW-PoS models (e.g., Kadena) allow for efficient scaling while retaining decentralization benefits.

c) Block Size and Time Adjustments

● Adaptive block sizes allow for dynamic adjustments based on network demand.
● Shorter block times improve throughput but require more efficient validation mechanisms.

26
Layer-2 Solutions (Off-Chain Scaling)
State Channels (e.g., Lightning Network, Raiden Network)

● Participants conduct multiple transactions off-chain and only settle final results on-chain.
● Reduces congestion and increases transaction throughput without compromising decentralization.

Rollups (Optimistic & ZK-Rollups)

● Optimistic Rollups: Aggregate multiple transactions and submit a single proof to the main blockchain.

Sidechains & Plasma Chains

● Sidechains (e.g., Polygon) operate parallel to the main chain but periodically anchor to the main
blockchain for security.
● Plasma Chains function as child chains that process transactions before submitting a final state to the
parent chain.

Alternative Architectures
● Directed Acyclic Graphs (DAGs) (used in projects like IOTA and Nano) allow multiple transactions to
be confirmed simultaneously, increasing scalability.
● Subnets & Parachains (used in Polkadot and Avalanche) distribute transaction load across multiple
interoperable chains.

27
28
29
Hashing and Digital Signature in Blockchain &
30
Generic terms used in Blockchain
Three-phase consensus protocol

PBFT consensus consists of three phases: Pre-Prepare, Prepare, and Commit. Together, they form the core of the PBFT

consensus algorithm:

Pre-Prepare: Primary node is responsible for verifying the requests and generating corresponding pre-prepare messages.

Then, the Primary node will broadcast pre-prepare messages to all Replica nodes. After receiving the messages, Replica

nodes will verify the legitimacy of those pre-prepare messages and then broadcast a corresponding prepare message.

Prepare: Gathering prepare messages. After a certain node gathers 2f+1 prepare messages, it will announce that it is ready

for block submission and start to broadcast commit messages;

Commit: Gathering commit messages. After a certain node gathers 2f+1 commit messages, it will process the native

requests cached locally and make corresponding changes to the system state.

31
Algorithm
NEW ROUND

A proposer is elected in a round-robin fashion.

● The proposer collects transactions from the transaction pool.


● Proposer creates a block proposal and broadcasts it to the network. The state of the proposer now changes to
PRE-PREPARED state.
● Validators receive the PRE-PREPARE message and enter the PRE-PREPARED state.
● Validators now verify the proposal and then broadcast a PREPARE message to the other validators.

PRE-PREPARED
● Validators wait for 2F+1 valid PREPARE messages, and then enter the PREPARED state.
● Validators now broadcast COMMIT messages upon entering PREPARED state.

PREPARED
● Validators wait for 2F+1 commit messages and then enter COMMITTED state.

COMMITTED
● Validators append the 2F+1 commit messages received into the block, and add the block into the blockchain.
● Validators now move a FINAL COMMITTED state when the block is inserted in the chain

FINAL COMMITTED
• A new round is initiated with a new proposer election.

32
Two important properties of distributed systems are Liveness and Safety.

Liveness

Liveness is the term used in the context of distributed systems when the system continues to operate. It means that the

system will not stall and will function even if some errors occur. In the case of blockchain, Liveness means that the

system will continue to add new blocks to the chain and at no point of time the system will stop working.

Safety

Safety is the term used in the context of distributed systems when the system converges to a single decision. In a

distributed system nodes may diverge into two decisions or split further, Safety of the distributed system ensures that

the network will end up with a single decision across all honest nodes even if there exist faulty nodes.

https://medium.com/coinmonks/implementing-pbft-in-blockchain-12368c6c9548

33
Hashing and Digital Signature in Blockchain &
34
Generic terms used in Blockchain
In bitcoin(proof of work), block proposer is the fastest miner,
whereas, in proof of stake, block proposer is the richest miner.

In PBFT, the block creator may not be any special miner, but the
proposed block which is committed to the chain would be the most
agreed block.
Thereby serving the same purpose that PoW and PoS do, i.e. adding a
new block to the chain.

35
Hashing and Digital Signature in Blockchain &
36
Generic terms used in Blockchain

You might also like

pFad - Phonifier reborn

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

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


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy