This book is your comprehensive guide to understanding Blockchain and Blockchain consensus algorithms. It covers distributed systems, distributed consensus, and relevant system models. And you''ll explore how classical and modern consensus algorithms work. The book also covers quantum consensus and explains the role that quantum computing plays in distributed systems.
Consensus protocols allow participants in distributed systems to agree on a common value, despite faults. It''s a fundamentally important construct in distributed systems. As a result of rigorous and ground-breaking research over the last four decades, many consensus mechanisms have been developed and are used in the industry today. However, with the advent of Blockchain technology, a renewed interest has arisen in this area, resulting in more research and innovation.
The first Blockchain, Bitcoin, was invented in 2008 and introduced a novel consensus protocol called Nakamoto consensus, a solution
Table of Contents
Chapter 1: Introduction
Chapter Goal: to introduce distributed computing concepts, models and relevant concepts
No of pages - 30
1. Introduction 1.1. What is distributed computing 1.1.1.Characteristics (collection, coherent, same task, consists of nodes etc) 1.2. Distributed algorithms 1.3. Elements of distributed computing 1.4. computational (system) model 1.5. Space / time diagram 1.6. Time, clocks and order 1.7. Broadcast ordering 1.8. types 1.8.1.1.Message passing 1.8.1.2.Shared memory 1.9. Synchrony / timing 1.10. Adversary model 1.11. Faults 1.11.1.Process / program faults 1.11.2.Processor / machine 1.11.3.Communication / link faults 1.11.4.Storage faults 1.11.5.Types (omission, byzantine . . . etc.) 1.11.6.Correct processes 1.11.7.Fault tolerance 1.12. Abstractions 1.12.1.What and why abstractions? 1.12.2.to understand / build distributed computing – helps to state and reason about distributed computing 1.12.3.System model 1.12.4.Processes and links 1.12.5.Communication and networks 1.12.5.1.Latency and bandwidth 1.12.6.Agreement 1.12.7.Cryptography abstractions 1.13. Role of cryptography in distributed systems and consensus 1.14. CAP theorem 1.15. Summary Chapter 2: Cryptography
Chapter Goal: to understand cryptography and build ground for use of cryptography in consensus
No of pages - 30
2. Cryptography 2.1.1.What is cryptography 2.1.2.CIA triad 2.1.3.Symmetric cryptography 2.1.4.Asymmetric cryptography 2.1.5.Hash functions 2.1.6.MACs 2.1.7.Digital signatures 2.1.8.Privacy 2.1.9.Zero knowledge 2.1.10.Summary Chapter 3: Distributed consensus
Chapter Goal: to introduced the subject of consensus, why its important, history, how it developed, what are the requirements and relevant results and abstractions.
No of pages - 30
3. Distributed consensus 3.1. What is distributed consensus 3.1.1.Agreement abstraction 3.2. Goal of distributed consensus 3.2.1.Safety 3.2.2.liveness 3.2.3.Other properties and goals 3.3. Consensus system model 3.4. History 3.5. Types 3.6. Building blocks 3.7. Other abstractions 3.8. Two generals problem - network model 3.9. Byzantine generals problem - node behaviour model 3.10. Byzantine agreement 3.11. Replication 3.12. Primary - backup model 3.13. State machine replication 3.14. Fundamental results, lower bounds / upper bounds 3.15. FLP impossibility 3.16. How to circumvent FLP impossibility 3.16.1.Synchrony models , assumptions, eventual, partial synchrony etc. 3.16.2.Other methods 3.17. Cryptography in distributed consensus 3.17.1.Privacy in consensus algorithms 3.18. Where are we now 3.19. Summary Chapter 4: Blockchain
Chapter Goal: to introduce blockchain, its structure, use cases and technical underpinnings.
No of pages - 20
4. Blockchain 4.1. What is blockchain 4.2. Background 4.2.1.The first blockchain 4.2.2.Bitcoin 4.2.3.Smart contracts 4.3. Blockchain is a distributed system 4.4. Basic structure 4.5. Benefits 4.6. Types 4.7. Available platforms 4.7.1.Ethereum 4.8. Use cases 4.9. Summary Chapter 5: blockchain consensus
Chapter Goal: introduce blockchain consensus, relationship with classical consensus, need of consensus in blockchain, how generally it works and Bitcoin protocol.
No of pages - 20
5. Blockchain consensus 5.1. Relationship with distributed systems 5.2. Why consensus is needed 5.3. First appearance – with Bitcoin to circumvent double spending and Sybil attack 5.4. A confusion – a consensus mechanism, consensus facilitation mechanism or a Sybil attack defence mechanism 5.5. First blockchain consensus – in Bitcoin – PoW 5.6. Summary Chapter 6: early protocols
Chapter Goal: to introduce what distributed consensus protocols were developed earlier , some fundamental relevant results and how these protocols work. This will develop intuition and basis for more advanced topics in the next chapter.
No of pages - 20
6. Early protocols 6.1. Byzantine agreement 6.2. Ben-Or 6.3. DLS 6.4. View stamped replication 6.5. Summary Chapter 7: Classical consensus algorithms
Chapter Goal: introduced classical consensus protocols , inluding Paxos, RAFt, PBFT and understand how they work in detail
No of pages - 30
7. Classical protocols / algorithms This chapter covers classical protocols in detail, their design, how they work and where they are implemented. How and if they can be used in blockchain 7.1. Paxos 7.2. RAFT 7.3. PBFT 7.4. How to adapt these classical protocols for blockchain. 7.5. Summary Chapter 8: blockchain age protocols
Chapter Goal: introduction to modern blockchain protocols and how they work.
No of pages - 40
8. Modern - blockchain age protocols 8.1. PoW 8.2. PoS 8.3. Tendermint 8.4. Hotstuff 8.5. SBFT 8.6. Summary Chapter 9: newer protocols
Chapter Goal: to introduce newer class of protocols , specifically developed for blockchains and cryptocurrencies
No of pages - 10
9. Other newer protocols 9.1. Snow flake family 9.2. Other exotic ideas and protocols 9.3. Summary Chapter 10: Design and implementation
Chapter Goal: to introduce how to model, design and verify consensus protocols
No of pages : 30
10. Design and implementation 10.1. Design 10.2. Formal methods in computer science 10.3. Correctness proofs 10.4. Formal spec and verification of consensus algorithms 10.5. Using TLA+ 10.6. Other Correctness proofs 10.7. Performance 10.7.1.Scalability and efficiency 10.8. Security 10.9. Implementation 10.10. Selection / evaluation criteria / Evaluation 10.10.1.Complexity concepts 10.10.2.Summary Chapter 11: current landscape and future
Chapter Goal: general overview of latest state of the art and current challenges along with research directions.
No of pages : 5
11. Current landscape, research directions and future 11.1. State of the art 11.2. Challenges 11.3. Research directions 11.4. Future 11.5. Exotic ideas 11.6. Conclusion