Using ZKP for better p2p messaging with Waku
Devcon·Mon, Oct 9, 2023, 12:00 AM
Visit the https://archive.devcon.org/ to gain access to the entire library of Devcon talks with the ease of filtering, playlists, personalized suggestions, decentralized access on IPFS and more. https://archive.devcon.org/archive/watch/6/using-zkp-for-better-p2p-messaging-with-waku/index In this short demo we'll look at Waku, the communication layer for Web3, and how it uses ZK for its service network. We'll demo using Waku with RLN for private, economic spam protection and what this means for you as a user and node operator. We'll also briefly look at how we can incentivize other services in the network in a private manner. Finally we'll show how you can actively participate in and contribute to the network yourself as a node operator, developer or end user. Speaker(s): Oskar Thorén Skill level: Beginner Track: ZKPs: Privacy, Identity, Infrastructure, & More Keywords: zk Follow us: https://twitter.com/efdevcon, https://twitter.com/ethereum Learn more about devcon: https://www.devcon.org/ Learn more about ethereum: https://ethereum.org/ Devcon is the Ethereum conference for developers, researchers, thinkers, and makers. Devcon 6 was held in Bogotá, Colombia on Oct 11 - 14, 2022. Devcon is organized and presented by the Ethereum Foundation, with the support of our sponsors. To find out more, please visit https://ethereum.foundation/
Transcript
foreign [Music] service network we'll show a demo with vacuum for we're using our land for private economic spam protection and what this means for you as a user and node operator finally we look at how you can actively participate in and contribute to a network itself as a node operator developer or end user and just as a warning I gave a talk yesterday that's going to be fairly similar to this one but this one is going to be slightly more higher level and targeted towards step Developers so first briefly about vac and me some director of research back we build public good protocols for the centralized web with a focus on privacy and communication we do applied research based on which we build protocols libraries and Publications and we also the custodians of protocols that reflect a set of principles it has its origins in the status Tab and basically trying to improve on online protocols and infrastructure and we build back among other things so as a Dev developer you have you might have like a front-end and some smart contact and the front end could be a website something else like a binary but what about all the other interactions so in the original web free Vision you had the whole Trinity with ethereum for compute consensus one for storage and Whisper for messaging a lot of these centralized applications tabs they make sacrifices how they function from the way domains work to our websites are hosted and Reliance essential Services when it comes to communication and we see this time and time again where centralized single points of failure systems they work for a while but then eventually they fail and often individual users they might not care enough and is tempting for platforms to take shortcuts and that's why it's important to be principled but at the same time be pragmatic in terms of trade-offs that you allow on top and we'll touch more on this when it comes to design goals around the modularity so it's request uh so privacy is the power to selectively reveal yourself and his requirement for freedom and self-determination and just like you need decentralization in order to get sensory resistance you need privacy to enable freedom of expression and to build applications that are decentralized and private protecting we need a base layer the infrastructure itself to have those properties uh signals proofs are a wonderful new tool and just like smart contacts enable programmable money synops proofs allows us to express fundamentally new things and in line with the great tradition of trust minimization we can prove statements while revealing adapted minimum information necessary and this fits the definition of privacy the power to selectively reveal itself perfectly I'm sorry you'll need to tell everyone in this room but this is truly revolutionary technology is advancing extremely fast and often it's our imagination is limit so Bridgestone backers what is it it's a set of modeler protocols for peer-to-peer communication it has a focus on privacy security and being able to run anywhere it's basically the spiritual success of the whisper by modeler we mean that you can pick and choose protocols and how you use them depending on various constraints and trade-offs for example bandwidth uses versus privacy it's designed to work in resources seated environments like mobile phones and in web browsers it's decentralized sensor persistent and blocks in agnostic share some example use cases for Raku so for example status is using it for its chat functionality World connect is partly using it for session management railgun for its relay Network and you can use it for things like multi-synchronization with hypnosis safe there are currently three main implementations uh JS vacuum for browsers go vacuum which is optimized for users on mobile and desktop and then else has binding for things like kotlin and Swift vacuo in Nim which is their sort of Main Service node and we're all the research is happening is also an experimental version in Rust just briefly on some some protocols that are used so we specify how our messages are formatted to facilitate things like encryptions and centers and relay for sending and receiving messages and this is based on lipid because sub and then also protocols for a lot more light usage like filter light push in store um these are you node used for by nodes that are maybe not always online or they might have some connectivity or bandwidth restrictions and there's also Olean relay which is used for peer-to-peer economic spam protection using sequence arcs which I'll go into soon and there are other products here as well but these are the main ones of Interest right now so one way of looking at vacuo is as an open service network there are nodes with varying degrees it becomes compatibilities and requirements for example when it comes to things like bandwidth usage storage uptime privacy requirements latest requirements and connectivity restrictions we have this concept of adaptive nodes that run a variety of protocols and node operating can sort of choose which protocols they want to run and naturally be some nodes that do more consumption and other nodes to do more provisioning and this gives kind of rise to the idea of a service network where services are provided for and consumed uh this is one way of looking at sort of vacuum Network we have a bunch of nodes with different capabilities and they run different protocols and for the vacuum Network there are a few problems that arise here um for example when it comes to network spam and in centralizing service nodes and we want to address these while keeping private Securities of the base layer so spam problem arises on the gospel player where anyone can overrun the network with messages and the source improvisation is a problem when nodes don't directly benefit from provisioning of a certain service this can happen if they're not using the protocol directly themselves as part of normal operation or if they're on social inclined to provide a certain service and this depends on a lot on how individual platforms decide to use this network in this air talk I'm only going to go into the first one but I also give a talk yesterday where I touched on the service inflation a bit more uh since the peer-to-peer relay network is open to anyone uh there's a problem with Spam and if we look at some existing solutions for dealing with Spam in traditional missing systems a lot of entities like Google Facebook Twitter telegram Discord they use phone number verification and while this is largely stable assistant it's centralized and not private at all historically wispy use proof work which isn't really good for heterogeneous networks and things like peer scoring but it's open to simple attacks and doesn't directly address spam protection spam protection in an anonymous peer-to-peer Network and the key idea here is to use Orlando for private economic spam protection using Seekers Knox I'm not going to go into too much detail of our land here if you're interested there's some write-ups on Vector Dev but it's now so it's been pushing all of this from outside and Taylor is giving a talk which goes into the online circuit in more detail in a few hours in this room um so but I'll just talk briefly about what is so Orlando stands for rate limiting nullifier it's an anonymous rate limited mechanism based on CK stocks and by rate limiting we mean that you can only send n messages in a given period And by anonymity we mean that you can't link messages to a publisher we can figure it as a voting booth where you're only allowed to vote once every election it can be used for things like spam protection and P2P investing system s and also rate limiting in general such as foreign capture and there are basically three parts to it so you register somewhere and then you can signal and file industry verification slashing phase you put some Capital at risk and this can need to be economic economical or social and if you double signal you get slashed so each user has a secret identity key and Reddit is a commitment of that in a contract and deposit some funds and this makes them a member of that outline group and the key to withdraw that fund uh is the secret identity key and if someone knows that secret they can take their Associated funds and for each Epoch the user sends a message by proving that it's member of the online group and it reveals a similar secret of its secret identity key the shares derived in such a way that two of success in the same Epoch allows construction of the corresponding secret ID key and the secret sharing has another element which is an application a defined identifier which is their online identifier and with that you can sort of make the secret sharing unique for your application so for example if a user wants to use the same membership credentials for two different apps for missing then you can do two without being worried about getting slashed by combining two shares from two different applications uh so here's a brief recorded video see here it's playing so what this is showing is that on the right here you have Jason in browser and you connect to your wallet and then sort of pulls on the state from their all-in contract uh including the number of members that are there and then after that you generate all inquiry installs locally so that's uh yeah the secret key and then also the kind of the public key uh and then you basically register it in the smart contract it's going to take a while until it gets it gets through and then that's on the left here you see in vacuum which is sort of uh this uh service node written in him um and that's going to listen for events from the contract and there's also this example chat application that you see in the top left um it will take a bit of time to go through and then basically the next step after you have registered is going to be the signaling right so this is uh using vacuum in the kind of light mode using light push stuff to that uh here you can see on the bottom left you see that the new key has been added so it's receiving the public keys from the smart contract and basically updating his local tree because it needs that in order to do verification and slashing [Music] now the transaction has been included see here yeah that was a bit slow one second right so here you actually sort of sending uh so in this case it's just using this very light mode to connect to the vacuum Network and then you're sending a message and once you send a message it's going to construct a proof as well as some additional metadata that's needed and then it's going to sort of basically propagate it throughout the rest of the network and all the these nodes that are running all in relay will sort of verify that verify that proof as well it makes s make sure that this is yeah the seeking proof is valid that it's not double signaling and and it's in the right Epoch and these sorts of things so you can see here it's been received um yeah and it's gonna and it's going to keep relaying it to other nodes I'm actually gonna skip to the next one uh here just to show how spamming works well this is playing right right so in this case we have I think it's a Unix the epoch is basically like a Unix time uh like 10 seconds uh buffer so that means that if you send more than two misses in a 10 second period and then that will sort of um you will it will be an invalid message basically right here we go so now you're going to see in the bottom left that it's uh yeah spam system has been found and it's going to drop the message for the validation so it means it's not going to propagate it to other nodes basically uh and slashing is not fully implemented yet in the in the sort of this client but it's work in progress um yeah so just some backup slides in case the demo didn't work here right uh so now whatever you can you can build stuff with backup today and regardless of which platform what platform you're on if it's a mobile browser on a server whatever you can take it to evacu.org we'll talk to some people from the back of Team here I also didn't go into too much detail of this here but if you want to play with this Library we're building um you can also do this with the circuit and this basically enables you to use all learnable applications outside of vacuum in different environments so maybe it's not just a browse application but you want to do something in in Rust with python or whatever so it can be pretty useful because as a cffi API and awesome API as well and you can also run a node and this helps the network and it's a fun way to sort of get more Hands-On when it comes to peer-to-peer and CK infra even if you aren't super technical um yeah I can check out this code and say hi as a QR code here to the back Discord here's some links if you find any of these exciting to work on feel free to come up to talk to me and we also hiring
Automatic transcript — names and jargon may be misspelled.