mirror of
https://github.com/logos-messaging/go-waku-compose.git
synced 2026-01-02 13:03:08 +00:00
chore: fix merge conflicts and pull useful changes from nwaku
This commit is contained in:
commit
ed7483d208
10
.env.example
Normal file
10
.env.example
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
ETH_CLIENT_ADDRESS=wss://sepolia.infura.io/ws/v3/<key>
|
||||||
|
ETH_TESTNET_KEY=012345privatekey
|
||||||
|
RLN_RELAY_CRED_PASSWORD="my_secure_keystore_password"
|
||||||
|
|
||||||
|
# Advanced
|
||||||
|
GO_WAKU_IMAGE=
|
||||||
|
NODEKEY=
|
||||||
|
DOMAIN=
|
||||||
|
EXTRA_ARGS=
|
||||||
|
RLN_RELAY_CONTRACT_ADDRESS=
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,3 +2,4 @@
|
|||||||
keystore
|
keystore
|
||||||
postgresql
|
postgresql
|
||||||
rln_tree
|
rln_tree
|
||||||
|
.env
|
||||||
|
|||||||
@ -14,12 +14,15 @@ You need:
|
|||||||
* Ethereum Sepolia account with some balance <0.01 Eth. Get some [here](https://www.infura.io/faucet/sepolia).
|
* Ethereum Sepolia account with some balance <0.01 Eth. Get some [here](https://www.infura.io/faucet/sepolia).
|
||||||
* A password to protect your rln membership.
|
* A password to protect your rln membership.
|
||||||
|
|
||||||
|
There is `.env.example` available for you as a template to use for providing the above values. The process when working with `.env` files is to copy the `.env.example`, store it as `.env` and edit the values there.
|
||||||
|
|
||||||
```
|
```
|
||||||
export ETH_CLIENT_ADDRESS=wss://sepolia.infura.io/ws/v3/YOUR_INFURA_KEY
|
cp .env.example .env
|
||||||
export ETH_TESTNET_KEY=REPLACE_BY_YOUR_KEY
|
${EDITOR} .env
|
||||||
export KEYSTORE_PASSWORD=PICK_A_PASSWORD
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Make sure to **NOT** place any secrets into `.env.example`, as they might be unintentionally published in the Git repository.
|
||||||
|
|
||||||
**🔑 1. Register RLN membership**
|
**🔑 1. Register RLN membership**
|
||||||
|
|
||||||
The RLN membership is your access key to The Waku Network. Its registration is done onchain, and allows your go-waku node to publish messages in a decentralized and private way, respecting some [rate limits](https://rfc.vac.dev/spec/64/#rate-limit-exceeded).
|
The RLN membership is your access key to The Waku Network. Its registration is done onchain, and allows your go-waku node to publish messages in a decentralized and private way, respecting some [rate limits](https://rfc.vac.dev/spec/64/#rate-limit-exceeded).
|
||||||
|
|||||||
@ -47,7 +47,7 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
DOMAIN: ${DOMAIN}
|
DOMAIN: ${DOMAIN}
|
||||||
NODEKEY: ${NODEKEY}
|
NODEKEY: ${NODEKEY}
|
||||||
KEYSTORE_PASSWORD: ${KEYSTORE_PASSWORD}
|
KEYSTORE_PASSWORD: "${KEYSTORE_PASSWORD}"
|
||||||
ETH_CLIENT_ADDRESS: *eth_client_address
|
ETH_CLIENT_ADDRESS: *eth_client_address
|
||||||
EXTRA_ARGS: ${EXTRA_ARGS}
|
EXTRA_ARGS: ${EXTRA_ARGS}
|
||||||
<<:
|
<<:
|
||||||
@ -119,8 +119,8 @@ services:
|
|||||||
- ./postgres_cfg/db.sql:/docker-entrypoint-initdb.d/db.sql:Z
|
- ./postgres_cfg/db.sql:/docker-entrypoint-initdb.d/db.sql:Z
|
||||||
- ${PG_DATA_DIR:-./postgresql}:/var/lib/postgresql/data:Z
|
- ${PG_DATA_DIR:-./postgresql}:/var/lib/postgresql/data:Z
|
||||||
command: postgres -c config_file=/etc/postgresql/postgresql.conf
|
command: postgres -c config_file=/etc/postgresql/postgresql.conf
|
||||||
ports:
|
ports: []
|
||||||
- 127.0.0.1:5432:5432
|
# - 127.0.0.1:5432:5432
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD-SHELL", "pg_isready -d db_prod"]
|
test: ["CMD-SHELL", "pg_isready -d db_prod"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
|
|||||||
@ -1,11 +1,16 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
if test -f ./keystore/keystore.json; then
|
if test -f $(pwd)/keystore/keystore.json; then
|
||||||
echo "keystore/keystore.json alredy exists. Use it instead of creating a new one."
|
echo "keystore/keystore.json already exists. Use it instead of creating a new one."
|
||||||
echo "Exiting"
|
echo "Exiting"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test -f .env; then
|
||||||
|
echo "Using .env file"
|
||||||
|
. $(pwd)/.env
|
||||||
|
fi
|
||||||
|
|
||||||
# TODO: Set go-waku release when ready
|
# TODO: Set go-waku release when ready
|
||||||
|
|
||||||
docker run -v $(pwd)/keystore:/keystore/:Z wakuorg/go-waku:v0.9.0 generate-rln-credentials \
|
docker run -v $(pwd)/keystore:/keystore/:Z wakuorg/go-waku:v0.9.0 generate-rln-credentials \
|
||||||
@ -13,4 +18,5 @@ docker run -v $(pwd)/keystore:/keystore/:Z wakuorg/go-waku:v0.9.0 generate-rln-c
|
|||||||
--eth-account-private-key=${ETH_TESTNET_KEY} \
|
--eth-account-private-key=${ETH_TESTNET_KEY} \
|
||||||
--eth-contract-address=0xF471d71E9b1455bBF4b85d475afb9BB0954A29c4 \
|
--eth-contract-address=0xF471d71E9b1455bBF4b85d475afb9BB0954A29c4 \
|
||||||
--cred-path=/keystore/keystore.json \
|
--cred-path=/keystore/keystore.json \
|
||||||
--cred-password=${KEYSTORE_PASSWORD}
|
--cred-password="${RLN_RELAY_CRED_PASSWORD}"
|
||||||
|
|
||||||
|
|||||||
10
run_node.sh
10
run_node.sh
@ -49,12 +49,12 @@ if [ -n "${NODEKEY}" ]; then
|
|||||||
NODEKEY=--nodekey=${NODEKEY}
|
NODEKEY=--nodekey=${NODEKEY}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "${RLN_RELAY_CRED_PATH}" ]; then
|
|
||||||
RLN_RELAY_CRED_PATH=--rln-relay-cred-path=${RLN_RELAY_CRED_PATH}
|
RLN_RELAY_CRED_PATH=--rln-relay-cred-path=${RLN_RELAY_CRED_PATH:-/keystore/keystore.json}
|
||||||
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}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exec /usr/bin/waku\
|
exec /usr/bin/waku\
|
||||||
@ -98,8 +98,6 @@ exec /usr/bin/waku\
|
|||||||
--rln-relay-eth-contract-address="${RLN_RELAY_CONTRACT_ADDRESS}"\
|
--rln-relay-eth-contract-address="${RLN_RELAY_CONTRACT_ADDRESS}"\
|
||||||
--rln-relay-eth-client-address="${ETH_CLIENT_ADDRESS}"\
|
--rln-relay-eth-client-address="${ETH_CLIENT_ADDRESS}"\
|
||||||
--rln-relay-tree-path="/etc/rln_tree"\
|
--rln-relay-tree-path="/etc/rln_tree"\
|
||||||
--rln-relay-cred-password="${KEYSTORE_PASSWORD}"\
|
|
||||||
--rln-relay-cred-path="/keystore/keystore.json"\
|
|
||||||
${RLN_RELAY_CRED_PATH}\
|
${RLN_RELAY_CRED_PATH}\
|
||||||
${RLN_RELAY_CRED_PASSWORD}\
|
${RLN_RELAY_CRED_PASSWORD}\
|
||||||
${DNS_WSS_CMD}\
|
${DNS_WSS_CMD}\
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user