libp2p / libp2p/specs

Proposal: Remove Peer Exchange in GossipSub Prune Message

Open
#570 13 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
1.8k
Forks
320
Avg merge
11d 15h
Merged PRs (30d)
1

Description

Introduction

Peer Exchange in GossipSub may introduce more issues than it aims to solve. I propose that we consider removing it.

Current Benefits of Peer Exchange:

  • Mesh Recovery: Helps pruned peers find alternative nodes to reestablish a mesh.

Concerns:

  • Unverifiable Data: Peer Exchange is the only feature that introduces data that can't be validated in the protocol. A malicious agent could generate fake identities and inject them, leaving no way to verify this data.
  • Message Size: We've observed prune messages with sizes up to 9KB and 210 peerIDs, and this size is primarily made up of Peer Exchange data. If signed records were populated, sizes could get substantially larger, raising both efficiency and potential DoS concerns.
  • Privacy and Security Risks: Publicizes all connected peers in a global topic, making them easier targets for attacks.
  • Suboptimal or Malicious Peer Suggestions: Possible that a malicious actor could flood the network with bad peer suggestions, reducing network quality.
  • Limited Applicability for Peer Discovery: Peer Exchange may aid in mesh recovery for pruned peers, but it does not replace the need for a dedicated peer discovery mechanism crucial for forming the initial mesh. As signed peer records containing the node's dialable addresses are currently optional, this feature is even less useful. Finally, waiting to be pruned to receive a list of peers is a slow, unpredictable, and unreliable strategy for bootstrapping a network from a single or small set of peers.

Proposal
I propose that we reconsider the existence of Peer Exchange in GossipSub to reduce potential vulnerabilities and to keep the protocol streamlined and focused on its primary goals.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The proposal concerns Peer Exchange in GossipSub Prune messages, but it names no repository files or tests. Start by locating the GossipSub specification and the Prune-message and Peer Exchange definitions, then read the discussion to determine whether removal has consensus. Done means an agreed protocol change with its compatibility and security implications documented.

Written by the indexing model from the issue text.

Assessment

Domain
distributed-systems, networking
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.