Mesh Manipulation

GossipSub Attacks

GossipSub is the production pub/sub protocol used by Ethereum 2.0 and Filecoin. Version 1.1 introduced a peer scoring function that detects and evicts malicious mesh participants.

This simulation demonstrates a Flash Attack — Sybil nodes connect simultaneously and attempt to disrupt message propagation — and shows how scoring defends the mesh.

Simulation Steps1 / 5

Warm GossipSub Mesh

A healthy GossipSub mesh for a topic. Each peer maintains D=6 mesh connections (Dlo=4, Dhi=12). Honest peers have built up positive scores through consistent message delivery. The peer scoring function tracks: time in mesh, first-message deliveries, delivery rate, and invalid messages.

D = 6 (mesh degree)
Dlo = 4, Dhi = 12
gossip_factor = 0.25

Flash Attack: Sybils Connect

In a Flash Attack, Sybil nodes connect to the network simultaneously and request to join the topic mesh via GRAFT messages. Since GossipSub allows new peers to join (up to Dhi), the Sybils initially get accepted into some honest peers' meshes.

Mesh Integrity
100%
Sybil Score
0

Message Suppression

The Sybils stop forwarding messages and drop all IHAVE/IWANT exchanges. Honest peers notice delayed or missing messages. However, GossipSub v1.1's flood publishing means newly published messages are sent to ALL connected peers above the publish threshold — not just mesh peers — so messages still propagate through honest paths.

Mesh Integrity
100%
Sybil Score
0

Peer Scoring Kicks In

The peer scoring function detects the attack. Sybils accumulate negative scores from: (1) failed message deliveries, (2) short mesh time, (3) IP colocation penalty. Once a peer's score drops below the graylist threshold, they are pruned from the mesh via PRUNE messages. The mesh begins self-healing.

Mesh Integrity
100%
Sybil Score
0

Mesh Recovery

The mesh fully recovers. Pruned Sybils cannot re-GRAFT due to the backoff mechanism. Opportunistic grafting brings better-scoring peers into the mesh. The GossipSub v1.1 Evaluation Report concluded: "GossipSub is resilient against ALL attacks studied, capable of recovering the mesh and meeting message delivery deadlines."

Mesh Integrity
100%
Sybil Score
0

Peer Scoring Deep-Dive

GossipSub v1.1 Scoring Function

Score(p) = TopicScore(p) + AppScore(p) · w_app
TopicScore = w₁·TimeInMesh + w₂·FirstDeliveries + w₃·MeshRate + w₄·Invalid

Peers with scores below specific thresholds are restricted or evicted from the mesh.

gossipThreshold

Below this, peer loses gossip (IHAVE) privileges. They can only receive messages directly.

publishThreshold

Below this, peer's published messages are ignored by the network to prevent spam.

graylistThreshold

Below this, peer is pruned from mesh and graylisted, severing all communication.

IP Colocation Factor

GossipSub penalizes multiple peers from the same IP address. The penalty scales quadratically with the number of peers per IP, making it expensive for attackers to run many Sybils from a single machine.