When I use peer A to call dht.get(cid), I have Error:Not Found, which is normal.
But then I use peer B to call dht._putLocal(cid, data).
And use peer A to call dht.get(cid), I have this error:
Uncaught (in promise) Error: stream reset
at Object.reset (stream.js:72)
at Mplex._handleIncoming (mplex.js:227)
at mplex.js:156
at async Mplex.sink (mplex.js:149)
Hello @th-781
Not exactly sure about the problem. Can you replicate this running with the debugger mode enabled and provide us the logs? Debug info
Moreover, you should not add the KadDHT to the peerRouting modules. I know this is confusing as KadDHT provides a peerRouting module. We want to improve the config to become more consistent, but for now the DHT need to be configured as a separate piece (and in the code we join it to the Peer and Content Routing modules.
I will remove KadDHT from peerRouting for the time being. By the way, is it fine that I don’t use anything for peerDiscover? My intention is to let peers contact a local WebRTC Star signaling server, and use it to discovery peers.
Yes, a discovery module is not mandatory. Also in reality the webrtc-star transport is also a discovery module, but it is not transparent to the user. There are some gaps in the libp2p config that we need to improve to make these sort of things more clear to the users. We have this issue to discuss that work. If you would like to add there the pain points you are having with the libp2p config, I would be appreciate as this might help us prioritize this.