mirror of
https://github.com/logos-messaging/docs.waku.org.git
synced 2026-01-07 15:23:07 +00:00
1 line
10 KiB
JavaScript
1 line
10 KiB
JavaScript
|
|
"use strict";(self.webpackChunkwaku_guide=self.webpackChunkwaku_guide||[]).push([[5766],{28453:(e,n,o)=>{o.d(n,{R:()=>d,x:()=>c});var s=o(96540);const i={},r=s.createContext(i);function d(e){const n=s.useContext(r);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:d(e.components),s.createElement(r.Provider,{value:n},e.children)}},99919:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>t,contentTitle:()=>c,default:()=>h,frontMatter:()=>d,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"run-node/configure-discovery","title":"Configure Peer Discovery","description":"This guide provides detailed steps to configure a nwaku node to discover and connect with peers in the Waku Network.","source":"@site/docs/run-node/configure-discovery.md","sourceDirName":"run-node","slug":"/run-node/configure-discovery","permalink":"/run-node/configure-discovery","draft":false,"unlisted":false,"editUrl":"https://github.com/waku-org/docs.waku.org/tree/develop/docs/run-node/configure-discovery.md","tags":[],"version":"current","lastUpdatedAt":null,"frontMatter":{"title":"Configure Peer Discovery","hide_table_of_contents":true,"displayed_sidebar":"runNode"},"sidebar":"runNode","previous":{"title":"Build Nwaku from Source","permalink":"/run-node/build-source"},"next":{"title":"Find Your Node Address","permalink":"/run-node/find-node-address"}}');var i=o(74848),r=o(28453);const d={title:"Configure Peer Discovery",hide_table_of_contents:!0,displayed_sidebar:"runNode"},c=void 0,t={},l=[{value:"Configure static peers",id:"configure-static-peers",level:2},{value:"Configure DNS discovery",id:"configure-dns-discovery",level:2},{value:"Configure Discv5",id:"configure-discv5",level:2},{value:"Configure peer exchange",id:"configure-peer-exchange",level:2}];function a(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",p:"p",pre:"pre",ul:"ul",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(n.p,{children:["This guide provides detailed steps to configure a ",(0,i.jsx)(n.code,{children:"nwaku"})," node to discover and connect with peers in the Waku Network."]}),"\n",(0,i.jsx)(n.admonition,{type:"info",children:(0,i.jsxs)(n.p,{children:["You can configure a ",(0,i.jsx)(n.code,{children:"nwaku"})," node to use multiple peer discovery mechanisms simultaneously."]})}),"\n",(0,i.jsx)(n.h2,{id:"configure-static-peers",children:"Configure static peers"}),"\n",(0,i.jsxs)(n.p,{children:["You can provide ",(0,i.jsx)(n.a,{href:"/learn/concepts/static-peers",children:"static peers"})," to a ",(0,i.jsx)(n.code,{children:"nwaku"})," node during startup using the ",(0,i.jsx)(n.code,{children:"staticnode"})," configuration option. To connect to multiple peers on startup, repeat the ",(0,i.jsx)(n.code,{children:"staticnode"})," option:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-shell",children:"./build/wakunode2 \\\n --staticnode=[PEER MULTIADDR 1] \\\n --staticnode=[PEER MULTIADDR 2]\n"})}),"\n",(0,i.jsxs)(n.p,{children:["For example, consider a ",(0,i.jsx)(n.code,{children:"nwaku"})," node that connects to two static peers on the same local host (IP: ",(0,i.jsx)(n.code,{children:"0.0.0.0"}),") using TCP ports ",(0,i.jsx)(n.code,{children:"60002"})," and ",(0,i.jsx)(n.code,{children:"60003"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-shell",children:"./build/wakunode2 \\\n --staticnode=/ip4/0.0.0.0/tcp/60002/p2p/16Uiu2HAkzjwwgEAXfeGNMKFPSpc6vGBRqCdTLG5q3Gmk2v4pQw7H \\\n --staticnode=/ip4/0.0.0.0/tcp/60003/p2p/16Uiu2HAmFBA7LGtwY5WVVikdmXVo3cKLqkmvVtuDu63fe8safeQJ\n"})}),"\n",(0,i.jsx)(n.h2,{id:"configure-dns-discovery",children:"Configure DNS discovery"}),"\n",(0,i.jsxs)(n.p,{children:["To enable ",(0,i.jsx)(n.a,{href:"/learn/concepts/dns-discovery",children:"DNS Discovery"})," in a ",(0,i.jsx)(n.code,{children:"nwaku"})," node, use the following configuration options:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{ch
|