-
Notifications
You must be signed in to change notification settings - Fork 190
Description
Description
Implement Gossipsub v1.4 in py-libp2p, aligning with the latest libp2p/specs/pubsub/gossipsub specification.
This update introduces key performance and security enhancements over v1.2, including improved peer scoring, message propagation, and adaptive gossip strategies.
Motivation
The current implementation in py-libp2p supports Gossipsub v1.1 / v1.2.
To ensure protocol parity with other libp2p implementations (go-libp2p, js-libp2p, rust-libp2p), and enable cross-language interoperability, we need to bring the Gossipsub 1.4 features to Python.
This will also enhance pubsub performance in decentralized applications using Python-based networking stacks, such as those in Filecoin and IPFS ecosystems.
Requirements
Key Features to Implement
-
Extended Peer Scoring Parameters
- Decay interval refinements and behavioral penalties.
-
IP Colocation Penalties
- Penalize peers from the same IP subnet to prevent Sybil attacks.
-
Adaptive Gossip Dissemination
- Dynamic adjustment of gossip parameters for improved propagation efficiency.
-
Message ID Customization
- Support for user-defined message ID functions.
-
Rate-limiting and Score Decay Enhancements
- Align with Gossipsub v1.4 performance tuning.
-
Testing and Interop
- Validate against
go-libp2pandjs-libp2pimplementations.
- Validate against
References
- Gossipsub v1.4 Spec: libp2p/specs#pubsub/gossipsub
- Go-libp2p implementation: go-libp2p-pubsub
- JS-libp2p implementation: js-libp2p-gossipsub
- Rust-libp2p implementation: rust-libp2p/gossipsub
Next Steps
- Review existing Gossipsub 1.2 module implementation in
py-libp2p. - Outline architectural deltas required for 1.4 compliance.
- Begin incremental implementation (peer scoring, adaptive gossip, rate limiting).
- Add test cases and benchmarking suite for verification.
- Validate interoperability with
go-libp2pandjs-libp2p.
Open questions
No response
Are you planning to do it yourself in a pull request ?
Maybe