Skip to content

🧭 Tracking Issue: Signed Peer Record transfer integration with transfer protocols #791

@lla-dane

Description

@lla-dane

Description

This issue tracks the integration of signed peer-record transfer in the transfer protocols. The PR related to the development of signed-peer-record utilities: #753.

Motivation

Currently py-libp2p only supports exchanging Signed Peer Records (SPRs) via the identify prptocol. While this works for basic peer metadata propagation, it limits the trustworthiness and completeness of peer information in real-world networks.

Integrating SPR transfer into protocols like GossipSub, DHT, and Relay v2 will:

  • ✅ Enable verifiable peer metadata propagation across the stack
  • ✅ Improve peer discovery, scoring, and routing accuracy
  • ✅ Bring py-libp2p in closer alignment with production-grade behavior in go-libp2p and rust-libp2p
  • ✅ Bring py-libp2p in closer alignment with production-grade behavior in go-libp2p and rust-libp2p
  • ✅ Lay the groundwork for future extensions (peer scoring, trust systems, gating, etc.)

This enhancement strengthens the robustness and correctness of the peer communication layer, especially under high churn or adversarial network conditions.

Target Protocols and Tasks

1. GossipSub (PubSub)

  • Investigate support for attaching SPRs to control messages or peer metadata.
  • Update example applications to reflect SPR usage.

2. DHT (Kad)

  • Define how to encode SPRs in DHT records or metadata.
  • Validate SPRs on receipt before storing multiaddrs.

3. Relay (Circuit v2)

  • Add optional SPR exchange during relayed connection setup.
  • Use SPR to verify introducer address claims.

4. Custom Extensions (eg. Peer Scoring, Gating)

  • Explore inclusion of SPRs in custom scoring or trust logic.

Current Implementation

At present signed-peer-record transfer has been integrated with identify protocol. The related PR: #753 and developer notes: #739 (comment)

Are you planning to do it yourself in a pull request ?

Maybe

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions