docs.waku.org/docs/overview/concepts/protocols.md

3.7 KiB

title
Protocols in Waku

Waku takes a modular approach, providing a range of protocols that enable applications to control the trade-offs involved in the Anonymity Trilemma. This flexibility empowers applications to make informed choices regarding the desired balance between anonymity, scalability, and reliability. Here are the main protocols provided by Waku:

Waku Relay

WAKU2-RELAY is a privacy-focused peer-to-peer messaging protocol that extends the libp2p GossipSub protocol. It utilizes a Pub/Sub approach to enable secure communication channels, encryption, and protection against censorship. With a strong emphasis on privacy, Waku Relay ensures scalability, allowing many peers and messages to coexist within the network.

Waku Filter

WAKU2-FILTER is a protocol enabling peers to subscribe to specific messages from other peers. It is designed for devices with limited bandwidth, serving as a lighter alternative to Waku Relay. Unlike relay nodes, Waku Filter allows light nodes to subscribe to service nodes and receive only the messages they are interested in. This optimizes bandwidth consumption but may involve privacy compromises. Nonetheless, Waku Filter efficiently delivers desired messages within bandwidth constraints.

Waku Store

WAKU2-STORE is a protocol that allows the querying of messages received through the relay protocol and stored by nodes. It supports retrieving historical messages with pagination. Unlike Waku Relay, which doesn't save messages for offline users, Waku Store peers retain relayed messages for later retrieval.

:::info Data availability is not guaranteed with Waku Store. Waku Relay or Waku Filter are preferred for online usage, while Waku Store is suitable for retrieving messages after reconnecting to the network, like when a dApp starts. :::

Waku Light Push

WAKU2-LIGHTPUSH is a Request/Reply protocol for Waku's light nodes with limited bandwidth and short connection windows. It enables clients to receive a confirmation when sending messages, indicating that at least one node has received them. However, using Waku Light Push compromises privacy as the remote peer becomes aware of the message originator.

:::info Please note that Waku Light Push confirms receipt by the remote peer but doesn't guarantee network-wide propagation. :::

Additional Protocols

Waku Message

WAKU2-MESSAGE is a communication protocol that facilitates the exchange of messages between peers in the network. It includes the data payload (actual message content being transmitted) and attributes (metadata associated with the message).

Waku Payload

WAKU2-PAYLOAD provides guidelines for implementing secure and private communication in the Waku network. It covers encryption, decryption, and signing methods for message payloads, focusing on confidentiality, authenticity, integrity, and unlinkability.

Waku RLN Relay

The WAKU2-RLN-RELAY protocol extends the Waku Relay protocol by adding spam protection using Rate Limiting Nullifiers (RLN). It enforces a global messaging rate for all peers to prevent spam in the Waku network. Spammers face financial penalties and removal from the system. This protocol provides efficient and economic spam prevention suitable for resource-constrained environments.