This repository has been archived by the owner on Jun 26, 2023. It is now read-only.
RFC: pubsub-interface #53
Labels
kind/enhancement
A net-new feature or improvement to an existing feature
Background
We created libp2p-pubsub as the base implementation of a pubsub router when we were working on the second pubsub router for libp2p (gossipsub).
While this approach allowed us to guarantee the implementation of pubsub routers with the same external APIs, we still have a lot of duplication in the tests. This comes with an extra cost for code maintenance. Over time, it is expected that new pubsub router implementations might appear.
Proposal
With gossipsub1.1 update, @wemeetagain is doing some improvements on the base pubsub implementation that will be moved to the repo. With this refactor, I think that we have a clear implementation and API for our base pubsub.
My proposal is to create a
pubsub-interface
and move thelibp2p-pubsub
codebase into this repo. Moreover, this repo should provide a test suite that each pubsub router should run to have an extensive test of its external API. The routers would only need to test their internal behaviours and require the interface tests for the rest.After landing the gossipsub1.1 it will be a good opportunity for doing this. We will need to update floodsub to receive
libp2p
(as we are doing for gossipsub), which will require changes in the tests. I plan to get it done in parallel with this effort.The text was updated successfully, but these errors were encountered: