libp2p/js-libp2p-bootstrap

How would a bootstrap node itself be configured?

Closed this issue · 1 comments

  • The examples here and in js-libp2p always point out that e.g. an instance running online and hosted at port 4001 could be used as a bootstrap node.
  • But that node running online being the bootstrap node, how is that supposed to be configured? For peerDiscover.tag.list does it have itself in there?

Actually, I found out myself: A bootstrap node doesn't integrate this package and neither defines any configuration as if it does, it'll start throwing errors like this one:

 libp2p:err Error: ERR_DISCOVERED_SELF
  libp2p:err     at Libp2p._onDiscoveryPeer (/root/rugpulld/node_modules/libp2p/src/index.js:674:17)
  libp2p:err     at Bootstrap.emit (node:events:390:28)
  libp2p:err     at /root/rugpulld/node_modules/libp2p-bootstrap/src/index.js:73:14
  libp2p:err     at Array.forEach (<anonymous>)
  libp2p:err     at Bootstrap._discoverBootstrapPeers (/root/rugpulld/node_modules/libp2p-bootstrap/src/index.js:57:16)
  libp2p:err     at Timeout._onTimeout (/root/rugpulld/node_modules/libp2p-bootstrap/src/index.js:44:42)
  libp2p:err     at listOnTimeout (node:internal/timers:557:17)
  libp2p:err     at processTimers (node:internal/timers:500:7) +1ms