Migrate Swarm notifications to the Eventbus
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 6.9k
- Forks
- 1.3k
- Avg merge
- 13d 21h
- Merged PRs (30d)
- 1
Description
We already emit events such as `Identify Completed`, `PeerProtocols Updated` etc. on the host Eventbus. It will be good if we also migrate Swarm notifications to the host Eventbus. This will enable subsystems to be notified of Network events such as Connections, Disconnections etc. without having to depend on the Host/Network. It will also remove the need for subsystems to have dual subscriptions(Swarm & Eventbus) to be notified of all the events in libp2p.
However, we **must ensure backward compatibility** by not breaking the existing Swarm notification mechanism.
Some work for this has been done at:
1. https://github.com/libp2p/go-libp2p-core/pull/57
2. https://github.com/libp2p/go-libp2p-swarm/pull/140
However, it needs to be refined and taken to completion.
Contributor guide
No contributing guide indexed for this repository
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
Start by reviewing the existing host Eventbus and Swarm notification mechanisms, then read go-libp2p-core/pull/57 and go-libp2p-swarm/pull/140 to understand the unfinished approach. Define how network events such as connections and disconnections should reach the Eventbus while preserving existing Swarm notifications; completion requires backward compatibility and removal of the need for dual subscriptions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100