mirror of
https://github.com/logos-messaging/docs.waku.org.git
synced 2026-01-03 21:33:05 +00:00
1 line
4.6 KiB
JavaScript
1 line
4.6 KiB
JavaScript
"use strict";(self.webpackChunkwaku_guide=self.webpackChunkwaku_guide||[]).push([[8061],{28453:(e,n,i)=>{i.d(n,{R:()=>s,x:()=>c});var o=i(96540);const r={},t=o.createContext(r);function s(e){const n=o.useContext(t);return o.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(r):e.components||r:s(e.components),o.createElement(t.Provider,{value:n},e.children)}},58962:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>d,contentTitle:()=>a,default:()=>p,frontMatter:()=>l,metadata:()=>o,toc:()=>h});const o=JSON.parse('{"id":"learn/concepts/peer-exchange","title":"Peer Exchange","description":"The primary objective of this protocol is to facilitate peer connectivity for resource-limited devices without relying on Discv5. The peer exchange protocol enables light nodes to request peers from other nodes within the network.","source":"@site/docs/learn/concepts/peer-exchange.md","sourceDirName":"learn/concepts","slug":"/learn/concepts/peer-exchange","permalink":"/learn/concepts/peer-exchange","draft":false,"unlisted":false,"editUrl":"https://github.com/waku-org/docs.waku.org/tree/develop/docs/learn/concepts/peer-exchange.md","tags":[],"version":"current","lastUpdatedAt":null,"frontMatter":{"title":"Peer Exchange","hide_table_of_contents":true,"displayed_sidebar":"learn"},"sidebar":"learn","previous":{"title":"Discv5","permalink":"/learn/concepts/discv5"},"next":{"title":"Security Features","permalink":"/learn/security-features"}}');var r=i(74848),t=i(28453);function s(e){const n={li:"li",mermaid:"mermaid",ol:"ol",...(0,t.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.mermaid,{value:"sequenceDiagram\n Alice->>DNS Server: (1) Execute DNS Discovery\n DNS Server--\x3e>Alice: (2) Bob's multiaddr (websocket)\n Alice--\x3e>Bob: (3) Dial\n Alice->>Bob: (4) Peer Exchange Query\n Bob--\x3e>Alice: (5) Carol's ENR, David's ENR\n Alice->>Alice: (6) Decode ENRs\n Alice->>Carol: (7) Dial\n Alice->>David: (7) Dial\n Alice--\x3e>Bob: (8) Disconnect"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsx)(n.li,{children:"DNS Discovery protocol is executed."}),"\n",(0,r.jsx)(n.li,{children:"Alice retrieves Bob's websocket multiaddr from DNS Server."}),"\n",(0,r.jsx)(n.li,{children:"Alice dials Bob using libp2p protocols."}),"\n",(0,r.jsx)(n.li,{children:"Alice executes a Peer Exchange query to Bob."}),"\n",(0,r.jsx)(n.li,{children:"Bob returns Carol's and David's ENR to Alice."}),"\n",(0,r.jsx)(n.li,{children:"Alice decodes ENRs and extracts Carol's and David's websocket multiaddrs."}),"\n",(0,r.jsx)(n.li,{children:"Alice dials Carol and David."}),"\n",(0,r.jsx)(n.li,{children:"Alice can now drop the connection with Bob (bootstrap node); Alice has 2 connections to the Waku Network."}),"\n"]})]})}function c(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(s,{...e})}):s(e)}const l={title:"Peer Exchange",hide_table_of_contents:!0,displayed_sidebar:"learn"},a=void 0,d={},h=[{value:"Pros",id:"pros",level:4},{value:"Cons",id:"cons",level:4},{value:"Overview",id:"overview",level:2}];function u(e){const n={admonition:"admonition",code:"code",h2:"h2",h4:"h4",li:"li",p:"p",ul:"ul",...(0,t.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(n.p,{children:["The primary objective of this protocol is to facilitate peer connectivity for resource-limited devices without relying on ",(0,r.jsx)(n.code,{children:"Discv5"}),". The peer exchange protocol enables light nodes to request peers from other nodes within the network."]}),"\n",(0,r.jsx)(n.admonition,{type:"info",children:(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"Peer Exchange"})," enables requesting random peers from other network nodes without revealing information about their connectivity or neighbourhood."]})}),"\n",(0,r.jsx)(n.h4,{id:"pros",children:"Pros"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Low resource requirements."}),"\n",(0,r.jsxs)(n.li,{children:["Decentralised with random sampling of nodes from a global view using ",(0,r.jsx)(n.code,{children:"Discv5"}),"."]}),"\n"]}),"\n",(0,r.jsx)(n.h4,{id:"cons",children:"Cons"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Decreased anonymity."}),"\n",(0,r.jsx)(n.li,{children:"Imposes additional load on responder nodes."}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n","\n",(0,r.jsx)(c,{})]})}function p(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(u,{...e})}):u(e)}}}]); |