# pBFT— Understanding the Consensus Algorithm

Nov 19, 2018 · 4 min read

# Drawbacks

Discover and review best Blockchain softwares

# Example replica set

I have calculated the minimum and maximum message count for each phase and placed it at the top of the diagram that I have created below. Included are the client request and reply for clarity, even though they are not actually considered phases in the pBFT algorithm.

# Total message count per client request

In our case with a max of 2 faulty replicas, that would be:
- request messages: `1`
- pre-prepare messages: `3f = 6`- prepare messages: `3f(3f-f) = 24`- commit messages: `(3f-f+1)(3f+1)= 35`- reply messages: `3f-1 = 5`

This gives us a minimum of 71 (1+6+24+35+5) total messages for 1 request when using 7 replicas! If we want to have just 1 more replica that can be faulty, this number increases to a minimum of 142 messages for 1 request using 10 replicas.

Want up to 4 nodes to be faulty? Just use 13 replicas, but the minimum messages will climb to 237 for a single request.

This is why pBFT does not scale as well as other consensus algorithms.

# Optimizations to pBFT

For this reason RSA digital signatures are only used for the view change and new-view messages, which are only sent to promote a backup replica to a primary replica. View changes only happen after a primary has become faulty or k requests have been processed. All other messages are authenticated using MACs like SHA256.

Miguel Castro and Barbara Lisk, authors of the original 1999 pBFT paper from MIT found that MACs could be computed three orders of magnitude faster than digital signatures. Although, they were comparing MD5 vs 1024 bit RSA signature, where we now commonly use SHA256 and 2048 bit RSA.

# Conclusion

pBFT should be used with a consortium of enterprise organizations, where each organization would represent a node on the network `node == organization`. Each of these organizational nodes should then have clusters of instances and load balancers behind the node’s endpoint to scale the computational power and insure a quick response time.

How’d you like this article? If you liked it or learned something, please leave a clap! DarkBlock.io is an enterprise blockchain development company and we’re always taking on new clients. Reach out to me at sheffield@darkblock.io or visit our website at DarkBlock.io!

Get Best Software Deals Directly In Your Inbox

## Coinmonks

### By Coinmonks

A newsletter that brings you week's best crypto and blockchain stories and trending news directly in your inbox, by CoinCodeCap.com Take a look

Written by

Written by