Skip to content

Messages are not propagated when only some nodes subscribe a topic #149

@vasco-santos

Description

@vasco-santos

Let's consider a simple network with 3 peers {A, B, C}, with 2 connections established A<->B and B<->C

In this scenario, if A subscribes to a given topic and C publishes messages to that topic, A should be able to receive the messages.

It seems to me that https://github.com/ChainSafe/js-libp2p-gossipsub/blob/v0.8.0/ts/index.ts#L1034 this should not break here, otherwise we will not grab fanout peers. However, this does not seem to fix the issue, as I tried to do a small hacking in the code but messages were not sent to the peer.

Other than that, should we make canRelayMessage options to be true by default? I would expect the default behaviour to relay messages, but users might turn that off if they like.

Test scenario to test: libp2p/js-libp2p-interfaces#83 (use this branch as a dep)

@wemeetagain any ideas on what is wrong here?

cc @Gozala

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions