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 am currently testing the DHT discovery example file. I created a simple bootstrap node.
When launching 4 instances of 1-dht.js file, they are able to make connection to the bootstrap node only, they can't connect to other nodes.
Do you think this behavior is okay?
Here is my bootstrap node code :
import { createLibp2p } from 'libp2p'
import { tcp } from '@libp2p/tcp'
import { noise } from '@chainsafe/libp2p-noise'
import { kadDHT } from '@libp2p/kad-dht'
import { identify } from '@libp2p/identify'
import { yamux } from '@chainsafe/libp2p-yamux'
const node = await createLibp2p({
addresses: {
listen: [
'/ip4/0.0.0.0/tcp/2000',
'/ip4/0.0.0.0/tcp/2001/ws'
]
},
transports: [
tcp()
],
streamMuxers: [
yamux()
],
connectionEncrypters: [
noise()
],
services: {
identify: identify(),
dht: kadDHT({
kBucketSize: 20,
clientMode: false // Whether to run the WAN DHT in client or server mode (default: client mode)
})
}
})
node.start();
console.log('PeerID: ', node.peerId.toString())
console.log('Multiaddrs: ', node.getMultiaddrs())
Thank you.
The text was updated successfully, but these errors were encountered:
Hello everyone,
I am currently testing the
DHT
discovery example file. I created a simple bootstrap node.When launching 4 instances of
1-dht.js
file, they are able to make connection to the bootstrap node only, they can't connect to other nodes.Do you think this behavior is okay?
Here is my bootstrap node code :
Thank you.
The text was updated successfully, but these errors were encountered: