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

FBC Unit-3

The document discusses the essentials of blockchain, focusing on consensus mechanisms that validate transactions without a central authority. It outlines various consensus algorithms such as Proof of Work (PoW), Proof of Stake (PoS), and others, detailing their advantages, limitations, and differences. Additionally, it covers concepts like block rewards, mining difficulty, confirmation, finality, and forks in blockchain.

Uploaded by

Anuj Suthar
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)
13 views36 pages

FBC Unit-3

The document discusses the essentials of blockchain, focusing on consensus mechanisms that validate transactions without a central authority. It outlines various consensus algorithms such as Proof of Work (PoW), Proof of Stake (PoS), and others, detailing their advantages, limitations, and differences. Additionally, it covers concepts like block rewards, mining difficulty, confirmation, finality, and forks in blockchain.

Uploaded by

Anuj Suthar
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/ 36

Unit-III

Essentials of Blockchain

By: C. D. Suthar (GES-II)


Lecturer, IT,
Government Polytechnic,
Himatnagar
Consensus mechanisms in
Blockchain

Source: https://www.investopedia.com/terms/c/consensus-mechanism-cryptocurrency.asp
Consensus mechanisms in
Blockchain
• There is no central authority present to validate and verify the
transactions, yet every transaction in the Blockchain is considered to
be completely secured and verified.

• This is possible only because of the presence of the consensus


protocol which is a core part of any Blockchain network.

Source: https://www.geeksforgeeks.org/consensus-algorithms-in-blockchain/
• A consensus algorithm is a process through which all the peers of the
Blockchain network reach a common agreement about the present
state of the distributed ledger.

• consensus algorithms achieve reliability in the Blockchain network


and establish trust between unknown peers in a distributed
computing environment.

Source: https://www.geeksforgeeks.org/consensus-algorithms-in-blockchain/
• The Blockchain consensus protocol consists of some specific
objectives such as coming to an agreement, collaboration,
cooperation, equal rights to every node, and mandatory participation
of each node in the consensus process.

Source: https://www.geeksforgeeks.org/consensus-algorithms-in-blockchain/
Consensus mechanisms
Various consensus algorithms/mechanisms:
1. Proof of Work (PoW):
• This consensus algorithm is used to select a miner for the next block generation.
• Bitcoin uses this PoW consensus algorithm.
• The central idea behind this algorithm is to solve a complex mathematical puzzle
and easily give out a solution.
• This mathematical puzzle requires a lot of computational power and thus, the
node who solves the puzzle as soon as possible gets to mine the next block.

Source: https://www.geeksforgeeks.org/consensus-algorithms-in-blockchain/
• Proof-of-Work (PoW) in the blockchain is a consensus mechanism that
allows miners to add a new block to the network based on
calculations made to find the perfect hash. Network participants
verify the transactions added by the new block.
• The work(ers) Proof-of-work blockchains are supported through a
network of decentralized computers called nodes.
• These nodes are also called miners because they spend computing
power and resources in return for the network’s underlying
cryptocurrency.
• Miners win the reward when they guess a hash that falls below the
threshold provided by the network. Once a miner finds the valid block
hash, it broadcasts this information to other miners who can quickly
validate and add the new block to their blockchain copies.
• The successful miner receives the block rewards and associated
transaction fees.
Advantages of Proof-of-Work
• A hard-to-find solution. Still, easy verification.
• PoW does not need initial stakes of coins before mining. One can start with
0 coins and it will only be positive.
• Ease of implementation compared to other blockchain consensus
mechanisms.
• It is fault tolerant. It means that the failure of one component will not shut
down the entire blockchain network.
• Give miners the opportunity to earn by adding a block.
• PoW is the oldest, most trusted, and most popular consensus protocol
Limitations of Proof-of-Work
• A lot of energy is wasted because only one miner can finally add their
block.
• It requires a lot of computing power and, therefore, massive
consumption of resources and energy.
• 51% risk of network attack. A controlling person can get 51% to
control the network.
• Spread environmental hazards with attachment machines.
• Pow is a time and energy wipe-out process.
• It required a lot of hardware costs.
Consensus mechanisms
2. Proof of Stake (PoS):
• This is the most common alternative to PoW.
• Ethereum has shifted from PoW to PoS consensus.
• In this type of consensus algorithm, instead of investing in
expensive hardware to solve a complex puzzle, validators
invest in the coins of the system by locking up some of their
coins as stakes.

Source: https://www.geeksforgeeks.org/consensus-algorithms-in-blockchain/
Consensus mechanisms
• Validators will validate blocks by placing a bet on them if they
discover a block that they think can be added to the chain.
• Based on the actual blocks added in the Blockchain, all the validators
get a reward proportionate to their bets, and their stake increase
accordingly.
• In the end, a validator is chosen to generate a new block based on its
economic stake in the network.
• Thus, PoS encourages validators through an incentive mechanism to
reach to an agreement.

Source: https://www.geeksforgeeks.org/consensus-algorithms-in-blockchain/
Consensus mechanisms
3. Delegated Proof Of Stake (DPoS):
• This type of consensus mechanism depends on the
basis of the delegation of votes.
• The users delegate their votes to other users.
• Whichever user then mines the block will distribute
the rewards to the users who delegated to that
particular vote.
Source: https://www.geeksforgeeks.org/consensus-algorithms-in-blockchain/
Consensus mechanisms
4. Proof of Burn (PoB):
• Validators ‘burn’ coins by sending them to an address from where
they are irretrievable.
• By committing the coins to an unreachable address, validators earn
the privilege to mine on the system based on a random selection
process. Thus, burning coins here means that validators have a long-
term commitment in exchange for their short-term loss.
• The more coins they burn, the better their chances of being selected
to mine the next block.

Source: https://www.geeksforgeeks.org/consensus-algorithms-in-blockchain/
Consensus mechanisms

5. Proof of Capacity:

• Validators are supposed to invest their hard drive space instead


of investing in expensive hardware or burning coins.

• The more hard drive space validators have, the better their
chances of getting selected for mining the next block and earning
the block reward.
Source: https://www.geeksforgeeks.org/consensus-algorithms-in-blockchain/
Consensus mechanisms
6. Proof of Elapsed Time:
• Every validator on the network gets a fair chance to create their own
block.
• All the nodes do so by waiting for a random amount of time, adding
proof of their wait in the block.
• The winner is the validator which has the least timer value in the
proof part.
• There are additional checks in the algorithm to stop nodes from
always winning the election, and stop nodes from generating the
lowest timer value.
Source: https://www.geeksforgeeks.org/consensus-algorithms-in-blockchain/
Difference: PoS vs PoW
Proof of Stake Proof of Work

Block creators are called validators Block creators are called miners

Participants must own coins or tokens to Participants must buy equipment and
become validators energy to become a miner

Energy efficient Not energy efficient


Robust security due to expensive upfront
Security through community control requirement
Validators receive transaction fees as
rewards Miners receive block rewards and fees

Source: https://www.investopedia.com/terms/p/proof-stake-pos.asp
Alternative of proof of work
Proof-Of Stake
• In PoW, miners exchange energy for cryptocurrency, which
causes PoW mining to use as much energy as some small
countries.
• Ethereum's transition from PoW to PoS reduced the
blockchain's energy consumption by 99.84%.
Proof of Stake
• In PoS, there doesn't need to be as much computational
work done.
• The owners offer their coins as collateral—staking—for the
chance to validate blocks and earn rewards.
• Ex. Ethereum

• Working of PoS, discussed earlier.


Proof of Stake
Features of PoS

• Fixed coins in existence

• Transaction fee as reward to minters/forgers

• Impracticality of the 51% attack


Proof of Stake
Advantages of PoS:
• Energy-efficient
• Decentralization
• Security: A person attempting to attack a network will have to own
51% of the stakes(pretty expensive)
Disadvantages of PoS:
• Large stake validators
• New technology
Block rewards
• A block reward is an incentive that miners get when they
approve a transaction. It is a cryptocurrency that users
usually get when they ‘mine’ a block.

• Cryptocurrency miners receive an amount in cryptocurrency


(called a block reward) as an incentive to verify transactions
and validate blocks.
Block rewards
Block rewards
Importance of Block reward
• Enhancement of decentralization: Users can use the currency if only
the cryptocurrency is circulated and this is possible by block rewards.
Therefore, its generation and control allow the creation of a
decentralized economic system.
• Using the new coins: Block Rewards are also used if the system wants
to issue new currency in the market.
Block rewards
Advantages
• To secure the network
• Financial Benefit
• More investments
Disadvantages
• Varying Rewards: The incentives vary from project to project.
• Increase in costs: For mining special hardware is required.
Block rewards
• Suppose a user wants to make a transaction.
• A block for that transaction is created.
• The block is sent to all the users.
• The users validate the transaction.
• Upon successful transaction, the users involved in the decision-
making get incentives.
• Protocols help in the distribution of incentives.
• Upon successful verification, the database is updated and the
transaction is complete.
Mining difficulty
• Mining difficulty is a measure of how difficult it is to mine a block in a
proof-of-work blockchain.
• A high cryptocurrency difficulty means it takes additional computing
power to verify transactions entered on a blockchain—a process
called mining.
Mining difficulty
• This competitive process means that those who have faster systems
stand a better chance of generating a hash that meets the difficulty
target.
• Difficulty adjustments were introduced to try to keep mining fair and
maintain a steady pace.
• In Bitcoin, The difficulty is adjusted every 2016 blocks (every 2 weeks
approximately) so that the average time between each block remains
10 minutes.

Source: https://www.bitpanda.com/academy/en/lessons/what-does-mining-difficulty-mean/
Mining difficulty
• Mining difficulty measures how difficult it is to solve the complex
cryptographic puzzles used in the mining process.
• The difficulty of mining new units increases or decreases over time,
depending on the number of miners in the network
• Increases in difficulty are necessary in order to maintain the target
block time.
Confirmation and finality
• A confirmation represents the acceptance of a new block
(containing several transactions) by the blockchain network.
• Once a miner has successfully added a new block to the
blockchain, one 'confirmation' has occurred.

Source: https://www.bitcoin.com/get-started/what-is-a-confirmation/
Finality in Blockchain
• Finality in blockchain means reaching a point where a
transaction is permanent and irreversible.
• Once a transaction achieves finality, it’s locked in and cannot
be altered or undone.
• This is crucial in maintaining trust in blockchain systems, as it
guarantees that transactions are secure and records remain
immutable.

Source: https://www.ledger.com/academy/glossary/finality/
Finality in Blockchain
• Different blockchains achieve this through different consensus
mechanisms, such as proof-of-work (PoW) and proof-of-stake (PoS).
Types of Block Finality
• Probabilistic finality : Transactions or blocks become final as more
and more blocks or transactions are confirmed. For example, a Bitcoin
transaction becomes practically immutable and irreversible after 6
confirmations (60 minutes).

Source: https://www.ledger.com/academy/glossary/finality/
Finality in Blockchain
• Deterministic/ Instant finality: when a transaction achieves near-
instant finality, i.e., the transaction becomes irreversible immediately
after it is confirmed and recorded on the blockchain.

• Economic Finality : A transaction is considered to have achieved


economic finality when reversing it becomes economically unviable. If
Validators on Proof-of-Stake approve a fake or malicious transaction,
they risk losing their stake, rendering such transactions economically
unviable.

Source: https://www.bnbchain.org/en/blog/what-is-finality-in-blockchain?ref=bnbchain.ghost.io
Forks in Blockchain
• Many times, the nodes in the network can’t come in a unanimous
consensus regarding the future state of the blockchain.
• This event leads to forks, meaning that point in which the ideal
‘single’ chain of blocks is split into two or more chains which are all
valid.
• Forks in blockchain means copying the code and modifying it to create
a new software or product.

You might also like