0% found this document useful (0 votes)
7 views20 pages

Module 3 Distributed Consensus Updated

The document discusses distributed consensus in decentralized systems, highlighting its importance for consistency, fault tolerance, and decentralized decision-making. It outlines key algorithms such as Paxos, Raft, and Byzantine Fault Tolerance, detailing their mechanisms and use cases. Additionally, it addresses challenges in achieving consensus and practical applications in blockchain technology and distributed databases.

Uploaded by

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

Module 3 Distributed Consensus Updated

The document discusses distributed consensus in decentralized systems, highlighting its importance for consistency, fault tolerance, and decentralized decision-making. It outlines key algorithms such as Paxos, Raft, and Byzantine Fault Tolerance, detailing their mechanisms and use cases. Additionally, it addresses challenges in achieving consensus and practical applications in blockchain technology and distributed databases.

Uploaded by

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

Module 3

Distributed Consensus
Video/ Youtube Link
LEC07 | Blockchain | Distributed Consensus by Mrs. G. Sowmya
(youtube.com)

Distributed Consensus: Definition & Properties of Consensus, Steps &


Fault-Tolerance in Consen. ALG. (youtube.com)

All Major Blockchain Consensus Algorithms Explained | Consensus


Mechanism in Blockchain (youtube.com)

Proof of Work vs Proof of Stake: What's Better? | 3-min crypto


(youtube.com)

What Is a Proof of Burn for cryptocurrency? How Proof of burn works?


(youtube.com)

In distributed systems, achieving consensus among nodes is critical for maintaining


coherence and reliability. This article explores the principles, algorithms, challenges, and
applications of distributed consensus, which are essential for ensuring agreement across
decentralized networks.

Distributed Consensus in Distributed Systems


What is the Distributed Consensus in Distributed Systems?
Distributed consensus in distributed systems refers to the process by which multiple nodes or
components in a network agree on a single value or a course of action despite potential
failures or differences in their initial states or inputs. It is crucial for ensuring consistency
and reliability in decentralized environments where nodes may operate independently and
may experience delays or failures. Popular algorithms like Paxos and Raft are designed to
achieve distributed consensus effectively.
Importance of Distributed Consensus in Distributed Systems
Below are the importance of distributed consensus in distributed systems:
 Consistency and Reliability:
o Distributed consensus ensures that all nodes in a distributed system agree on a
common state or decision. This consistency is crucial for maintaining data
integrity and preventing conflicting updates.
 Fault Tolerance:
o Distributed consensus mechanisms enable systems to continue functioning
correctly even if some nodes experience failures or network partitions. By
agreeing on a consistent state, the system can recover and continue operations
smoothly.
 Decentralization:
o In decentralized networks, where nodes may operate autonomously, distributed
consensus allows for coordinated actions and ensures that decisions are made
collectively rather than centrally. This is essential for scalability and resilience.
 Concurrency Control:
o Consensus protocols help manage concurrent access to shared resources or data
across distributed nodes. By agreeing on the order of operations or transactions,
consensus ensures that conflicts are avoided and data integrity is maintained.
 Blockchain and Distributed Ledgers:
o In blockchain technology and distributed ledgers, consensus algorithms (e.g.,
Proof of Work, Proof of Stake) are fundamental. They enable participants to agree
on the validity of transactions and maintain a decentralized, immutable record of
transactions.
Challenges of Achieving Consensus
Achieving consensus in distributed systems presents several challenges due to the inherent
complexities and potential uncertainties in networked environments. Some of the key
challenges include:
 Network Partitions:
o Network partitions can occur due to communication failures or delays between
nodes. Consensus algorithms must ensure that even in the presence of partitions,
nodes can eventually agree on a consistent state or outcome.
 Node Failures:
o Nodes in a distributed system may fail or become unreachable, leading to
potential inconsistencies in the system state. Consensus protocols need to handle
these failures gracefully and ensure that the system remains operational.
 Asynchronous Communication:
o Nodes in distributed systems may communicate asynchronously, meaning
messages may be delayed, reordered, or lost. Consensus algorithms must account
for such communication challenges to ensure accurate and timely decision-
making.
 Byzantine Faults:
o Byzantine faults occur when nodes exhibit arbitrary or malicious behavior, such
as sending incorrect information or intentionally disrupting communication.
Byzantine fault-tolerant consensus algorithms are needed to maintain correctness
in the presence of such faults.
Distributed Consensus Algorithms in Distributed Systems
Distributed consensus algorithms are fundamental in ensuring that nodes in a distributed
system can agree on a single value or decision despite potential failures, delays, or
differences in their initial states. These algorithms play a crucial role in maintaining
consistency, reliability, and coordination across decentralized networks. Here’s an in-depth
explanation of key distributed consensus algorithms:

1. Paxos Algorithm

Paxos is a classic consensus algorithm which ensures that a distributed system can agree on a
single value or sequence of values, even if some nodes may fail or messages may be
delayed. Key concepts of paxos algorithm include:

Paxos Algorithm
 Roles:
o Proposer: Initiates the proposal of a value.
o Acceptor: Accepts proposals from proposers and communicates its acceptance.
o Learner: Learns the chosen value from acceptors.
 Phases:
o Phase 1 (Prepare): Proposers send prepare requests to a majority of acceptors to
prepare them to accept a proposal.
o Phase 2 (Accept): Proposers send accept requests to acceptors with a proposal,
which is accepted if a majority of acceptors agree.
 Working:
o Proposers: Proposers initiate the consensus process by proposing a value to be
agreed upon.
o Acceptors: Acceptors receive proposals from proposers and can either accept or
reject them based on certain criteria.
o Learners: Learners are entities that receive the agreed-upon value or decision
once consensus is reached among the acceptors.
 Safety and Liveness:
o Paxos ensures safety (only one value is chosen) and liveness (a value is eventually
chosen) properties under normal operation assuming a majority of nodes are
functioning correctly.
 Use Cases:
o Paxos is used in distributed databases, replicated state machines, and other
systems where achieving consensus among nodes is critical.

2. Raft Algorithm

The Raft algorithm is a consensus algorithm designed to achieve consensus among a cluster
of nodes in a distributed system. It simplifies the complexities of traditional consensus
algorithms like Paxos while providing similar guarantees. Raft operates by electing a leader
among the nodes in a cluster, where the leader manages the replication of a log that contains
commands or operations to be executed.

Raft Algorithm
 Key Concepts:
o Leader Election: Nodes elect a leader responsible for managing log replication
and handling client requests.
o Log Replication: Leader replicates its log entries to followers, ensuring
consistency across the cluster.
o Safety and Liveness: Raft guarantees safety (log entries are consistent) and
liveness (a leader is elected and log entries are eventually committed) under
normal operation.
 Phases:
o Leader Election: Nodes participate in leader election based on a term number
and leader’s heartbeat.
o Log Replication: Leader sends AppendEntries messages to followers to replicate
log entries, ensuring consistency.
 Use Cases:
o Raft is widely used in modern distributed systems such as key-value stores,
consensus-based replicated databases, and systems requiring strong consistency
guarantees.

3. Byzantine Fault Tolerance (BFT) Algorithm

Byzantine Fault Tolerance (BFT) algorithms are designed to address the challenges posed by
Byzantine faults in distributed systems, where nodes may fail in arbitrary ways, including
sending incorrect or conflicting information. These algorithms ensure that the system can
continue to operate correctly and reach consensus even when some nodes behave maliciously
or fail unexpectedly.

BFT Algorithm
 Key Concepts:
o Byzantine Faults: Nodes may behave arbitrarily, including sending conflicting
messages or omitting messages.
o Redundancy and Voting: BFT algorithms typically require a 2/3 or more
agreement among nodes to determine the correct state or decision.
 Examples:
o Practical Byzantine Fault Tolerance (PBFT): Used in systems where safety and
liveness are crucial, such as blockchain networks and distributed databases.
o Simplified Byzantine Fault Tolerance (SBFT): Provides a simpler approach to
achieving BFT with reduced complexity compared to PBFT.
 Use Cases:
o BFT algorithms are essential in environments requiring high fault tolerance and
security, where nodes may not be fully trusted or may exhibit malicious behavior.
A practical Byzantine Fault Tolerant system can function on the condition that
the maximum number of malicious nodes must not be greater than or equal to
one-third of all the nodes in the system. As the number of nodes increase, the
system becomes more secure. pBFT consensus rounds are broken into 4
phases.
 The client sends a request to the primary(leader) node.
 The primary(leader) node broadcasts the request to the all the secondary(backup) nodes.
 The nodes(primary and secondaries) perform the service requested and then send back a
reply to the client.
 The request is served successfully when the client receives ‘m+1’ replies from different
nodes in the network with the same result, where m is the maximum number of faulty
nodes allowed.

4. Challenges and Considerations:

 Network Partitions and Delays: Algorithms must handle network partitions and
communication delays, ensuring that nodes eventually reach consensus.
 Scalability: As the number of nodes increases, achieving consensus becomes more
challenging due to increased communication overhead.
 Performance: Consensus algorithms should be efficient to minimize latency and
maximize system throughput.
 Understanding and Implementation: Many consensus algorithms, especially BFT
variants, are complex and require careful implementation to ensure correctness and
security.
In summary, distributed consensus algorithms are crucial for enabling cooperation and
coordination among nodes in distributed systems. They ensure that all nodes agree on a
consistent state or decision, providing reliability, fault tolerance, and consistency across
decentralized networks in various applications from distributed databases to blockchain
networks.
Each algorithm has its strengths and trade-offs, making them suitable for
different use cases depending on the system’s requirements for performance,
fault tolerance, and security
Practical Applications of Distributed Consensus in Distributed Systems
Below are some practical applications of distributed consensus in distributed systems:
 Blockchain Technology:
o Use Case: Blockchain networks rely on distributed consensus to agree on the
validity and order of transactions across a decentralized ledger.
o Example: Bitcoin and Ethereum use consensus algorithms (like Proof of Work
and Proof of Stake) to achieve decentralized agreement among nodes.
 Distributed Databases:
o Use Case: Consensus algorithms ensure that distributed databases maintain
consistency across nodes, ensuring that updates and transactions are applied
uniformly.
o Example: Google Spanner uses a variant of Paxos to replicate data and ensure
consistency across its globally distributed database.
 Cloud Computing:
o Use Case: Cloud providers use distributed consensus to manage resource
allocation, load balancing, and fault tolerance across distributed data centers.
o Example: Amazon DynamoDB uses quorum-based techniques for replication and
consistency among its distributed database nodes.
Blockchain Distributed Consensus Mechanism
Blockchain uses a specific kind of distributed consensus to manage transactions and maintain
a secure, decentralized record (ledger). Key mechanism include:
 Proof of Work (PoW):
o Concept: Computers (miners) solve difficult math puzzles to validate and add
new blocks of transactions to the blockchain.
o Consensus: The longest chain with the most computational effort is considered
the valid chain, ensuring agreement on the transaction history.
 Proof of Stake (PoS):
o Concept: Validators are chosen based on the amount of cryptocurrency they hold
and stake in the network.
o Consensus: Validators are selected to propose and validate blocks of transactions
based on their stake, promoting fairness and security.
 Practical Byzantine Fault Tolerance (PBFT):
o Concept: Nodes agree on the order of transactions through a voting process
where two-thirds of the nodes must agree.
o Consensus: Used in networks where participants are known and trusted, ensuring
fast transaction confirmation and high throughput.
 Delegated Proof of Stake (DPoS):
o Concept: Token holders vote for delegates who are responsible for validating
transactions and producing blocks.
o Consensus: Delegates with the most votes perform block production, balancing
decentralization with efficiency and governance.
Challenges and Considerations for Scalabilty, Fault Tolerance and Resilience

1. Scalability Issues:

Scalability refers to a system’s ability to handle increasing amounts of work or users without
compromising performance or efficiency.
 Challenge: As the number of nodes (computers) in a distributed system grows, achieving
consensus becomes more complex due to increased communication overhead and
potential delays.
 Considerations:
o Sharding: Partitioning data into smaller subsets (shards) to distribute the
workload and reduce the burden on individual nodes.
o Optimized Protocols: Developing efficient communication protocols and
algorithms to minimize message exchanges and latency.
o Parallel Processing: Utilizing parallel processing techniques to handle multiple
tasks simultaneously, improving overall throughput.

2. Fault Tolerance and Resilience:

Fault tolerance refers to a system’s ability to continue operating in the presence of hardware
or software failures, ensuring data integrity and availability.
 Challenge: Nodes in a distributed system can fail unexpectedly or behave maliciously
(Byzantine faults), disrupting consensus and potentially compromising the system’s
reliability.
 Considerations:
o Redundancy: Implementing redundant nodes or replicas to replicate data and
tasks across multiple nodes, ensuring continuity even if some nodes fail.
o Consensus Mechanisms: Using robust consensus algorithms (e.g., Practical
Byzantine Fault Tolerance – PBFT) that can tolerate a certain percentage of faulty
or malicious nodes.
o Monitoring and Recovery: Implementing monitoring systems to detect failures
promptly and automated recovery mechanisms to restore system integrity.
What Is Nakamoto Consensus?

Nakamoto Consensus, named after the pseudonymous creator of Bitcoin, Satoshi Nakamoto,
is a Byzantine Fault Tolerant (BFT) consensus mechanism that combines Proof-of-Work with
the "longest chain" rule to create a consensus protocol that adequately maintains the
authenticity of decentralized blockchain networks.

First implemented in Bitcoin and later adopted by many subsequent cryptocurrencies,


Nakamoto Consensus is the critical innovation that allowed Bitcoin to become the first BFT
system that could scale organically without ever experiencing downtime. It's worth pointing
out that while Nakamoto Consensus is often confused with Proof-of-Work, they're different.
Nakamoto Consensus is a broader consensus protocol that incorporates Proof-of-Work but
also other innovative ideas that make it unique.

Nakamoto Consensus and Byzantine Fault Tolerance

Because Nakamoto Consensus is what makes Bitcoin a Byzantine Fault Tolerant system, it’s
worth first exploring what that means.

Nakamoto Consensus is said to be a BFT consensus mechanism because it provides a


solution to the Byzantine Generals Problem, a notorious thought experiment in computer
science that grapples with the question of whether it’s possible to achieve lasting consensus
in a computer network composed of independent, geographically distributed nodes.

BFT is basically a characteristic of distributed computer networks that can still work even
when some of their nodes are going rogue or acting unpredictably or maliciously. Since
blockchains are exactly that—distributed computer networks—they implement complex
protocols to achieve consensus in a “Byzantine Fault Tolerant” way.

Nakamoto Consensus Explained

As already mentioned, Nakamoto Consensus combines two novel ideas to achieve Byzantine
Fault Tolerance: Proof-of-Work, and the “longest chain” rule.

Nakamoto Consensus: Proof-of-Work

Proof-of-Work (PoW) is a cryptographic mechanism used in blockchain networks to validate


transactions and maintain the network's security. In the case of Bitcoin, it is used as a
consensus algorithm to determine the most valid block in the blockchain.

The process of validating blockchain transactions involves miners attempting to find a valid
solution to a cryptographic puzzle associated with a new block of transactions. The only way
for miners to find the solution to the Proof-of-Work puzzle is through trial and error, or by
making thousands of guesses per second until they find one answer that matches the
protocol's criteria. The first miner to find the correct answer gets to mine a new block (that,
once validated by all the other full nodes in the network, is appended to the blockchain) and,
in return, is rewarded with newly minted cryptocurrency.

Finding the Proof-of-Work solution, however, requires significant computing power and
energy consumption, meaning miners also have something to lose, not only gain. This means
that the Proof-of-Work algorithm relies on a robust incentive mechanism that (i) guarantees
adequate punishment for any individual entity trying to circumvent or cheat the protocol and
(ii) awards sufficient privileges to all distributed entities that follow the rules of the
agreement.

Colloquially, this is also known as the "carrot and stick" approach, where the stick is the
electrical energy required for computing complex problems that every mining node must do
to participate in the mining process (i.e., the process of validating transactions), and the carrot
is the block rewards in the form of newly minted bitcoin. In other words, the mining nodes
that follow the rules of the Proof-of-Work protocol get rewarded with newly minted bitcoins,
while cheating nodes are left with nothing but a hefty electrical bill for doing useless work.
This is how Proof-of-Work-based blockchains can achieve real-time consensus between all
participating nodes on the ledger's true state.

Nakamoto Consensus: Longest Chain Rule

The longest chain rule, a key component of Nakamoto Consensus, states that in the event of
competing blockchain forks, the chain with the most accumulated computational work, as
measured by the number of blocks in the chain, is considered the correct and valid chain.

This means that miners are incentivized to extend the blockchain with the most accumulated
computational work because doing so increases the likelihood that their blocks will be added
to the correct chain and rewarded with cryptocurrency. In other words, the longest chain rule
encourages miners to work on the same chain and ensures that the blockchain is maintained
and extended by the majority of the network.

The longest chain rule helps prevent attacks on the network by making it extremely difficult
for an attacker to create a longer valid chain than the existing one. Any attacker attempting to
create a new, competing chain would need more computational power than the rest of the
network combined, which is currently infeasible for most blockchains due to the high cost of
acquiring and maintaining that much computational power.

Overall, the longest chain rule is a critical aspect of Nakamoto Consensus, as it provides a
simple and effective way for the network to converge on a single, valid version of the
blockchain, ensuring that the network operates securely and reliably.

Conclusion

By utilizing Proof-of-Work and the longest chain rule, Nakamoto Consensus ensures that
blockchains remain secure and resistant to attacks. While it has limitations, this consensus
mechanism has proven to be a powerful and reliable tool for maintaining the integrity of
blockchain networks.

For this reason, many cryptocurrencies beyond Bitcoin use different implementations of
Nakamoto Consensus in their protocols. For example, Nervos’ Layer 1, Common Knowledge
Base, uses Nakamoto Consensus Max (NC-Max), an improved version of the original
Nakamoto Consensus that provides better security and performance.

Consensus Algorithms in Blockchain


Prerequisites: Introduction to Blockchain technology | Set 1, Set 2 We know that Blockchain
is a distributed decentralized network that provides immutability, privacy, security, and
transparency. 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. A consensus algorithm is a procedure through which all the peers of
the Blockchain network reach a common agreement about the present state of the distributed
ledger. In this way, consensus algorithms achieve reliability in the Blockchain network and
establish trust between unknown peers in a distributed computing environment. Essentially,
the consensus protocol makes sure that every new block that is added to the Blockchain is the
one and only version of the truth that is agreed upon by all the nodes in the 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. Thus, a consensus algorithm aims at
finding a common agreement that is a win for the entire network. Now, we will discuss
various consensus algorithms and how they work.
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. For more details on PoW,
please read Proof of Work (PoW) Consensus
2. Practical Byzantine Fault Tolerance (PBFT): Please refer to the existing article
on practical Byzantine Fault Tolerance(pBFT).
3. 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. After that, all the validators will start
validating the blocks. 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.
4. Delegated Proof Of Stake (DPoS): This is another type of Proof of Stake consensus
algorithm. 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. Refer to the
article Delegated Proof of Stake for more.
5. Proof of Burn (PoB): With PoB, instead of investing in expensive hardware equipment,
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. Depending
on how the PoB is implemented, miners may burn the native currency of the Blockchain
application or the currency of an alternative chain, such as bitcoin. The more coins they
burn, the better their chances of being selected to mine the next block. While PoB is an
interesting alternative to PoW, the protocol still wastes resources needlessly. And it is also
questioned that mining power simply goes to those who are willing to burn more money.
6. Proof of Capacity: In the Proof of Capacity consensus, 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.
7. Proof of Elapsed Time: PoET is one of the fairest consensus algorithms which chooses
the next block using fair means only. It is widely used in permissioned Blockchain
networks. In this algorithm, 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 created blocks are broadcasted to the network for
others’ consideration. The winner is the validator which has the least timer value in the
proof part. The block from the winning validator node gets appended to the Blockchain.
There are additional checks in the algorithm to stop nodes from always winning the
election, and stop nodes from generating the lowest timer value.
There also exist other consensus algorithms like Proof of Activity, Proof of Weight, Proof of
Importance, Leased Proof of Stake, etc. It is therefore important to wisely choose one as per
the business network requirement because Blockchain networks cannot function properly
without the consensus algorithms to verify each and every transaction that is being
committed.
Difficulty Level in Distributed Consensus
✅ Definition:
 Difficulty level is a parameter in blockchain (especially in Proof of Work) that
determines how hard it is to find a valid hash below a certain target.
 It controls the rate of block creation to ensure blocks are added at a consistent time
interval (e.g., every 10 minutes in Bitcoin).
🔁 How It Works:
 Miners must solve a cryptographic puzzle: find a nonce such that the hash of the
block is less than the target value.
 The more leading zeroes in the required hash, the harder it is to find such a hash.
 Higher difficulty means more computational effort required.
Adjustment Mechanism:
 Blockchain networks adjust difficulty periodically to match the target block
production rate.
 Example (Bitcoin): Adjusts every 2,016 blocks (~2 weeks) based on total time taken
to mine those blocks.
🔐 Purpose:
 Maintains network stability by controlling block time.
 Prevents rapid block generation even if more miners join (i.e., hash rate increases).
 Helps protect against attacks and keeps mining decentralized.
Relation to Security:
 A higher difficulty requires more computational power to attack (e.g., 51% attack
becomes harder).
 Makes it more expensive and time-consuming to tamper with the blockchain.
⚡ Energy Implications:
 Higher difficulty → More computation → More energy consumed.
 Drives the need for energy-efficient alternatives like Proof of Stake or Proof of
Burn.
⚡ Energy Utilization and Alternatives in Distributed Consensus
🔋 Energy Utilization in Proof of Work (PoW):
 Proof of Work consumes massive amounts of electricity as miners perform complex
computations to solve cryptographic puzzles.
 This leads to high energy use due to:
o Continuous operation of mining hardware (ASICs/GPUs).
o Global competition among miners for block rewards.
 Example: Bitcoin’s annual energy usage is comparable to that of some small
countries.
❗ Concerns:
 Environmental impact due to carbon emissions (especially when powered by fossil
fuels).
 High economic cost of mining (hardware, cooling, electricity).
 Centralization risk as only large players can afford energy and hardware.
Difficulty Level:
The difficulty is a measure of how difficult it is to mine a Bitcoin block, or in more technical
terms, to find a hash below a given target. A high difficulty means that it will take more
computing power to mine the same number of blocks, making the network more secure
against attacks.

 Sybil attack
 It exploits the decentralized nature of blockchain networks by allowing a single entity to
impersonate multiple users, effectively controlling a larger portion of the network than
they legitimately deserve.
Working Principle:
 The attacker registers numerous fake identities (Sybil nodes) on the blockchain
network.
 These Sybil nodes are used to manipulate the network, for example, by voting in a
way that favors the attacker or overwhelming the network with fraudulent
transactions.
 The goal is to gain control or influence over the network's decisions, potentially
leading to censorship, data manipulation, or even a 51% attack (where the attacker
controls more than half of the network's computing power).

Energy Utilization:
Blockchain makes transactions traceable, safe, and rapid. This technology encourages
the generation and consumption of 100% renewable energy by improving the green energy
supply's efficiency, flexibility, and transparency.

Blockchain Use Cases in Energy and Utilities:

1. Peer-to-Peer Energy Trading.


2. Renewable Energy Certificates (RECs) ...
3. Automatic Settlement of Trades. ...
4. Microgrids & Virtual Power Plants. ...
5. Smart Meters.

What are Decentralized Apps (dApps)?

Decentralized applications or dApps are distributed, decentralized open-source software


applications that run on a decentralized peer-to-peer network. Imagine the Twitter
application that you have on your phone. You can post anything you want on Twitter but
ultimately it’s controlled by a single company that can delete your tweets if they violate
community guidelines or some other reason. But if there was a Twitter-type dApp, then it
would be decentralized and not owned by any one person. If you posted something there,
nobody would be able to delete it including its creators.
Multiple people can create content and consume content on these applications that is free of
any control and interference from one person. Below are some of the requirements of
dApps:
1. Open Source: dApps should be open source and its codebase should be freely available
for all. Any changes in the structure or working of the app should only be taken with the
agreement of the majority.
2. Decentralized: dApps should be decentralized with all the information and operations
stored on a public and decentralized Blockchain which would ensure security and
transparency.
3. Incentive: dApps should offer some sort of incentive to their users in the form of
cryptographic tokens. These are a sort of liquid assets and they provide incentives for
users to support the Blockchain dApp ecosystem.
4. Protocol: dApps should have a particular protocol to demonstrate proof of value. This
means showing the value of a particular process in a way that can be easily verified by
others.

How Do dApps Work?

A dApp has a backend code running on a decentralized peer-to-peer network. It can also
have a frontend code and a user interface that can be written in any language just as it is
done for normal applications. The front end can be hosted on any decentralized server like
IPFS. dApps work in a manner similar to normal applications except for the few differences
that are discussed below:
The dApp working has the following features:
 Decentralized: A dApp operates on Ethereum which is an open public decentralized
platform.
 Deterministic: dApps perform the same function irrespective of the environment in
which they are executed.
 Turing complete: dApps can perform any action given the required resources.
 Isolated: dApps are executed in an Ethereum Virtual Machine which is a virtual
environment that ensures that even if there is a bug in the smart contract, it won’t
hamper the normal functioning of the blockchain network.

 Open source: All the required are decided on the majority of the other nodes available
in the network.
 Storage: As the name is decentralized data are stored on the decentralized blocks.
 Validation: As the Application runs on the blockchain system, they use a cryptographic
token which is a need of the network.

Decentralized vs Centralized Applications

Basis Centralized Decentralized

In the centralized application In the decentralized applications,


Location software location resides at a software resides on each client’s
central location machines

In a centralized application, a
In a decentralized application, a file
minimum number of applications
Size resides on each of the client’s
and files reside on the client’s
workstations
system

It requires high bandwidth as the It requires low bandwidth as the


Bandwidth software movement from the server movement of the application software
to the client takes place frequently is less

In a centralized system, there is a In a decentralized application, it is


User
less flexibility for the user as it more flexible and user choices are
choice
depends on the server more priority

Increase number of applications on


Increased number of applications will
the network increases the
be easier to be stored in local work
Feasibility likelihood as there will be a
station hence it can be achieved by
conflict between two or more
decentralized application
packets

Pros of dApp

 Faster Adoption: A decentralized application provides freedom to the user to run the
app without having to trust any other party and thus results in faster adoption of the
application. The smart contract is deployed on the blockchain the network is whole and
will be able to serve clients that are looking to interact with the contracts.
 Less pause: These applications are more flexible than the centralized ones as they do
not rely on a single server. So, enterprises can ensure minimum interruption and
downtime for continuity of the network, a single node working in a decentralized
network can stay available even though the performance of the network may be
downgraded.
 Cost reduction: Unlike centralized systems which require a high installation cost of the
server and experts to manage and maintain the server. This decentralized application
eliminates the cost of the network.
 Highly autonomous: These applications are considered to be more secure when
compared with traditional applications. These applications do not face any security
breaches as they do not have any central structure from which threats occur. The
decentralized application seems to be more secure as the creator also cannot the flow of
the network
 No censorship: The coding used in this type of application is totally open source. The
absence of all corporations to govern the application is a major reason to provide
resistance to censorship
 New opportunities: Since it is a new technology there are less number of users and this
gives a lot of opportunities for the early adopters. No single entity can block the other
user from submitting the transaction or reading the data from the blockchain.

Cons of dApp

 Slow speed: In the decentralized system, it occurs in some transactions are delayed in
the process, this add lags time to the process which is executing in the network. This
becomes the sole reason for the business not to rely on decentralized applications. The
network can only process around 10-15 transactions per second.
 Hard Maintenance: Dapps are as difficult as it is hard to modify the code and data
published on the blockchain. Once the Dapps are deployed developers also find it hard
to make changes even if the bug is identified.
 Hard to use: It is as an end-user as the average end-user finds it too difficult to set up
the necessary stack to interact with the blockchain insecure manner. To make it
somewhere user-friendly one solution is to build a base layer on the top of the apps
which ended up as a centralized app.
 End-user experience: Since Dapps is solving the major aspect of security and
efficiency the end-user experience is neglected. This may impact their digital
penetration rate and the rate at which people will adopt this technology.
 Immutable: We have seen the Immutability of dApps as a benefit but it can have some
disadvantages also i.e. smart contracts are developed by humans and as human error is
unavoidable these dApps have a high potential to become a huge problem.

Most Common Platforms For Creating dApps

There are many Blockchain platforms created by various companies. While the most
popular and commonly heard one is Bitcoin, there are many others that are used to create
dApps. These Blockchain platforms are further used as a base to create dApps. So let’s see
some of these now:
1. Ethereum: Ethereum is the most popular decentralized, open-source blockchain in the
world currently. It is used as the base for many Blockchain projects, including more
than 2500 dApps. In fact, Ethereum is only second to Bitcoin in terms of its market
value. Ethereum also has a native cryptocurrency known as BTH which is their version
of Bitcoin. All in all, this is an excellent option for creating a dApp although it’s a bit
expensive.
2. NEO: NEO is also a decentralized, open-source blockchain that aims to create a smart
economy. It is also called the Chinese Ethereum and provides better options for
scalability in dApps as compared to other Blockchain platforms. NEO is currently less
popular than Ethereum with only about 100 dApps built using this technology. It’s also
quite expensive and can even charge higher fees than Ethereum in some cases.
3. TRON: TRON is a comparatively new Blockchain platform as compared to Ethereum
or NEO. However, it’s quite popular and may even become a competitor to Ethereum in
the future. TRON is particularly famous for gaming applications and gambling sites.
There are around 1500 dApps created using this platform which makes it an excellent
choice.

Advantages of dApps

The following are some of the advantages of dApps:


1. Fault tolerance: As dApps work on a decentralized platform, if a single node is
working the network will be still; available but the performance will be severely
downgraded.
2. Privacy: Users don’t need to submit real-world identity or any personal information to
use any app-specific functionality.
3. Data integrity: Data stored on the blockchain is immutable and tamper-proof due to the
use of consensus algorithms. Hackers cannot forge transactions and the data stored on
the blockchain is resistant to change.
4. Flexible platform: The Ethereum platform provides a flexible environment for easy
development of dApps.
5. Verifiable behavior: Smart contracts can be analyzed and are guaranteed to execute in
predictable ways without a need from monitoring or involvement from a central
authority.

Disadvantages of dApps

The following are some of the drawbacks of dApps:


1. Performance Overhead: There is a lot of performance overhead to achieve the level of
security, transparency, and integrity that Ethereum desires. Even the proof-of-work
takes a lot of time and computational resources.
2. Maintenance: dApps are hard to maintain, debug and update, as the code or data
published to the blockchain are hard to modify and all bug fixes require consensus from
all the peers on the network which is in most cases hard to achieve in a timely manner.
3. Scalability: Decentralized networks are hard to scale than centralized networks.
4. User experience: It is quite hard for the developers to design a user-friendly dApp as it
requires users to use the public and private keys for login instead of the username and
password that is being used in centralized applications.
5. Centralization: Developing user-friendly, developer-friendly applications on top of
Ethereum may end up developing a centralized service. Centralization may eliminate all
the good features of the blockchain over the traditional model.
6. Network Congestion: There is an issue of network congestion while using a dApp as
one dApp uses too many computational resources, and the entire network gets backed
up. If the number of transactions coming in is more than the 10-15 transactions that are
being processed in a second then unconfirmed transactions will pile up.

Conclusion

dApps are the continuation of Blockchain culture and a wonderful invention because of
their focus on security and transparency. While there are relatively few dApps in the market
as compared to conventional apps, that’s only because Blockchain is a new technology, and
dApps will become more and more popular when Blockchain becomes commonplace.

You might also like