feat: adding RLN support for nwaku-compose

This commit is contained in:
Gabriel Mermelstein 2023-09-21 12:25:39 +03:00 committed by alrevuelta
parent 32b5335dc0
commit 083051da55
No known key found for this signature in database
GPG Key ID: F345C9F3CCDB886E
3 changed files with 1000 additions and 92 deletions

View File

@ -10,8 +10,8 @@ x-pg-pass: &pg_pass ${POSTGRES_PASSWORD:-test123}
x-pg-user: &pg_user ${POSTGRES_USER:-postgres}
x-pg-environment: &pg_env
POSTGRES_USER: *pg_user
POSTGRES_PASSWORD: *pg_pass
POSTGRES_USER: *pg_user
POSTGRES_PASSWORD: *pg_pass
x-pg-exporter-env: &pg_exp_env
environment:
@ -62,6 +62,7 @@ services:
volumes:
- ./run_node.sh:/opt/run_node.sh:Z
- ./certs:/etc/letsencrypt/:Z
- ./rln_tree:/etc/rln_tree/:Z
entrypoint: sh
command:
- /opt/run_node.sh

File diff suppressed because it is too large Load Diff

View File

@ -41,6 +41,12 @@ if [ "${NODEKEY}" != "" ]; then
NODEKEY=--nodekey=${NODEKEY}
fi
RLN_RELAY_CONTRACT_ADDRESS="0xF471d71E9b1455bBF4b85d475afb9BB0954A29c4" # Sepolia Testnet
RLN_TREE_PATH="/etc/rln_tree"
ETH_CLIENT_ADDRESS= # Add a WebSockets endpoint to your Eth Node or an Infura WebSockets URL
# https://docs.infura.io/networks/ethereum/how-to/choose-a-network
# Make sure to use an URL for the same network than the relay contract
exec /usr/bin/wakunode\
--relay=true\
--topic=/waku/2/default-waku/proto\
@ -69,6 +75,11 @@ exec /usr/bin/wakunode\
--store=true\
--store-message-db-url="postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/postgres"\
--store-message-retention-policy=time:86400\
--rln-relay=true\
--rln-relay-dynamic=true\
--rln-relay-eth-contract-address="${RLN_RELAY_CONTRACT_ADDRESS}"\
--rln-relay-eth-client-address="${ETH_CLIENT_ADDRESS}"\
--rln-relay-tree-path="${RLN_TREE_PATH}"\
${DNS_WSS_CMD}\
${NODEKEY}\
${EXTRA_ARGS}