Closed 0xCourtney closed 4 months ago
Can you please configure the @libp2p/identify
service and try again?
import { identify } from '@libp2p/identify'
const n = await createLibp2p({
// ... other config
services: {
// ... other services
identify: identify()
}
})
Can you please configure the
@libp2p/identify
service and try again?import { identify } from '@libp2p/identify' const n = await createLibp2p({ // ... other config services: { // ... other services identify: identify() } })
That did it, thanks.
Version:
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 https://github.com/ChainSafe/js-libp2p-gossipsub/issues/481.Logs
Steps to reproduce the error:
Minimally reproducible example: https://gist.github.com/0xCourtney/c59b786d8609ebcba7747658f3b7b6d3