Add tool to inject traffic via rpc

This commit is contained in:
alrevuelta 2023-08-16 14:04:21 +00:00
parent f83563c369
commit d20e39ac6f
6 changed files with 55 additions and 16 deletions

6
.env Normal file
View File

@ -0,0 +1,6 @@
export GOWAKU_IMAGE=statusteam/go-waku:latest
export NWAKU_IMAGE=04320c32d7e9
export NUM_NWAKU_NODES=5
export NUM_GOWAKU_NODES=0
export MSG_PER_SECOND=10
export MSG_SIZE_KBYTES=10

7
Dockerfile Normal file
View File

@ -0,0 +1,7 @@
FROM python
WORKDIR /src/app
COPY requirements.txt requirements.txt
COPY traffic.py traffic.py
RUN pip install -r requirements.txt
ENTRYPOINT [ "python", "./traffic.py" ]

View File

@ -26,12 +26,24 @@ services:
entrypoint: sh
command:
- '/opt/run_nwaku.sh'
#ports:
# - 127.0.0.1:8545:8545
volumes:
- ./run_nwaku.sh:/opt/run_nwaku.sh:Z
- ./rlnKeystore.json:/rlnKeystore.json:Z
# - ./rln_tree.db:/rln_tree.db:Z # this should not be done as its being written by all the replicas
depends_on:
- bootstrap
rpc-traffic:
image: a444c985d103b9f86121b935f21b02b0fbe0ccc7c7538a1195996984ed317188
restart: "no"
#depends_on:
# - nwaku
command:
- --node=http://bootstrap:8545
- --msg-size-kbyte=10
gowaku:
image: ${GOWAKU_IMAGE}
restart: on-failure
@ -45,15 +57,15 @@ services:
depends_on:
- bootstrap
waku-publisher:
image: alrevuelta/waku-publisher:9fb206c
entrypoint: sh
- 'opt/run_wakupublisher.sh'
volumes:
- ./run_wakupublisher.sh:/opt/run_wakupublisher.sh:Z
environment:
MSG_PER_SECOND: 10
MSG_SIZE_KBYTES: 10
# waku-publisher:
# image: alrevuelta/waku-publisher:9fb206c
# entrypoint: sh
# - 'opt/run_wakupublisher.sh'
# volumes:
# - ./run_wakupublisher.sh:/opt/run_wakupublisher.sh:Z
# environment:
# MSG_PER_SECOND: 10
# MSG_SIZE_KBYTES: 10
prometheus:
image: prom/prometheus:latest

2
requirements.txt Normal file
View File

@ -0,0 +1,2 @@
requests==2.31.0

View File

@ -38,4 +38,3 @@ exec /usr/bin/wakunode\
--rln-relay-cred-path=/rlnKeystore.json \
--rln-relay-eth-contract-address=0x39558059411112732d73997712b75a865a697330 \
--rln-relay-eth-client-address=ws://linux-01.ih-eu-mda1.nimbus.sepolia.wg:9557
#--rln-relay-eth-client-address=wss://sepolia.infura.io/ws/v3/4576482c0f474483ac709755f2663b20 \

File diff suppressed because one or more lines are too long