Book Image

Foundations of Blockchain

By : Koshik Raj
Book Image

Foundations of Blockchain

By: Koshik Raj

Overview of this book

Blockchain technology is a combination of three popular concepts: cryptography, peer-to-peer networking, and game theory. This book is for anyone who wants to dive into blockchain from first principles and learn how decentralized applications and cryptocurrencies really work. This book begins with an overview of blockchain technology, including key definitions, its purposes and characteristics, so you can assess the full potential of blockchain. All essential aspects of cryptography are then presented, as the backbone of blockchain. For readers who want to study the underlying algorithms of blockchain, you’ll see Python implementations throughout. You’ll then learn how blockchain architecture can create decentralized applications. You’ll see how blockchain achieves decentralization through peer-to-peer networking, and how a simple blockchain can be built in a P2P network. You’ll learn how these elements can implement a cryptocurrency such as Bitcoin, and the wider applications of blockchain work through smart contracts. Blockchain optimization techniques, and blockchain security strategies are then presented. To complete this foundation, we consider blockchain applications in the financial and non-financial sectors, and also analyze the future of blockchain. A study of blockchain use cases includes supply chains, payment systems, crowdfunding, and DAOs, which rounds out your foundation in blockchain technology.
Table of Contents (14 chapters)

Networking in Blockchain

In the previous chapters, we covered the cryptography concepts that are essential for blockchain to function in a trustless network. But we haven't discussed what a trustless network is. A decentralized network facilitates a trustless environment. In this chapter, we will explore how blockchain achieves decentralization with peer-to-peer (P2P) networking.

In this chapter, we will cover the following topics:

  • P2P networking
  • Network discovery
  • Block synchronization
  • Building a simple blockchain in a P2P network

We know that blockchain was created to remove the trust in a single central authority by building a trustless network that decentralizes all the tasks that are otherwise centralized in a single entity. P2P networking is an architecture style used to achieve this decentralization in blockchain applications. We'll begin this chapter by exploring...