Networking

P2P decentralized networking - libp2p

Othentic P2P networking layer is based on the libp2p open-source library.

The protocol provides peer-to-peer networking primitives such as peer discovery, connection management, and secure messaging. The network relies on a secure Auth Service to manage peer connectivity and handshaking, ensuring only valid peers can use the network.

Networks that are using the Othentic stack can be permissionless (anyone that re-stakes tokens can register as an Operator for the network) or whitelisted. The Auth Service verifies the incoming connections came from a registered Operator.

Libp2p also allows a discovery layer using a distributed hash table (DHT) based on the Kademlia algorithm. The DHT stores information about other peers in the network, such as their addresses and availability. Othentic nodes do not support DHT at the moment but will in the future.

New Operators can be easily onboarded to the network by using Bootnodes which act as relays for peer discovery.

Interaction with the network is done using a Gossip protocol that abstracts the details of network communication, serialization, and deserialization.

Learn more about libp2p

TxRelayer

A TxRelayer is responsible for forwarding or relaying transactions from one source to another. Its primary function is to facilitate the transmission of transactions between various network participants or components.

Here are some key aspects of a TxRelayer's role:

  • Transaction Propagation: TxRelayer helps propagate transactions across the network. When a user initiates a transaction, it may be initially sent to a TxRelayer, which then disseminates it to the appropriate nodes, validators, or components for processing.

  • Transaction Broadcasting: In many blockchain networks, transactions need to be broadcasted to multiple nodes for validation and inclusion in blocks. TxRelayer ensures that transactions are efficiently broadcasted to the network.

  • Transaction Prioritization: In cases where there is a backlog of transactions awaiting processing, TxRelayers can prioritize which transactions to relay first based on various factors, such as transaction fees or network congestion.

JSON-RPC API

JSON-RPC is a lightweight, language-agnostic protocol that allows developers to interact with Othentic nodes.

Currently the JSON-RPC API is limited but will be expanded in the future with additional methods.

Last updated