From 884cfdb3d458d7abc680ddcb803535b29f7a5ebc Mon Sep 17 00:00:00 2001 From: stubbsta Date: Mon, 28 Jul 2025 16:07:59 +0200 Subject: [PATCH] Modify to make relay without publishing default --- .env.example | 5 +++-- README.md | 16 ++++++---------- run_node.sh | 12 +++++++----- 3 files changed, 16 insertions(+), 17 deletions(-) diff --git a/.env.example b/.env.example index e0fbd74..cea37fc 100644 --- a/.env.example +++ b/.env.example @@ -17,8 +17,9 @@ RLN_CONTRACT_ADDRESS=0xB9cd878C90E49F797B4431fBF4fb333108CB90e6 # Address of the RLN Membership Token contract on Linea Sepolia used to pay for membership. TOKEN_CONTRACT_ADDRESS=0x185A0015aC462a0aECb81beCc0497b649a64B9ea -# Password you would like to use to protect your RLN membership. -RLN_RELAY_CRED_PASSWORD="my_secure_keystore_password" +# Path and password if you have an existing RLN Membership - new membership registration is WIP +# RLN_RELAY_CRED_PATH="" +# RLN_RELAY_CRED_PASSWORD="" # Advanced. Can be left empty in normal use cases. NWAKU_IMAGE= diff --git a/README.md b/README.md index 05a56b4..5f936db 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # nwaku-compose -Ready‑to‑use **docker‑compose** stack for running your own [nwaku](https://github.com/waku-org/nwaku) full node: +Ready‑to‑use **docker‑compose** stack for running your own [nwaku](https://github.com/waku-org/nwaku) node for a subset of protocols (full node capability is coming soon).: -* RLN‑enabled nwaku node (relay + store protocols) +* RLN‑enabled nwaku node (relay + store protocols, excluding message publishing) * Simple web UI to publish and receive messages * Grafana dashboard for metrics * Requires **Docker Compose** and **Git** @@ -10,7 +10,7 @@ Ready‑to‑use **docker‑compose** stack for running your own [nwaku](https:/ ## 📝 Prerequisites * **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) * Already have ETH on Sepolia? Bridge it to Linea via the [official bridge](https://bridge.linea.build/native-bridge) @@ -18,8 +18,8 @@ Ready‑to‑use **docker‑compose** stack for running your own [nwaku](https:/ | # | 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.| -| **2** | **setup-wizard** | Fastest one-command bootstrap | Generates `.env`, registers RLN, and spins up the whole stack automatically | +| **1** | **script** | Power user / CI | setup a .env file manually and then start the node.| +| **2** | ** WIP setup-wizard** | Fastest one-command bootstrap | Generates `.env`, registers RLN, and spins up the whole stack automatically |
🧪 option 1 :- SCRIPT [ manual ] [ recommended ] @@ -29,10 +29,6 @@ cp .env.example .env ``` 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 @@ -105,7 +101,7 @@ For advanced documentation, refer to [ADVANCED.md](https://github.com/waku-org/n
-⚙️ option 2 :- SETUP-WIZARD [ experimental ] +⚙️ option 2 (not recommended at this time):- SETUP-WIZARD [ experimental ] Run the wizard script. Once the script is done, the node will be started for you, so there is nothing else to do. diff --git a/run_node.sh b/run_node.sh index 9048e1f..3203a37 100755 --- a/run_node.sh +++ b/run_node.sh @@ -87,8 +87,10 @@ if [ -n "${NODEKEY}" ]; then NODEKEY=--nodekey=${NODEKEY} 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 RLN_RELAY_CRED_PASSWORD=--rln-relay-cred-password="${RLN_RELAY_CRED_PASSWORD}" @@ -103,7 +105,7 @@ fi exec /usr/bin/wakunode\ --relay=true\ --filter=true\ - --lightpush=true\ + --lightpush=false\ --keep-alive=true\ --max-connections=150\ --cluster-id=1\ @@ -126,8 +128,8 @@ exec /usr/bin/wakunode\ --store-message-db-url="postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/postgres"\ --rln-relay-eth-client-address="${RLN_RELAY_ETH_CLIENT_ADDRESS}"\ --rln-relay-tree-path="/etc/rln_tree"\ - "${RLN_RELAY_CRED_PATH}"\ - "${RLN_RELAY_CRED_PASSWORD}"\ + ${RLN_RELAY_CRED_PATH:+${RLN_RELAY_CRED_PATH}}\ + ${RLN_RELAY_CRED_PASSWORD:+${RLN_RELAY_CRED_PASSWORD}}\ ${DNS_WSS_CMD}\ ${NODEKEY}\ ${STORE_RETENTION_POLICY}\