Why it is “peer-to-peer”
If we consider the situation from the point of view of information technology, then peer-to-peer networks are networks in which individual elements (nodes) exchange files with each other and store the same data set. The nodes are equal in power and perform the same tasks.
From a financial point of view, peer-to-peer networks are financial platforms that allow you to carry out financial purchase-and-sale transactions without intermediaries. In some situations, the procedures for obtaining and issuing loans are organised similarly.
In any case, they started talking about the first effective peer-to-peer networks around the 90s of the last century when programs for efficient file sharing appeared. However, it was the advent of cryptocurrency networks based on the classic P2P architecture that awoke the main interest in them. Now such networks are used not only in cryptoeconomics but also in creation of search engines, streaming platforms, various online markets and as part of the IPFS, interplanetary file system.
How does it work?
So. We have a large number of computers connected to each other. Each of them contains a copy of all files contained in the network. It allows you to simultaneously perform both the client and server roles. In addition, the nodes are equal in their rights, so that no one has an advantage over the others, and decisions on global changes are made collectively.
This situation allows each node to upload new information and distribute already stored one simultaneously. It is a continuous and constant process since all nodes are required to respond to any change in the network contents.
Independent storage of information at different sources makes the entire system more resistant to external influences and hacks. In addition, there is no single point of failure in P2P networks, unlike in centralised systems.
There are three main types of peer-to-peer networks.
- Unstructured (flat). The nodes are randomly in contact with each other, which ensures high activity of the system even with a significant node turnover. Relatively simple to build, but require large capacities when working. The fact is that search or any other requests are sent to the maximum possible number of machines at the same time, so that the network is overloaded with “empty” information requests, which can interfere with the passage of reviews.
- Structured. Nodes are combined in a strict architecture-based system. Such a system actively uses hash search, which significantly reduces the overall intensity of the information flow. However, such systems are already centralised to some extent, and therefore much more demanding for maintenance and installation. And when a large group of nodes are temporarily lost, the entire system is violated.
- Hybrid. Two previous combined. For example, there is a central server that simplifies exchanging between individual nodes. Typically, these networks are defined by high performance and stability.
P2P and blockchain
When Satoshi Nakamoto created the Bitcoin network, he formulated it as a “peer-to-peer electronic money payment system”. This was ensured thanks to the work of a new technology — blockchain.
The technology allowed the exchange of digital currency with participants around the world without any intermediaries and central servers. In addition, anyone could join this process.
The role of banks, recording and authenticating financial transactions, was assumed by the digital register recording all activity and which anyone can turn to. Simply put, each node connected to the network stores all its information and regularly communicates with other nodes to guarantee the accuracy and relevance of the stored information.
But despite the fact that the network is peer-to-peer, different nodes can take on different functions. So, for example, there are so-called “full nodes” that mainly check transactions in the system for compliance with their existing consensus algorithms. And there are other nodes, miners, that mainly generate new information storage blocks.
- High resistance to DoS attacks because the information is not stored in one place, and the network bandwidth allows you to process many requests simultaneously.
- High resistance to already entered information change. To rewrite the data on all the machines in the network, you need power in excess of half the total capacity of the system. It is called a “51 percent attack”. Occurs quite rarely, especially in large networks.
- High resistance to internal errors and conflicting signals. P2P networks show high “Byzantine resiliency”.
- Resistance to external censorship. For example, cryptocurrency wallets cannot be frozen by decision of courts and governments, unlike bank accounts.
- The larger the network, the more computational work needs to be done to ensure the relevance of the stored information. It slows down the overall work speed. This problem is known as the “scalability problem”. And very few peer-to-peer networks have found more or less acceptable ways to solve it. Examples are the Lightning Network, Ethereum Plasma, and the Mimblewimble protocol.
- A “hard fork”, i.e. “splitting” a chain of information into two is possible. In this case, both new branches are vulnerable to a replay attack (a reliable transaction from one chain is duplicated to the second, allowing to withdraw 2 times more money). And if you consider that such hard forks happen regularly, then you have to provide additional protection from them.
- The inability to correct information can be a disadvantage. It is extremely difficult to extract, for example, compromising data from such a network. As well as digital copies related to copyright infringement.
Peer-to-peer architecture significantly improved the efficiency of information storage, making the exchange more transparent, stable and faster. Moreover, not only within cryptocurrency networks, but also during the exchange of different information — from peer-to-peer network files, such as torrent, to information related to large-scale trading operations or the processing of large amounts of digital data.