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

Private Blockchain Consensus Algorithms

The document discusses private blockchains, which allow only verified participants to join, contrasting them with public blockchains. It details consensus algorithms like Paxos and PBFT, highlighting their advantages and disadvantages, particularly focusing on PBFT's ability to handle malicious nodes and its application in enterprise systems. The document emphasizes the importance of these technologies in ensuring secure and efficient transactions in various business applications.
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)
13 views14 pages

Private Blockchain Consensus Algorithms

The document discusses private blockchains, which allow only verified participants to join, contrasting them with public blockchains. It details consensus algorithms like Paxos and PBFT, highlighting their advantages and disadvantages, particularly focusing on PBFT's ability to handle malicious nodes and its application in enterprise systems. The document emphasizes the importance of these technologies in ensuring secure and efficient transactions in various business applications.
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

Module 5

A private blockchain (also called permissioned blockchain) is a distributed ledger where only
selected and verified participants are allowed to join the network. Unlike public blockchains
such as Bitcoin or Ethereum—where anyone can read, write, or validate transactions—a
private blockchain restricts participation to trusted nodes that belong to a single
organization or a consortium.. Only trusted nodes can run consensus, update the ledger, or
deploy smart contracts. Private blockchains are typically used for business and enterprise
applications like supply-chain management, finance, healthcare, and government workflows,
where confidentiality, identity verification, and controlled access are essential. Since the
participants are known and pre-approved, private blockchains can use faster consensus
mechanisms (like RAFT, PBFT) and can achieve high throughput, low latency, and efficient
governance.

Characteristics
Smart Contract
SMR

PAXOS
Advantages of Paxos

1. Strong Consistency

Paxos ensures that all non-faulty nodes always agree on a single value, which is crucial in
distributed systems like databases.
2. Crash Fault Tolerant (CFT)

Paxos continues to work even if some nodes crash or become unresponsive.


It does not require every node to be online.

3. Works in Asynchronous Networks

Paxos handles:

 message delays,

 message reordering,

 duplicated messages,

 lost messages.

It does not assume perfect communication.

4. No Single Point of Failure

Consensus is achieved using majority votes, so no single node controls the system.

✘ Disadvantages of Paxos

1. Complex to Understand

The biggest criticism of Paxos is its complexity.


Even experts find it difficult to fully grasp the protocol.

2. Hard to Implement

Due to multiple edge cases and message flows, real implementations are tricky, leading to
errors if not designed perfectly.

3. Not Suitable for Malicious Nodes

Paxos is crash fault tolerant but not Byzantine fault tolerant.


It fails if:

 nodes lie,

 send wrong messages,

 get corrupted.

5. Additional Latency Due to Multiple Phases

Every proposal goes through two phases, which increases:

 network calls,
 response time,

 overhead.

RAFT
BFT
PBFT

PBFT (Practical Byzantine Fault Tolerance) – Explained in Detail

PBFT is a consensus algorithm designed to work even when some nodes in a distributed
network behave maliciously or incorrectly (called Byzantine faults).
It was introduced by Miguel Castro and Barbara Liskov in 1999 to make Byzantine Fault
Tolerance practical for real systems.

PBFT is widely used in permissioned/private blockchains like Hyperledger Fabric (v0.6) and
other enterprise systems.

⭐ Goal of PBFT

To make all honest nodes in the network agree on the same values even if up to 1/3 of the
nodes are faulty or malicious, and to do this efficiently and quickly.

A PBFT system can tolerate:

f faulty nodes → requires at least 3f + 1 total nodes

Example:

 If you want to tolerate 1 malicious node, you need 4 nodes.

 If you want to tolerate 3 malicious nodes, you need 10 nodes.


⭐ When is PBFT Used?

PBFT is used in:

 Private blockchains

 Enterprise distributed systems

 Banking ledgers

 Permissioned networks (few, known participants)

It is not used in public blockchains because it is not scalable to thousands of nodes.

⭐ How PBFT Works (3 Phase Process)

PBFT follows a three-phase protocol in each round of consensus.

There is one node called the Primary / Leader, and the rest are Replicas / Backups.

1️⃣ Pre-Prepare Phase

 A client sends a transaction request to the Primary node.

 The primary assigns a sequence number and sends a Pre-Prepare message to all
other replicas.

Purpose:
✔ Make sure everyone hears the same proposed request
✔ Ensure ordering of requests

2️⃣ Prepare Phase

 Each replica verifies the Pre-Prepare message.

 If valid, replicas broadcast a Prepare message to all other nodes.

Purpose:
✔ Nodes compare messages to ensure the primary is honest
✔ If 2f matching Prepare messages are received → request is accepted

3️⃣ Commit Phase

 Nodes broadcast a Commit message.


 When a node receives 2f + 1 commit messages, it finalizes the request.

Purpose:
✔ Ensures all honest nodes reach the same conclusion
✔ Guarantees safety even if some nodes lie

Finally,

 The result is sent back to the client.

⭐ Visual Summary of PBFT Flow

Client → Primary → Replicas


Replicas → Replicas (prepare)
Replicas → Replicas (commit)
Replicas → Client

⭐ Advantages of PBFT

✔ 1. Byzantine fault tolerant

Can handle malicious nodes, not just crashes.

✔ 2. Fast finality

Once consensus is reached, the decision is final. No forks happen.

✔ 3. Low latency

Works very fast for small networks (4–20 nodes).

✔ 4. Energy efficient

No mining or PoW needed.

✔ 5. Ideal for private blockchains

Because the number of participants is small and known.

⭐ Disadvantages of PBFT

❌ 1. Not scalable

Communication is O(n²) → each node must talk to every other node.


So it becomes slow when nodes > 30.

❌ 2. Requires known participants


Not suitable for open/public blockchains.

❌ 3. Leader may be a bottleneck

If the primary node is slow or malicious, it affects the whole system.


(Though PBFT has a view-change protocol to replace a bad leader.)

❌ 4. High message complexity

A lot of messages exchanged in Prepare and Commit phases.

⭐ Where PBFT is used?

 Hyperledger Fabric (version 0.6)


Later versions replaced PBFT with Raft.

 Tendermint (Cosmos chain) – PBFT-like consensus

 Zilliqa (PBFT + PoW hybrid)

 Financial blockchain systems

Common questions

Powered by AI

Paxos offers several advantages, including strong consistency, crash fault tolerance (CFT), the ability to operate in asynchronous networks, and no single point of failure as consensus is based on majority votes. These features make it suitable for ensuring agreement among non-faulty nodes in distributed systems, which is crucial for applications like databases. However, Paxos also has notable disadvantages: it is complex to understand and implement due to various edge cases and message flows; it is not suitable for mitigating malicious nodes as it is not Byzantine fault tolerant; and it introduces additional latency because every proposal must go through multiple phases with increased network calls and overhead .

PBFT manages leader faults through a view-change protocol, which allows the network to replace a slow or malicious primary node with another node, thereby maintaining the stability and integrity of the consensus process. When nodes detect discrepancies indicating the primary might be faulty, they initiate a view change, selecting a new leader to ensure that malicious or performance-degrading behavior is addressed. This prevents bottlenecks created by leader failures and helps sustain the overall operation of the network by ensuring continuous progression in consensus rounds, even amidst such faults .

PBFT (Practical Byzantine Fault Tolerance) ensures consensus by requiring that all nodes agree on the same set of transactions, even if some nodes are faulty or malicious. This is achieved through a three-phase consensus process involving pre-prepare, prepare, and commit phases. A primary node proposes a transaction order, which is then confirmed through messages exchanged among the nodes. If 2f + 1 replicas agree on the transaction, consensus is reached. This approach allows PBFT to handle up to 1/3 of faulty nodes. It is particularly suitable for private blockchains because they operate with a limited number of known, trusted nodes, allowing PBFT to maintain efficiency and low latency due to the manageable communication overhead .

Identity verification in private blockchains is crucial because it ensures that only authorized and trusted participants can access the network, perform transactions, and participate in consensus mechanisms. This controlled access reinforces the security and confidentiality of transactions, which is especially important in enterprise contexts where sensitive data is involved, such as healthcare, finance, or supply-chain management. By knowing who participates, private blockchains can effectively prevent unauthorized access and reduce risks related to malicious activities, creating a trusted environment that is both secure and manageable .

Private blockchains differ from public blockchains in that they are restricted to a set of verified participants, which allows them to use faster and more efficient consensus mechanisms like RAFT or PBFT. In private blockchains, only trusted nodes, pre-approved by a central authority, can participate, update the ledger, or deploy smart contracts. Unlike public blockchains, where anyone can participate, private blockchains focus on confidentiality and controlled access, making them suitable for enterprise applications. The restricted participant roles in private blockchains allow for high throughput and low latency, which are critical in business contexts .

The complexity of the Paxos algorithm impacts its implementation in real-world distributed systems by posing significant challenges for developers due to its intricate protocols and numerous edge cases. The complexity often leads to errors in design and code unless the implementation team has deep expertise and thoroughly understands the nuances of the protocol. This difficulty in implementation can result in increased development time and potential vulnerabilities if not executed correctly. Its complexity demands rigorous testing and validation to ensure reliable operation in environments that require strong consistency and fault tolerance .

PBFT is not suitable for public blockchains primarily because it is not scalable to large numbers of nodes. The communication complexity of the consensus process is O(n²), requiring each node to communicate with every other node, which becomes inefficient and cumbersome as the network size grows beyond 30 nodes. Moreover, PBFT assumes that participants are known and trusted, an assumption that does not hold in public blockchains where anyone can join the network. These scalability and participation constraints make PBFT more appropriate for private blockchains with controlled and limited membership rather than open public systems .

PBFT is energy efficient compared to proof-of-work (PoW) consensus mechanisms because it does not rely on computationally expensive processes like mining. PoW requires nodes to perform complex calculations to validate transactions, consuming substantial amounts of energy and computational resources. In contrast, PBFT achieves consensus through communication and message passing among a known set of nodes, significantly reducing energy consumption as it involves less intensive computational tasks. This efficiency makes PBFT ideal for private blockchains where energy consumption is a concern, supporting fast, low-cost consensus without the overhead of mining .

PBFT faces scalability limitations primarily due to its high communication complexity, which grows quadratically (O(n²)) with the number of nodes. This requires extensive message passing, which becomes a bottleneck in larger networks as each node must communicate with every other node. Potential solutions to address these challenges involve optimizing communication patterns, such as using hierarchical structures to reduce direct communications, or integrating state-of-the-art consensus algorithms like sharding, where the network is divided into smaller groups of nodes that handle separate transaction sets. These solutions could help PBFT scale by minimizing direct cross-group communication and managing network resources more efficiently, supporting larger blockchain systems without compromising their Byzantine fault tolerance capabilities .

The RAFT consensus algorithm is used in private blockchains to achieve high throughput and low latency consensus among a set of trusted and pre-approved nodes. RAFT simplifies the consensus process by electing a leader to manage the replication of log entries. This leader simplifies the decision-making process, thus reducing overhead compared to more complex algorithms like Paxos. This efficiency is significant for private blockchains used in enterprise applications, where rapid confirmation of transactions is essential. RAFT's streamlined approach contributes to efficient governance and operational simplicity, enhancing system performance by reducing the time and complexity involved in reaching consensus .

You might also like