Enabling RLN, using correctly NUM_NWAKU_NODES variable

This commit is contained in:
Gabriel Mermelstein 2023-10-30 15:44:31 +02:00
parent c43c07c449
commit a8c8bbd09f
No known key found for this signature in database
GPG Key ID: 306734DDCE542DCD
3 changed files with 5 additions and 7 deletions

View File

@ -66,7 +66,7 @@ services:
dockerfile: Dockerfile.rest-traffic
command: >
python /opt/traffic.py
-mn=${TRAFFIC_MULTIPLE_NODES:-http://waku-simulator_nwaku_[1..5]:8645}
-mn=${TRAFFIC_MULTIPLE_NODES:-http://waku-simulator_nwaku_[1..$NUM_NWAKU_NODES]:8645}
-s=${TRAFFIC_MESSAGE_SIZE_KB:-10}
-d=${TRAFFIC_DELAY_SECONDS:-15}
volumes:

View File

@ -4,12 +4,11 @@ IP=$(ip a | grep "inet " | grep -Fv 127.0.0.1 | sed 's/.*inet \([^/]*\).*/\1/')
echo "My container name is: $HOSTNAME"
# Get an unique node index based on the container's IP
FOURTH_OCTET=${IP##*.}
THIRD_OCTET="${IP%.*}"; THIRD_OCTET="${THIRD_OCTET##*.}"
NODE_INDEX=$((FOURTH_OCTET + 256 * THIRD_OCTET))
echo "FOURTH_OCTET $FOURTH_OCTET"
echo "THIRD_OCTET $THIRD_OCTET"
echo "NODE_INDEX $NODE_INDEX"
echo "$IP"
@ -38,9 +37,9 @@ exec /usr/bin/wakunode\
--rest-admin=true\
--rest-private=true\
--rest-address=0.0.0.0\
#--rln-relay=true\
#--rln-relay-dynamic=false\
#--rln-relay-membership-index=${NODE_INDEX}\
--rln-relay=true\
--rln-relay-dynamic=false\
--rln-relay-membership-index=${NODE_INDEX}\
--dns-discovery=true\
--discv5-discovery=true\
--discv5-enr-auto-update=True\

View File

@ -38,7 +38,6 @@ def send_waku_msg(node_address, kbytes, pubsub_topic, content_topic):
if(response != None):
elapsed_ms = (time.time() - s_time) * 1000
print(response.status_code, response.text)
print('Response from %s: status:%s content:%s [%.4f ms.]' % (node_address, \
response.status_code, response.text, elapsed_ms))