mirror of https://github.com/waku-org/research.git
d7167bcedb | ||
---|---|---|
.. | ||
raw | ||
README.md | ||
analyze.py | ||
plot.jpg | ||
plot.py | ||
shadow.yaml |
README.md
rln-delay-simulations
This folder contains a shadow
configuration to simulate 1000
nwaku
nodes in an end to end setup:
nwaku
binaries are used, built withmake wakunode2
but with a minor modification, see simulationsrln
is used with hardcoded static memberships, to avoid the sepolia node + contract, see.- Focused on measuring message propagation delays. Each message that is sent, encodes the timestamp when it was created.
- Requires significant resources to run (tested with 256 GB RAM)
- See simulation parameters: latency, bandwidth, amount of nodes, amount of publishers.
- Note that due to TCP flow control, when using big messages the first ones to arrive will show a higher delay. Filter them out to not bias the measurements.
How to run
Get nwaku
codebase and checkout to simulations branch, build it and start the shadow simulation. Ensure path
points to the wakunode2
binary and you have enough resources.
git clone https://github.com/waku-org/nwaku.git
cd nwaku
git checkout simulations
make wakunode2
shadow shadow.yaml
How to analyze
First check that the simulation finished ok. Check that the numbers match.
grep -nr 'ended_simulation' shadow.data | wc -l
# expected: 1000 (simulation finished ok in all nodes)
grep -nr 'tx_msg' shadow.data | wc -l
# expected: 10 (total of published messages)
grep -nr 'rx_msg' shadow.data | wc -l
# expected: 9990 (total rx messages)
Get metrics:
grep -nr 'rx_msg' shadow.data > latency.txt
grep -nr 'mesh_size' shadow.data > mesh_size.txt
Print results:
python analyze.py latency.txt "arrival_diff="
python analyze.py mesh_size.txt "mesh_size="