docs.waku.org/assets/js/2f51beae.30097b0e.js

1 line
6.9 KiB
JavaScript
Raw Normal View History

2024-02-20 09:23:32 +00:00
"use strict";(self.webpackChunkwaku_guide=self.webpackChunkwaku_guide||[]).push([[231],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>m});var r=n(67294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var c=r.createContext({}),l=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},p=function(e){var t=l(e.components);return r.createElement(c.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},v=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,i=e.originalType,c=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),d=l(n),v=o,m=d["".concat(c,".").concat(v)]||d[v]||u[v]||i;return n?r.createElement(m,a(a({ref:t},p),{},{components:n})):r.createElement(m,a({ref:t},p))}));function m(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=n.length,a=new Array(i);a[0]=v;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[d]="string"==typeof e?e:o,a[1]=s;for(var l=2;l<i;l++)a[l]=n[l];return r.createElement.apply(null,a)}return r.createElement.apply(null,n)}v.displayName="MDXCreateElement"},59043:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>l,default:()=>f,frontMatter:()=>c,metadata:()=>p,toc:()=>u});var r=n(87462),o=(n(67294),n(3905));const i={toc:[]},a="wrapper";function s(e){let{components:t,...n}=e;return(0,o.kt)(a,(0,r.Z)({},i,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("mermaid",{value:"sequenceDiagram\n Alice->>DNS Server: (1) Execute DNS Discovery\n DNS Server--\x3e>Alice: (2) Bob's connection details (UDP + TCP)\n activate Alice\n Alice->>Bob: (3) Execute Discv5 over UDP\n Bob--\x3e>Alice: (4) ENRs (UDP + TCP): Carol, David, Erin\n Alice->>Alice: (5) Decode ENRs\n Alice->>Carol: (6) Execute Discv5 over UDP\n Carol--\x3e>Alice: (7) ENRs (UDP + TCP): Frank, Gwen, Harry\n Alice->>Alice: (8) Decode ENRs\n deactivate Alice\n Alice->>Alice: (9) Select peers to dial\n Alice->>David: (10) Libp2p dial (TCP)\n Alice->>Frank: (10) Libp2p dial (TCP)\n Alice->>Gwen: (10) Libp2p dial (TCP)"}),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},"DNS Discovery protocol is executed."),(0,o.kt)("li",{parentName:"ol"},"Alice retrieves Bob's ENR (Ethereum Node Record) from DNS Server."),(0,o.kt)("li",{parentName:"ol"},"Alice executes the Discv5 protocol with Bob using UDP connection details from ENR."),(0,o.kt)("li",{parentName:"ol"},"Bob returns Carol's, David's and Erin's ENRs to Alice."),(0,o.kt)("li",{parentName:"ol"},"Alice decodes ENRs and extracts the details of Carol, David, and Erin's TCP and UDP connections."),(0,o.kt)("li",{parentName:"ol"},"Alice executes the Discv5 protocol with Carol using UDP connection details from ENR."),(0,o.kt)("li",{parentName:"ol"},"Carol returns Frank's, Gwen's and Harry's ENRs to Alice."),(0,o.kt)("li",{parentName:"ol"},"Alice decodes ENRs and extracts Frank's, Gwen's and Harry's TCP and UDP connection details."),(0,o.kt)("li",{parentName:"ol"},"Alice selects