diff --git a/.env.example b/.env.example index b670433..8a1a411 100644 --- a/.env.example +++ b/.env.example @@ -1,6 +1,6 @@ # RPC URL for accessing testnet via HTTP. # e.g. https://sepolia.infura.io/v3/123aa110320f4aec179150fba1e1b1b1 -ETH_CLIENT_ADDRESS=https://sepolia.infura.io/v3/ +RLN_RELAY_ETH_CLIENT_ADDRESS=https://sepolia.infura.io/v3/ # Private key of testnet where you have sepolia ETH that would be staked into RLN contract. # Note: make sure you don't use the '0x' prefix. diff --git a/ADVANCED.md b/ADVANCED.md index b2bfca5..51cc94a 100644 --- a/ADVANCED.md +++ b/ADVANCED.md @@ -9,7 +9,7 @@ There are multiple environment variables you can configure to modify behaviour o * `NWAKU_IMAGE` - the image you want to use for the nwaku container (e.g. `NWAKU_IMAGE=statusteam/nim-waku:v0.19.0-rc.0`). You can see the available tags in [docker hub](https://hub.docker.com/r/waku-org/nwaku). * `DOMAIN` - domain name pointing to the IP address of your node, when configured the run script will request SSL certs from Let's Encrypt and run Waku node with WebSockets Secure (WSS) options enabled (e.g. `DOMAIN=waku.example.com`) * `NODEKEY` - this env variable allows you to provide a node key as described in [operators documentation](https://github.com/waku-org/nwaku/blob/master/docs/operators/how-to/configure-key.md) (e.g. `NODEKEY=9f439983aa4851346cfe6e17585e426f482871a43626812e23490895cd602c11`) -* `ETH_CLIENT_ADDRESS` (**mandatory**) - URL to an HTTP Ethereum node URL on the same network as the contract address. If you're not running your own node, you can get the URL at Infura with the following [instructions](https://docs.infura.io/networks/ethereum/how-to/choose-a-network) +* `RLN_RELAY_ETH_CLIENT_ADDRESS` (**mandatory**) - URL to an HTTP Ethereum node URL on the same network as the contract address. If you're not running your own node, you can get the URL at Infura with the following [instructions](https://docs.infura.io/networks/ethereum/how-to/choose-a-network) * `RLN_RELAY_CRED_PATH` - path for peristing rln-relay credential * `RLN_RELAY_CRED_PASSWORD` - password for encrypting RLN credentials * `EXTRA_ARGS` - this variable allows you to specify additional or overriding CLI option for the Waku node which will be appended to the `wakunode2` command. (e.g. `EXTRA_ARGS="--store=false --max-connections=3000`) @@ -66,4 +66,4 @@ That will give insights on the Node's message store database. If started with 'dbadmin' profile it must be used when stopping it: ```console docker compose --profile dbadmin down -``` \ No newline at end of file +``` diff --git a/docker-compose.yml b/docker-compose.yml index 66af27a..c1dd2cb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,7 +6,7 @@ x-logging: &logging max-size: 1000m # Environment variable definitions -x-eth-client-address: ð_client_address ${ETH_CLIENT_ADDRESS:-} # Add your ETH_CLIENT_ADDRESS after the "-" +x-rln-relay-eth-client-address: &rln_relay_eth_client_address ${RLN_RELAY_ETH_CLIENT_ADDRESS:-} # Add your RLN_RELAY_ETH_CLIENT_ADDRESS after the "-" x-rln-environment: &rln_env RLN_RELAY_CONTRACT_ADDRESS: ${RLN_RELAY_CONTRACT_ADDRESS:-0xF471d71E9b1455bBF4b85d475afb9BB0954A29c4} @@ -47,7 +47,7 @@ services: DOMAIN: ${DOMAIN} NODEKEY: ${NODEKEY} RLN_RELAY_CRED_PASSWORD: "${RLN_RELAY_CRED_PASSWORD}" - ETH_CLIENT_ADDRESS: *eth_client_address + RLN_RELAY_ETH_CLIENT_ADDRESS: *rln_relay_eth_client_address EXTRA_ARGS: ${EXTRA_ARGS} STORAGE_SIZE: ${STORAGE_SIZE} <<: @@ -141,7 +141,7 @@ services: - --config.file=/etc/pgexporter/postgres-exporter.yml depends_on: - postgres - + waku-frontend: # TODO: migrate to waku-org image: alrevuelta/waku-frontend:latest @@ -194,4 +194,4 @@ services: # "Username": "postgres", # "PassFile": "/pgpass", # "SSLMode": "disable" -# }}} \ No newline at end of file +# }}} diff --git a/register_rln.sh b/register_rln.sh index c63663b..1be9dbb 100755 --- a/register_rln.sh +++ b/register_rln.sh @@ -9,7 +9,7 @@ fi if test -f .env; then - echo "Using .env file" + echo "Using .env file" . $(pwd)/.env fi @@ -18,7 +18,7 @@ fi docker run -v $(pwd)/keystore:/keystore/:Z harbor.status.im/wakuorg/nwaku:v0.25.0 generateRlnKeystore \ ---rln-relay-eth-client-address=${ETH_CLIENT_ADDRESS} \ +--rln-relay-eth-client-address=${RLN_RELAY_ETH_CLIENT_ADDRESS} \ --rln-relay-eth-private-key=${ETH_TESTNET_KEY} \ --rln-relay-eth-contract-address=0xF471d71E9b1455bBF4b85d475afb9BB0954A29c4 \ --rln-relay-cred-path=/keystore/keystore.json \ diff --git a/run_node.sh b/run_node.sh index e9ba453..a337225 100644 --- a/run_node.sh +++ b/run_node.sh @@ -2,7 +2,7 @@ echo "I am a nwaku node" -if [ -z "${ETH_CLIENT_ADDRESS}" ]; then +if [ -z "${RLN_RELAY_ETH_CLIENT_ADDRESS}" ]; then echo "Missing Eth client address, please refer to README.md for detailed instructions" exit 1 fi @@ -83,7 +83,7 @@ exec /usr/bin/wakunode\ --nat=extip:"${MY_EXT_IP}"\ --store=true\ --store-message-db-url="postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/postgres"\ - --rln-relay-eth-client-address="${ETH_CLIENT_ADDRESS}"\ + --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}\