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

fix: use unidirectional streams #105

Merged
merged 2 commits into from
Jun 4, 2020
Merged

Conversation

vasco-santos
Copy link
Member

@vasco-santos vasco-santos commented Jun 3, 2020

This PR makes libp2p pubsub subsystem use unidirectional streams instead of bidirectional streams per discussion on ipfs/go-ipfs#7390.

More details about the reasoning for this can be found in https://discuss.libp2p.io/t/gossip-questions/257/6

I have tested this change on all libp2p repos: js-libp2p, libp2p-daemon and interop and everything is working properly. The tests here need to be updated though, as a result of the tests being implemented considering a bidirectional stream.

Bear in mind that a lot of this "connection logic" can be abstracted. I did not worry about it and just followed what we already had in floodsub and gossipsub. Hopefully, after gossipsub@1.1, I want to create the libp2p pubsub interface and move/refactor the tests there and re-use most of them in all our router implementations.

Needs:

@vasco-santos vasco-santos marked this pull request as ready for review June 3, 2020 16:15
@vasco-santos
Copy link
Member Author

Per ipfs/kubo#7390 (comment) this should be ready to go

@vasco-santos vasco-santos merged commit 96d3265 into master Jun 4, 2020
@vasco-santos vasco-santos deleted the fix/use-unidirectional-streams branch June 4, 2020 08:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants