add general FAQ (#189)

This commit is contained in:
LordGhostX 2024-04-22 17:19:26 +01:00 committed by GitHub
parent d54c569600
commit ff5464b7d3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 150 additions and 107 deletions

View File

@ -20,11 +20,11 @@ sequenceDiagram
D ->> E: HistoryResponse(msg1, ...) (6)
```
The Pub/Sub topic `pubtopic1` serves as a means of routing messages (the network employs a default Pub/Sub topic) and indicates that it is subscribed to messages on that topic for a relay. Node D serves as a `Store` and is responsible for persisting messages.
The Pub/Sub topic `pubtopic1` serves as a means of routing messages (the network employs a default Pub/Sub topic) and indicates that it is subscribed to messages on that topic for a relay. Node D serves as a `Store` and is responsible for storing messages.
1. Node A creates a WakuMessage `msg1` with [Content Topic](/learn/concepts/content-topics) `contentTopic1`.
2. Node F requests to get messages filtered by Pub/Sub topic `pubtopic1` and Content Topic `contentTopic1`. Node D subscribes F to this filter and will forward messages that match that filter in the future.
3. Node A publishes `msg1` on `pubtopic1`. The message is sent from Node A to Node B and then forwarded to Node D.
4. Node D, upon receiving `msg1`, stores the message for future retrieval by other nodes and forwards it to Node C.
5. Node D also pushes `msg1` to Node F, informing it about the arrival of a new message.
6. At a later time, Node E comes online and requests messages matching `pubtopic1` and `contentTopic1` from Node D. Node D responds with `msg1` and potentially other messages that match the query.
6. At a later time, Node E comes online and requests messages matching `pubtopic1` and `contentTopic1` from Node D. Node D responds with `msg1` and potentially other messages that match the query.

View File

@ -18,7 +18,7 @@ import { AccordionItem } from '@site/src/components/mdx'
Check out the <a href="/guides/js-waku/store-retrieve-messages">Retrieve Messages Using Store Protocol</a> guide to learn how to retrieve and filter historical messages using the <a href="/learn/concepts/protocols#store">Store protocol</a>.
</AccordionItem>
<AccordionItem title="How can I prevent Store peers from persisting my messages?">
<AccordionItem title="How can I prevent Store peers from storing my messages?">
When <a href="/guides/js-waku/light-send-receive#choose-a-content-topic">creating your message encoder</a>, you can configure the <strong>ephemeral</strong> option to prevent Store peers from keeping your messages on the Waku Network.
</AccordionItem>
@ -48,4 +48,4 @@ import { AccordionItem } from '@site/src/components/mdx'
<AccordionItem title="How can I send images and videos on the Waku Network?">
While it's possible to transmit media such as images as bytes on Waku, we recommend uploading your media to a CDN or a file system like <a href="https://ipfs.tech/">IPFS</a> and then sharing the corresponding URL via Waku.
</AccordionItem>
</AccordionItem>

View File

@ -43,12 +43,12 @@ You can use the domain name provided by your cloud provider to configure the dom
To enable message caching and serve them to network peers, enable the [Store protocol](/learn/concepts/protocols#store) using the following configuration options:
- `store`: Enables storing messages to serve them to peers (disabled by default).
- `store-message-retention-policy`: Retention policy of the store node (how long messages will be persisted). Three different retention policies are supported:
- Time retention policy: `time:<duration-in-seconds>` (e.g., `time:14400`)
- Capacity retention policy: `capacity:<messages-count>` (e.g, `capacity:25000`)
- `store-message-retention-policy`: Retention policy of the store node (how long messages will be stored). Three different retention policies are supported:
- Time retention policy: `time:<duration-in-seconds>` (e.g., `time:14400`)
- Capacity retention policy: `capacity:<messages-count>` (e.g, `capacity:25000`)
- Size retention policy: `size:<storage-in-MB/GB>` (e.g, `size:512MB` or `size:10GB`)
- Set this option to `none` to disable the retention policy. If you omit this option, it will default to `time:172800` (48 hours).
- `store-message-db-url`: Database connection URL for persisting messages in the [SQLAlchemy database URL format](https://docs.sqlalchemy.org/en/20/core/engines.html#database-urls). Setting this option to an empty string will instruct the node to use the fallback in-memory message store. If you omit this option, it will default to `sqlite://store.sqlite3`.
- Set this option to `none` to disable the retention policy. If you omit this option, it will default to `time:172800` (48 hours).
- `store-message-db-url`: Database connection URL for storing messages in the [SQLAlchemy database URL format](https://docs.sqlalchemy.org/en/20/core/engines.html#database-urls). Setting this option to an empty string will instruct the node to use the fallback in-memory message store. If you omit this option, it will default to `sqlite://store.sqlite3`.
```shell
./build/wakunode2 \
@ -72,7 +72,7 @@ You can configure `nwaku` as a `Store client` using the `storenode` option. This
./build/wakunode2 --storenode=[STORE PEER MULTIADDR]
```
For example, consider a `nwaku` node that does not persist messages but can query peers for historical messages:
For example, consider a `nwaku` node that does not store messages but can query peers for historical messages:
```shell
./build/wakunode2 --storenode=/dns4/node-01.ac-cn-hongkong-c.waku.sandbox.status.im/tcp/30303/p2p/16Uiu2HAmSJvSJphxRdbnigUV5bjRRZFBhTtWFTSyiKaQByCjwmpV
@ -157,6 +157,7 @@ You can use [Let's Encrypt](https://letsencrypt.org/) or [Certbot](https://certb
```shell
sudo certbot certonly -d <your.domain.name>
```
:::
## Configure REST API server
@ -166,7 +167,7 @@ Nwaku provides a [REST API](https://waku-org.github.io/waku-rest-api/) to intera
- `rest`: Enables the REST API server on the node (disabled by default).
- `rest-address` (optional): Listening address of the REST API server. If you omit this option, it will default to `127.0.0.1`.
- `rest-port` (optional): Listening port of the REST API server. If you omit this option, it will default to `8645`.
- `rest-relay-cache-capacity` (optional): Capacity of the Relay REST API message cache. If you omit this option, it will default to `30`.
- `rest-relay-cache-capacity` (optional): Capacity of the Relay REST API message cache. If you omit this option, it will default to `30`.
- `rest-admin` (optional): Enables access to REST admin API (disabled by default).
- `rest-private` (optional): Enables access to REST private API (disabled by default).

View File

@ -45,4 +45,4 @@ While the `Light Push` protocol acknowledges the receipt by the remote peer, it
- `payload` attribute containing the message data payload to be sent.
- `meta` attribute for conveying additional details to various protocols for application-specific processing.
- `timestamp` attribute signifying the time at which the message was generated by its sender.
- `ephemeral` attribute specifying whether the network should not persist the message.
- `ephemeral` attribute specifying whether the network should not store the message.

35
docs/learn/faq.md Normal file
View File

@ -0,0 +1,35 @@
---
title: Waku FAQ
hide_table_of_contents: true
sidebar_label: Frequently Asked Questions
---
import { AccordionItem } from '@site/src/components/mdx'
<AccordionItem title="How can I start building my application using Waku?">
Check out the <a href="/">Getting Started</a> guide to explore our numerous SDKs and learn how to run a Waku node.
</AccordionItem>
<AccordionItem title="Does messaging on Waku require a gas fee?">
No, sending and receiving messages on Waku involves no gas fee.
</AccordionItem>
<AccordionItem title="What encryption does Waku use?">
Waku uses libp2p noise encryption for node-to-node connections. However, no default encryption method is applied to the data sent over the network. This design choice enhances Waku's encryption flexibility, encouraging developers to use custom protocols or Waku message payload encryption methods freely.
</AccordionItem>
<AccordionItem title="Where does Waku store the messages?">
Waku's <a href="/learn/concepts/protocols#store">Store protocol</a> is designed to temporarily store messages within the network. However, Waku does not guarantee the message's availability and recommends using <a href="https://codex.storage/">Codex</a> for long-term storage.
</AccordionItem>
<AccordionItem title="Can Waku only be used for wallet-to-wallet messaging?">
No, Waku is flexible and imposes no specific rules on identifiers.
</AccordionItem>
<AccordionItem title="How does Waku differ from IPFS?">
Waku focuses on short, ephemeral, real-time time messages, while IPFS focuses on large, long-term data storage. Although there's an overlap between the two technologies, Waku does not currently support large data for privacy reasons.
</AccordionItem>
<AccordionItem title="What are Rate Limiting Nullifiers (RLN)?">
<a href="/learn/concepts/protocols#rln-relay">Rate Limiting Nullifier</a> is a zero-knowledge (ZK) protocol enabling spam protection in a decentralized network while preserving privacy. Each message must be accompanied by a ZK proof, which <a href="/learn/concepts/protocols#relay">Relay</a> nodes verify to ensure the publishers do not send more messages than they are allowed. The ZK proof does not leak any private information about message publishers - it only proves they are members of a set of users allowed to publish a certain number of messages per given time frame.
</AccordionItem>

View File

@ -2,101 +2,108 @@
/** @type {import("@docusaurus/plugin-content-docs").SidebarsConfig} */
const sidebars = {
guides: [
"guides/getting-started",
{
type: "category",
label: "Run a Nwaku Node",
link: {
type: "doc",
id: "guides/nwaku/run-node",
},
items: [
"guides/nwaku/run-docker-compose",
"guides/nwaku/run-docker",
"guides/nwaku/build-source",
"guides/nwaku/configure-discovery",
"guides/nwaku/config-methods",
"guides/nwaku/config-options",
"guides/nwaku/configure-nwaku",
"guides/nwaku/faq",
{
type: 'html',
value: '<a href="https://waku-org.github.io/waku-rest-api/" target="_blank" rel="noopener noreferrer" class="menu__link external-link">REST API Reference<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M11.1918 4H3.42848V2.85715H13.1428V12.5714H11.9999V4.80813L3.83254 12.9755L3.02441 12.1674L11.1918 4Z" fill="white"/></svg>',
},
]
},
{
type: "category",
label: "JavaScript Waku SDK",
link: {
type: "doc",
id: "guides/js-waku/index",
},
items: [
"guides/js-waku/light-send-receive",
"guides/js-waku/store-retrieve-messages",
"guides/js-waku/message-encryption",
"guides/js-waku/use-waku-react",
"guides/js-waku/use-waku-create-app",
"guides/js-waku/configure-discovery",
"guides/js-waku/run-waku-nodejs",
"guides/js-waku/debug-waku-dapp",
"guides/js-waku/manage-filter",
"guides/js-waku/faq",
{
type: 'html',
value: '<a href="https://examples.waku.org" target="_blank" rel="noopener noreferrer" class="menu__link external-link">@waku/sdk Examples<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M11.1918 4H3.42848V2.85715H13.1428V12.5714H11.9999V4.80813L3.83254 12.9755L3.02441 12.1674L11.1918 4Z" fill="white"/></svg>',
},
{
type: 'html',
value: '<a href="https://js.waku.org" target="_blank" rel="noopener noreferrer" class="menu__link external-link">API Reference<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M11.1918 4H3.42848V2.85715H13.1428V12.5714H11.9999V4.80813L3.83254 12.9755L3.02441 12.1674L11.1918 4Z" fill="white"/></svg>',
},
]
},
],
learn: [
"learn/waku-network",
{
type: "category",
label: "Concepts",
collapsed: false,
items: [
"learn/concepts/protocols",
"learn/concepts/content-topics",
"learn/concepts/network-domains",
"learn/concepts/transports",
{
type: "category",
label: "Peer Discovery",
link: {
type: "doc",
id: "learn/concepts/peer-discovery",
},
items: [
"learn/concepts/static-peers",
"learn/concepts/dns-discovery",
"learn/concepts/discv5",
"learn/concepts/peer-exchange",
]
},
]
},
"learn/security-features",
"learn/research",
"learn/waku-vs-libp2p",
"learn/glossary",
{
type: 'html',
value: '<a href="https://ideas.waku.org" target="_blank" rel="noopener noreferrer" class="menu__link external-link">Waku Idea Board<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M11.1918 4H3.42848V2.85715H13.1428V12.5714H11.9999V4.80813L3.83254 12.9755L3.02441 12.1674L11.1918 4Z" fill="white"/></svg>',
},
],
research: [
{
type: 'autogenerated',
dirName: 'research', // '.' means the current docs folder
},
],
guides: [
"guides/getting-started",
{
type: "category",
label: "Run a Nwaku Node",
collapsed: false,
link: {
type: "doc",
id: "guides/nwaku/run-node",
},
items: [
"guides/nwaku/run-docker-compose",
"guides/nwaku/run-docker",
"guides/nwaku/build-source",
"guides/nwaku/configure-discovery",
"guides/nwaku/config-methods",
"guides/nwaku/config-options",
"guides/nwaku/configure-nwaku",
"guides/nwaku/faq",
{
type: "html",
value:
'<a href="https://waku-org.github.io/waku-rest-api/" target="_blank" rel="noopener noreferrer" class="menu__link external-link">REST API Reference<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M11.1918 4H3.42848V2.85715H13.1428V12.5714H11.9999V4.80813L3.83254 12.9755L3.02441 12.1674L11.1918 4Z" fill="white"/></svg>',
},
],
},
{
type: "category",
label: "JavaScript Waku SDK",
collapsed: false,
link: {
type: "doc",
id: "guides/js-waku/index",
},
items: [
"guides/js-waku/light-send-receive",
"guides/js-waku/store-retrieve-messages",
"guides/js-waku/message-encryption",
"guides/js-waku/use-waku-react",
"guides/js-waku/use-waku-create-app",
"guides/js-waku/configure-discovery",
"guides/js-waku/run-waku-nodejs",
"guides/js-waku/debug-waku-dapp",
"guides/js-waku/manage-filter",
"guides/js-waku/faq",
{
type: "html",
value:
'<a href="https://examples.waku.org" target="_blank" rel="noopener noreferrer" class="menu__link external-link">@waku/sdk Examples<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M11.1918 4H3.42848V2.85715H13.1428V12.5714H11.9999V4.80813L3.83254 12.9755L3.02441 12.1674L11.1918 4Z" fill="white"/></svg>',
},
{
type: "html",
value:
'<a href="https://js.waku.org" target="_blank" rel="noopener noreferrer" class="menu__link external-link">API Reference<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M11.1918 4H3.42848V2.85715H13.1428V12.5714H11.9999V4.80813L3.83254 12.9755L3.02441 12.1674L11.1918 4Z" fill="white"/></svg>',
},
],
},
],
learn: [
"learn/waku-network",
{
type: "category",
label: "Concepts",
collapsed: false,
items: [
"learn/concepts/protocols",
"learn/concepts/content-topics",
"learn/concepts/network-domains",
"learn/concepts/transports",
{
type: "category",
label: "Peer Discovery",
link: {
type: "doc",
id: "learn/concepts/peer-discovery",
},
items: [
"learn/concepts/static-peers",
"learn/concepts/dns-discovery",
"learn/concepts/discv5",
"learn/concepts/peer-exchange",
],
},
],
},
"learn/security-features",
"learn/research",
"learn/waku-vs-libp2p",
"learn/glossary",
"learn/faq",
{
type: "html",
value:
'<a href="https://ideas.waku.org" target="_blank" rel="noopener noreferrer" class="menu__link external-link">Waku Idea Board<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M11.1918 4H3.42848V2.85715H13.1428V12.5714H11.9999V4.80813L3.83254 12.9755L3.02441 12.1674L11.1918 4Z" fill="white"/></svg>',
},
],
research: [
{
type: "autogenerated",
dirName: "research", // '.' means the current docs folder
},
],
};
module.exports = sidebars;