Skip to content
This repository has been archived by the owner on Jun 26, 2023. It is now read-only.

RFC: pubsub-interface #53

Closed
vasco-santos opened this issue Jul 2, 2020 · 2 comments
Closed

RFC: pubsub-interface #53

vasco-santos opened this issue Jul 2, 2020 · 2 comments
Labels
kind/enhancement A net-new feature or improvement to an existing feature

Comments

@vasco-santos
Copy link
Member

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 the libp2p-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.

@vasco-santos
Copy link
Member Author

Thoughts?
cc @jacobheun @wemeetagain

@jacobheun jacobheun added the kind/enhancement A net-new feature or improvement to an existing feature label Jul 9, 2020
@vasco-santos
Copy link
Member Author

This was done

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/enhancement A net-new feature or improvement to an existing feature
Projects
None yet
Development

No branches or pull requests

2 participants