From 66aef1b1de15ec6addf251fb74c44a2bb708f3d9 Mon Sep 17 00:00:00 2001 From: LordGhostX <47832826+LordGhostX@users.noreply.github.com> Date: Tue, 5 Mar 2024 09:30:38 +0100 Subject: [PATCH 1/4] resolve docs issues for nwaku logs and idea board visibility (#174) --- docs/guides/getting-started.md | 10 +++++++--- docs/guides/nwaku/run-docker-compose.md | 8 +++++++- sidebars.js | 8 ++++++-- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/docs/guides/getting-started.md b/docs/guides/getting-started.md index e58fe86..c6cb372 100644 --- a/docs/guides/getting-started.md +++ b/docs/guides/getting-started.md @@ -16,8 +16,8 @@ The Waku Network is a decentralised, permissionless system where anyone can run | | Description | Documentation | | - | - | - | -| [nwaku](https://github.com/waku-org/nwaku) | Nim-based Waku implementation to run a standalone node and access the network (recommended) | [Run a Nwaku Node](/guides/nwaku/run-node) | -| [nwaku-compose](https://github.com/waku-org/nwaku-compose) | Pre-configured Docker Compose setup for running a RLN-enabled `nwaku` node with Grafana metrics dashboard | [Run Nwaku with Docker Compose](/guides/nwaku/run-docker-compose) | +| [nwaku](https://github.com/waku-org/nwaku) | Nim-based Waku implementation to run a standalone node and access the network | [Run a Nwaku Node](/guides/nwaku/run-node) | +| [nwaku-compose](https://github.com/waku-org/nwaku-compose) | Pre-configured Docker Compose setup for running a RLN-enabled `nwaku` node with Grafana metrics dashboard (recommended) | [Run Nwaku with Docker Compose](/guides/nwaku/run-docker-compose) | | [go-waku](https://github.com/waku-org/go-waku) | Golang-based Waku implementation to run a standalone node and access the network | COMING SOON | ## Integrate using SDKs @@ -46,4 +46,8 @@ Waku provides integrations tailored for mobile applications, enabling Waku to ru | | Description | Documentation | | - | - | - | | [REST API](https://waku-org.github.io/waku-rest-api/) | REST API interface provided by `nwaku` and `go-waku` to interact with the Waku Network | [Waku Node REST API Reference](https://waku-org.github.io/waku-rest-api/) | -| [@waku/create-app](https://www.npmjs.com/package/@waku/create-app) | Starter kit to bootstrap your next `@waku/sdk` project from various example templates | [Scaffold DApps Using @waku/create-app](/guides/js-waku/use-waku-create-app) | \ No newline at end of file +| [@waku/create-app](https://www.npmjs.com/package/@waku/create-app) | Starter kit to bootstrap your next `@waku/sdk` project from various example templates | [Scaffold DApps Using @waku/create-app](/guides/js-waku/use-waku-create-app) | + +:::tip +Check out the [Waku Idea Board](https://ideas.waku.org/) for creative project ideas and explore the limitless possibilities of the Waku protocol. +::: \ No newline at end of file diff --git a/docs/guides/nwaku/run-docker-compose.md b/docs/guides/nwaku/run-docker-compose.md index 3a52ce1..c8e242d 100644 --- a/docs/guides/nwaku/run-docker-compose.md +++ b/docs/guides/nwaku/run-docker-compose.md @@ -16,7 +16,7 @@ This guide provides detailed steps to configure, run, monitor, and interact with - [Git](https://git-scm.com/) or [GitHub Desktop](https://desktop.github.com/) - [Docker](https://docs.docker.com/engine/install/) and [Docker Compose](https://docs.docker.com/compose/install/) - [Ethereum Sepolia WebSocket Endpoint](https://github.com/waku-org/nwaku/blob/master/docs/tutorial/pre-requisites-of-running-on-chain-spam-protected-chat2.md#3-access-a-node-on-the-sepolia-testnet-using-infura) -- [Wallet with Sepolia Ethereum](https://github.com/waku-org/nwaku/blob/master/docs/tutorial/pre-requisites-of-running-on-chain-spam-protected-chat2.md#2-obtain-sepolia-eth-from-faucet) (less than 0.1 Sepolia ETH) +- [Wallet with Sepolia Ethereum](https://github.com/waku-org/nwaku/blob/master/docs/tutorial/pre-requisites-of-running-on-chain-spam-protected-chat2.md#2-obtain-sepolia-eth-from-faucet) (less than 0.01 Sepolia ETH) - A password to protect your RLN membership ## Clone the repository @@ -61,6 +61,12 @@ Start all processes: `nwaku` node, database for storing messages, and Grafana fo docker-compose up -d ``` +View the logs of the node to confirm that it is running correctly: + +```shell +docker-compose logs -f nwaku +``` + ## Interact with the node Visit to view your node metrics in real time. diff --git a/sidebars.js b/sidebars.js index 5be6b78..08238ce 100644 --- a/sidebars.js +++ b/sidebars.js @@ -12,9 +12,9 @@ const sidebars = { id: "guides/nwaku/run-node", }, items: [ - "guides/nwaku/build-source", - "guides/nwaku/run-docker", "guides/nwaku/run-docker-compose", + "guides/nwaku/run-docker", + "guides/nwaku/build-source", "guides/nwaku/configure-discovery", "guides/nwaku/configure-nwaku", "guides/nwaku/config-methods", @@ -84,6 +84,10 @@ const sidebars = { "learn/research", "learn/waku-vs-libp2p", "learn/glossary", + { + type: 'html', + value: 'Waku Idea Board', + }, ], research: [ { From 150e5b1f0982d7be721892817d65323e6475d0a5 Mon Sep 17 00:00:00 2001 From: LordGhostX <47832826+LordGhostX@users.noreply.github.com> Date: Tue, 5 Mar 2024 12:24:23 +0100 Subject: [PATCH 2/4] add FAQ sections for nwaku and js-waku docs (#176) --- .cspell.json | 1 + docs/guides/js-waku/faq.md | 51 +++++++++++++++++++++++ docs/guides/js-waku/light-send-receive.md | 4 +- docs/guides/js-waku/message-encryption.md | 8 +--- docs/guides/js-waku/run-waku-nodejs.md | 2 +- docs/guides/js-waku/use-waku-react.md | 2 +- docs/guides/nwaku/configure-nwaku.md | 2 +- docs/guides/nwaku/faq.md | 39 +++++++++++++++++ docs/guides/nwaku/run-node.md | 2 +- package.json | 2 +- sidebars.js | 4 +- yarn.lock | 40 +++++++++--------- 12 files changed, 123 insertions(+), 34 deletions(-) create mode 100644 docs/guides/js-waku/faq.md create mode 100644 docs/guides/nwaku/faq.md diff --git a/.cspell.json b/.cspell.json index 62b8370..e9e5dc6 100644 --- a/.cspell.json +++ b/.cspell.json @@ -79,6 +79,7 @@ "txid", "baarerstrasse", "FDPIC", + "IPFS", ], "flagWords": [], "ignorePaths": [ diff --git a/docs/guides/js-waku/faq.md b/docs/guides/js-waku/faq.md new file mode 100644 index 0000000..8a5390a --- /dev/null +++ b/docs/guides/js-waku/faq.md @@ -0,0 +1,51 @@ +--- +title: JavaScript SDK FAQ +hide_table_of_contents: true +sidebar_label: Frequently Asked Questions +--- + +import { AccordionItem } from '@site/src/components/mdx' + + + You can add the JavaScript SDK to your project using NPM, Yarn, or a CDN. Check out the installation guide to get started. + + + + Protocol Buffers ensure consistent formatting, interoperability, and backward compatibility for your application's messages, with a smaller payload size than JSON. Check out the installation guide and Protobuf documentation to learn more. + + + + Check out the Retrieve Messages Using Store Protocol guide to learn how to retrieve and filter historical messages using the Store protocol. + + + + When creating your message encoder, you can configure the ephemeral option to prevent Store peers from keeping your messages on the Waku Network. + + + + You can encrypt and decrypt your messages using symmetric, ECIES, and noise encryption methods. Check out the Encrypt, Decrypt, and Sign Your Messages guide to get started. + + + + Waku has a specialized SDK designed for building React applications. Check out the Build React DApps Using @waku/react guide for instructions on installation and usage. + + + + The JavaScript SDK has a default bootstrap method that can be configured with Static Peers and DNS Discovery. Check out the Bootstrap Nodes and Discover Peers guide for setting up peer discovery for your node. + + + + Though the JavaScript SDK isn't directly usable in NodeJS due to certain limitations, we recommend running nwaku in a Docker container and consuming its REST API in a NodeJS application. + + + + Check out the Debug Your Waku DApp and WebSocket guide to discover how to use debug logs to troubleshoot your Waku DApp and resolve connection issues with nwaku WebSockets. + + + + We recommend regularly pinging peers to check for an active connection and reinitiating the subscription when it disconnects. Check out the Manage Your Filter Subscriptions guide for a detailed explanation and step-by-step instructions. + + + + 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 IPFS and then sharing the corresponding URL via Waku. + \ No newline at end of file diff --git a/docs/guides/js-waku/light-send-receive.md b/docs/guides/js-waku/light-send-receive.md index fd52bc3..02bfa67 100644 --- a/docs/guides/js-waku/light-send-receive.md +++ b/docs/guides/js-waku/light-send-receive.md @@ -62,12 +62,12 @@ const encoder = createEncoder({ contentTopic }); const decoder = createDecoder(contentTopic); ``` -The `ephemeral` option allows you to specify whether messages should not be stored by [Store peers](/guides/js-waku/store-retrieve-messages): +The `ephemeral` option allows you to specify whether messages should **NOT** be stored by [Store peers](/guides/js-waku/store-retrieve-messages): ```js const encoder = createEncoder({ contentTopic: contentTopic, // message content topic - ephemeral: true, // allows messages not be stored on the network + ephemeral: true, // allows messages NOT be stored on the network }); ``` diff --git a/docs/guides/js-waku/message-encryption.md b/docs/guides/js-waku/message-encryption.md index 88a3c37..0a1706a 100644 --- a/docs/guides/js-waku/message-encryption.md +++ b/docs/guides/js-waku/message-encryption.md @@ -171,15 +171,11 @@ await subscription.subscribe([ECIESEncoder], callback); await node.lightPush.send(ECIESEncoder, { payload }); ``` -You can extract the `signature` and its public key (`signaturePublicKey`) from the [DecodedMessage](https://js.waku.org/classes/_waku_message_encryption.DecodedMessage.html) and compare it with the expected public key to verify the message origin: - - - +You can extract the `signature` and its public key (`signaturePublicKey`) from the [DecodedMessage](https://js.waku.org/classes/_waku_message_encryption.DecodedMessage.html) and compare it with the expected public key or use the `verifySignature()` function to verify the message origin: ```js title="Bob (receiver) client" import { generatePrivateKey } from "@waku/message-encryption"; import { createEncoder } from "@waku/message-encryption/symmetric"; -import { equals } from "uint8arrays/equals"; // Generate a random private key for signing messages // For this example, we'll call the receiver of the message Bob @@ -201,7 +197,7 @@ const callback = (wakuMessage) => { // Verify the message was actually signed and sent by Alice // Alice's public key can be gotten from broadcasting or out-of-band methods - if (equals(signaturePublicKey, alicePublicKey)) { + if (wakuMessage.verifySignature(alicePublicKey)) { console.log("This message was signed by Alice"); } else { console.log("This message was NOT signed by Alice"); diff --git a/docs/guides/js-waku/run-waku-nodejs.md b/docs/guides/js-waku/run-waku-nodejs.md index 0346974..cf995df 100644 --- a/docs/guides/js-waku/run-waku-nodejs.md +++ b/docs/guides/js-waku/run-waku-nodejs.md @@ -27,7 +27,7 @@ Certain features in `@waku/sdk` are tailored for browsers and might not translat ## Recommendations -Before using `@waku/sdk` in a NodeJS environment, take into account these limitations. For a more optimised solution, we recommend [running nwaku in a Docker container](/guides/nwaku/run-docker) and consuming its [REST API](https://waku-org.github.io/waku-rest-api/). +Before using `@waku/sdk` in a NodeJS environment, take into account these limitations. For a more optimised solution, we recommend [running nwaku in a Docker container](/guides/nwaku/run-docker-compose) and consuming its [REST API](https://waku-org.github.io/waku-rest-api/). ## Future developments diff --git a/docs/guides/js-waku/use-waku-react.md b/docs/guides/js-waku/use-waku-react.md index 2aa50b6..163e14e 100644 --- a/docs/guides/js-waku/use-waku-react.md +++ b/docs/guides/js-waku/use-waku-react.md @@ -294,5 +294,5 @@ To explore the available Store query options, have a look at the [Retrieve Messa ::: :::tip -You have successfully integrated `@waku/sdk` into a React application using the `@waku/react` package. Have a look at the [web-chat](https://github.com/waku-org/js-waku-examples/tree/master/examples/web-chat) example for a working demo. +You have successfully integrated `@waku/sdk` into a React application using the `@waku/react` package. Have a look at the [web-chat](https://github.com/waku-org/js-waku-examples/tree/master/examples/web-chat) example for a working demo and the [Building a Tic-Tac-Toe Game with Waku](https://blog.waku.org/tictactoe-tutorial) tutorial to learn more. ::: \ No newline at end of file diff --git a/docs/guides/nwaku/configure-nwaku.md b/docs/guides/nwaku/configure-nwaku.md index e7b51c7..703bb55 100644 --- a/docs/guides/nwaku/configure-nwaku.md +++ b/docs/guides/nwaku/configure-nwaku.md @@ -161,7 +161,7 @@ sudo certbot certonly -d ## Configure REST API server -Nwaku provides a REST API to interact with the node and Waku Network. To enable the REST API, use the following configuration options: +Nwaku provides a [REST API](https://waku-org.github.io/waku-rest-api/) to interact with the node and Waku Network. To enable the REST API, use the following configuration options: - `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`. diff --git a/docs/guides/nwaku/faq.md b/docs/guides/nwaku/faq.md new file mode 100644 index 0000000..2544bbe --- /dev/null +++ b/docs/guides/nwaku/faq.md @@ -0,0 +1,39 @@ +--- +title: Nwaku FAQ +hide_table_of_contents: true +sidebar_label: Frequently Asked Questions +--- + +import { AccordionItem } from '@site/src/components/mdx' + + + Check out the Run Nwaku with Docker Compose guide to learn the simplest and fastest way to run a node. You can also check the comprehensive Run a Nwaku Node guide to explore other options like downloading binaries and building from source. + + + + We recommend running a nwaku node with at least 2GB of RAM, especially if WSS is enabled. If running just a Relay node, 0.5GB of RAM is sufficient. + + + + You can interact with a running nwaku node using the REST API interface or the JavaScript Waku SDK. + + + + To check your node logs in Docker, use the command: "docker-compose logs -f nwaku" + + + + You can configure Nwaku nodes using command line options and flags, environment variables, and TOML configuration files. Check out the Node Configuration Methods guide to understand their usage and priority. + + + + Check out the Node Configuration Options guide for available node configuration options, their default values and descriptions. For examples of common configuration use cases, visit the Node Configuration Examples guide. + + + + You can configure peer discovery for nwaku nodes through options like Static Peers, DNS Discovery, DiscV5, and Peer Exchange. Check out the Configure Peer Discovery guide for setting up your node. + + + + The node listening and ENR addresses can be found through the node's logs and REST API. Check out the Find the node addresses section to understand how to locate your node addresses. + \ No newline at end of file diff --git a/docs/guides/nwaku/run-node.md b/docs/guides/nwaku/run-node.md index ae6d846..d3154d5 100644 --- a/docs/guides/nwaku/run-node.md +++ b/docs/guides/nwaku/run-node.md @@ -8,7 +8,7 @@ Nwaku is a lightweight and robust Nim client for running a Waku node, equipped w This guide provides detailed steps to download, build, configure, and connect a `nwaku` node to the Waku Network. It also includes interacting with the node and finding its addresses. :::info -We recommend running a `nwaku` node with at least 2GB of RAM, especially if you have `WSS` enabled. If running just a `Relay` node, 0.5GB of RAM is sufficient. +We recommend running a `nwaku` node with at least 2GB of RAM, especially if `WSS` is enabled. If running just a `Relay` node, 0.5GB of RAM is sufficient. ::: ## Get the node binary diff --git a/package.json b/package.json index 099c942..a26db45 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ }, "dependencies": { "@acid-info/docusaurus-fathom": "^1.0.0-alpha.111", - "@acid-info/logos-docusaurus-preset": "^1.0.0-alpha.122", + "@acid-info/logos-docusaurus-preset": "^1.0.0-alpha.143", "@docusaurus/core": "^2.4.1", "@docusaurus/preset-classic": "^2.4.1", "@docusaurus/theme-mermaid": "^2.4.1", diff --git a/sidebars.js b/sidebars.js index 08238ce..7cb2b20 100644 --- a/sidebars.js +++ b/sidebars.js @@ -16,9 +16,10 @@ const sidebars = { "guides/nwaku/run-docker", "guides/nwaku/build-source", "guides/nwaku/configure-discovery", - "guides/nwaku/configure-nwaku", "guides/nwaku/config-methods", "guides/nwaku/config-options", + "guides/nwaku/configure-nwaku", + "guides/nwaku/faq", { type: 'html', value: 'REST API Reference', @@ -42,6 +43,7 @@ const sidebars = { "guides/js-waku/run-waku-nodejs", "guides/js-waku/debug-waku-dapp", "guides/js-waku/manage-filter", + "guides/js-waku/faq", { type: 'html', value: '@waku/sdk Examples', diff --git a/yarn.lock b/yarn.lock index 12cf1b7..3c8c64a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -19,10 +19,10 @@ satori "^0.10.1" sharp "^0.32.1" -"@acid-info/docusaurus-og@^1.0.0-alpha.111": - version "1.0.0-alpha.111" - resolved "https://registry.yarnpkg.com/@acid-info/docusaurus-og/-/docusaurus-og-1.0.0-alpha.111.tgz#0a5f96512f5ad1bf22d632009fe5902b184fb53c" - integrity sha512-LrKfnxdG6P0/YtHP2ugz3QMhFCgavfnWLjpuvdlAUA1CWXBDVX33UGvKh4Zt7m5j3tLtpdlEt3Xa3IMgBUJAUg== +"@acid-info/docusaurus-og@^1.0.0-alpha.131": + version "1.0.0-alpha.131" + resolved "https://registry.yarnpkg.com/@acid-info/docusaurus-og/-/docusaurus-og-1.0.0-alpha.131.tgz#316a736455c3c0e542b32ad63f1b34714588b67b" + integrity sha512-a0EbvwffHdShC8+bDzLA3VqPW71n2NPy01t0c2Tm8lMu1Xo/JOUEAr23qcuRETfOPbiHWY2DJC/3AGWOffc59g== dependencies: "@docusaurus/core" "^2.4.1" "@docusaurus/module-type-aliases" "^2.4.1" @@ -36,14 +36,14 @@ satori "^0.10.1" sharp "^0.32.1" -"@acid-info/logos-docusaurus-preset@^1.0.0-alpha.122": - version "1.0.0-alpha.122" - resolved "https://registry.yarnpkg.com/@acid-info/logos-docusaurus-preset/-/logos-docusaurus-preset-1.0.0-alpha.122.tgz#17413393d9c7a77db5faf4b9333a8760446feebc" - integrity sha512-evBg2XFiU8/F8B78mIA/Ii1oP0zSKZ2qn1eMgx+4t8fyDr0w8VyqCBSInWmWjYkkzOrAEQWDrL0ZxNp/Ct47KA== +"@acid-info/logos-docusaurus-preset@^1.0.0-alpha.143": + version "1.0.0-alpha.143" + resolved "https://registry.yarnpkg.com/@acid-info/logos-docusaurus-preset/-/logos-docusaurus-preset-1.0.0-alpha.143.tgz#492a2765da4cf41ec94c0283cba1f722f03012c9" + integrity sha512-LsTurD30hmgdylR3scOPvkBck0H9mCOG8JSmKSzFBrHtqeNKgImcZh13HiDFFAOwv8nWk7vci+cmSfaXXd8AqQ== dependencies: - "@acid-info/docusaurus-og" "^1.0.0-alpha.111" + "@acid-info/docusaurus-og" "^1.0.0-alpha.131" "@acid-info/logos-docusaurus-search-local" "^1.0.0-alpha.111" - "@acid-info/logos-docusaurus-theme" "^1.0.0-alpha.122" + "@acid-info/logos-docusaurus-theme" "^1.0.0-alpha.143" "@docusaurus/core" "^2.4.1" "@docusaurus/module-type-aliases" "^2.4.1" "@docusaurus/preset-classic" "^2.4.1" @@ -71,13 +71,13 @@ "@easyops-cn/docusaurus-search-local" "^0.33.6" lodash "^4.17.21" -"@acid-info/logos-docusaurus-theme@^1.0.0-alpha.122": - version "1.0.0-alpha.122" - resolved "https://registry.yarnpkg.com/@acid-info/logos-docusaurus-theme/-/logos-docusaurus-theme-1.0.0-alpha.122.tgz#4da98bf673acb11ebcaad685d8b1cab5f634b26f" - integrity sha512-0GKEb94cObPzgfuH21X7MNro7j/zSisI+/7710VMOyidoI9W2OSfe7KwCuIQbW7Y9N+oyw+2YLYKu69RfiLbZg== +"@acid-info/logos-docusaurus-theme@^1.0.0-alpha.143": + version "1.0.0-alpha.143" + resolved "https://registry.yarnpkg.com/@acid-info/logos-docusaurus-theme/-/logos-docusaurus-theme-1.0.0-alpha.143.tgz#5f93b13f623fcf789498aa218675ff1ce3196d67" + integrity sha512-KOX65g9/bjsaCmz1jThPCUHcyaQBUT0dgViw5TJXCYA6bmaVIZujlNQsJpffH3n6bJCxmgjb3sW1eonwvsgngQ== dependencies: - "@acid-info/docusaurus-og" "^1.0.0-alpha.111" - "@acid-info/lsd-react" "^0.1.0-alpha.21" + "@acid-info/docusaurus-og" "^1.0.0-alpha.131" + "@acid-info/lsd-react" "^0.1.0-beta.1" "@docusaurus/core" "^2.4.1" "@docusaurus/mdx-loader" "^2.4.1" "@docusaurus/module-type-aliases" "^2.4.1" @@ -118,10 +118,10 @@ three-stdlib "^2.23.4" utility-types "^3.10.0" -"@acid-info/lsd-react@^0.1.0-alpha.21": - version "0.1.0-alpha.21" - resolved "https://registry.yarnpkg.com/@acid-info/lsd-react/-/lsd-react-0.1.0-alpha.21.tgz#3a6a6862bc492521197ef354795f1b1fe9bceffe" - integrity sha512-zgec9ezT469HBB/rKFzqbgEFiH59Raf8BkWE4XWP4mS9qc2ZQwwYy59TjbJKN5kgwWVnVX/cY1Ryvj9uFcnO8g== +"@acid-info/lsd-react@^0.1.0-beta.1": + version "0.1.0-beta.3" + resolved "https://registry.yarnpkg.com/@acid-info/lsd-react/-/lsd-react-0.1.0-beta.3.tgz#2f211b647d68d6fce163afb60989494f555354be" + integrity sha512-lD/x1BZyYdQCUmtMH3YpKSInEO73wRFRxUM6lzbz5UDDUnPfDpj/g4mQrXKL1keV3ujGJbMLaCC36cZT8VgNNw== dependencies: "@datepicker-react/hooks" "^2.8.4" "@emotion/react" "^11.10.5" From c01ee1ee10763f5545186be4bc1c6cca1f1e0da3 Mon Sep 17 00:00:00 2001 From: LordGhostX <47832826+LordGhostX@users.noreply.github.com> Date: Fri, 8 Mar 2024 05:01:03 +0100 Subject: [PATCH 3/4] add rules of engagement article (#178) --- docs/rules-of-engagement.md | 76 +++++++++++++++++++++++++++++++++++++ docusaurus.config.js | 4 ++ 2 files changed, 80 insertions(+) create mode 100644 docs/rules-of-engagement.md diff --git a/docs/rules-of-engagement.md b/docs/rules-of-engagement.md new file mode 100644 index 0000000..51ac8ae --- /dev/null +++ b/docs/rules-of-engagement.md @@ -0,0 +1,76 @@ +--- +displayed_sidebar: null +sidebar_class_name: hidden +pagination_prev: null +pagination_next: null +--- + +# Rules of Engagement + +Waku is a nascent technology and the Waku community is still growing. Hence, the Waku team is keen to work closely with projects to help leverage Waku technology to drive the success of their own applications. + +We describe below the expected flow for working with Waku and some rules of engagement to set expectations for project teams interacting with the Waku team. + +## 1. Initial discussion + +We encourage the initial discussion to happen over a video call. However, in-person event or online discussions are also an option. + +During this initial interaction, the project team should present their product and the needs they have in relation to peer-to-peer communication and real time interaction. + +The Waku team will provide an overview of Waku and point to specific protocol and software that should help fulfil such needs. + +Benefits and caveats are highlighted and further documentation and examples will be provided. + +## 2. Solution design + +Projects should review Waku documentations and libraries in their own time; start building a PoC using Waku. + +Projects should start designing over Waku and come up with skeleton design or user flows about specific friction points or complex area (e.g. user experience, scaling). + +Project should appoint one or two Waku SME (Subject Matter Expert) to drive most discussions with Waku team to start acquire expertise on Waku behaviour. + +Project's Waku SMEs should present unresolved design issues to Waku team. + +The Waku team will then review and provide skeleton design solutions on how to overcome said unresolved or complex issues. + +## 3. Commitment + +The project should finalise a design, solution or protocol they will build using Waku. + +If they wish to, they can present this solution to the Waku team to get feedback and identify technical gaps. + +The Waku team can provide feedback, highlight potential caveats, and communicate on delivery timeline for gaps, if any. + +:::note +While the Waku team can provide feedback or even design potential solution on how Waku could be integrated in an application. +It is the responsibility of the project team to understand the potential caveats and limitations that may incur with such a design. + +The Waku team can provide options, but it is up to the project team to decide on the final solution. +::: + +## 4. Building + +The project then start building their MVP using Waku. The Waku team can provide support regarding API usage, bugs encountered, documentation gaps. + +Waku team will use feedback raised by project to improve APIs, fix bugs and enhance documentation. Waku team continues R&D to deliver any committed technical gaps. + +Project delivers their MVP. + +:::note +The Waku team is keen to help any usage of Waku library. Please note that code snippets are necessary for preliminary investigations of issues. + +Sometimes, a code snippet is not enough; in this case, a [minimal reproduction repo](https://minimum-reproduction.wtf/) is necessary to allow us to do further investigation. +If the project is open-source, then the Waku team might try to further investigate using it, as long as the reproduction steps are easy. + +If no code is provided to help with the investigation, then there is nothing the Waku team can do. + +For any unresolved issue, the project must open an issue on the related GitHub repository under the [waku-org](https://github.com/waku-org) organisation. +::: + +# 5. Ongoing relation + +Once the project application is live, the Waku team is keen to maintain regular contact. This can include discussion around performance, bugs found by users, etc. + +The Waku team is keen to regularly present new and upcoming development to project team, highlight items that are particularly relevant. + +If a project wishes to take onboard any new Waku protocol, or decide to extend their product with a new functionality using Waku, the circle can resume from [step 1](#1-initial-discussion). \ No newline at end of file diff --git a/docusaurus.config.js b/docusaurus.config.js index 4ced973..5070f1d 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -173,6 +173,10 @@ const config = { href: '/privacy-policy', label: 'Privacy Policy', }, + { + href: '/rules-of-engagement', + label: 'Rules of Engagement', + }, ], }, ], From cfa2c623e208135a68db7d1c4e6d88a1008f1241 Mon Sep 17 00:00:00 2001 From: Sasha <118575614+weboko@users.noreply.github.com> Date: Fri, 8 Mar 2024 05:06:21 +0100 Subject: [PATCH 4/4] chore: update doc for setting static peers (#179) --- docs/guides/js-waku/configure-discovery.md | 43 +++------------------- docs/guides/js-waku/light-send-receive.md | 6 +-- docs/guides/js-waku/message-encryption.md | 2 +- 3 files changed, 9 insertions(+), 42 deletions(-) diff --git a/docs/guides/js-waku/configure-discovery.md b/docs/guides/js-waku/configure-discovery.md index 684bf45..bc060c6 100644 --- a/docs/guides/js-waku/configure-discovery.md +++ b/docs/guides/js-waku/configure-discovery.md @@ -26,43 +26,14 @@ const node = await createLightNode({ defaultBootstrap: true }); ## Configure static peers -To bootstrap a node using [static peers](/learn/concepts/static-peers), first install the `@libp2p/bootstrap` package: - -```mdx-code-block -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; -``` - - - - -```shell -npm install @libp2p/bootstrap -``` - - - - -```shell -yarn add @libp2p/bootstrap -``` - - - - -Then, use the `bootstrap()` function to provide a list of `multiaddr` to bootstrap the node: +To set [static peers](/learn/concepts/static-peers), a list of `multiaddr` to bootstrap the node should be passed to the `bootstrapPeers` parameter of the `createLightNode()` function: ```js import { createLightNode } from "@waku/sdk"; -import { bootstrap } from "@libp2p/bootstrap"; // Bootstrap node using static peers const node = await createLightNode({ - libp2p: { - peerDiscovery: [ - bootstrap({ list: ["[PEER MULTIADDR]"] }), - ], - }, + bootstrapPeers: ["[PEER MULTIADDR]"], }); ``` @@ -77,11 +48,7 @@ const peers = [ // Bootstrap node using the static peers const node = await createLightNode({ - libp2p: { - peerDiscovery: [ - bootstrap({ list: peers }), - ], - }, + bootstrapPeers: peers, }); ``` @@ -179,11 +146,11 @@ const NODE_REQUIREMENTS = { filter: 3, }; -// Bootstrap node using DNS Discovery +// Bootstrap node using DNS Discovery and static peers const node = await createLightNode({ libp2p: { + bootstrapPeers: peers, peerDiscovery: [ - bootstrap({ list: peers }), wakuDnsDiscovery( [enrTree["PROD"]], NODE_REQUIREMENTS, diff --git a/docs/guides/js-waku/light-send-receive.md b/docs/guides/js-waku/light-send-receive.md index 02bfa67..ae1ce5e 100644 --- a/docs/guides/js-waku/light-send-receive.md +++ b/docs/guides/js-waku/light-send-receive.md @@ -21,7 +21,7 @@ await node.start(); ``` :::info -When the `defaultBootstrap` option is set to `true`, your node will be bootstrapped using the [default bootstrap method](/guides/js-waku/configure-discovery#default-bootstrap-method). Have a look at the [Bootstrap Nodes and Discover Peers](/guides/js-waku/configure-discovery) guide to learn more methods to bootstrap nodes. +When the `defaultBootstrap` parameter is set to `true`, your node will be bootstrapped using the [default bootstrap method](/guides/js-waku/configure-discovery#default-bootstrap-method). Have a look at the [Bootstrap Nodes and Discover Peers](/guides/js-waku/configure-discovery) guide to learn more methods to bootstrap nodes. ::: ## Connect to remote peers @@ -35,7 +35,7 @@ import { waitForRemotePeer } from "@waku/sdk"; await waitForRemotePeer(node); ``` -The `protocols` option allows you to specify the [protocols](/learn/concepts/protocols) that the remote peers should have enabled: +The `protocols` parameter allows you to specify the [protocols](/learn/concepts/protocols) that the remote peers should have enabled: ```js import { waitForRemotePeer, Protocols } from "@waku/sdk"; @@ -62,7 +62,7 @@ const encoder = createEncoder({ contentTopic }); const decoder = createDecoder(contentTopic); ``` -The `ephemeral` option allows you to specify whether messages should **NOT** be stored by [Store peers](/guides/js-waku/store-retrieve-messages): +The `ephemeral` parameter allows you to specify whether messages should **NOT** be stored by [Store peers](/guides/js-waku/store-retrieve-messages): ```js const encoder = createEncoder({ diff --git a/docs/guides/js-waku/message-encryption.md b/docs/guides/js-waku/message-encryption.md index 0a1706a..d6a45a2 100644 --- a/docs/guides/js-waku/message-encryption.md +++ b/docs/guides/js-waku/message-encryption.md @@ -136,7 +136,7 @@ Message signing helps in proving the authenticity of received messages. By attac Signing messages is only possible when encrypted, but if your application does not require encryption, you can generate a symmetric key through hardcoded or deterministic methods using information available to all users. ::: -The `sigPrivKey` option allows the `Symmetric` and `ECIES` message `encoders` to sign the message before encryption using an `ECDSA` private key: +The `sigPrivKey` parameter allows the `Symmetric` and `ECIES` message `encoders` to sign the message before encryption using an `ECDSA` private key: ```js title="Alice (sender) client" import { generatePrivateKey, getPublicKey } from "@waku/message-encryption";