Table of Contents
- Motivation and goals
- Network interaction domains
- Upgradability and Compatibility
- Underlying transports, etc
Waku is a privacy-preserving peer-to-peer messaging protocol for resource restricted devices. It implements PubSub over libp2p and adds capabilities on top of it. These capabilities are: (i) retrieving historical messages for mostly-offline devices (ii) adaptive nodes, allowing for heterogeneous nodes to contribute, and (iii) bandwidth preservation for light nodes. This makes it ideal for running a p2p protocol on mobile.
Historically, it has its roots in Waku v1, which stems from Whisper, originally part of the Ethereum stack. However, Waku v2 acts more as a thin wrapper for PubSub and has a different API. It is implemented in an iterative manner where initial focus is on porting essential functionality to libp2p. See rough road map.
Motivation and goals
Generalized messaging. Many applications requires some form of messaging protocol to communicate between different subsystems or different nodes. This messaging can be human-to-human or machine-to-machine or a mix.
Peer-to-peer. These applications sometimes have requirements that make them suitable for peer-to-peer solutions.
Resource restricted.These applications often run in constrained environments, where resources or the environment is restricted in some fashion. E.g.:
- limited bandwidth, CPU, memory, disk, battery, etc
- not being publicly connectable
- only being intermittently connected; mostly-offline
- Privacy. These applications have a desire for some privacy guarantees, such as pseudonymity, metadata protection in transit, etc.
Waku provides a solution that satisfies these goals in a reasonable matter.
Network interaction domains
While Waku is best though of as a single cohesive thing, there are three network interaction domains: (a) gossip domain (b) discovery domain (c) req/resp domain.
Protocols and identifiers
The current protocol identifiers are:
These protocols and their semantics are elaborated on in their own specs.
For the actual content being passed around, see the Waku Message spec.
The WakuMessage spec being used is:
See WakuRelay spec for more details.
Default pubsub topic
The default PubSub topic being used for Waku is currently:
This indicates that it relates to Waku, is version 2, is the default topic, and that the encoding of data field is protobuf.
The default PubSub topic SHOULD be used for all protocols. This ensures a connected network, as well some degree of metadata protection. It MAY be different if or when:
- Different applications have different message volume
- Topic sharding is introduced
- Encoding is changed
- Version is changed
Discovery domain is not yet implemented. Currently static nodes should be used.
This consists of two main protocols. They are used in order to get Waku to run in resource restricted environments, such as low bandwidth or being mostly offline.
Historical message support
See WakuStore spec for more details.
See WakuFilter spec for more details.
Upgradability and Compatibility
Compatibility with Waku v1
Waku v2 and Waku v1 are different protocols all together. They use a different transport protocol underneath; Waku v1 is devp2p RLPx based while Waku v2 uses libp2p. The protocols themselves also differ as does their data format. Compatibility can be achieved only by using a bridge that not only talks both devp2p RLPx and libp2p, but that also transfers (partially) the content of a packet from one version to the other.
See bridge spec for details on a bridge mode.
- Add recommended default PubSub topic
- Update relay and message spec version
Initial draft version. Released 2020-09-17
Copyright and related rights waived via CC0.