Introducing the Edge, WatchDog, and Guardian Nodes

SendingNetwork's decentralized communication protocol stack is a dynamic and adaptive messaging relay network driven by incentives. It's designed to minimize reliance on centralized nodes, safeguard privacy and account ownership, and offer scalability and efficiency, making it an ideal backbone for Web3 applications.

Let's explore the network’s architecture in more detail, specifically the different roles of the Nodes.

Understanding the Network Architecture

First, let’s take a look at the network architecture. The protocol operates on a three-tier structure—access, relay, and consensus layers—utilizing Proof of Relay and Proof of Availability to motivate participants.

Access Layer

At the access layer, dApps integrating our SDK—such as games, wallets, and NFT marketplaces—function as messaging clients. Users can send and receive end-to-end encrypted messages. When a message is sent, it progresses to the Relay layer, handled by an Edge Node. Here, WatchDog nodes, posing as ordinary clients, randomly select Edge Nodes to forward messages, monitoring their availability.

Relay Layer

In the Relay layer, Edge Nodes find the recipient or the next relay node via the P2P protocol to continue the message’s journey. Edge Nodes generate bills through the Proof of Relay mechanism and submit them to the Guardian Nodes at the consensus layer.

Consensus Layer

Guardian Nodes verify the work proofs submitted by Edge Nodes and assess each node’s service quality using the information provided by WatchDog nodes through Proof of Availability. Guardian Nodes compile these transactions into batches for validation to the Layer 2 blockchain.

Roles of The Nodes

Edge Nodes

Edge Nodes operate within the Relay Network layer of the SendingNetwork. They function as crucial relay points that forward messages by utilizing their bandwidth and storage resources. Edge Nodes also provide message caching for offline clients, ensuring that messages are stored temporarily and deleted once retrieved by the client, which prevents long-term data retention. These nodes prove their message forwarding tasks using the Proof of Relay mechanism, where each forwarded message is signed by the sender, the relay, and the recipient.

To manage the vast amount of receipt data generated, Edge Nodes use Zero-Knowledge (ZK) circuits to create ZK proofs of their activities. These proofs, along with compressed transaction data, are submitted to Guardian Nodes for verification. This system eliminates the need to send detailed transaction data across the entire network.

Edge Nodes are designed to maintain optimal system performance and network connectivity to ensure they are selected by clients based on a node selection algorithm. Although the network comes with a redundancy design, which prevents downtime from affecting message delivery, maintaining a high uptime is critical for network stability.

To deploy an Edge node, refer to our Edge Node Deployment Tutorial.

WatchDog Nodes

WatchDog nodes serve as sentinels within the network, tasked with maintaining high uptime for Edge nodes. They periodically send challenge messages to Edge Nodes and report the results to Guardian Nodes, which help evaluate the performance of the relayers.

The WatchDog nodes perform a simple yet crucial role: monitoring and reporting. They do not make any assessments themselves but instead check whether Edge Nodes can promptly respond to random challenges. A timely response indicates that an Edge Node is actively relaying messages within the network. Failure to respond promptly may suggest a malfunction or non-compliance with the decentralized network’s operational rules, potentially leading to slashing.

The challenge messages initiated by WatchDogs are indistinguishable from regular traffic to the Edge Nodes, ensuring that Edge Nodes cannot differentiate these tests from normal operations. This maintains the integrity of the testing process.

WatchDog nodes are rewarded based on the number of effective checks they perform on different Edge Nodes within a given period. To encourage continuous and extensive monitoring, the reward for repeated checks on the same Edge Node diminishes over time.

The simplicity of the WatchDog node's function—continuously sending verification messages—means that they have low hardware performance requirements and no strict uptime requirements, making them ideal for ordinary users to host. This setup supports the network's stability by ensuring constant monitoring of Edge Nodes' operational status.

Guardian Nodes

Guardian Nodes play multiple key roles within the network: they act as ZK verifiers, transaction sequencers and node performance reviewers. These nodes receive numerous work proofs and transaction data from Edge and WatchDog Nodes. Their first task is to validate the ZK proofs of these submissions. Additionally, they use the results of WatchDog challenges, combined with Proof of Availability, to evaluate and rate the performance of relay nodes, determining rewards or penalties based on their activities.

Guardian Nodes submit the transactions to Layer 2 blockchain. Layer 2 sequencer will execute transactions off-chain and compile the state transition outputs, ZK proofs, and necessary data. This compiled information is then submitted to the main chain, ensuring data availability at Layer 1.

Conclusion

The integration of Edge, WatchDog, and Guardian Nodes forms a strong, decentralized communication infrastructure for our messaging network. These nodes are incentivized to perform their respective functions, collectively ensuring the network's efficiency.

Last updated