Skip to Content

Waku

The Open Internet Protocol (OIP) utilizes the Waku  messaging protocol to manage and route data efficiently in a decentralized, peer-to-peer network. This page details the best practices for constructing and utilizing Waku messages within OIP.

Introduction to Waku

Overview

Waku is a suite of decentralized, censorship-resistant communication protocols designed to facilitate privacy-focused messaging within Web3 applications. Evolving from Ethereum’s Whisper protocol, Waku addresses the scalability and usability challenges of its predecessor, enabling efficient peer-to-peer messaging across diverse environments, including mobile devices and web browsers.

Historical Context

In 2014, Gavin Wood introduced Ethereum alongside tools like Whisper for decentralized messaging and Swarm for decentralized storage. However, Whisper faced limitations in scalability and resource consumption, hindering its widespread adoption. Recognizing these challenges, the Vac team developed Waku as a successor to Whisper, enhancing scalability and efficiency while maintaining privacy and security.

Core Features

  • Privacy: Waku employs advanced cryptographic techniques, including zero-knowledge proofs, to protect user data and metadata, ensuring that communications remain confidential and resistant to surveillance.

  • Censorship Resistance: Operating on a decentralized peer-to-peer network, Waku eliminates single points of failure, making it difficult for external entities to censor or block communications.

  • Modularity: Waku’s design is highly modular, allowing developers to select and integrate specific protocols tailored to their application’s requirements, optimizing performance and resource utilization.

  • Scalability: Through message sharding and efficient peer discovery mechanisms, Waku scales to support a large number of nodes without compromising performance, ensuring reliable message delivery even under high network load.

Technical Architecture

Waku builds upon libp2p’s GossipSub  protocol for message routing, enhancing it to meet the privacy and scalability needs of decentralized applications. Key components of Waku’s architecture include:

  • Relay Protocol: Facilitates the propagation of messages across the network using a publish-subscribe model, ensuring that messages reach their intended recipients efficiently.

  • Rate-Limiting Nullifiers (RLN): Implemented to economically prevent spam and enforce rate limits on message propagation, RLN imposes financial penalties and network removal for spammers, maintaining the network’s integrity and performance.

  • Filter Protocol: Allows light nodes to selectively subscribe to specific messages based on content topics, optimizing bandwidth usage for resource-constrained devices.

  • Store Protocol: Enables nodes to store and retrieve historical messages, ensuring that offline peers can access messages sent during their absence, enhancing the robustness of the messaging system.

  • Light Push Protocol: Designed for nodes with limited bandwidth and short connection windows, this protocol allows clients to send messages with acknowledgment of receipt, ensuring reliable message delivery without the need for continuous network participation.

Vitalik Buterin, co-founder of Ethereum, acknowledged Waku as the continuation of the vision for decentralized messaging initially embodied by Whisper . He noted that while Whisper received less attention with the shift toward financialization around 2017, it continues to exist as Waku and is actively used by projects like the decentralized messenger Status.

  • Light Nodes and Efficiency: Applications interacting with OIP should primarily use Waku’s Light Push for sending and Filter for receiving messages. This setup significantly reduces network and computational overhead compared to fully on-chain operations.

  • Content Addressing and Storage: Messages in OIP are addressed via IPLD-compliant hashes (IPLD v1). Developers should utilize these content identifiers (CIDs) for message integrity and verifiability.

  • Security and Integrity: Message hashes should be computed deterministically to ensure consistency and integrity. OIP follows Waku’s recommended message hashing methodology to ensure efficient verification.

Persistence and Ephemerality

Messages marked as ephemeral will not be persisted across the network. Ephemeral status should be carefully set according to the application’s requirements, as this affects both storage behavior and network resilience.


This document provides a clear overview of messaging practices within OIP using the Waku protocol. For deeper technical details, consult the Waku documentation .