libp2p / js-libp2p-bootstrap

Rail a libp2p node through a bootstrap peer list
https://libp2p.io
Other
30 stars 21 forks source link

Boot strapping first ever node in network? #134

Closed chainhead closed 2 years ago

chainhead commented 2 years ago

If I want to launch first ever node of my network - meaning, no other nodes exist in network - how should my configuration to launch the bootstrap node look like?

achingbrain commented 2 years ago

If you've not got any nodes to bootstrap to, you'd just not use the bootstrap module.

So instead of:

const node = await createLibp2p({
  addresses: {
    listen: [...]
  },
  transports: [...],
  streamMuxers: [...],
  connectionEncryption: [...],
  peerDiscovery: [
    new Bootstrap({
      list: [...]
    })
  ]
})

do:


```js
const node = await createLibp2p({
  addresses: {
    listen: [...]
  },
  transports: [...],
  streamMuxers: [...],
  connectionEncryption: [...]
})