Add Gossipsub 1.4 module in py-libp2p
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 624
- Forks
- 256
- Avg merge
- 1d 34m
- Merged PRs (30d)
- 47
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the existing Gossipsub 1.2 module in py-libp2p alongside the Gossipsub v1.4 specification and the referenced Go, JavaScript, and Rust implementations. Identify the architectural deltas for peer scoring, gossip, message IDs, rate limiting, and interoperability before implementing incrementally. Done means the listed features are covered by tests, benchmarks, and cross-language validation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- distributed-systems, networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100