You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've configured a node to connect to a known bootstrapped peer and broadcast messages using floodsub. Both nodes are running locally on my machine. It seems like the node can connect to the peer just fine (and vice versa) however pubsub does not seem to recognize that a peer is connected despite both nodes subscribing to the same topic. As a result, I cannot exchange messages between nodes. I was having this issue using gossipsub originally, and was only able to get gossipsub to work when I set the directPeers. I would expect that I could exchange messages between peers as long as they both subscribe to the same topic.
Looking into this a bit further it seems the issue may be with the connection managers onConnect method. I tried debugging the _onPeerConnected function but it was not being called. For reference, this may be related to ChainSafe/js-libp2p-gossipsub#481.
Logs
# Node 1 is started and subscribed to 'test-topic'
Qma3GsJmB47xYuyahPZPSadh1avvxfyYQwk8R3UnFrQ6aP - node instance has started
Qma3GsJmB47xYuyahPZPSadh1avvxfyYQwk8R3UnFrQ6aP - node is subscribed to test-topic
# Node 2 is started and subscribed to 'test-topic'
QmcrQZ6RJdpYuGvZqD5QEHAv6qX4BrQLJLQPQUrTrzdcgm - node instance has started
QmcrQZ6RJdpYuGvZqD5QEHAv6qX4BrQLJLQPQUrTrzdcgm - node is subscribed to test-topic
# Node 1 discovers Node 2
Qma3GsJmB47xYuyahPZPSadh1avvxfyYQwk8R3UnFrQ6aP - peer found: QmcrQZ6RJdpYuGvZqD5QEHAv6qX4BrQLJLQPQUrTrzdcgm
# Node 2 discovers Node 1
QmcrQZ6RJdpYuGvZqD5QEHAv6qX4BrQLJLQPQUrTrzdcgm - peer found: Qma3GsJmB47xYuyahPZPSadh1avvxfyYQwk8R3UnFrQ6aP
# Node 1 connects with Node 2
QmcrQZ6RJdpYuGvZqD5QEHAv6qX4BrQLJLQPQUrTrzdcgm - connected to: zQma3GsJmB47xYuyahPZPSadh1avvxfyYQwk8R3UnFrQ6aP
# Node 2 connects with Node 1
Qma3GsJmB47xYuyahPZPSadh1avvxfyYQwk8R3UnFrQ6aP - connected to: zQmcrQZ6RJdpYuGvZqD5QEHAv6qX4BrQLJLQPQUrTrzdcgm
Qma3GsJmB47xYuyahPZPSadh1avvxfyYQwk8R3UnFrQ6aP - node peers QmcrQZ6RJdpYuGvZqD5QEHAv6qX4BrQLJLQPQUrTrzdcgm
# Node 1 does not have pubsub peers or subscribers
Qma3GsJmB47xYuyahPZPSadh1avvxfyYQwk8R3UnFrQ6aP - node connections 2
Qma3GsJmB47xYuyahPZPSadh1avvxfyYQwk8R3UnFrQ6aP - pubsub subscribers: 0
Qma3GsJmB47xYuyahPZPSadh1avvxfyYQwk8R3UnFrQ6aP - pubsub peers: 0
# Node 2 does not have pubsub peers or subscribers
QmcrQZ6RJdpYuGvZqD5QEHAv6qX4BrQLJLQPQUrTrzdcgm - node connections 2
QmcrQZ6RJdpYuGvZqD5QEHAv6qX4BrQLJLQPQUrTrzdcgm - pubsub subscribers: 0
QmcrQZ6RJdpYuGvZqD5QEHAv6qX4BrQLJLQPQUrTrzdcgm - pubsub peers: 0
Platform: MacOS
Subsystem:
Severity: High
Description:
I've configured a node to connect to a known bootstrapped peer and broadcast messages using
floodsub
. Both nodes are running locally on my machine. It seems like the node can connect to the peer just fine (and vice versa) however pubsub does not seem to recognize that a peer is connected despite both nodes subscribing to the same topic. As a result, I cannot exchange messages between nodes. I was having this issue usinggossipsub
originally, and was only able to getgossipsub
to work when I set thedirectPeers
. I would expect that I could exchange messages between peers as long as they both subscribe to the same topic.Looking into this a bit further it seems the issue may be with the connection managers
onConnect
method. I tried debugging the_onPeerConnected
function but it was not being called. For reference, this may be related to ChainSafe/js-libp2p-gossipsub#481.Logs
Steps to reproduce the error:
Minimally reproducible example: https://gist.github.com/0xCourtney/c59b786d8609ebcba7747658f3b7b6d3
The text was updated successfully, but these errors were encountered: