mirror of
https://github.com/vacp2p/research.logos.co.git
synced 2026-04-03 03:01:03 -04:00
1 line
16 KiB
JavaScript
1 line
16 KiB
JavaScript
"use strict";(self.webpackChunkresearch_logos_co=self.webpackChunkresearch_logos_co||[]).push([[7594],{12630:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>d,contentTitle:()=>l,default:()=>c,frontMatter:()=>a,metadata:()=>n,toc:()=>h});var n=s(49241),i=s(74848),r=s(28453);const a={layout:"post",name:"Waku Update",title:"Waku Update",date:new Date("2020-02-14T12:00:00.000Z"),authors:"oskarth",published:!0,slug:"waku-update",categories:"research",image:"/img/waku_infrastructure_sky.jpg",discuss:"https://forum.research.logos.co/t/waku-update-where-are-we-at/34"},l=void 0,d={authorsImageUrls:[void 0]},h=[{value:"Current state",id:"current-state",level:2},{value:"How many users does Waku support?",id:"how-many-users-does-waku-support",level:2},{value:"Simulation",id:"simulation",level:2},{value:"Difference between Waku and Whisper",id:"difference-between-waku-and-whisper",level:2},{value:"Next steps and future plans",id:"next-steps-and-future-plans",level:2},{value:"Acknowledgements",id:"acknowledgements",level:2}];function o(e){const t={a:"a",code:"code",em:"em",h2:"h2",img:"img",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.p,{children:"A research log. What's the current state of Waku? How many users does it support? What are the bottlenecks? What's next?"}),"\n","\n",(0,i.jsxs)(t.p,{children:["Waku is our fork of Whisper where we address the shortcomings of Whisper in an iterative manner. We've seen a in ",(0,i.jsx)(t.a,{href:"https://research.logos.co/fixing-whisper-with-waku",children:"previous post"})," that Whisper doesn't scale, and why. In this post we'll talk about what the current state of Waku is, how many users it can support, and future plans."]}),"\n",(0,i.jsx)(t.h2,{id:"current-state",children:"Current state"}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.strong,{children:"Specs:"})}),"\n",(0,i.jsxs)(t.p,{children:["We released ",(0,i.jsx)(t.a,{href:"https://rfc.vac.dev/waku/standards/legacy/6/waku1",children:"Waku spec v0.3"})," this week! You can see the full changelog ",(0,i.jsx)(t.a,{href:"https://rfc.vac.dev/waku/standards/legacy/6/waku1/#changelog",children:"here"}),"."]}),"\n",(0,i.jsx)(t.p,{children:"The main change from 0.2 is making the handshake more flexible. This enables us to communicate topic interest immediately without ambiguity. We also did the following:"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"added recommendation for DNS based discovery"}),"\n",(0,i.jsx)(t.li,{children:"added an upgradability and compatibility policy"}),"\n",(0,i.jsx)(t.li,{children:"cut the spec up into several components"}),"\n"]}),"\n",(0,i.jsx)(t.p,{children:"We cut the spec up in several components to make Vac as modular as possible. The components right now are:"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:["Waku (main spec), currently in ",(0,i.jsx)(t.a,{href:"https://rfc.vac.dev/waku/standards/legacy/6/waku1",children:"version 0.3.0"})]}),"\n",(0,i.jsxs)(t.li,{children:["Waku envelope data field, currently in ",(0,i.jsx)(t.a,{href:"https://rfc.vac.dev/waku/standards/legacy/7/data",children:"version 0.1.0"})]}),"\n",(0,i.jsxs)(t.li,{children:["Waku mailserver, currently in ",(0,i.jsx)(t.a,{href:"https://rfc.vac.dev/waku/standards/legacy/8/mail",children:"version 0.2.0"})]}),"\n"]}),"\n",(0,i.jsx)(t.p,{children:"We can probably factor these out further as the main spec is getting quite big, but this is good enough for now."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.strong,{children:"Clients:"})}),"\n",(0,i.jsxs)(t.p,{children:["There are currently two clients that implement Waku v0.3, these are ",(0,i.jsx)(t.a,{href:"https://github.com/status-im/nim-waku",children:"Nimbus (Update: now nim-waku)"})," in Nim and ",(0,i.jsx)(t.a,{href:"https://github.com/status-im/status-go",children:"status-go"})," in Go."]}),"\n",(0,i.jsxs)(t.p,{children:["For more details on what each client support and don't, you can follow the ",(0,i.jsx)(t.a,{href:"https://github.com/vacp2p/pm/issues/7",children:"work in progress checklist"}),"."]}),"\n",(0,i.jsxs)(t.p,{children:["Work is currently in progress to integrate it into the ",(0,i.jsx)(t.a,{href:"https://github.com/status-im/status-react/pull/9949",children:"Status core app"}),". Waku is expected to be part of their upcoming 1.1 release (see ",(0,i.jsx)(t.a,{href:"https://trello.com/b/DkxQd1ww/status-app-roadmap",children:"Status app roadmap (link deprecated)"}),")."]}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.strong,{children:"Simulation:"})}),"\n",(0,i.jsxs)(t.p,{children:["We have a ",(0,i.jsx)(t.a,{href:"https://github.com/status-im/nim-waku/blob/master/waku/v1/node/quicksim.nim",children:"simulation"})," that verifies - or rather, fails to falsify - our ",(0,i.jsx)(t.a,{href:"https://research.logos.co/fixing-whisper-with-waku",children:"scalability model"}),". More on the simulation and what it shows below."]}),"\n",(0,i.jsx)(t.h2,{id:"how-many-users-does-waku-support",children:"How many users does Waku support?"}),"\n",(0,i.jsx)(t.p,{children:"This is our current understanding of how many users a network running Waku can support. Specifically in the context of the Status chat app, since that's the most immediate consumer of Waku. It should generalize fairly well to most deployments."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.strong,{children:"tl;dr (for Status app):"})}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"beta: 100 DAU"}),"\n",(0,i.jsx)(t.li,{children:"v1: 1k DAU"}),"\n",(0,i.jsx)(t.li,{children:"v1.1 (waku only): 10k DAU (up to x10 with deployment hotfixes)"}),"\n",(0,i.jsx)(t.li,{children:"v1.2 (waku+dns): 100k DAU (can optionally be folded into v1.1)"}),"\n"]}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.em,{children:"Assuming 10 concurrent users = 100 DAU. Estimate uncertainty increases for each order of magnitude until real-world data is observed."})}),"\n",(0,i.jsx)(t.p,{children:"As far as we know right now, these are the bottlenecks we have:"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"Immediate bottleneck - Receive bandwidth for end user clients (aka \u2018Fixing Whisper with Waku\u2019)"}),"\n",(0,i.jsx)(t.li,{children:"Very likely bottleneck - Nodes and cluster capacity (aka \u2018DNS based node discovery\u2019)"}),"\n",(0,i.jsx)(t.li,{children:"Conjecture but not unlikely to appear- Full node traffic (aka \u2018the routing / partition problem\u2019)"}),"\n"]}),"\n",(0,i.jsxs)(t.p,{children:["We've already seen the first bottleneck being discussed in the initial post. Dean wrote a post on ",(0,i.jsx)(t.a,{href:"https://research.logos.co/dns-based-discovery",children:"DNS based discovery"})," which explains how we will address the likely second bottleneck. More on the third one in future posts."]}),"\n",(0,i.jsxs)(t.p,{children:["For more details on these bottlenecks, see ",(0,i.jsx)(t.a,{href:"https://discuss.status.im/t/scalability-estimate-how-many-users-can-waku-and-the-status-app-support/1514",children:"Scalability estimate: How many users can Waku and the Status app support?"}),"."]}),"\n",(0,i.jsx)(t.h2,{id:"simulation",children:"Simulation"}),"\n",(0,i.jsx)(t.p,{children:"The ultimate test is real-world usage. Until then, we have a simulation thanks to Kim De Mey from the Nimbus team!"}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{src:s(28640).A+"",width:"1131",height:"637"})}),"\n",(0,i.jsx)(t.p,{children:"We have two network topologies, Star and full mesh. Both networks have 6 full nodes, one traditional light node with bloom filter, and one Waku light node."}),"\n",(0,i.jsx)(t.p,{children:"One of the full nodes sends 1 envelope over 1 of the 100 topics that the two light nodes subscribe to. After that, it sends 10000 envelopes over random topics."}),"\n",(0,i.jsx)(t.p,{children:"For light node, bloom filter is set to almost 10% false positive (bloom filter: n=100, k=3, m=512). It shows the number of valid and invalid envelopes received for the different nodes."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.strong,{children:"Star network:"})}),"\n",(0,i.jsxs)(t.table,{children:[(0,i.jsx)(t.thead,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.th,{children:"Description"}),(0,i.jsx)(t.th,{children:"Peers"}),(0,i.jsx)(t.th,{children:"Valid"}),(0,i.jsx)(t.th,{children:"Invalid"})]})}),(0,i.jsxs)(t.tbody,{children:[(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Master node"}),(0,i.jsx)(t.td,{children:"7"}),(0,i.jsx)(t.td,{children:"10001"}),(0,i.jsx)(t.td,{children:"0"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Full node 1"}),(0,i.jsx)(t.td,{children:"3"}),(0,i.jsx)(t.td,{children:"10001"}),(0,i.jsx)(t.td,{children:"0"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Full node 2"}),(0,i.jsx)(t.td,{children:"1"}),(0,i.jsx)(t.td,{children:"10001"}),(0,i.jsx)(t.td,{children:"0"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Full node 3"}),(0,i.jsx)(t.td,{children:"1"}),(0,i.jsx)(t.td,{children:"10001"}),(0,i.jsx)(t.td,{children:"0"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Full node 4"}),(0,i.jsx)(t.td,{children:"1"}),(0,i.jsx)(t.td,{children:"10001"}),(0,i.jsx)(t.td,{children:"0"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Full node 5"}),(0,i.jsx)(t.td,{children:"1"}),(0,i.jsx)(t.td,{children:"10001"}),(0,i.jsx)(t.td,{children:"0"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Light node"}),(0,i.jsx)(t.td,{children:"2"}),(0,i.jsx)(t.td,{children:"815"}),(0,i.jsx)(t.td,{children:"0"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Waku light node"}),(0,i.jsx)(t.td,{children:"2"}),(0,i.jsx)(t.td,{children:"1"}),(0,i.jsx)(t.td,{children:"0"})]})]})]}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.strong,{children:"Full mesh:"})}),"\n",(0,i.jsxs)(t.table,{children:[(0,i.jsx)(t.thead,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.th,{children:"Description"}),(0,i.jsx)(t.th,{children:"Peers"}),(0,i.jsx)(t.th,{children:"Valid"}),(0,i.jsx)(t.th,{children:"Invalid"})]})}),(0,i.jsxs)(t.tbody,{children:[(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Full node 0"}),(0,i.jsx)(t.td,{children:"7"}),(0,i.jsx)(t.td,{children:"10001"}),(0,i.jsx)(t.td,{children:"20676"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Full node 1"}),(0,i.jsx)(t.td,{children:"7"}),(0,i.jsx)(t.td,{children:"10001"}),(0,i.jsx)(t.td,{children:"9554"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Full node 2"}),(0,i.jsx)(t.td,{children:"5"}),(0,i.jsx)(t.td,{children:"10001"}),(0,i.jsx)(t.td,{children:"23304"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Full node 3"}),(0,i.jsx)(t.td,{children:"5"}),(0,i.jsx)(t.td,{children:"10001"}),(0,i.jsx)(t.td,{children:"11983"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Full node 4"}),(0,i.jsx)(t.td,{children:"5"}),(0,i.jsx)(t.td,{children:"10001"}),(0,i.jsx)(t.td,{children:"24425"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Full node 5"}),(0,i.jsx)(t.td,{children:"5"}),(0,i.jsx)(t.td,{children:"10001"}),(0,i.jsx)(t.td,{children:"23472"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Light node"}),(0,i.jsx)(t.td,{children:"2"}),(0,i.jsx)(t.td,{children:"803"}),(0,i.jsx)(t.td,{children:"803"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Waku light node"}),(0,i.jsx)(t.td,{children:"2"}),(0,i.jsx)(t.td,{children:"1"}),(0,i.jsx)(t.td,{children:"1"})]})]})]}),"\n",(0,i.jsx)(t.p,{children:"Things to note:"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"Whisper light node with ~10% false positive gets ~10% of total traffic"}),"\n",(0,i.jsx)(t.li,{children:"Waku light node gets ~1000x less envelopes than Whisper light node"}),"\n",(0,i.jsx)(t.li,{children:"Full mesh results in a lot more duplicate messages, expect for Waku light node"}),"\n"]}),"\n",(0,i.jsxs)(t.p,{children:["Run the simulation yourself ",(0,i.jsx)(t.a,{href:"https://github.com/status-im/nim-waku/blob/master/waku/v1/node/quicksim.nim",children:"here"}),". The parameters are configurable, and it is integrated with Prometheus and Grafana."]}),"\n",(0,i.jsx)(t.h2,{id:"difference-between-waku-and-whisper",children:"Difference between Waku and Whisper"}),"\n",(0,i.jsxs)(t.p,{children:["Summary of main differences between Waku v0 spec and Whisper v6, as described in ",(0,i.jsx)(t.a,{href:"https://eips.ethereum.org/EIPS/eip-627",children:"EIP-627"}),":"]}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"Handshake/Status message not compatible with shh/6 nodes; specifying options as association list"}),"\n",(0,i.jsx)(t.li,{children:"Include topic-interest in Status handshake"}),"\n",(0,i.jsx)(t.li,{children:"Upgradability policy"}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"topic-interest"})," packet code"]}),"\n",(0,i.jsx)(t.li,{children:"RLPx subprotocol is changed from shh/6 to waku/0."}),"\n",(0,i.jsx)(t.li,{children:"Light node capability is added."}),"\n",(0,i.jsx)(t.li,{children:"Optional rate limiting is added."}),"\n",(0,i.jsx)(t.li,{children:"Status packet has following additional parameters: light-node, confirmations-enabled and rate-limits"}),"\n",(0,i.jsx)(t.li,{children:"Mail Server and Mail Client functionality is now part of the specification."}),"\n",(0,i.jsx)(t.li,{children:"P2P Message packet contains a list of envelopes instead of a single envelope."}),"\n"]}),"\n",(0,i.jsx)(t.h2,{id:"next-steps-and-future-plans",children:"Next steps and future plans"}),"\n",(0,i.jsx)(t.p,{children:"Several challenges remain to make Waku a robust and suitable base\ncommunication protocol. Here we outline a few challenges that we are addressing and will continue to work on:"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"scalability of the network"}),"\n",(0,i.jsx)(t.li,{children:"incentived infrastructure and spam-resistance"}),"\n",(0,i.jsx)(t.li,{children:"build with resource restricted devices in mind, including nodes being mostly offline"}),"\n"]}),"\n",(0,i.jsxs)(t.p,{children:["For the third bottleneck, a likely candidate for fixing this is Kademlia routing. This is similar to what is done in ",(0,i.jsx)(t.a,{href:"https://www.ethswarm.org/",children:"Swarm's"})," PSS. We are in the early stages of experimenting with this over libp2p in ",(0,i.jsx)(t.a,{href:"https://github.com/status-im/nim-libp2p",children:"nim-libp2p"}),". More on this in a future post!"]}),"\n",(0,i.jsx)(t.h2,{id:"acknowledgements",children:"Acknowledgements"}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsxs)(t.em,{children:['Image from "caged sky" by mh.xbhd.org is licensed under CC BY 2.0 (',(0,i.jsx)(t.a,{href:"https://ccsearch.creativecommons.org/photos/a9168311-78de-4cb7-a6ad-f92be8361d0e",children:"https://ccsearch.creativecommons.org/photos/a9168311-78de-4cb7-a6ad-f92be8361d0e"}),")"]})})]})}function c(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(o,{...e})}):o(e)}},28453:(e,t,s)=>{s.d(t,{R:()=>a,x:()=>l});var n=s(96540);const i={},r=n.createContext(i);function a(e){const t=n.useContext(r);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),n.createElement(r.Provider,{value:t},e.children)}},28640:(e,t,s)=>{s.d(t,{A:()=>n});const n=s.p+"assets/images/waku_simulation-3923bb91799b72a73608687149068b40.jpeg"},49241:e=>{e.exports=JSON.parse('{"permalink":"/rlog/waku-update","source":"@site/rlog/2020-02-14-waku-update.mdx","title":"Waku Update","description":"A research log. What\'s the current state of Waku? How many users does it support? What are the bottlenecks? What\'s next?","date":"2020-02-14T12:00:00.000Z","tags":[],"readingTime":5.64,"hasTruncateMarker":true,"authors":[{"name":"Oskar","twitter":"oskarth","github":"oskarth","key":"oskarth","page":null}],"frontMatter":{"layout":"post","name":"Waku Update","title":"Waku Update","date":"2020-02-14T12:00:00.000Z","authors":"oskarth","published":true,"slug":"waku-update","categories":"research","image":"/img/waku_infrastructure_sky.jpg","discuss":"https://forum.research.logos.co/t/waku-update-where-are-we-at/34"},"unlisted":false,"prevItem":{"title":"From Kademlia to Discv5","permalink":"/rlog/kademlia-to-discv5"},"nextItem":{"title":"DNS Based Discovery","permalink":"/rlog/dns-based-discovery"}}')}}]); |