The Heartbeat of Cardano.

Decentralizing Cardano’s Networking Layer: An In-Depth Look

Cardano, a blockchain platform, has a strong commitment to decentralization as one of its core principles. The platform’s decentralization is divided into three pillars: networking, governance, and block production. Currently, Cardano has achieved complete decentralization in block production, and the next step is the complete decentralization of the networking layer.

In this article, we’ll take a deep dive into the evolution of Cardano’s network connectivity model, the current system, and the upcoming P2P network.

Source:https://www.cityam.com/decentralised-block-production-on-cardano/

Introduction to Cardano’s Networking Layer

A networking layer is a physical infrastructure that combines nodes and their interactions into a unified system. The network distributes information about transactions and block creation among all active nodes.

There are two types of nodes in Cardano’s network:

Core nodes are responsible for producing blocks, and Relay nodes are responsible for communicating with other relays and broadcasting blocks.

Source: https://docs.cardano.org/development-guidelines/operating-a-stake-pool/node-connectivity

The Byron Era: Cardano’s Federated Networking Layer

Source: https://docs.cardano.org/explore-cardano/cardano-network/p2p-networking

When Cardano was launched, the Byron network connectivity model operated in a federated state. All the core and relay nodes that connected to about 200 other relays were maintained by Input Output Global. (IOG).

This was a centralized networking layer connected by a static configuration defined in a topology file. The federated system ensured that the nodes were connected by a static configuration defined in a topology file.

The Shelley Era: Cardano’s Hybrid Networking Layer

Source: https://docs.cardano.org/explore-cardano/cardano-network/p2p-networking

The Shelley era marked a transition in Cardano’s network connectivity model, moving away from the federated model of the Byron era to a hybrid model.

In the hybrid model, nodes are connected to both federated relays, and other SPO (Stake Pool Operator) relays, but the connectivity is not fully automatic. Instead, it is partially constructed manually, relying on the centralized tool called the ‘topologyUpdater.’

Source: https://pooltool.io/

The network topology refers to the arrangement of nodes, and as a block producer, it is important to have incoming connections for the blocks to propagate. The topologyUpdater helps stake pool operators connect their nodes to other nodes and generates new topology.json files every 24 hours.

Mini protocols

The network functions through a set of mini protocols, which are modular building blocks that allow for communication between nodes.

https://docs.cardano.org/explore-cardano/cardano-network/p2p-networking

Each mini protocol implements basic information exchange, such as sharing blocks and informing peers of the latest block. A multiplexing layer acts as a central crossing between mini-protocols and the network channel.

Source:https://docs.cardano.org/explore-cardano/cardano-network/networking-protocol

However, the topologyUpdater was only developed as a temporary solution until Cardano’s networking layer transforms into a P2P network.

https://github.com/cardano-community/guild-operators/blob/alpha/docs/Scripts/topologyupdater.md

In case of a failure in the centralized topologyUpdater service, it would result in the failure of all topologyUpdaters on the relay nodes. To ensure the smooth functioning of the network, it is important to have a well-designed topology and effective communication between nodes through mini protocols.

The hybrid model introduced some improvements over the federated model, but it was still not fully decentralized. The manual configuration and reliance on a centralized tool meant that the network was not as resilient or secure as it could be. The upcoming P2P network aims to address these issues by enabling the complete decentralization of the Cardano network.

The P2P Network: Decentralizing Cardano’s Networking Layer

Source: https://docs.cardano.org/explore-cardano/cardano-network/p2p-networking

The main goals of the P2P network are to enhance the flow of information between nodes, remove the network’s reliance on centralized services, and enable complete decentralization of the Cardano network.

The P2P network will have four components: the P2P governor, the connection manager, the server, and the inbound protocol governor.

Source:https://docs.cardano.org/explore-cardano/cardano-network/p2p-networking

The P2P Governor

The P2P governor is a critical component of Cardano’s upcoming P2P network. It is responsible for peer connection management, which is essential for ensuring the best performance of the network.

The P2P governor classifies the network’s peer nodes based on their relative activity and established connections into three categories: hot peers, cold peers, and warm peers.

Hot peers are nodes that have a connection that is being used by all three node-to-node mini-protocols. Cold peers are existing nodes without an established network connection. Warm peers are nodes with an established connection that is only used for network measurements without implementing any of the node-to-node mini-protocols.

The P2P governor will manage the P2P connection based on activity and established network connection to ensure the best system performance of the network. It will determine which peers are beneficial for connection purposes and which should be in the cold, warm, or hot sets, maintaining a target number for each set.

Source:https://docs.cardano.org/explore-cardano/cardano-network/p2p-networking

These automated activities will help build and maintain a connectivity map of the entire network, simplifying the connection process between peer nodes.

The Connection Manager

The integration of the connection manager with the P2P governor will enable bidirectional communication between peers and enhanced node-to-node communication without affecting performance.

The Server

The server will accept connections and perform dynamic rate limiting to control the number of requests sent or received by peers. This will ensure that the network functions smoothly and efficiently.

The Inbound Protocol Governor

The inbound protocol governor will run and track the state of each remote peer (cold, warm, or hot) and inbound mini-protocol. This component will play a crucial role in ensuring the smooth functioning of the P2P network.

The Gossip Component

The P2P network will also have a Gossip component, which will help discover nodes that are not registered on the chain.

This will enable Daedalus, a full node, to connect to relays from SPOs and vice-versa, making Cardano the most resilient and decentralized public blockchain.

Source:https://docs.cardano.org/explore-cardano/cardano-network/p2p-networking

The current state of P2P

Although P2P capability is part of the current version of the Cardano node 1.35.5, it’s still under production, and the use of P2P capability is not yet recommended by IOG.

Conclusion

The decentralization of Cardano’s networking layer is a highly anticipated upgrade that will make Cardano a far more decentralized and resilient network. The P2P network will enhance the flow of information between nodes, remove the network’s reliance on centralized services, and enable complete decentralization of the Cardano network. The decentralization of Cardano’s networking layer is a significant step towards making Cardano a truly decentralized blockchain platform that operates on the principles of transparency, security, and efficiency.

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts