mirror of
https://github.com/waku-org/nwaku.git
synced 2025-01-13 08:14:43 +00:00
deploy: bd516788cb39132ccbf0a4dcf0880e9694beb233
This commit is contained in:
parent
cca6125490
commit
b08a92c7e6
@ -273,8 +273,8 @@ c. Run `nwaku`:
|
||||
--store:true \
|
||||
--persist-messages \
|
||||
--dns-discovery \
|
||||
--dns-discovery-url:"$WAKU_FLEET"
|
||||
--dns4-domain-name="$DOMAIN_NAME"
|
||||
--dns-discovery-url:"$WAKU_FLEET" \
|
||||
--dns4-domain-name:"$DOMAIN_NAME" \
|
||||
--discv5-discovery:true
|
||||
```
|
||||
|
||||
@ -287,7 +287,7 @@ c. Run `nwaku`:
|
||||
--store:true \
|
||||
--persist-messages \
|
||||
--dns-discovery \
|
||||
--dns-discovery-url:"$WAKU_FLEET"
|
||||
--dns-discovery-url:"$WAKU_FLEET" \
|
||||
--discv5-discovery:true
|
||||
```
|
||||
|
||||
|
@ -4,8 +4,9 @@ Nwaku can be configured to serve the adaptive needs of different operators.
|
||||
This page serves as an index of tutorials explaining how to configure your nwaku node for different use cases.
|
||||
|
||||
1. [Connect to other peers](./connect.md)
|
||||
1. [Configure a domain name](./configure-domain.md)
|
||||
1. [Use DNS discovery to connect to existing nodes](./configure-dns-disc.md)
|
||||
1. [Configure store protocol](./configure-store.md)
|
||||
1. [Generate and configure a node key](./configure-key.md)
|
||||
1. [Configure websocket transport](./configure-websocket.md)
|
||||
2. [Configure a domain name](./configure-domain.md)
|
||||
3. [Use DNS discovery to connect to existing nodes](./configure-dns-disc.md)
|
||||
4. [Configure store protocol](./configure-store.md)
|
||||
5. [Generate and configure a node key](./configure-key.md)
|
||||
6. [Configure websocket transport](./configure-websocket.md)
|
||||
7. [Run nwaku with rate limiting enabled](./run-with-rln.md)
|
97
docs/operators/how-to/run-with-rln.md
Normal file
97
docs/operators/how-to/run-with-rln.md
Normal file
@ -0,0 +1,97 @@
|
||||
# How to run spam prevention on your nwaku node (RLN)
|
||||
|
||||
This guide explains how to run a nwaku node with RLN (Rate Limiting Nullifier) enabled.
|
||||
|
||||
[RLN](https://rfc.vac.dev/spec/32/) is a protocol integrated into waku v2,
|
||||
which prevents spam-based attacks on the network.
|
||||
|
||||
For further background on the research for RLN tailored to waku, refer
|
||||
to [this](https://rfc.vac.dev/spec/17/) RFC.
|
||||
|
||||
Registering to the membership group has been left out for brevity.
|
||||
If you would like to register to the membership group and send messages with RLN,
|
||||
refer to the [on-chain chat2 tutorial](../../tutorial/onchain-rln-relay-chat2.md).
|
||||
|
||||
This guide specifically allows a node to participate in RLN testnet 2.
|
||||
You may alter the rln-specific arguments as required.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
1. Follow the [droplet quickstart](../droplet-quickstart.md) or the [build guide](./build.md) till the `make` command for the wakunode2 binary.
|
||||
|
||||
> Note: If you would like to run a nwaku node with RLN enabled within a docker container, skip ahead to step 2.
|
||||
|
||||
## 1. Update the build command
|
||||
|
||||
_Instead_ of just running -
|
||||
```bash
|
||||
make wakunode2
|
||||
```
|
||||
|
||||
Run the following command -
|
||||
```bash
|
||||
make wakunode2 RLN=true
|
||||
```
|
||||
|
||||
The `RLN=true` flag will enable compilation of the waku-rln-relay protocol
|
||||
into your wakunode2 binary.
|
||||
|
||||
## 2. Update the runtime arguments
|
||||
|
||||
Follow [Step 10](../droplet-quickstart.md#10-run-nwaku) of the [droplet quickstart](../droplet-quickstart.md) guide, while replacing the run command with -
|
||||
|
||||
```bash
|
||||
export GOERLI_WS_NODE_ADDRESS=<WS RPC URL to a Goerli Node>
|
||||
export RLN_RELAY_CONTRACT_ADDRESS="0x4252105670fe33d2947e8ead304969849e64f2a6" # Replace this with any compatible implementation
|
||||
$WAKUNODE_DIR/wakunode2 \
|
||||
--store:true \
|
||||
--persist-messages \
|
||||
--dns-discovery \
|
||||
--dns-discovery-url:"$WAKU_FLEET" \
|
||||
--discv5-discovery:true \
|
||||
--rln-relay:true \
|
||||
--rln-relay-dynamic:true \
|
||||
--rln-relay-eth-contract-address:"$RLN_RELAY_CONTRACT_ADDRESS" \
|
||||
--rln-relay-eth-client-address:"$GOERLI_WS_NODE_ADDRESS"
|
||||
```
|
||||
|
||||
OR
|
||||
|
||||
If you are running the nwaku node within docker, follow [Step 2](../docker-quickstart.md#step-2-run) while replacing the run command with -
|
||||
|
||||
```bash
|
||||
export WAKU_FLEET=<entree of the fleet>
|
||||
export GOERLI_WS_NODE_ADDRESS=<WS RPC URL to a Goerli Node>
|
||||
export RLN_RELAY_CONTRACT_ADDRESS="0x4252105670fe33d2947e8ead304969849e64f2a6" # Replace this with any compatible implementation
|
||||
docker run -i -t -p 60000:60000 -p 9000:9000/udp statusteam/nim-waku:v0.12.0 \
|
||||
--dns-discovery:true \
|
||||
--dns-discovery-url:"$WAKU_FLEET" \
|
||||
--discv5-discovery \
|
||||
--nat:extip:[yourpublicip] \ # or, if you are behind a nat: --nat=any
|
||||
--rln-relay:true \
|
||||
--rln-relay-dynamic:true \
|
||||
--rln-relay-eth-contract-address:"$RLN_RELAY_CONTRACT_ADDRESS" \
|
||||
--rln-relay-eth-client-address:"$GOERLI_WS_NODE_ADDRESS"
|
||||
```
|
||||
|
||||
> Note: You can choose to keep connections to other nodes alive by adding the `--keep-alive` flag.
|
||||
|
||||
Following is the list of additional fields that have been added to the
|
||||
runtime arguments -
|
||||
|
||||
1. `--rln-relay`: Allows waku-rln-relay to be mounted into the setup of the nwaku node
|
||||
2. `--rln-relay-dynamic`: Enables waku-rln-relay to connect to an ethereum node to fetch the membership group
|
||||
3. `--rln-relay-eth-contract-address`: The contract address of an RLN membership group
|
||||
4. `--rln-relay-eth-client-address`: The websocket url to a Goerli ethereum node
|
||||
|
||||
You should now have nwaku running, with RLN enabled!
|
||||
|
||||
To see metrics related to the functioning of RLN, refer to this [guide](./todo).
|
||||
You can also refer to the periodic logging, for a few metrics like -
|
||||
|
||||
- number of spam messages
|
||||
- number of valid messages
|
||||
- number of invalid messages
|
||||
|
||||
|
||||
> Note: This guide will be updated in the future to include features like slashing.
|
@ -2,7 +2,7 @@
|
||||
|
||||
# libtool - Provide generalized library-building support services.
|
||||
# Generated automatically by config.status (libbacktrace) version-unused
|
||||
# Libtool was configured on host fv-az260-712:
|
||||
# Libtool was configured on host fv-az96-850:
|
||||
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
|
||||
#
|
||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
|
||||
|
Loading…
x
Reference in New Issue
Block a user