Skip to content

Add Gossipsub 1.2 Support to py-libp2p #806

@seetadev

Description

@seetadev

Description

The goal of this issue is to implement Gossipsub 1.2 in the Python implementation of libp2p (py-libp2p).
Gossipsub 1.2 introduces a series of enhancements over Gossipsub 1.1, including peer scoring, spam prevention mechanisms, and improved message validation.

Adding support for Gossipsub 1.2 will bring py-libp2p in line with other actively maintained libp2p implementations (go-libp2p, js-libp2p) and enable better interoperability for pubsub-based applications.

Tasks

  1. Review the Gossipsub 1.2 spec

    • Reference: Gossipsub 1.2 Spec
    • Identify differences from the existing Gossipsub 1.1 implementation in py-libp2p.
  2. Implement core new features

    • Peer scoring
    • Message author validation
    • IP colocation checks
    • Spam protection enhancements
    • Extended control messages
  3. Add configuration options

    • Allow enabling/disabling peer scoring.
    • Configurable scoring parameters.
  4. Ensure interoperability

    • Test with go-libp2p and js-libp2p Gossipsub 1.2 nodes.
    • Verify message propagation, peer scoring behavior, and subscription syncing.
  5. Add unit & integration tests

    • Cover all new features.
    • Include cross-language test scenarios.
  6. Update documentation

    • Explain configuration changes.
    • Provide example code for using Gossipsub 1.2.

Acceptance Criteria

  • py-libp2p supports all core Gossipsub 1.2 features.
  • Successful interoperability with go-libp2p and js-libp2p 1.2 implementations.
  • Comprehensive tests and documentation updates included.

References


Labels: enhancement, interop, pubsub
Assigned To: @Winter-Soren

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