Thanks Pierre,
Do you know of any existing code that uses LibP2P (either NodeJs or GoLang) that is connecting to Substrate? I’m able to connect to IPFS but still unable to connect to the substrate network. It looks like that some of the libraries like (NodeJs multiaddr) might be built for IPFS only.
I was able to ping the IPFS bootnodes but when I just try to ping (using the standard setup provided by libp2p tutorial) the Substrate bootnodes, I get either one of two errors:
When pinging /ip4/40.117.153.33/tcp/30363/p2p/QmPiGU1jwL9UDw2FMyMQFr9FdpF9hURKxkfy6PWw6aLsur
The response is:
pinging remote peer at /ip4/40.117.153.33/tcp/30363/ipfs/QmPiGU1jwL9UDw2FMyMQFr9FdpF9hURKxkfy6PWw6aLsur
error pinging: { Error: No available transports to dial peer QmPiGU1jwL9UDw2FMyMQFr9FdpF9hURKxkfy6PWw6aLsur!
When Pinging: /ip4/104.211.48.247/tcp/30363/ipfs/QmYT3p4qGj1jwb7hDx1A6cDzAPtaHp3VR34vmw5BsXXB8D
Response:
pinging remote peer at /ip4/104.211.48.247/tcp/30363/ipfs/QmYT3p4qGj1jwb7hDx1A6cDzAPtaHp3VR34vmw5BsXXB8D
error pinging: Error: dialed to the wrong peer, Ids do not match
My config:
transport: [
TCP,
WebSockets
],
connEncryption: [
SECIO
],
streamMuxer: [
Multiplex
]
}
Looks like the multiaddr library is converting all p2p
protocol into ipfs
not sure if that’s intentional and if that’ll work for the substrate network.
If you can point me to some reference code (go/node) for connecting to Substrate using libP2P that would be very helpful.
Thanks