This Apress imprint is published by the registered company APress Media, LLC, part of Springer Nature.
The registered company address is: 1 New York Plaza, New York, NY 10004, U.S.A.
This book is dedicated to my father, the most affectionate, selfless, and hard-working person I’ve ever known.
If you are stuck at a research problem, rigorously read all relevant literature, you will find the answer.
—Scientist Bashir Ahmed Khan
This book is an introduction to distributed consensus and its use in the blockchain. It covers classical protocols, blockchain age protocols that emerged after Bitcoin, and quantum protocols. Many enthusiasts have come from different backgrounds into the blockchain world and may not have traditional distributed systems experience. This book fills that knowledge gap. It introduces classical protocols and foundations of distributed consensus so that a solid foundation is built to understand the research on blockchain consensus. Many other people have come from traditional distributed systems backgrounds, either developers or theorists. Still, they may lack the understanding of blockchain and relevant concepts such as Bitcoin and Ethereum. This book will fill that gap too.
Moreover, as quantum computing will impact almost everything in the future, I have also covered how quantum computing can help build quantum consensus algorithms. A clear advantage can be realized in the efficiency and security of consensus algorithms by using quantum computing. Therefore, an entire chapter is dedicated to quantum consensus.
This book is for everyone who wants to understand this fascinating world of blockchain consensus and distributed consensus in general. A basic understanding of computer science is all that's required to fully benefit from this book. This book can also serve as a study resource for a one-semester course on blockchain and distributed consensus.
The book starts with a basic introduction to what distributed consensus is and covers fundamental ideas such as causality, time, and various distributed system models. Then to build the foundation for understanding the security aspects of blockchain consensus, an introduction to cryptography is provided. Then a detailed introduction to distributed consensus is presented. Next, an introduction to the blockchain is given, which gives a solid understanding of what a blockchain is and how it is fundamentally a distributed system. We then discuss blockchain consensus, focusing on the first cryptocurrency blockchain, Bitcoin, and how it achieves its security and distributed consensus goals. Starting from Chapter 6 is an introduction to early protocols covering classical work like the Byzantine generals problem and its various solutions. After this, classical protocols such as Paxos, DLS, and PBFT are covered. Next, the blockchain protocols such as ETHASH, Tendermint, GRANDPA, BABE, HotStuff, and Casper are introduced. These protocols are the latest in the research on blockchain consensus mechanisms. Of course, we cannot cover everything due to the vastness of the subject. Still, this chapter dedicated to blockchain consensus introduces all those protocols which are state of the art and in use in mainstream blockchain platforms, such as Polkadot, Ethereum, and Cosmos.
The next chapter is another exciting topic, quantum consensus. With the advent of quantum computing, it has been realized that quantum computing can significantly enhance the classical distributed consensus results. Even results such as FLP impossibility might be possible to refute using quantum properties like superposition and entanglement.
Finally, the last chapter summarizes what we have learned in the book, introduces some exotic protocols, and suggests some research directions.
As this book focuses on the foundations of the blockchain and consensus, I believe that this book will serve as a great learning resource for all enthusiasts who want to learn about the blockchain and blockchain consensus. Furthermore, I hope that this book will serve technologists, researchers, students, developers, and indeed anyone who wants to know about this fascinating subject well for many years to come.
This book would not have been possible without help from many people. First, I would like to thank Aditee Mirashi from Apress for her time, patience, and dedication to this project.
Over the years, I have gone through many books, papers, online resources, and lectures from experts and academics in this field to learn about this subject. I want to thank all those researchers and engineers who have shared their knowledge. I also want to thank the reviewers whose suggestions have improved this book greatly.
I want to thank my wife and children for their support and bearing with me when I was busy writing during weekends, which I was supposed to spend with them.
Finally, I want to thank my father, my beacon of light. He sacrificed everything for me, guided me at every step in life, and empowered me to achieve the best in life. Thank you, Dad! He motivated me to write this book and suggested that I publish it in 2022. And my mother, whose unconditional love for me has no bounds. Thank you Ammi!
3.15.219.217