Owner: @Daniel Sanchez Quiros

Reviewers: 🟢@Álvaro Castro-Castilla 🟢@Gusto Bacvinka 🟢@Youngjoon Lee 🟢@Antonio

Introduction

The Nomos peer-to-peer (P2P) network serves as the comprehensive communication layer connecting Nomos nodes. Its primary functions include facilitating the mempool for transaction dissemination and enabling block propagation. This specification leverages established, publicly available protocols to ensure robust performance. The Nomos P2P network is designed to scale according to the project's requirements, supporting efficient communication with low bandwidth and minimal latency.

Participants, or peers, operating Nomos nodes encompass a diverse array of machine specifications, ranging from laptops to dedicated servers, as well as various operating systems and geographic locations as described in the Hardware Requirements documentation. A key priority is to streamline communication for non-technical users, ensuring accessibility. This entails enabling peers to remain reachable—ideally even with limited connectivity or when situated behind a router—thereby enhancing inclusivity and usability across the network.

Overview

The Nomos network constitutes a foundational element of the communication infrastructure, addressing several critical challenges:

The Nomos network uses production-tested protocols to ensure all of the above is achieved.

Network Protocols Details

Transport

The Nomos network extensively leverages the libp2p suite of plug-and-play protocols, which forms a foundational component for delivering the essential functionalities outlined previously.

At its core, the Nomos network employs the QUIC transport protocol. QUIC provides rapid connection establishment and offers several advantages, including enhanced NAT traversal capabilities stemming from its UDP foundation. Additionally, its default multiplexing feature simplifies configuration processes.

Peer Discovery

Following an evaluation of existing protocols and network requirements, the optimal approach for Nomos is to leverage the established libp2p stack, incorporating libp2p-kad for peer discovery. This provides a robust, modular, and scalable solution that seamlessly integrates with other libp2p protocols (e.g., gossipsub, identify, ping), enabling support for large-scale, dynamic networks with eventual consistency and resilience.

The Nomos P2P network integrates a combination of libp2p's Kademlia and Identify protocols to facilitate peer discovery. Kademlia enables the identification and connection to new peers by employing proximity-based heuristics, optimizing the discovery process. Complementing this, the Identify protocol supports the exchange of peer information, including details about the protocols each peer supports, thereby enhancing interoperability and network coordination.

The specific protocols to be negotiated are: