mirror of
https://github.com/sigp/gossipsub-testground.git
synced 2026-01-09 13:37:58 -05:00
cb2d84dcc4be70ef29fe6452e2797acccb145e41
emulation test plan (#4)
* Scaffold for a new test and implement sharing test instance information * Setup discovery * Subscribe to a topic and wait for `warmup` time to expire * Add MaliciousBehaviour * Remove unnecessary dependency * Add emulation directory to CI * Fix clippy warning * Make sure swarm started listening at the time to the barrier * Handle subscriptions * Handle PRUNEs and schedule re-graft * Publish messages * Print peer scores * Store scores to InfluxDB * Store metrics to InfluxDB * Store more metrics to InfluxDB * Tweak comments * Refactor queries * Store Histogram metrics to InfluxDB * Tweak scores * Add `instance_peer_id` tag to the measurements * Fix wrong field name * Introduce message_rate * Parameterize honest node configs * Tweak comments and update default configs * Fix deprecation warning (NetworkBehaviourEventProcess) and improve barrier method * Install protoc * Add README for emulation crate * Update emulation/src/attacker.rs Co-authored-by: Divma <26765164+divagant-martian@users.noreply.github.com> * Update emulation/src/honest.rs Co-authored-by: Divma <26765164+divagant-martian@users.noreply.github.com> * Update emulation/src/utils.rs Co-authored-by: Divma <26765164+divagant-martian@users.noreply.github.com> * Update emulation/src/utils.rs Co-authored-by: Divma <26765164+divagant-martian@users.noreply.github.com> * Update emulation/src/utils.rs Co-authored-by: Divma <26765164+divagant-martian@users.noreply.github.com> * Update emulation/src/utils.rs Co-authored-by: Divma <26765164+divagant-martian@users.noreply.github.com> * Remove unnecessary unwrap * Make some comments to docs * Remove unnecessary comment * No need to exclude test plans because the lock file can be automatically generated * Move tags commonly used to constants * Remove plan directory no longer need to change working-directory since the plans are members of workspace * cargo update * Upgrade libp2p from 0.46 to 0.48 * Remove needless patch * Update libp2p (and prometheus-client) * Revert to libp2p whose metrics encoding is fixed to `protobuf` to make the test plan work * Add dashboard * Add `Peer scores` dashboard * Add panels to `Gossipsub metrics` dashboard * invalid_messages_per_topic * accepted_messages_per_topic * ignored_messages_per_topic * rejected_messages_per_topic * topic_iwant_msgs * Align the timestamp between metrics of all instances This is helpful when we want to sort metrics by something not timestamp(e.g. instance_name). * Upgrade testground SDK to the latest version * Rename dashboard * Disable chrono's default features for the sake of compile times * Remove debug code * Add Grafana container with preconfigured datasources and dashboards * Update README Co-authored-by: Divma <26765164+divagant-martian@users.noreply.github.com>
gossipsub-testground
This repository contains Testground test plans for libp2p-gossipsub.
Getting started
Before running test plans, make sure the testground daemon is running. See here for how to install and run the daemon.
# Cloning this repo
git clone https://github.com/sigp/gossipsub-testground.git
# Import the test plans from this repo
testground plan import --from ./gossipsub-testground/
# Run smoke tests
testground run single \
--plan=gossipsub-testground/smoke \
--testcase=smoke \
--builder=docker:generic \
--runner=local:docker \
--instances=3 \
--wait
Dashboards
Provides Grafana GUI with preconfigured data sources and dashboards. All you have to do is running docker-compose up and browse to http://localhost:13000/dashboards.
For details of the dashboards please see READMEs in each test plan directories.
Description
Languages
Rust
95.5%
Dockerfile
3.2%
Shell
1.3%