waku-org / waku-simulator

Tool to simulate a waku network with multiple nodes, traffic and users
https://simulator.waku.org
2 stars 6 forks source link

Integrate go-waku-light in waku-simulator #58

Closed alrevuelta closed 23 hours ago

alrevuelta commented 3 weeks ago
./go-waku-light send-messages-loop \
--priv-key=SOME_PRIV_KEY \
--user-message-limit=5 \
--message="light client sending a rln message" \
--content-topic=/basic2/1/test/proto \
--pubsub-topic=/waku/2/rs/100/0 \
--cluster-id=100 \
--lightpush-peer=/ip4/127.0.0.1/tcp/60000/p2p/16Uiu2HAkxTGJRgkCxgMDH4A4QBvw3q462BRkVJaPF5KQWkc1t4cp \
--message-every-secs=5

Docker image should be available at alrevuelta/go-waku-light@a89b7e1, being a89b7e1 the first 7 digits of any commit present in the repo.

alrevuelta commented 3 weeks ago

By now I'm not sure if we will integrate go-waku-light inside waku-simulator docker-compose, since:

By now the following will be enough. It runs a docker image isolated, connecting to the simulator network and injects traffic via light push. ⚠️ set the priv-key and set your lightpush-peer.

docker run --platform linux/amd64 --network waku-simulator_simulation alrevuelta/go-waku-light:b853233 \
--eth-endpoint=http://foundry:8545 \
--contract-address=0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9 \
send-messages-loop \
--priv-key=xxx \
--user-message-limit=5 \
--message="light client sending a rln message" \
--content-topic=/basic2/1/test/proto \
--pubsub-topic=/waku/2/rs/66/0 \
--cluster-id=66 \
--lightpush-peer=/ip4/10.2.0.13/tcp/60000/p2p/16Uiu2HAm1HaBMbKuxm8EumCtirWeqhEq9XyXERYGU6pbdhjYb92h \
--message-every-secs=5

This was tested end-to-end with waku-simulator and works fine. Running it like this, it allows more control on it. One can start multiple instances, start/stop it when desired etc.

Leaving the issue open. Itegrating this in the docker-compose would be almost a copy paste from the command above.

alrevuelta commented 23 hours ago

By now the goal is to keep waku-simulator as clean and simple as possible, so go-waku-light is not integrated inside, but connecting on demand. Explained here: https://waku-org.github.io/waku-simulator/connect-light-node.html