Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
35 views13 pages

Blockchain and Its Applications

Uploaded by

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

Blockchain and Its Applications

Uploaded by

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

Consensus Algorithms and

Blockchain Frameworks
Distributed consensus
• A procedure to reach a common agreement in a distributed or
decentralized multi-agent platform. It is important for the message
passing system.
• It ensures reliability and fault tolerance in distributed systems.
• In the presence of faulty individuals, it is Ensure correct operations.
How to achieve distributed
consensus
• Consensus Algorithm-Paxos, Raft, and various Byzantine Fault
Tolerance (BFT) algorithms
• Node Roles-leaders, followers, or validators
• Leader Election
• In many distributed consensus algorithms, a leader is responsible for proposing decisions
and coordinating the consensus process. Ensure that a leader is elected or selected among
the nodes. Leader election mechanisms are typically part of the consensus algorithm itself.
• Proposal Phase:
Nodes, particularly the leader, propose values or decisions that need to be agreed upon.
• Voting and Agreement
• Communication and Network Reliability
Byzantine Generals Problem
• The Byzantine Generals Problem is a classic problem in distributed
computing and fault tolerance that was introduced by Leslie Lamport,
Robert Shostak, and Marshall Pease in 1982. It is a thought experiment
that illustrates the challenges of achieving consensus in a distributed
system when some of the participants (generals) may be untrustworthy or
behave maliciously.

• Consensus algorithms have been developed to address this problem, such


as Practical Byzantine Fault Tolerance (PBFT), HoneyBadgerBFT, and others.
These algorithms use cryptographic techniques, voting mechanisms, and
redundancy to achieve consensus while tolerating Byzantine failures.
Practical Byzantine Fault Tolerance

• Practical Byzantine Fault Tolerance (PBFT) is a consensus algorithm


designed to solve the Byzantine Generals Problem in a practical and
efficient manner. It was introduced by Miguel Castro and Barbara
Liskov in their 1999 paper titled "Practical Byzantine Fault Tolerance."
• PBFT is particularly suited for use in distributed systems where nodes
need to agree on a common state or sequence of events in the
presence of potentially malicious or faulty nodes.
• It achieves Byzantine fault tolerance, meaning that it can reach
consensus even when a portion of the nodes (up to one-third) are
acting maliciously or providing incorrect information
Key characteristics and features of
PBFT include:
• Replica-Based: In PBFT, the nodes in the network are referred to as replicas. Each replica
has a copy of the system's state and participates in the consensus process by exchanging
messages with other replicas.
• Leaderless: any replica can initiate the consensus process.
• Three-Phase Protocol: PBFT uses a three-phase protocol for reaching consensus. The three
phases are:
• Pre-Prepare: The replica that wants to propose a new block or state change sends a pre-
prepare message to other replicas, suggesting the proposed change.
• Prepare: Replicas receive pre-prepare messages from others and, if they agree with the
proposal, send prepare messages.
• Commit: When a replica receives enough prepare messages for a proposal, it sends a
commit message. Once a replica receives commit messages from a quorum of replicas, it
applies the change to its state.
Key characteristics and features of PBFT include

• View Changes: PBFT handles situations where a replica suspects that


something is wrong with the consensus process, such as detecting malicious
behavior or faults. In such cases, a view change mechanism allows the network
to switch to a new view, possibly with a different leader, to continue the
consensus process.
• High Throughput: PBFT is designed for high throughput and can process a
significant number of transactions per second, making it suitable for use in
practical applications.
• Resilience to Byzantine Failures: PBFT can tolerate up to one-third of the
replicas behaving maliciously or failing, while still reaching consensus correctly.
• Cryptographic Signatures: The messages exchanged between replicas are
digitally signed to ensure authenticity and integrity.
Blockchain are Proof of Work (PoW) and Proof of Stake
(PoS).
• Proof of Work (PoW)
• Mining: In a PoW-based blockchain, miners compete to solve a complex mathematical
puzzle through a process known as mining. The first miner to solve the puzzle gets the
right to propose a new block of transactions.
• Verification: Other nodes in the network (validators) verify the validity of the proposed
block by checking whether the transactions within it are legitimate and whether the
solution to the puzzle is correct.
• Consensus: Once a supermajority of nodes (usually over 50%) agree that the proposed
block is valid, it is added to the blockchain. This process continues for each new block.
• Incentives: Miners are rewarded with cryptocurrency (e.g., Bitcoin) for their efforts.
This economic incentive motivates miners to participate honestly and secure the
network.
• Security: PoW is known for its high level of security but requires a significant amount
of computational power and energy consumption.
Proof of Stake (PoS)
• Validators: In a PoS-based blockchain, validators are chosen to propose and
validate new blocks based on the amount of cryptocurrency they hold and
are willing to "stake" as collateral.
• Randomization: Validators are typically chosen through a randomization
process that takes into account their stake. The higher the stake, the greater
the chance of being selected.
• Verification: Validators propose new blocks and validate transactions. Other
validators check the proposed blocks for correctness.
• Consensus: Consensus is achieved when a supermajority of validators agree
on a proposed block. This agreement is based on the validator's stakes.
• Security: PoS is considered to be more energy-efficient than PoW but relies
on the economic incentive of validators not to act maliciously, as they have
something to lose (their staked cryptocurrency).
Delegated Proof of Stake (DPoS)
• Delegated Proof of Stake (DPoS) is a consensus algorithm used in
some blockchain networks to achieve consensus and validate
transactions.
• It is a variation of the more commonly known Proof of Stake (PoS)
consensus mechanism.
• DPoS was designed to address some of the perceived limitations of
PoS, particularly in terms of scalability and energy efficiency.
• Some well-known blockchain platforms that use DPoS include EOS,
TRON, and Lisk.
DPoS works
• Block Producers: In a DPoS system, there are a limited number of nodes, often referred to as
"block producers" or "witnesses," that are responsible for validating transactions and creating
new blocks. These block producers are elected by token holders within the network.
• Delegation: Token holders in the network can vote to select block producers or delegates. The
number of votes a token holder can cast is often proportional to the number of tokens they
hold. Token holders can choose to vote for one or more delegates.
• Block Production: The top-ranked block producers, based on the number of votes they
receive, are responsible for producing new blocks and validating transactions. These
producers take turns creating blocks in a predetermined order.
• Block Confirmation: Transactions are considered confirmed when they are included in a block
produced by one of the elected block producers. DPoS blockchains typically have faster block
confirmation times compared to Proof of Work (PoW) systems, which rely on mining.
• Incentives and Penalties: Block producers are incentivized to act honestly and maintain the
network's integrity, as they receive rewards in the form of cryptocurrency tokens for their
work. However, if a block producer behaves maliciously or violates the rules of the network,
they may be voted out of their position, and their rewards can be slashed.
DPoS offers several advantages
• Scalability: DPoS can achieve higher transaction throughput compared
to PoW because it has a fixed number of block producers, and
transactions are confirmed more quickly.

• Energy Efficiency: DPoS is often considered more environmentally


friendly than PoW because it doesn't require the massive computational
power associated with mining.

• Democratic Participation: DPoS allows token holders to actively


participate in network governance by voting for delegates, giving them a
say in the direction of the blockchain.
Homework: variations of recent validation algorithms

• Ethash
• RandomX
• Proof of Authority (PoA)
• Proof of Stake and Work (PoSW)
• Delegated Byzantine Fault Tolerance (dBFT)
• HoneyBadgerBFT
• Tendermint
• Algorand
• Casper (Ethereum 2.0)
• Proof of Space (PoSpace)
• Proof of History (PoH):

You might also like