0% found this document useful (0 votes)
16 views3 pages

PBFT - Private Blockchain

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

PBFT - Private Blockchain

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

Numerical Example: Practical Byzantine Fault

Tolerance (PBFT) in Permissioned Blockchains

Introduction
Practical Byzantine Fault Tolerance (PBFT) is a consensus mechanism used
in permissioned blockchains, where nodes are known and have access control.
PBFT can tolerate up to f faulty or malicious nodes in a network of 3f + 1
nodes, ensuring the system’s security and reliability.

Steps of PBFT Process


The PBFT protocol involves the following steps:

• Request: A client sends a request to invoke a service operation to the


primary (leader) node.
• Pre-prepare: The primary node broadcasts the request to all other
backup nodes.

• Prepare: Each backup node validates the request and broadcasts a ”pre-
pare” message.
• Commit: Nodes exchange ”commit” messages with each other.
• Reply: After reaching a consensus (agreeing on the same state), nodes
send replies to the client.

Numerical Example: PBFT in Action


Consider a permissioned blockchain system with 4 nodes: N0 , N1 , N2 , and
N3 . The system can tolerate f = 1 faulty node, as the total number of nodes
required is 3f + 1 = 4.
- N0 is the primary node (leader). - N1 , N2 , and N3 are backup nodes.
A client wants to submit a transaction T1 to the blockchain. The following
steps illustrate how PBFT achieves consensus.

1
Step 1: Client Request
The client sends the request for transaction T1 to the primary node N0 .

Client → N0 : T1

Step 2: Pre-prepare
The primary node N0 forwards the request T1 to the backup nodes N1 , N2 , and
N3 as a pre-prepare message.

N0 → {N1 , N2 , N3 } : Pre-prepare(T1 )

Step 3: Prepare
Each node (including N0 ) validates the request T1 . If valid, they send a prepare
message to the other nodes.

N1 → {N0 , N2 , N3 } : Prepare(T1 )
N2 → {N0 , N1 , N3 } : Prepare(T1 )
N3 → {N0 , N1 , N2 } : Prepare(T1 )

Each node waits until it receives 2f + 1 = 3 prepare messages (including its


own).

Step 4: Commit
After receiving enough prepare messages, each node sends a commit message to
the other nodes.
N1 → {N0 , N2 , N3 } : Commit(T1 )
N2 → {N0 , N1 , N3 } : Commit(T1 )
N3 → {N0 , N1 , N2 } : Commit(T1 )
Each node waits until it receives 2f + 1 = 3 commit messages (including its
own).

Step 5: Reply
Once a node collects enough commit messages, it executes the transaction T1
and sends a reply back to the client.

N0 → Client : Reply(T1 )
N1 → Client : Reply(T1 )
N2 → Client : Reply(T1 )
N3 → Client : Reply(T1 )

When the client receives f +1 = 2 replies, it considers the transaction confirmed.

2
Handling Faults
In this system, PBFT can tolerate up to 1 faulty node. For example, if N2 is
malicious and sends conflicting prepare or commit messages, the remaining 3
nodes (N0 , N1 , N3 ) can still reach consensus since they outnumber the faulty
node.

Summary of Communication

Step Node Involved Message Sent Purpose


Request Client → N0 T1 Client submits the transaction
Pre-prepare N0 → N1 , N2 , N3 Pre-prepare(T1 ) Primary node forwards the request
Prepare N1 , N2 , N3 Prepare(T1 ) Nodes validate and prepare
Commit N1 , N2 , N3 Commit(T1 ) Nodes agree to commit the transaction
Reply N0 , N1 , N2 , N3 Reply(T1 ) Nodes confirm transaction to the client

Table 1: Summary of PBFT Message Communication

Conclusion
This example demonstrates how PBFT enables consensus in permissioned blockchains,
ensuring security and fault tolerance even when up to f nodes are faulty. The
process involves multiple stages of message exchange to achieve consensus on a
transaction, making PBFT suitable for small networks where nodes are trusted
or semi-trusted.

You might also like