Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query: GossipSub publish doesn't return failure even if node is not connected to any peers for a topic #539

Open
chaitanyaprem opened this issue Aug 16, 2023 · 3 comments

Comments

@chaitanyaprem
Copy link
Contributor

If we are using GossipSub to publish a message for a topic, the API doesn't return any error/failure in case there are no peers available for that topic.
If there are no fan-out peers identified/discovered for that topic, shouldn't an error be returned to the caller indicating that not enough peers are available to publish the message?

Especially since a node is not required to subscribe to a topic to which it wants to publish messages, I am thinking this would be a good to have.

@vyzo
Copy link
Collaborator

vyzo commented Aug 16, 2023

There is a publish option to wait until there are enough peers.

@chaitanyaprem
Copy link
Contributor Author

chaitanyaprem commented Aug 18, 2023

Ok, but shouldn't it be the default option.
I am wondering as to why would a node want to publish if there are no peers to publish. Is there some use-case i am missing?

@vyzo
Copy link
Collaborator

vyzo commented Aug 18, 2023

The library can't guess the user's requirements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants