Modify to make relay without publishing default

This commit is contained in:
stubbsta 2025-07-28 16:07:59 +02:00
parent 8c3ec4cd2f
commit 884cfdb3d4
No known key found for this signature in database
3 changed files with 16 additions and 17 deletions

View File

@ -17,8 +17,9 @@ RLN_CONTRACT_ADDRESS=0xB9cd878C90E49F797B4431fBF4fb333108CB90e6
# Address of the RLN Membership Token contract on Linea Sepolia used to pay for membership. # Address of the RLN Membership Token contract on Linea Sepolia used to pay for membership.
TOKEN_CONTRACT_ADDRESS=0x185A0015aC462a0aECb81beCc0497b649a64B9ea TOKEN_CONTRACT_ADDRESS=0x185A0015aC462a0aECb81beCc0497b649a64B9ea
# Password you would like to use to protect your RLN membership. # Path and password if you have an existing RLN Membership - new membership registration is WIP
RLN_RELAY_CRED_PASSWORD="my_secure_keystore_password" # RLN_RELAY_CRED_PATH=""
# RLN_RELAY_CRED_PASSWORD=""
# Advanced. Can be left empty in normal use cases. # Advanced. Can be left empty in normal use cases.
NWAKU_IMAGE= NWAKU_IMAGE=

View File

@ -1,8 +1,8 @@
# nwaku-compose # nwaku-compose
Readytouse **dockercompose** stack for running your own [nwaku](https://github.com/waku-org/nwaku) full node: Readytouse **dockercompose** stack for running your own [nwaku](https://github.com/waku-org/nwaku) node for a subset of protocols (full node capability is coming soon).:
* RLNenabled nwaku node (relay + store protocols) * RLNenabled nwaku node (relay + store protocols, excluding message publishing)
* Simple web UI to publish and receive messages * Simple web UI to publish and receive messages
* Grafana dashboard for metrics * Grafana dashboard for metrics
* Requires **Docker Compose** and **Git** * Requires **Docker Compose** and **Git**
@ -10,7 +10,7 @@ Readytouse **dockercompose** stack for running your own [nwaku](https:/
## 📝 Prerequisites ## 📝 Prerequisites
* **Linea Sepolia RPC endpoint** — grab one for free on [Infura](https://www.infura.io) * **Linea Sepolia RPC endpoint** — grab one for free on [Infura](https://www.infura.io)
* **Linea Sepolia wallet** with at least **0.01 ETH** * **Linea Sepolia wallet** with at least **0.01 ETH** (Only REquired For RLN Membership Registration which is WIP)
* Need test ETH? Use the [Linea Sepolia faucet](https://www.infura.io/faucet/sepolia) * Need test ETH? Use the [Linea Sepolia faucet](https://www.infura.io/faucet/sepolia)
* Already have ETH on Sepolia? Bridge it to Linea via the [official bridge](https://bridge.linea.build/native-bridge) * Already have ETH on Sepolia? Bridge it to Linea via the [official bridge](https://bridge.linea.build/native-bridge)
@ -18,8 +18,8 @@ Readytouse **dockercompose** stack for running your own [nwaku](https:/
| # | Option | Quick-start command | What happens | | # | Option | Quick-start command | What happens |
|---|------|--------------------|--------------| |---|------|--------------------|--------------|
| **1** | **script** | Power user / CI | setup a .env file manually, run ./register_rln.sh, and then start the node.| | **1** | **script** | Power user / CI | setup a .env file manually and then start the node.|
| **2** | **setup-wizard** | Fastest one-command bootstrap | Generates `.env`, registers RLN, and spins up the whole stack automatically | | **2** | ** WIP setup-wizard** | Fastest one-command bootstrap | Generates `.env`, registers RLN, and spins up the whole stack automatically |
<details> <details>
<summary>🧪 option 1 :- SCRIPT [ manual ] [ recommended ] </summary> <summary>🧪 option 1 :- SCRIPT [ manual ] [ recommended ] </summary>
@ -29,10 +29,6 @@ cp .env.example .env
``` ```
Edit the .env file and fill in all required parameters Edit the .env file and fill in all required parameters
This command will register your membership and store it in `keystore/keystore.json`:
```
./register_rln.sh
```
### 💽 2. Select DB Parameters ### 💽 2. Select DB Parameters
@ -105,7 +101,7 @@ For advanced documentation, refer to [ADVANCED.md](https://github.com/waku-org/n
</details> </details>
<details> <details>
<summary>⚙️ option 2 :- SETUP-WIZARD [ experimental ]</summary> <summary>⚙️ option 2 (not recommended at this time):- SETUP-WIZARD [ experimental ]</summary>
Run the wizard script. Run the wizard script.
Once the script is done, the node will be started for you, so there is nothing else to do. Once the script is done, the node will be started for you, so there is nothing else to do.

View File

@ -87,8 +87,10 @@ if [ -n "${NODEKEY}" ]; then
NODEKEY=--nodekey=${NODEKEY} NODEKEY=--nodekey=${NODEKEY}
fi fi
RLN_RELAY_CRED_PATH=--rln-relay-cred-path=${RLN_RELAY_CRED_PATH:-/keystore/keystore.json} if [ -n "${RLN_RELAY_CRED_PATH}" ]; then
echo "Using RLN credentials from ${RLN_RELAY_CRED_PATH}"
RLN_RELAY_CRED_PATH=--rln-relay-cred-path="${RLN_RELAY_CRED_PATH}"
fi
if [ -n "${RLN_RELAY_CRED_PASSWORD}" ]; then if [ -n "${RLN_RELAY_CRED_PASSWORD}" ]; then
RLN_RELAY_CRED_PASSWORD=--rln-relay-cred-password="${RLN_RELAY_CRED_PASSWORD}" RLN_RELAY_CRED_PASSWORD=--rln-relay-cred-password="${RLN_RELAY_CRED_PASSWORD}"
@ -103,7 +105,7 @@ fi
exec /usr/bin/wakunode\ exec /usr/bin/wakunode\
--relay=true\ --relay=true\
--filter=true\ --filter=true\
--lightpush=true\ --lightpush=false\
--keep-alive=true\ --keep-alive=true\
--max-connections=150\ --max-connections=150\
--cluster-id=1\ --cluster-id=1\
@ -126,8 +128,8 @@ exec /usr/bin/wakunode\
--store-message-db-url="postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/postgres"\ --store-message-db-url="postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/postgres"\
--rln-relay-eth-client-address="${RLN_RELAY_ETH_CLIENT_ADDRESS}"\ --rln-relay-eth-client-address="${RLN_RELAY_ETH_CLIENT_ADDRESS}"\
--rln-relay-tree-path="/etc/rln_tree"\ --rln-relay-tree-path="/etc/rln_tree"\
"${RLN_RELAY_CRED_PATH}"\ ${RLN_RELAY_CRED_PATH:+${RLN_RELAY_CRED_PATH}}\
"${RLN_RELAY_CRED_PASSWORD}"\ ${RLN_RELAY_CRED_PASSWORD:+${RLN_RELAY_CRED_PASSWORD}}\
${DNS_WSS_CMD}\ ${DNS_WSS_CMD}\
${NODEKEY}\ ${NODEKEY}\
${STORE_RETENTION_POLICY}\ ${STORE_RETENTION_POLICY}\