Every blockchain technology definition describes it as a decentralized peer-to-peer transaction model that eliminates intermediaries. That’s great, but what does peer-to-peer even mean? If you are familiar with BitTorrent, you might have an idea of how P2P systems work. However, if you’re not, P2P networks might sound confusing. This decentralized network is the basis of the blockchain, and it’s the very thing that powers Bitcoin, cryptocurrencies, and all your valuable NFTs. This is why it’s essential to understand what P2P is, how it works, and what are the peer-to-peer blockchain pros and cons.
Peer-to-peer technology is a decentralized network of interconnected devices that collectively store and share files between them. Each device or computer consists of a node making it a “peer”. Before we dwell on how data sharing happens between these peers, it’s best to explain what a traditional client-server system is.
Traditional Client-Server System
The client-server system is how the regular internet works. It is a model that illustrates the relationship between two or more computers. The client is a local computer that requests a specific service, for example, to download an application. The server is a centralized remote machine that stores all data and offers a service or access to a service, for example, letting you access the application so you can download it. This is basically how the world wide web works. An interchange of client-service data that follows the many-to-one relationship. Where one server can comply with many clients.
Going back to the peer-to-peer system that powers the blockchain, the P2P system is the exact opposite of the client-server model. Instead of clients requesting services from centralized servers, in the P2P system, each computer acts as both the client and the server. Furthermore, when a computer that has a node or a peer in a P2P network acts as a client, it downloads data and files from other peers. In contrast, when this computer acts as a server, it becomes a downloading source that other peers can use.
Therefore, all computers that participate in the peer-to-peer model provide and consume the same data circulating in that network. The data could be any file shareable on the internet. Moreover, this model has no central authority because all nodes are equal and thus there is no hierarchy.
How Does P2P Work?
Since all nodes of the peer-to-peer network are connected, they share files between them with no intermediary central authority or server. That means the file you download from a peer-to-peer network is a file that another node, like you, is sharing it. And the cycle continues. As long as there are nodes or peers uploading a certain file on the network, that file is downloadable. The more peers share a certain file, the faster you can download it. The same thing goes if a file on the network doesn’t have peers sharing it, the file might appear but it wouldn’t be available for download (since no one is uploading its data).
Types of Peer-to-Peer Networks
Before we discuss why peer-to-peer networks are the fundamental system of the blockchain we’ll go over the various types of P2P. Interestingly, peer-to-peer networks are divided into three types.
In structured peer-to-peer networks, the nodes are organized and each node can search the network for a specific file or data, even if it’s unavailable. Although t makes it easier for peers to find data, it bears the risk of being too centralized. Also, their lack of flexibility renders the network inefficient.
In unstructured peer-to-peer systems, the nodes are randomly connected to each other with no imposing structure. Unstructured P2P is easy to set up and is the most common type of P2P network. However, their randomness makes it harder to retrieve specific files.
Hybrid P2P models are a combination of both peer-to-peer systems and client-server models. That means that there is a central server that provides structured functionality which allows peers to find each other. This model usually performs better than the other two types of P2P networks since it employs both.
Alas, we come to discuss the role of the peer-to-peer network in blockchain technology. Before P2P progressed into powering the revolutionary Web3 technology, the blockchain, the decentralized network was actually powering illegal file-sharing networks like BitTorrent. This could be done because there are no centralized authorities that can monitor illegal files. Pseudonymous Satoshi Nakamoto found that P2P networks can do much more than that. In 2009, Nakamoto launched Bitcoin on a system of nodes that would store transactions that cannot be altered. Therefore the decentralized trait of P2P networks made it the perfect solution for a decentralized ledger.
Furthermore, the blockchain records transactions in a peer-to-peer model that eliminates the need for intermediaries. Meaning, there is no central authority that manages the blockchain, and only participants, in this case, called miners, can validate transactions through interconnected nodes. The integrity of the blockchain lies in the fact that the validation of transactions does not fall under a single organization’s power. In contrast, centralized institutions like banks control all transactions and data.
In addition, anyone can participate in the peer-to-peer network that powers the blockchain. Each participant can set up a node and act as a miner that validates transactions. However, in order to become a miner, there are computational requirements like owning a mining machine. Moreover, these miners will be rewarded for maintaining the blockchain, this ensures that miners (or nodes) are always available and contributing to the network.
Peer-to-peer Blockchain Pros and Cons
The decentralized P2P network offers many benefits to the blockchain, but also comes with a price.
- Permanence: Since the blockchain is a peer-to-peer network, it is hard to take down the blockchain. If one peer gets down, other peers persist. It takes more than half of the peers running the blockchain to shut down in order to break the chain. In contrast, centralized networks are easily taken down.
- Security: In centralized networks, by just attacking the central storage of data, the whole system can be hacked. However, the peer-to-peer network of the blockchain makes hacking nearly impossible. It takes a hack of 51% of the peers in order to disrupt the whole blockchain.
- Immutability: In centralized networks, you have to trust central file-storing platforms from altering your data. However, because the blockchain uses a peer-to-peer network, there is no censorship by central authorities.
- Massive Computational Power: Using the proof-of-work consensus, massive computational power is needed in order to keep the blockchain running, which has immense environmental effects.
- Difficult to Manage: Since there is no central authority, the P2P network of the blockchain is hard to manage and monitor.
The P2P model has evolved from a file-sharing network to a decentralized currency trading platform. Its decentralized nature and secure framework have made it the core of the blockchain. Even though P2P has its disadvantages, it still marked the development of the first decentralized ledger thanks to its security and transparency. The development of the peer-to-peer network has put the crypto exchange platforms on a pedestal and perhaps kickstarted the new era of a decentralized internet.