add content topic name considerations

This commit is contained in:
LordGhostX 2023-05-31 01:43:49 +01:00
parent 196b2c3eae
commit 657763679d
No known key found for this signature in database
GPG Key ID: 520CC5DC4F94FCC7
5 changed files with 23 additions and 11 deletions

View File

@ -6,7 +6,7 @@ Get involved in Waku's open-source initiatives to improve the protocols, SDKs, d
- [Operating a node](/guides/sdks-and-nodes#operate-a-waku-node) within your application.
- [Reporting bugs](#report-a-bug) and [suggesting missing features](#suggest-a-feature) to the development team.
- Inspiring other developers to explore and utilize Waku for [various use cases](/getting-started/use-cases).
- Inspiring other developers to explore and use Waku for [various use cases](/getting-started/use-cases).
Begin your journey by visiting the [SDKs and Nodes](/guides/sdks-and-nodes) guide and start building on Waku today!

View File

@ -11,15 +11,27 @@ Here is the recommended format for content topics:
`/{application-name}/{version}/{content-topic-name}/{encoding}`
- `application-name`: This is the unique name of your decentralized application (dApp) to prevent conflicts with other dApps.
- `version`: Typically starting at 1, this field helps track breaking changes in your messages.
- `content-topic-name`: The specific name of the content topic used for filtering. If your dApp utilizes Waku for multiple features, it is advisable to have a separate content topic for each feature.
- `version`: Typically starting at `1`, this field helps track breaking changes in your messages.
- `content-topic-name`: The specific name of the content topic used for filtering.
- `encoding`: The message serialization/encoding format, with [Protocol Buffers](https://protobuf.dev/) (`proto`) being the recommended choice.
For instance, if your dApp is called `SuperCrypto` and it allows users to receive notifications and send private messages, you can consider utilizing the following content topics:
For instance, if your dApp is called `SuperCrypto` and it allows users to receive notifications and send private messages, you can consider using the following content topics:
- `/supercrypto/1/notification/proto`
- `/supercrypto/1/private-message/proto`
:::info
While you can choose any encoding format for your `Content Topic`, we highly recommend using [Protocol Buffers](https://protobuf.dev/) (`proto`) because of its efficiency. Choosing a lightweight format ensures optimal performance of your dApp.
:::
While you can choose any encoding format for your `Content Topic`, we highly recommend using Protocol Buffers (`proto`) because of its efficiency. Choosing a lightweight format ensures optimal performance of your dApp.
:::
## Naming Considerations
When choosing a content topic, it is crucial to consider privacy implications. The `Filter` protocol discloses content topics to peers, and the `Store` protocol can link them with a light node, allowing nodes providing these services to access message content topics, posing potential privacy risks.
:::info
Waku is developing privacy-preserving features like [Anonymous Filter Subscription](https://rfc.vac.dev/spec/12/#future-work) for the `Filter` protocol and [Anonymous Query](https://rfc.vac.dev/spec/13/#future-work) for the `Store` protocol to hide content topics from potential adversaries.
:::
You can preserve the anonymity of individual identities by increasing [k-anonymity](https://www.privitar.com/blog/k-anonymity-an-introduction/), where k is proportional to the network size (number of subscribers). This involves using a single content topic across the entire application or specific features such as notifications or private messages, allowing multiple users to share it.
However, maintaining functionality with a single content topic can introduce complexity. We recommend switching functionality using the Protocol Buffer message format or the [Waku Message](/getting-started/concepts/protocols#waku-message) `meta` attribute. By doing so, applications can retain a high granularity and functionality while using a single content topic, preserving user privacy.

View File

@ -12,7 +12,7 @@ Once a connection is established, the node must actively seek out additional pee
## Predefined Nodes
Waku applications have the flexibility to embed bootstrap node addresses directly into their codebase. Developers can opt to utilize either the [predefined nodes by Status](https://github.com/waku-org/js-waku/blob/master/packages/core/src/lib/predefined_bootstrap_nodes.ts#L45) or [operate a node](/guides/sdks-and-nodes#operate-a-waku-node) per their preference.
Waku applications have the flexibility to embed bootstrap node addresses directly into their codebase. Developers can opt to use either the [predefined nodes by Status](https://github.com/waku-org/js-waku/blob/master/packages/core/src/lib/predefined_bootstrap_nodes.ts#L45) or [operate a node](/guides/sdks-and-nodes#operate-a-waku-node) per their preference.
#### Pros
@ -27,7 +27,7 @@ Waku applications have the flexibility to embed bootstrap node addresses directl
## [DNS Discovery](https://rfc.vac.dev/spec/31/)
Built upon the foundation of [EIP-1459: Node Discovery via DNS](https://eips.ethereum.org/EIPS/eip-1459), DNS Discovery allows for registering an `ENR` tree in the `TXT` field of a domain name. This innovative approach enables the storage of essential node connection details, including IP, port, and multiaddr, utilizing the standardized [ENR format](https://rfc.vac.dev/spec/31/).
Built upon the foundation of [EIP-1459: Node Discovery via DNS](https://eips.ethereum.org/EIPS/eip-1459), DNS Discovery allows for registering an `ENR` tree in the `TXT` field of a domain name. This innovative approach enables the storage of essential node connection details, including IP, port, and multiaddr, using the standardized [ENR format](https://rfc.vac.dev/spec/31/).
This bootstrapping method allows anyone to register and publish a domain name for the network, fostering increased decentralization.
@ -44,7 +44,7 @@ This bootstrapping method allows anyone to register and publish a domain name fo
## [Discv5](https://rfc.vac.dev/spec/33/)
`Discv5` is a decentralized and efficient peer discovery method for the Waku network. It utilizes a [Distributed Hash Table (DHT)](https://en.wikipedia.org/wiki/Distributed_hash_table) for storing `ENR` records, providing resistance to censorship. `Discv5` offers a global view of participating nodes, enabling random sampling for load distribution. It uses bootstrap nodes as an entry point to the network, providing randomized sets of nodes for mesh expansion. This enhances resilience, load balancing, and security in the Waku network.
`Discv5` is a decentralized and efficient peer discovery method for the Waku network. It uses a [Distributed Hash Table (DHT)](https://en.wikipedia.org/wiki/Distributed_hash_table) for storing `ENR` records, providing resistance to censorship. `Discv5` offers a global view of participating nodes, enabling random sampling for load distribution. It uses bootstrap nodes as an entry point to the network, providing randomized sets of nodes for mesh expansion. This enhances resilience, load balancing, and security in the Waku network.
#### Pros

View File

@ -6,7 +6,7 @@ Transports help move data packets across a network by establishing connections b
Waku is a transport-agnostic framework that allows developers to choose and support multiple protocols according to their requirements. For Waku nodes, the following transports are recommended:
- **TCP:** By default, Waku nodes utilize TCP for communication. Service nodes should employ TCP for listening to and connecting with other nodes.
- **TCP:** By default, Waku nodes use TCP for communication. Service nodes should employ TCP for listening to and connecting with other nodes.
- **Secure WebSocket:** In browser environments, secure WebSocket is used. Service nodes are encouraged to set up SSL certificates to enable incoming connections from browsers and serve them securely.
- Other protocols like [WebRTC](https://github.com/waku-org/js-waku/issues/20), [WebTransport](https://github.com/waku-org/js-waku/issues/697), and QUIC have been researched and studied for potential integration.

View File

@ -80,7 +80,7 @@ Publish/Subscribe (Pub/Sub) is a messaging pattern where publishers distribute m
### Pub/Sub Topic
A Pub/Sub topic serves as a routing mechanism for messages, with the default topic indicating a subscription to receive messages on that topic for relay purposes.
A Pub/Sub topic is a routing mechanism for messages, indicating a subscription to receive messages on that topic for relay purposes.
### Rate Limit Nullifiers