New Ethereum talks, every Monday. The week's conference uploads by event, in your inbox.

Loading player…

Bridging the Gap in Decentralized Communications with Waku | Danish Arora, Waku | ETHTaipei 2024

ETHTaipeiWed, Oct 9, 2024, 12:00 AM

Bridging the Gap in Decentralized Communications with Waku | Danish Arora, Waku | ETHTaipei 2024

Transcript

I am Danish I'm an engineer at waku and we're going to be talking about Communications today so over the past few decades we've seen internet protocols evolve uh but privacy isn't something that these protocols essentially solve for your social interactions by default aren't Anonymous on these platforms they're linked your interactions are linked with IP addresses which arguably can be solved uh by using certain strategies and these platforms require kyc of sorts so maybe email verification phone verification this leads this exposure can lead to censorship um surveillance and of course like your hindering your freedom of speech let's say hi to waku so waku is a family of the censorship resistant and private protocols that enable uh privacy focused communication some of the things that waku really stands for is private communication what that means is your interactions with the protocol are Anonymous it's adaptive what that means is you can use different type of devices be it a mobile phone be it an extensive VPS um so you have a choice and flexibility in the terms of devices you interact with it's censorship resistant which also ties into the Privacy argument it's scalable so we recently implemented sharding on the network which helps scale the network to Millions uh it is modular so it is built on lip P2P um which is by the protocol Labs team and is extensively modular what that means is you can pick the pieces that you want to use for the network for your node you can use your own sort of encryption you can um use your own sort of Discovery strategies and so on it also has rate limiting which is kind of a cool feature for a peer-to-peer Network to have and we'll we'll talk about rate limiting and spam prevention for the network um going into the presentation so these properties sound pretty cool for a chat application right but waku is much more than just chat and can be seen as a generalized coms um layer some of the applications can include gaming marketplaces State channels and anything that can benefit from peer-to-peer and decentralized um Communications so who here is familiar with this diagram looking back at the history of ethereum of course so uh this was introduced this was uh included a lot and talked by Gavin Woods the co-founder co-creator of ethereum U Back in the day and this essentially talks about how the original Cipher Punk vision for ethereum where ethereum was to be used as the contract lay swarm for file storage and Whisper for uh Communications CU to 2024 um whisper was extended by waku V1 which a few years down the line was upgraded to to use to waku V2 which uses lip P2P and today waku is continuing to evolve we have sharding implemented we have things like spam prevention in the works so let's look at what Mak waku so two parts the first the protocols themselves and everything is available on RFC W.D which is the research entity and everything is open source uh we have our implementations available in typescript Nim goang there are rust bindings available C bindings available and react HS which ties into the typescript implementation so looking at the protocols everything is Pub sub so every message that is sent out to the network uh Works in a publishing subscriber way light push is actually the published part of the protocol uh everything gets sent out to a particular content topic filter is used to subscribe to a particular content topic and store is a temporary U Storage layer that we provide with vaku this is how a message traversal would usually look like with multiple content topics and different devices sending out uh messages into the network this is the format for how a Content topic would look like for example um you want to have your application name of the version the content topic name and encoding and in action um a message gets sent out to a Content topic using light push and is subscribed with uh subscribed with filter to different peers and the stored protocol allows for a temporary storage layer for these messages if do not want to keep the ephemerality the message structure um looks something like that but what we're really interested is in the payload which is of arbitrary data type and that that really allows you to be very flexible with what you can and cannot send on the network moving on um we have a lot of different peer Discovery strategies within vaku and it is built on top of lip P2P so everything is pretty much mod so you can choose to implement your own P Discovery strategy um talking about relay this is really the backbone of the entire network it uh is an extension to lip p2ps gossip sub the same protocol that is also used in ethereum uh clients and rln relay is a new addition um which is an extension to relay but also uses rate limiting nullifiers which we'll talk about uh more in a second which helps and ties back into the spam prevention and uh rate limit in part of the protocol so a normal message uh using relay would look something like that and this is similar to light push and filter what we just saw um this is uh Bob sending out a message to a Content topic using relay and Alice John and Charlie happily consuming these uh this this message now let's say Bob decides to be a little more malicious and sends out or kind of wants to spam the network so he sends out multiple messages into the content topic now Alice John and Charlie aren't happy the most happy because well there Bob is anonymous right nobody actually knows who Bob is and this is one of the problems with uh peer-to-peer Anonymous networks which is Spam is a problem that nobody really wants to talk about um and then moving on Bob decides to spam even further right and Alis John and Charlie are still very very confused and Bob just decides to um just go for it right and we don't even Charlie anymore right Charlie just disappeared and Alice and JN are just you know they're all over the place so this is what the network looks like without rln which is with Spam right um rln stands for rate limiting Neiers and if we look at this diagram we see Bob being the malicious actor sends out these messages into the network and spams the network which essentially causes these certain nodes to just get burned down um moving on now that we talk talk about rln if the same uh message traversal was to be included with a certain zero knowledge proof that nodes can verify um and based on certain um properties like how many signals per Epoch is being sent out these nodes can verify the proof and if uh the the proofs do not match or if there's some problem with uh a if spam is detected these messages can be dropped and the connection with the nodes can be drop and this can be really seen uh with these statistics where the proof generation time we increase the average Miss size but the proof generation time generally revolves around uh 15 milliseconds similarly for proof verification time it somewhere stays around uh 20 milliseconds and this is a really interesting one so here we see the malicious actor sending out almost 2500 m Mees per minute right and we see that the the connection right at that instant the connection with that node is dropped and this is essentially what rln is solving and this ties into the waku network um this is the RFC for the network and uh you can essentially run your own note today in a permissionless way we have certain um docs that can help you get started and the easiest one is to either set up a Dap node or uh run your own Docker container and this is a very very cool uh demo of how message is being traveled in a live way by one of uh my colleagues Alvaro um let me see if I can try to play this yeah so this is how a message is traveling or there's something up with the demo but yeah so we can see um basically this is a live view of how a message travels across the network across different nodes and these are some of the resources that can really help you understand these things better and maybe try things more Hands-On uh docs. wu. org can give you a glimpse into how you can use waku as a developer or if you choose to run a node ideas. wu.

are some of the projects that we uh it's it's like an idea board that we see getting built out with waku and awesome waku is a GitHub repository that um houses all the different hackathon projects or different side projects that are built using waku um some of the projects that currently use waku are XMP uh the graph status and rail gun if anybody's interested feel free to scan this QR and you would be uh jumped right into the docs website which will house most of the information that we talked about and everything we do is open source and Communications happen in the Discord so if you're interested to just observe lurk around contribute feel free to join the Discord and that's it for me thank you thank you Danish do we have any question for Danish or [Music] waku uh does waku do encryption uh very good question so we do encrypt connections with noise with the noise protocol but again uh since waku is very modular you do have a flexibility of using whatever connection uh encryption layer you want um saying that we also encourage developers to really use uh encryption strategies of themselves on the application layer so on the protocol layer we do have an option of using noise but again we encourage uh developers and application consumers to sort of use their own encryption strategies okay thank you does that does that answer your question um so um we can add another encryption layer on top of waku right correct okay and um um how does it compare to like web RTC um so web RTC is a family of protocols right which is also peer toer but natively with web RTC you do form um it is it is a way for you to connect to a different node right it is a connection uh layer waku with within waku you can choose to use web RTC as a means to connect to another peer you can also choose to use TCP um so you can use different uh protocols that uh that you can connect to to different peers dependent on what uh the other node supports for example if you're using vaku in a browser environment um websockets is a strategy that we generally recommend uh um web RTC is something that is still possible similarly UDP is something that's still possible so all these strategies are possible but this is something that in the browser environments we're experimenting on and haven't really uh tried but considering it is Li and considering that you have the flexibility of using whatever you should be able to experiment and uh uh you know just just try it so Wu is um can use um many protocol underneath right so um think of waku as the closest an analogy to web a web2 protocol um is a message bus right so I wouldn't really say TCP IP uh as as an alter as as an analogy just because it it assumes certain message reliabilities and acknowledgements that waku does not do so waku is actually an abstraction over the certain protocols um it is built on top of the uh Gossip up protocol by lip2p right which is again pubsub so when you're connecting one node to uh when you're connecting your node to another node you can choose to use whichever protocol you prefer which is supported right it can be web RTC it can be TCP it can be UDP it can be websockets is there some Financial incentive for Relay provider great question so we are we have been permissionless for um forever almost but incentivization is something that is currently is is being researched and uh it is part of our road map for this year pre probably by Q4 Q3 Q4 so it is something that is being researched uh but currently waku nodes are not being incentivized so we do have uh certain operators that um are running their nodes and if you do run into and we're we're going to be opening um uh a form of sorts to actually just keep a log of all the operators that currently exist in the network so if you do run into any troubles running your own node Discord is a great place to uh just bounce your uh questions off of okay thank you of course thank you more questions um so you mentioned RN is used in the waku and sorry can you say that again r n yes is used so um what user need to deposit before using the chat right so we are currently deployed on um testnet we're currently deployed on cipia uh the exact uh specifics of slashing is uh also being researched um so the idea is of course you you deposit a you you stake um certain amount of tokens into the contract and that essentially gives you a membership ID and whenever you send a message into the network you generate a proof based on your membership ID and some more parameters and is that is being uh that is verified by the other nodes and if you are seen seen to be a malicious node or a or a bad actor you will be slashed but the specifics of it is currently being researched and uh everything is open source so we encourage uh contribution if you're interested in this particular part of it uh the Discord and the Forum is a great place to be at um and um if user um only spends in the certain topic um what is still be slashed or is um it will have limitation for each topic or um it's overall so if I understand that right um you're asking if the node can choose to choose the content topics that it cares about yeah um oh I mean um user might only spam in the surgeon topic instead of the um all topics so um what Ron work on each topic I mean work the rate limit per topic or it is overall for all topics yeah I see so that's a very good question um you as as an note the when you're generating your proof certain criterias need to be met for example the number of messages per Epoch that you're sending out for which for example if it's a minute um it is independent of as far as I know the we we'd have to check the circuit um but it is independent of the the pub sub topic or the content topic that you're sending out the message to and it is linked to uh your membership ID your commitment and uh the the epoch and the number of messages that you are sending I see thank you to what extent depend on sorry can you say that again to what extent does the graph depend on waku yeah of course so um graph Ops one of the um sister companies of the graph which uh essentially uses waku to decentralize their indexers um so indexers need to communicate with each other right and um they prior to waku they use some sort of central uh coms to facilitate uh their their Communications and switching out to waku they essentially have their indexers communicate with each other using waku do we have more questions thank you so much D thank you

Automatic transcript — names and jargon may be misspelled.