mirror of
https://github.com/sigp/gossipsub-testground.git
synced 2026-01-08 05:03:58 -05:00
* Initial implementation for scoring-parameters test plan * Record the number of BeaconBlock messages received per epoch * Add attacker module * Dialing from attackers to a beacon node * Add debug log * Add TopicScoreParameter for BeaconBlock * Rename crate and collect attacker info * Add dashboards * Add metrics * Add topic_msg_sent_counts to dashboard * Attestations * rename * topic_msg_sent_counts * Make params configurable * dashboards * Aggregates per epoch * Attestations per epoch * run time * Remove empty descriptions * cargo update * Record the result of sync_committee_aggregates and sync_committee_messages * Update Messages dashboard * Topic params for SignedContributionAndProof and SyncCommitteeMessage * Make get_param() generic * Use get_param() * Dashboard: automate run_id * Dashboard: Add `Settings` * Set gossipsub config based on lighthouse * Record peer scores on its own task * Record metrics on its own task * Fix invalid gossipsub config * Remove unnecessary comment lines * Some cleanup * Merge main into scoring-parameters * Add scoring test plan to CI workflow * Update dashboard * Fix: discarding correct message * Add `Cache Misses` to the dashboard * Avoid unnecessary compiling * Add Cargo.lock * Introduce NetworkConfiguration * Fix clippy warnings * Upgrade npg * Add README * Fix clippy warnings * Improve qualifications * Remove debug lines
3.1 KiB
3.1 KiB
Scoring Simulation
This simulation creates a number of malicious nodes which do not propagate received messages, and mimics gossipsub messages on an Ethereum consensus network.
Running the Simulation
This simulation can be run with the following command (from within the repos root directory):
testground run composition -f ./scoring/compositions/simulation.toml --wait
Various aspects of the simulation can be modified. Please read the
scoring/manifest.toml to understand test parameters and
scoring/compositions/simulation.toml to modify them.
Scenario: Censor Attack Against a Single Target
sequenceDiagram
participant BeaconNode
participant BeaconNode without validators
participant Attackers
%% Discovery
Note over BeaconNode,BeaconNode without validators: Setup discovery<br />Connect to some of the honest nodes<br />randomly selected
BeaconNode->>BeaconNode without validators: Connect
BeaconNode without validators->>BeaconNode: Connect
Note over Attackers: Setup discovery<br />Connect to a single target with the highest number of validators
Attackers->>BeaconNode: Connect to a single target
%% Subscribe topics
Note over BeaconNode,BeaconNode without validators: Subscribe topic(s)
BeaconNode->>BeaconNode without validators: Subscribe/GRAFT
BeaconNode without validators->>BeaconNode: Subscribe/GRAFT
BeaconNode->>Attackers: Subscribe/GRAFT
Note over Attackers: Subscribe to the topic in the message from the target, <br/>and send back Subscribe/GRAFT.
Attackers->>BeaconNode: Subscribe/GRAFT
%% Publish messages
Note over BeaconNode: Periodically publish messages.
loop Publish messages
Note over BeaconNode,BeaconNode without validators: Record scores and gossipsub metrics while this loop.
BeaconNode->>BeaconNode without validators: Message
BeaconNode->>Attackers: Message
Note over Attackers: **Don't propagate messages**
end
%% Record metrics
Note over BeaconNode,BeaconNode without validators: Record the number of messages per epoch after the simulation.
Dashboards
Please see the root README for how to run Grafana.
Settings
Settings of the specific run. (e.g. topology)
Variables for this dashboard:
run_id: The run_id for the test run you want to see.
Messages
The number of messages (min, max, mean) each peers received per epoch.
Variables for this dashboard:
run_id: The run_id for the test run you want to see.
Peer Scores and Gossipsub Metrics
Variables for this dashboard:
run_id: The run_id for the test run you want to see.peer_id: The PeerId you want to see.- Note: The censoring target ID can be found on the
Settingsdashboard.
- Note: The censoring target ID can be found on the