Module 2 Updated
Module 2 Updated
• A consensus algorithm helps keep all network members in sync in a democratic way.
• Rules are needed for network members to agree on and implement changes.
• Consensus allows independent nodes to equally participate in updating and validating
changes.
• In a blockchain, all participants have the same copy of transactions to stay connected and
synchronized.
• Decentralization gives equal decision-making power to all network members.
How Does Consensus Work?
• In a decentralized network (like a system without a central boss), there are different
methods (called consensus mechanisms) to agree on changes.
• Each method has its own way of getting everyone on the network to agree on an update.
• Typically, more than half (at least 51%) of the participants in the network need to
approve the change for it to happen.
• If enough people agree, the network updates. If not, the change is rejected.
• Basically, it's like a group vote to decide on changes in a system without a single person
in charge.
Types of Consensus
Mechanisms
Proof of Work (PoW)
•PoW is a method for agreeing on changes in networks like Bitcoin and Ethereum.
•Think of miners like contestants in a lottery.
•They compete by solving a complex math problem to win the right to add a block of transactions
to the network.
•The winner gets a reward, like a prize in the lottery.
•This competition uses a lot of computing power, like solving a difficult puzzle.
•Other participants then check the block to make sure the transactions are real.
Proof of Stake (PoS)
• PoS is another method for agreeing on changes in networks, but it's more energy-friendly
than PoW.
• Instead of solving puzzles, miners (now called validators) put up some of their own coins as a
deposit, like a security deposit for an apartment.
• The more coins a validator has deposited (or staked), the higher the chance they have of being
chosen to add a block.
• This system works best when there are already a lot of people participating in the network.
.
Delegated Proof of Stake
(DPoS)
• DPoS is a way for people in a blockchain network to choose who gets to validate transactions
(like adding blocks). It's like an election for trusted people.
• It's an improvement on Proof of Stake (PoS) because in DPoS, everyone gets to vote on who
validates transactions, instead of just those with the most coins.
• People vote for delegates (like candidates) they trust. These delegates then add blocks and make
sure everything is legit.
• DPoS is more democratic and energy-efficient than the way Bitcoin does things (called Proof of
Work).
.
Delegated Proof of Stake
(DPoS)
Proof of Importance (PoI)
• PoI is a method for agreeing on changes in networks, designed to address some issues with PoS.
It's used by the NEM blockchain (XEM coin).
• Unlike PoS where just holding coins matters, PoI considers your reputation in the network. The
more you participate in good transactions, the higher your "importance score" and the better
chance you have of verifying blocks (like mining).
• To be a block verifier (harvester), you need to:
Hold onto some coins for a while (vested stake).
Make regular transactions, and not just tiny ones or fake ones to cheat.
• In short, PoI rewards people who actively use the network in a positive way, instead of just
sitting on a pile of coins.
Proof of Importance (PoI)
Target 1: Reach at least a minimum vested stake.
Proof of Importance (PoI)
Target 2: Make regular transactions to quality accounts
Proof of Capacity (PoC)
• PoC is a way for agreeing on changes in blockchain networks, kind of like voting.
• Unlike other methods, PoC uses hard drive space instead of computing power or staked coins.
The more space you have, the better chance you have of adding a block and getting a reward.
• It's like playing a guessing game where you write down all the possible answers beforehand
(storing them on your hard drive). The bigger your list of answers, the better chance you have of
picking the right one.
• This method uses less energy and is faster than other popular methods.
• Blockchains like Storj and Chia use PoC.
.
Proof of Elapsed Time (PoET)
• PoET is a way for agreeing on changes in special blockchain networks where only certain
participants are allowed (permissioned). It's like a lottery to choose who gets to add the next
block.
• Developed by Intel, PoET works by giving each participant a random amount of wait time. The
first one to finish waiting gets to add their block.
• This method is designed to be fair and secure, making sure everyone has a chance and no one
can cheat.
• Only approved participants can join the network.
• Everyone gets a random wait time.
• The first one to finish waiting gets to add a block.
• Special tools ensure fairness and security.
Proof of Elapsed Time (PoET)
Selection Process
Proof of Elapsed Time (PoET)
Generation Process
Proof of Activity (PoA)
• PoA combines PoW and PoS for agreeing on changes in blockchain networks. It's like a two-step
race:
• Miners compete with puzzles (like PoW) to add an empty "placeholder" block.
• Validators (different from miners) then check and approve the block based on their coin stake
(like PoS).
• Unlike PoW, miners don't add transactions yet. They just compete for the right to add an empty
block.
• Validators with more coins have a higher chance of being chosen to approve the block.
• If enough validators approve, the block (now with transactions added) gets added to the
blockchain.
Proof of Activity (PoA)
• Rewards are shared between miners and validators for their contribution.
• Miners compete to add an empty block (no transactions yet).
• Separate validators (chosen based on coins) approve the block.
• More coins, higher chance of being a validator.
• Approved blocks get transactions added and then joined to the blockchain.
• Rewards go to miners and validators.
Proof of Activity (PoA)
Proof of Authority (PoA)
•PoA is a way for agreeing on changes in private blockchain networks, similar to PoS but with a
twist.
•Instead of using staked coins, PoA relies on the good reputation of participants to be chosen as
validators who add blocks.
•It's like being elected to a position based on your trustworthiness, not how much money you have.
•To become a validator, you need a good history and commitment to the network, kind of like a
background check.
•Because only trusted people can be validators, PoA is considered fast and secure.
•Blockchains like VeChain use PoA.
Proof of Authority (PoA)
•Good reputation in the network is key, not staked coins.
•Validators are chosen based on trust and history.
•Strict checks make it hard to become a validator.
•Fewer validators but faster and more secure.
•Used in private blockchains.
Proof of Burn (PoB)
• It's a way for miners to agree on changes in a blockchain network by burning coins.
• Miners burn coins by sending them to a special address where they can't be used again.
• The more coins a miner burns, the better chance they have of adding a block of transactions to
the network.
• This method uses less energy than Proof of Work (PoW) and doesn't require staking coins like
Proof of Stake (PoS).
Byzantine Fault Tolerance (BFT)
• The Byzantine Generals' Problem is a thought experiment about how generals with unreliable
messengers can agree on a battle plan. It's like a challenge in communication and trust.
• Blockchain uses Byzantine Fault Tolerance (BFT) to deal with this challenge. BFT is a way for a
system to agree on changes even if some parts of the system are unreliable or malicious.
• Byzantine Generals' Problem: Generals need to agree on a plan despite unreliable messengers.
• Byzantine Fault Tolerance (BFT): Ensures a system can agree on changes even with unreliable
parts.
Pros and Cons of Consensus Mechanisms
Pros Cons
• Establishing global agreement in a distributed • Few of the mechanisms consume high power
network. and energy, leading to environmental hazards.
• Create protection and security against • Some of the mechanisms are susceptible to
intruder attacks. 51% attacks and Sybil attacks.
• Mechanisms are available for both • The constant fear of turning a decentralized
permission and permissionless blockchain network into a centralized one.
networks.