P2P or Peer-to-Peer networks are a type of decentralized networks. Networks that are made up of hundreds and even millions of computers located around the world. All of them operating under the same communications protocol, with the aim of creating a huge network to share information of any kind.

Una network P2P is peer-to-peer, is a network where a group of people or machines participate in a completely decentralized way. That is to say, it is a network where there is no central point of connection or control, and where the parties act autonomously responding to a common communication and consensus protocol. In this way, the members of the network can exchange information directly and without intermediaries.

To achieve this, P2P networks are built on protocols that run on top of Internet protocols (also known as TCP / IP). Hence, P2P protocols are called application protocols or Layer 7, according to the model Open Systems Interconnection or OSI. This means that P2P protocols require the use of other more abstract protocols in order to function, but that, at the same time, makes them easier to build and operate.

Thanks to this, P2P protocols have been widely used since their creation for different uses. Some legal, others a bit gray, but despite this, there is one thing very clear, P2P protocols are very powerful and allow the creation of decentralized structures, hardly objectionable and free to use. For that reason, cryptocurrencies like Bitcoin They were built on the basis of P2P protocols.

That said, let's learn a little more about these protocols and their evolution.

Origin and history of P2P

The origin of the first P2P network, we can trace it until the creation of the protocol UUCP o Unix to Unix Copy Protocol, in 1980. This simple protocol gave rise to the well-known network USENET and, to BBS, networks that are still active and functioning today. A good example of this is, BBS EffectLinux, which is still active for those nostalgic for this communication system.

The principle of operation of these systems is simple: The machine made a connection call (dial-up connection) using a modem, communicated with the target machine, and they could share information point-to-point without intermediaries. At the end of the connection call, the user could initiate another connection with another machine starting the process again. It is worth noting that all this was possible without a structure like the Internet we know today, a network and technology that was still under development at that time.

At the time, USENET and the UUCP protocol were the pinnacle of communications. In fact, the movement cypherpunk started with the use of this protocol. Characters like Saint Jude, Eric Hughes, Timothy C. May, David Chaum, made use of these systems to share information on the BBS boards of the Cypherpunks community. These were the early years of computing, and at that time, there was already a glimpse of the future possibilities of this type of protocol and of much more powerful and capable computers.

Later, in 1983, the TCP / IP protocol. Basically, this new protocol sought to make the creation of large global networks more flexible, in fact, it is the basis for the construction of what we know today as the Internet. The latter became really possible when the OSI system or model (defining the seven layers of abstraction that we currently have on the Internet) in 1989 and, finally, with the arrival of the WWW (World Wide Web) protocol in 1990.

Types of P2P networks

Among the types of existing P2P networks we can specify the following:

  • Decentralized and structured network. These types of networks are known as hybrid P2P networks. In this type of network there is no directory on a central server, but instead there are a series of nodes or peers, which have the ability to receive requests for information and respond to them to facilitate access to resources. To avoid the centralization of this functionality, the nodes or special peers can be installed and configured by anyone, thereby seeking that the same community of users extend the functionality of the network and allow its correct operation. A good example of this type of network is federated networks such as Diaspora o Mastodon.
  • Decentralized and unstructured network. In this type of P2P network there are no computers or nodes that function as central controllers of requests. On the contrary, each node within the network has the same functions as the rest of nodes, so each new node exercises the same authority as the rest. At this point, networks like Bitcoin meet these characteristics, since each connected node has the same capabilities as the rest.

How does a P2P network work?

The operation of a P2P network is relatively simple. Basically what is done is to build a communications protocol (language) that allows people who use said software to communicate directly and without intermediaries with other computers. However, the biggest problem when building these systems is; How to design a system that does not need a centralized directory to communicate with other computers running the same software? 

A complex problem, but the situation can be solved quite effectively with two well-defined measures:

  1. First, make the software capable of sharing connection information about those who run it. Thus, each computer that runs the software is capable of having a directory of connected computers and using them to connect to the node it wants.
  2. Encourage the greatest possible decentralization of the network. That is, make many people run the software by creating their own nodes, and therefore increasing the size of the network. In this way, its scope and its possibilities are improved.

That is, the more peers (computers running P2P software) The network has, the more chances there are that the network cannot be censored, its operation will be more resistant and the better capabilities it will have. In early P2P systems, such as USENET or IRC, the systems and their connections were made known by written means, calls, or the same system that had a board of peers to which to connect. Thus, each new member in the network had access to the list of peers and added themselves so that others could establish communication with them if required. Not only that, that new peer could be the gateway to information from peers that could be blocked.

Node network in a P2P system

But bigger networking like IRC, DCC, DC ++, Napster, Gnutella, BitTorrent and even Bitcoin drastically changed this. Now each node was connected to a point, they get a list of initial peer (or seed nodes). And from there, each node is able to recreate its own list of nodes that belong to the network. As a result, better censorship resistance is obtained and the network can grow faster.

Of course, the operation of each protocol is different. IRC for example, is a distributed (almost centralized) system of servers that can give you the ability to connect point-to-point with a person. But DC + and Gnutella are completely decentralized, their networks are designed so that the network automatically adjusts with the entry and exit of new nodes to the network.

The same thing happens in Bitcoin, where the network started with a single seed, the one started by Satoshi Nakamoto, and since then, the network has grown gradually to become a network with a size greater than 10 thousand active nodes. Of course, the objective of Bitcoin is different from that of a network like Gnutella, but the principles of the protocol remain: communicate to two parties without intermediaries.

Bitcoin and its nodes in the world

Advantages and Disadvantages of this technology

Advantages

  1. A P2P network is resistant to censorship. A highly decentralized P2P network is practically impossible to censor.
  2. They offer unmatched resilience. If one node falls, another node can take its place. This is why they say that P2P networks can survive a nuclear catastrophe, because they can destroy many nodes, but if only one survives, the network can be completely rebuilt.
  3. P2P networks can lead to powerful scalability solutions to present unique services with global reach.
  4. By not depending on central entities, P2Ps generate more trust in their users. 
  5. They offer a high level of bandwidth. This is thanks to the fact that they take advantage of the bandwidth of each participant, to transform it into their own network.
  6. They serve to transmit digital information of any kind. From your favorite song to hundreds of millions of dollars, in seconds.

Disadvantages

  1. A P2P network is resistant to censorship, but it doesn't make you anonymous unless it's designed for it, even if that network uses encryption. The best example is BitTorrent, where ISPs can detect the use of the protocol, and thereby warn the authorities of the illegal download by a user.
  2. The design of P2P networks means that the larger the latency increases. That is, for information to reach all the parts that make up the network, it will take more time in a large P2P network than in a smaller one. Hence, new algorithms and protocols are sought to help overcome this problem.
  3. P2P protocols have a number of known structural problems. Cases such as MITM attacks to take control of nodes, because they must be connected publicly at all times are one of these failures. Also protocols are susceptible to routing attacks or things as stealthy as a eclipse attack or Erebus attack.

Bitcoin, a P2P network to manage value

Bitcoin is one of the largest P2P networks that exist today, with its more than 10 thousand active nodes, Bitcoin is a global network that allows its users to manage value without intermediaries. All you have to do is download a software that allows you to interact with this network, and you can now use it.

The construction of Bitcoin as a P2P network responds to the need to decentralize its capabilities. It is useless to create a crypto currency, if it is then managed by a central entity. That would be simply creating a new central bank. Instead, Satoshi Nakamoto wanted a global, uncensored, secure, and private network that allowed value to be managed. So for this, Nakamoto designed Bitcoin on the basis of a P2P network using its own protocol designed under the principles of Kademlia protocol y Gossip protocol.

The result is that Bitcoin is a P2P network that practically cannot be stopped. Even with its structural flaws, the P2P protocol was the best decision that Nakamoto could make in Bitcoin's design. With this, he made sure to create digital money that served the interests of the world and its users.

P2P to solve digital money problems

Best of all, Bitcoin with its P2P system has managed to create a distributed accounting system in which problems such as double spending are a thing of the past. Double spending was one of the main problems of digital money. The possibility of doubling the money and falsifying it, was something that had no solution until Satoshi Nakamoto designed the blockchain and its P2P protocol for Bitcoin.

Since then, we have been able to use cryptocurrencies with total security, knowing that our money is not only in an open, transparent and free protocol, but also can never be counterfeited. And all this because each node has a history of network transactions, witnessing each operation on it. This enormous network of witnesses, remains as an unchangeable record of everything that happens and gives us the assurance that the system is not manipulable.

Something really useful and that allows to transform Bitcoin into a secure digital money, the most secure and transparent of all.

How much do you know, cryptonuta?

Do P2P networks by themselves guarantee our privacy and anonymity?

FALSE!

A P2P network by itself does not guarantee us privacy or anonymity. To achieve this, the protocol must be built on the basis of achieving both characteristics. In cryptocurrencies we can clearly see this situation. For example, Bitcoin that was intended for privacy but not anonymity, while Monero, if it was intended for both functions from its base. There the difference between both cryptocurrencies, their networks and how each one works.

Other important events in the origin of P2P

The birth of IRC

In 1988, a young man named Jarkko Oikarinen designed the IRC protocol, in order to replace a program called MUT (MultiUser Talk) in a BBS called OuluBox at the University of Oulu in Finland, where he worked in the Department of Information Processing Science .

His intention was to extend the BBS software he managed to allow USENET-style news, real-time discussions, and BBS-like features. The first part he implemented was the chat part, which he did with borrowed parts written by his friends Jyrki Kuoppala and Jukka Pihl. The first IRC network was running on a single server called tolsun.oulu.fi.

The fact that the protocol was designed to use TCP / IP gave it enormous flexibility in the future. In fact, by 1990 the first large IRC network, the EFNet, was founded. EFNet's role was vital to global communications during the Persian Gulf conflict. In fact, it was the preferred network to know in real time what was happening on the battlefield. It thus showed that the potential of IRC compared to mail was superior, at least in terms of immediacy and interactivity of communications. The same happened with the Fall of the Soviet Union, where IRC was also vital in the role of communicating what was happening to the world in real time.

Since then, the IRC protocol has undergone enormous expansion and acceptance, creating networks such as UnderNet, DALnet, Freenode (widely used for free software projects), Rizon e Immortal-Anime (now Xertion). The expansion in its acceptance brought more development to the protocol, and from there was born one of the first P2P systems on the Internet, the IRC-DCC, or IRC Direct Client-to-Client. The system allowed direct communication between the parties without intermediaries, file sharing, encrypted end-to-end (OTR) communication, and more.

HotLine Connect is born

For 1996, another creation would come in the world of P2P, created Adam Hinkley. HotLine Connect It was a P2P file-sharing network that uses a tracker system to allow two users to exchange information. Widely used until the end of 2000, it fell into disuse thanks to the emergence of other more flexible protocols and the significant rise of the IRC-DCC.

Gnutella

Gnutella is a file sharing P2P network development developed in 2000 by Justin Frankel and Tom Pepper. Frankel and Pepper were employees of Nullsoft, the company that created the Winamp player and the audio streaming service. Shoutcast.

Since then and until now, Gnutella is the largest P2P network that exists in the world. In fact, this network has more than 12 million nodes in operation around the world.

The Birth of Napster

Napster was a software developed by Shawn Fanning in 1998 and allowed the download of music for free. Although Napster was not a pure P2P network (as was also the case with IRC), it allowed two people to exchange music without intermediaries external to those that existed on the network and its servers. But Napster touched the pockets of the music industry and after a lengthy trial it was closed in July 2001.

However, what Napster had done called the world to develop more decentralized systems.