[ASSETH] reçoit Parity + Snips - 25 Mai 2018
Ethereum Paris·Wed, Oct 9, 2019, 12:00 AM
L'Asseth a le plaisir de vous convier à ce meetup, qui traitera des sujets suivants : - Maciej Hirsz - Parity Signer & MyCrypto - Presentation & Demo - Turn your old mobile phone into a hardware wallet - Andre Silva - Pluggable Conesensus w/ Parity - Presentation - Aura/PoA and what we're working on in the engine (support for finality, casper, etc.) - Rand Hindi - Snips AIR: a Private-by-Design, Open-Source, Decentralized Voice Assistant Ce meetup vous est proposé en partenariat avec TalanLabs que nous remercions chaleureusement pour leur accueil et leur soutien. Pour en savoir plus sur Talan Labs : https://blog.talanlabs.com/cat/technologies/blockchain/ Pour adhérer à l'Asseth: http://www.asseth.fr/adhesion/ https://www.meetup.com/fr-FR/cryptofr/events/250855451/
Transcript
tonight it's on the plate we have on the menu we have parody several times about priority has been a very long time since we wanted to have priority to a meet up with us so we are very happy that they are present today and renting G from steps is gonna also come and present his project for a I in rock chain and before we started at Jerome here I give us a couple of words about Tara Nancy so we are p22 welcome yet for another meetup is probative fifth or sixth time between that I really appear to see you here tonight so we're just a big group of so it's a slider in French I wasn't expecting English content so basically we're about two hundred two thousand people by the end of the year spread worldwide although there's a lot of people in in France in multiple cities and we are working on four main technology levers which are quite similar to many people I guess I achieved a big big that are artificial intelligence and obviously blockchain which is a reason why we already a bit to a sort of view I'm part of specific and gt72 small called Terran labs some of you may have last months we had a meteor meetup here as well where we are talking about a short presentation about the Turin coin which was already also done at the SEC conference so yeah I will just gave you the mic we shortly we've got some few stickers if you want so obviously we are recruiting as many people I guess so you've got some few information there and I'm not sure with the first start but please thank you hi my name is Marty I worked party and this is kind of like um product showcase scissors / a bit of storytelling basically at a party we have like a kind of a problem that we be a lot of things and people don't really know we build things and occasionally you get to ask questions like this and one of the questions actually happens like hey wouldn't be cool if there was an app that could turn me on like falling into hardware what and you know we can do maybe like you something like car codes do to sign transactions or transactions like and yeah would be cool like and the answer usually is like we've already built built over like last year or whatever like whenever we build a thing so the problem is like okay why doesn't anyone know about it like this this has been enough sir for four months and once a month and what it is is basically it's not it's a really erect native app so it works on both iOS and Android all the crypto stuff is actually rust code pulled from the party Jim client so so this is the same kind of like you figure a fee that you're like normally to them now who's running an important thing is the app is completely offline and which means the the app never actually closed any data from the internet and the intended use for the app is that you you get on like an old phone or just a vacated phone for it you download the app and then you put the phone into like flight mode or put it offline forever and then you create an account on the phone so your your private key stays in the phone and never touches a device that's connected to the Internet and the only means of operation is that you exchange the stuff we've using correct QR codes actually in short off a bit actually hello okay maybe maybe further but yeah okay so why doesn't anyone know about it so I need so this is this is a tile from from the polity wallets UI and that's like all the information you have in the party UI so there's kind of like a pictogram of a phone over log and next to no account and there's like no mention of the app in the party UI as this so like if you don't know it exists like he probably doesn't so yeah the ex could have a murder so we felt okay let's let's just you know if we just asked about it like maybe you just like fix it properly and maybe we can try to expect the word about it a bit so what we figured we can ask to do is like get gets like to get it more widespread to get like get it integrating like more popular wallet and like more and user connected wallet so you feel like my Kryptos probably good good candidate here and because it's a it's yeah it's like super like user ending wallet it's a popular it actually solves their issue because my crypto faces like all of issues were decides you know people make copy cake Cooper got to decide with like maybe a bit different URL or whatever and then you know tries to trick people into uploading their private key to the website and then they lose of the money so having like a heart reward obviously is a better way to do it and for us they also had like a very fresh version there was in better at the time now it's actually released and del beta is a complete rewrite and it's all typescript which is nice because you like type systems and it's react which is also nice because we allow the stuff in react side and half like look into like regular JavaScript with angular and try to figure things out it's okay I guess now I can maybe just show it works okay so there's the party tile after all my webcam and it works okay so have my sign out here the one thing I will do though I will change my network from material may not to coven because I don't have really fair if we're here it would not be safe okay so have my account here there is a key our code we address and I just scanned and there we go I was no company for right here and the fastest thinking in there just scoping the dress over send myself 3d fair some transaction and now I get another awesome PR code so this thing is the entire transaction encoded as arrow key so yeah it's basically the exact same thing that goes over network when you send the transaction - the the signature which can't have obviously say just this kind of thing and now the important thing is the app shows me actually the transaction that I'm making so I can verify on the phone that I am really sending you know to you fer from which address to which address at which gas price at which nuns and and so on so forth so I can just over here enter my pin if I have one and now I get a QR code to the signature which is just regular sekhti signature so I just click scan and there we go and then consume it here and it's sent and I can go to a chess game for coven and hopefully it will get mind you know well if you do I feels good okay oh it's pending so they already got it in the queue oh yeah that's roughly how it works so you have your phone ideally offline phone that's dedicated for this purpose you know maybe you'll just upgrade at your phone and just have your old phone lying around being useless so I can just repurpose that for for a hard reward yeah there we go it's mind okay so the way this roughly happened is I come in February everyone an issue as like hey guys do you want this app do you want to use it and you know did the answer was Rafi well they make it small yeah yeah so was Rafi yes we want it you know but in March I open the first VR and then in April it finally get merged and we got this magic party sign our tile next to the legend treasure very important think we have a wiki so you can actually read about it and you can like have like guides on how it works do we also includes how to do it in pirate party wallet so it's not just my crypto stuff hopefully you will get some more adoption I actually was two weeks ago Westerner I also talked to like people from metamath they are like very happy to to the implemented it except they like their infrastructure doesn't really predict having like types of accounts so they would have to draw a lot of refactoring but the things it seems they're they're kind of keen on doing it so that stuff you worry now so this app has been out from on the App Store's for months and months and months but we also like Furyk and we can do better so we're doing and you rewrite actually if you come later to attack to Alexei I can show you like the new build but yeah we have new branding so they all DICOM that you have enough server right now is this weird key which is I believe just free icons from somewhere so we have like a new icon this is like roughly the Parsee logo but it's a bit more used to like the increased size to small sizes you have ten UI so you know I was coming to look roughly like this scanner and you have some more features for it so one thing that's coming is the signed transaction so he cannot show you the actual transaction history because again the phone isn't like digital ink and data but gonna see see what you have signed on on the phone as this that's one thing another thing we figured out okay right now there is no like Network indication on the app the app actually works and lakitu I'm like network that supports you know stuff like my crypto so you can use it and you can use the same account on like main net and obstinate govern and all the other networks what we found out is people don't actually know that that they can use the same private key multiple networks like the assumption was that this is made for the main it and no one knows we're actually adding this primarily as an education that okay you can actually use it more for multiple networks and as a second thing we can also check the chain ID from the transaction you're signing and if you created an account specifically for like a main net and your sign extraction not from the main it then you should at least warn you about it we should like tell you which network the transaction belongs to him and if it's not the turn does that work you expect and maybe you shouldn't sign it and last but not least there's like on all the on all the screens there was this security in the corner so we were also like trying to show you how to use it directing the app without having a battery great documentation because yeah who are its recommendation right so so basically the app will check whether there is wireless access and if there is one last way to access it will show you that the phone is actually insecure so you have like a big red warning on every single screen in the app that you're not actually using it the way it's internet it will obviously work but you know just be educated so Sofia there's link today to the wiki my crypto weak link you still do the better the better stuff like you can just go to their regular my regrow my crypto and because it launched in advance like last week it's roughly so yeah it's on my crypto is pretty free news well so yeah that's it or any questions yeah so you can see you can sign a contract transactions I'm not sure so the QR code scales to the amount of data it just gets more dense I'm not sure actually what the limits are of like how much data it can do but like a regular like year see 20 tokens you can you can send stuff the only problem is like you know the app doesn't obviously know and think about the contracts you're calling so the data is just going to be like hex code that doesn't personally mean anything to human so we're thinking about some ways to do like something about it so maybe like if you use some UI that knows about what they'd be is maybe that you I can tell the phone what the ABI expect the expected API is for the for a come to contact call and the cool thing is the the phone can actually verify that the call in the data is actually matching the signature because of this key month like there is and the types in the name of the functions are hashed and then I've truncated so maybe a bit easy to attack but there's at least somewhere about security where you you know you can actually verify that the data is sending as the data so we can actually see like maybe the data type and I guess for things like maybe you see 20 transfers we can build 210 somehow yeah yeah yeah yeah yes so in the in the order of questions in iterative questions so yeah one thing after you're going to put in the observer guideline like how to use it then one of the points is like you should never plug it into them anything other than like your your manufacturers charger into the power outlet like you shouldn't like put it into like random use B ports but there may be output so fine I don't know but like you know like what were your where your time charging it what would he order to ISO so like the only software so the hard drive or SSD on the on the iPhone I think is encrypted by default on Android you can make it cuter so I think the new version is also encrypted by default there is a pin on when you're sending stuff so he's got a good security Maria like yeah yeah well did so the app should work for our quote unquote right Oh ideally what you can also do is you could you could probably just do like a complete like factory swipe of the phone and then update or download the new version put it offline again and then restore the account from a phrase Rossi right yeah but the application the applications and make transactions yeah I mean sure like you always like have security vulnerabilities and issues with this especially it's I figured I think is the same yeah sube this would be the same yeah and anyway yeah the point is like the app is made so that you should not have to update like you should not be forced to update so like any any new features we are going to add we actually don't want to make like out of races we just want like you've make a hopefully one release and leave it and not have to touch it unless there's like really something changed me to your own protocol itself it's not all the history yeah yeah so we're actually thinking about the drinks I think that were where he could like sing the history the history so like if you're I feel like online what has the ability like fetch the history free account then maybe you can like sync your your you know party sign our up with a QR code fetching in fact fitting of some from you I the problem that is you kind of have to trust it you know obviously and I'm not gonna say sure if this adds super lots of value but yeah we were thinking about it the main problem here is like if you have like a super long history and maybe it doesn't fit in there again this is a similar problem to data maybe you need like a stream of QR codes or something so now the technically possible kind of interesting maybe but like we have some other features we also like one to get my main interest yes yeah yes give floor to hundra [Applause] hi everyone i'm andrey work at parity and i'm gonna give a talk about pluggable consensus with apparenty client so parity is an aetherium client but we usually call it like aetherium plus because we have some extra features they are not part of the main net and we have a really big focus on making sure that the client it's pluggable so the networking code is pluggable the VM is is pluggable so we support EVM and also web assembly and we also have pluggable consensus engines which is what we're going to talk about so what is consensus on the on a blockchain so we want to send transactions that requires us to create new blocks and we need to find a way to agree on who is the next block proposer and we also need to find a way to choose between different chains in case there's a fork which one is the canonical chain so with a proof-of-work the block proposers are actually miners because they must do some work to find the proof and that gives them the right to propose a new block finding the proof is a stochastic process they are just doing a bunch of ashes with random noises until they find one so the next block proposer is chosen randomly in proportion to its computational power and in proof of work the fork choice rule is that we choose a fork if we have two different Forks we go with the one that has the most work behind it it's usually the longest one but that's details whereas with a peer way which is proof of Authority we have a set of authorities that will be proposing blocks and we have a consensus algorithm that will will determine who is the next block proposer after the algorithm determines that validator can then seal a new blog and broadcast it to everyone else so in parity besides supporting like II - for the main net we also support Ora its consensus algorithm that it's called aura the ideas that it's Authority round the full name of the engine so it works by time is split into discrete steps of a given duration so for example let's say five seconds and a step is basically the current time divided by that duration so at a given step a proposer is determined and the rule for determining it is we have like this bounded list of validators and we just pick the note that as the index like step 5 module number of nodes so and that proposer is then allowed to issue a block so basically the consensus itself is done by having synchronized clocks that's what everyone is agreeing on and then from then since everyone has synchronized clocks we can know that we are all on the same step and agree on that and since we know we are all agreeing on the same step we can have this simple rule to determine who is the validator so besides that the protocol also contains a chain scoring rule the idea is that it will prefer chains that are longer but with less gaps that means with less steps skips we might have a smaller chain where no steps were skipped and we will prefer that chain instead and so on each step each honest node will propagate the chain that they have seen with the highest score okay so now we're going to sidetrack into finality so finality it's basically the idea that after and block is finalized it's impossible to revert it like even if we find some other longer chain or chain with a higher score or however we define it after the protocol finalized the block it's impossible to revert so with pio pio proof of work with like aetherium or Bitcoin it has no notion of strict finality because it always follows the longest chain so if somehow we can create a longer chain we can basically revert whatever we want but we also have we do have the concept of economic or probabilistic finality because since there's like a lot of ashing power it's not reasonably to expect you to be able to mine a chain that's 100 blocks ahead because you have to have a lot of mining power and so you have this notion of probabilistic finality so the deeper a block gets in the blockchain the harder it is to revert it so this is why for example with Bitcoin they say that you must wait for six confirmations the idea is that six confirmation gives you an amount of probabilistic or economic finality that you know that no people will have to spend like a lot of money to be able to revert that but with proof of authority we can have different finality guarantees depending on the consensus protocol we can have like instant finality so as soon as the block it's committed it's impossible to revert basically what this means is that every time we're committing a block that a majority of authorities must agree on that or you can have the notion of non instant or eventual finality so this is maybe a bit scary but we'll get get right through it so all this finality work in our consensus engine aura so we have this notion of the signature set of a given set of blocks and so basically for any given such chain if the block at the head has been signed by more than half of the authorities that block and all his ancestors are considered finalized and so we're gonna sorry the authorities also yeah basically let me go back so the authorities are basically some special nodes that can participate in the consensus protocol so whereas in proof of work you can just try there's no coordination you just find the proof and that gives you the authority to wish you a block in proof of authority you have like a set of notes that only then we'll be able to participate in consensus yeah actually I don't know okay so going back to this let's look at an example of how finality works with the formulas that I showed earlier so we will have five authorities so only five nodes will be able to issue new blocks and each each node each of these validators will be denoted by a different color so the first node commits this block at step zero so at the next step it will be other authority that can issue a new block so they will issue a new block and by issuing a new block on top of the previous one they are basically signaling approval for the previous block even though there's no communication like implicitly you are saying that as an authority you agree with what just happened so the next time someone issues a new block they keep implicitly agreeing with what you've built on and in this case the block at step zero is now confirmed by three different authorities and remember that we have like only five authorities so this block is essentially finalized like it's it's no can revert it because there's only two authorities left so we have a majority that as agreed on this specific lock and as we keep issuing new blocks the same thing keeps happening so the block at step zero now for different authorities agree with it in this case it doesn't really matter because we already had the majority but now the block at step one is also finalized the block at step two will also be finalized yeah and so this idea of finality stems from the fact that week a simple majority rule so in this case we only had like two we already have signatures from three nodes even if the other two nodes are malicious they cannot do anything because you'll never get a majority vote but one of the important things with this mechanism is that in order to reach finality basically authorities need to keep producing blocks that yeah so actually in this in this proof of authority it's usually used for like permission chains where you have like authorities in the real world you have a consortium of companies that have an identity so they're not backed by any stake at all in this in this scenario this is a spoiler we're going to talk about this so yeah the only way that we can reach finality is to keep issuing blocks even if there are no transactions we need to issue empty blocks okay so as I said in order to since we need to keep issuing empty blocks this would cause a lot of blockchain bloat so instead what we do is that if the authorities if the selected authority to issue a block has no transactions at all we just like broadcast an empty step message and signed it signed it all of the other authorities accumulated no blockage issues and we go to the next round and basically when an authority has to produce a block it will include all of these empty step messages in the block that's actually mined and these empty step magic messages will also be taken into account for rewards calculation and the empty step messages will also account for finality because by issuing an empty step and the fact that it will be included in a block means that this authority agrees with whatever was done in the previous step so that again they're signalling support for what happened before so we can exploit that to achieve finality okay so now I have a demo let's see is this big enough okay so we're gonna basically start network with three different authorities that will basically keep issuing blocks okay nothing to see here I'll talk about it so you have like three different colors for the three different authorities this this will get better in a bit okay so there are issuing blocks every two seconds roughly and we can see that now they've mined block three now they're unblocked four and every two seconds the authorities the Selective Authority produces in your block in this case it's an empty block and all the other authorities sync with that block so we're not using the empty steps stuff here so I'm gonna change it and we're gonna start again but now oh I hope it's this one okay so now nothing's happening no blocks are being produced but in the backstage new authority is being selected and it's sending an empty step to the message to the other authorities basically they will keep sending empty step messages until someone has a transaction to mine so what I'm going to do is I'm going to send a transaction and yeah the authority that was selected mined a block like right away and then again we have the same finality guarantees obviously this block is not finalized it's the first block but then I can send another transaction and the new block is mined and so this way we don't have to deal with the bloat of always keeping producing empty empty blocks but we still get the same finality guarantees okay so as my check was talking earlier we need to get some way to declare who are the accounts that can participate in the consensus process so who are the authorities the simple thing is to have like a static list of addresses that never change these are authorities that you pick and they will never change at all or we can have a smart contract which the engine will query every time to know who are the current validators so we call this smart contract the validator set and the interface is that when you are implementing this validator set interface whenever you want to change the validators you basically issue and initiate change event which will eventually be picked up by the consensus engine you also need to provide a method to get the current list of validators and there's a special method called final has changed which is only called by the engine when the change that you triggered before is finalized so why can't we right away when we want to change the validators just do it by the way because that the that change itself it's not finalized so we could issue the event saying that we want to change something but the chain could be reworked some other fork where that event is never never exists so we the contract issues the event saying that it wants to change the validator set and when the engine realizes that this block is finalized then it calls the finalized changes method and then you can in your smart contract update internal state to represent the new validator set besides this the validator set interface also has methods for dealing with reporting misbehavior so for example if a given Authority doesn't produce a block on their on their step that's misbehavior we call it like in this index that specific case it's benign and this misbehavior it could just be offline it's not really trying to subvert the system but there's also reporting for malicious activity and in that case you will you also get like a proof of this malicious behavior so if your notes see a given Authority doing basically a double vote so in their step doing different things on different chains if anyone picks this up they can report it to the contract show the proof like this guy issued this block on another place and then in your validator stage you can deal with this any way you like so for example if you had stake you could burn the stake and and kick them out okay so earlier I said that besides dealing with who is the next block proposer we also need to have like a for choice rule and up until now the parity agent had like a hard-coded fork choice rule which was similar to what we had in the theorem so every engine that you implemented in parity had to have this idea of attributing a score to a block and then the rest of the framework will always follow the chain that has the highest total score across all blocks but this doesn't really make sense for engines that provide block finalization because you could find a different chain there's a higher score but that it's reverting some finalized blocks and we should never do that so finality should be taken into account in the for choice rule so what we did was we had like these two methods to the engine when you're implementing a new engine in parity you have like this fork choice type where you say that I want to go with a new fork or with the old fork and the engine cell for example or ax can look at the it's finality information to say okay this block is finalized so it doesn't matter if the score is higher I'm gonna choose the old fork and besides that the engine can also issue like actions so for example in this case the action will be marking a given block as finalized so the engine says this block has been finalized and the framework indels the rest okay all of this finality stuff it's actually needed for us to implement Kasper FFG Kasper FFG it's basically an hybrid proof of work and proof of stake system where he theorem will keep working as it works now with proof of work and every 100 blocks that will have validators taking that will vote to finalize a block that we call a check point we actually already have a prototype working for for the latest VIP and it basically uses all the features that I that I just described about the fork choice framework okay then last thing the paraty consensus engine also allows you to do the block reward calculation using a smart contract so we have some people that are using parity to run their their own theorem like chain and sometimes they have specific rules for how they want to do block rewards and right now what they do is that they either fourth parity and change the engine or we actually incorporate that change into our engine if it's a big enough chain so the idea is that we'll have a smart contract that will calculate the rewards the engine will call that contract get the rewards and then apply them to the chain so the the engine passes this list of benefactors so for this block the benefactors in etherium would be like the block author and the uncles so it's the accounts there are somehow involved in the production of this block and we also have like this array of different kinds so for example for the first benefactor we would say this is the block author for the second one this is an uncle and then you can use whatever logic you want to reward them okay so I've implemented this block reward which is the subsidized Android block reward which basically what it does is you get this list of benefactors and it basically has my account to always receive block rewards so I receive like nine thousand either for every block that is issued this is obviously actually there's some change for which this exact thing is useful because they will use block rewards to like fund the development team so the some some chains actually have something similar to this but now they can implement it without forking parity they just write their smart contract configure the range into query this contract and that's it okay so last slide I think the interesting thing about a proof of Authority is that proof of Authority is a building block for proof of state system so in what you essentially want to do is to choose the authorities in proportion to their stake and you can implement this logic in the validator set you can implement a evaluator set contract where different accounts can just stake ether there you have some logic to to choose which will actually be part of the validator set and then everything else is the same okay and that's it questions yeah yeah yeah yeah so in the case of proof of authority like you know that the next Authority will be this guy but for example as I was saying you imagine that you want to build a proof of stake system on top of this and you can say that like every 50 rounds we change the value they're set so every 50 rounds they're staking involved the your other changes and so you can eat and you can also like do on chain randomness to solve it that kind of stuff so yeah that that specific case yeah even for POS if you build on top of Borre like it's your responsibility to shuffle the validator set like and if the developer set is static but for a small amount of time I guess there's you can prove something about it yeah yeah I mean from a security perspective I don't know what is the size of the epoch also again the question I have to repeat the question which was that we will if we have to reshuffle the validator set every single block if we're doing a proof of state system for security actually I don't know how to answer that question like add there's there's probably like a there's security analysis that you can do based on the number of validators based on the number of blocks that you go between different rounds of staking some to be the no go ahead yeah yeah but but it's okay so the question is that in a proof of stake system we would have to everyone wants to stake they want to stake and be a validator like right away but it doesn't actually like if you stake money it doesn't mean that you're going to be a validator on the next block there's that yeah yeah it's true but even that is not true there's like these epochs where for like this period of 100 blocks its static like it's these validator sets and through this epoch people can stake again I I don't yeah okay so the question was sometimes choosing the longest chain is not a correct decision that was specific to two etherium where we take into account it's not like Bitcoin where we also take into account uncle's it's actually called the greediest observable subtree yeah it's called the ghost protocol where you take into account not only the length of the difficulty but the number of uncles also matter for the difficulty yeah yeah I shouldn't have said that [Laughter] yeah the one that runs on that that's on Linux and Mac OS I guess yeah yeah yeah yeah that's yeah yeah actually this is something not only that we actually have to synchronize the time so we have to make sure that the different authorities are running NTP and stuff like that so as I said like I'm not personally in love with this consensus rule like because as I said like the consensus itself will be done by NTP where it synchronizes time of over different authorities but in the future we want to change so that we don't have such a reliance on synchronized time just on like clocks beating at the same rate and we also want to change something where even if I don't have so for example right now at a given step only the specific authority can issue a block and if it doesn't have any transactions it issues an empty block but the next Authority could have transactions in its queue and could produce a block with transactions so we was also want to improve it so that at each step like I was selected to issue a block but I don't have any transactions but somehow the protocol allows this authority to issue a block in my turn it doesn't happen right now but that's where we want to go eventually like different different epochs inside okay anyone else that's it so I guess I'm gonna be talking less about you know protocols and things like that because in fact what we're working on here a we're likely to be implementing that with parity so you know anyway so what we're building at snips is a decentralized private by design open source voice assistant anybody familiar with Alexa so you've probably seen that news today that someone could randomly recorded and it got sent to a random person and the reason why this happens is because of the voice assistance use machine learning and so machine learning is a probabilistic method it's sometimes it just fails right so in that case there was a triple fail the machine learning failed thinking the woman was asking Alexa to do something so it started listening then it actually taught that a person has said send call or whatever something like that then it failed again thinking they pronounced someone's name so there was three failure consecutively in the machine learning models then made this thing record so the point is that the moment you start using a voice assistant in the cloud you're guaranteed no privacy and whoever says otherwise is either lying to you or has no idea what they're talking about that's a fact so what we're doing is the exact opposite alright so we built a voice assistant and runs a high percent embedded on the device you're talking to so when you're speaking to a device that has the snips assistant inside the device itself does it processing and no data is ever sent to the cloud for processing and so what that means is that we've actually been able to run basically super-advanced deep learning on small devices so if you want to know exactly I works there is a wake word that's a convolution neuron that in a deep net together we squeeze the down to one megabyte there is a speech recognition that transforms the sound of your voice into corresponding text so that's a time delay in your network in LS TM that's 10 megabyte and then there is the natural language understanding which is a more traditional CF so you can see that the platform itself is actually pretty lightweight but you get equivalent performances to what Alex and Gator guys are actually offering so even when people tell you need a part of the cloud to get performance that again is completely a lie it's also mean that our assistant is private by design so it's guaranteed privacy because we have zero data we know nothing about the people using our product but nothing like there is literally no data we have zero server powering the voice assistant that's it it's that simple so we guarantee privacy by design by having zero data effectively it runs pretty fast so you can run that during raspberry pi the whole end-to-end thing will take maybe 200 milliseconds so it's actually faster than if you're going through the network with all the delays of the internet and all these different things so the point I'm trying to say here is that you know very often when people are talking about what assistant or talk thinking about Alexa but my goal here is to actually kill Alexa because that product is exactly everything that's wrong with the Internet it's a centralized product where Amazon has access to all the data of every person using it you know we're talking one in six Americans today that's huge right Amazon as a company gives no information how to collaborate with the government as far as we know they might actually be sending all this data to government we wouldn't actually even know that Amazon is complete closed source we have no idea what's actually running in Alexa and of course it also actually doesn't offer any privacy whatsoever and if that was not enough Amazon's business model is in fact to actually monetize your data so it's basically like for me Alexa is twenty years with people doing things wrong on the Internet and that's essentially what it got to a microphone connected to the internet in your home which makes no sense so anyway now you see the connective super-city okay we support multiple languages so everything in green you can already do today what's in orange is going to be coming up soon what's in red is planned everything else we want to do eventually is just that you know you gotta prioritize it's also open source so we've started open sourcing it piece by piece the first piece we per source is the natural language understanding module the whole platform is built in rust so it's actually also super fast so for those of you who like rust this is actually a super nice piece of software and by the end of the year we will be open sourcing everything else so if you don't trust us you can actually build it yourself and you can use it yourself so that's the ecosystem we're building on top of it you connect it so on top of the snips assistant we basically have two categories we've got an enterprise business that's been going for about a year and a half that's going great we sell that to companies the white label solution on the other side we've got a consumer product that we just announced recently that we're gonna be shipping next year and that consumer product is what I want to talk about here today it's basically a number of different devices with the developer community building stuff on top of it and a blockchain token to power all of that so the idea of the sniffs air Pro consumer product is that it's basically a number of different devices which are connected together in your home so instead of thinking about one you know smart speaker imagine having all those different devices a coffee machine a TV a speaker all of which are connected in a mesh network with AI assistants and so by doing that you can ask your TV to make your coffee you can ask your coffee machine to play music in the living room you don't actually have to worry about how these things are connected and we're building two devices ourselves a smart speaker with a CPU for processing and those small satellites which are effectively microcontroller based power battery powered small microphones and all of that is running internally inside your house so there is absolutely nothing happening on the Internet everything stays local on your local network so this is just to give you an idea of their size so anyway so I'm just gonna be skipping quick here of course you were gonna be building skills so skills are essentially apps but like any platform you want to enable developers to build their own skills as well and so what you need is effectively an app store and so this is a first use for us of a blockchain because when you think about app stores you want people to be able to monetize with their building which means that you need a payment system the problem is if you take credit cards then you have to get identities for the people giving the credit cards and therefore you can actually attach identities with usage of what people are purchasing and so that we kind of like not leave that private and so at least by using cryptocurrencies we don't have to know who the person is you can consider it in your address for every transaction you could use you know monaro z cash something like that there is many ways that you could actually hide the identity and so we're looking at different ways of doing that but it's also a great way to incentivize people to participate in a fair marketplace because app stores are very often completely biased right so the richer people will basically be able to be on top reviewers are completely fake there's all these different issues that you can solve with good you know incentives on a blockchain so I'm not going to give too much detail here about that because it's still not yet finalized but there's a lot of interesting stuff happening here now on the developer site is really where it gets interesting the whole idea of my talk today in order to help people build skills we created this web interface where you can just log online you can very easily create a skill to run on the sniffs assistant we already have sorry yeah so you can build anything you want from voice control drone so these are stuff people actually built voice control drones you know smart home things games for their kids and we even provide a maker kit with a Raspberry Pi a microphone and everything so that when people don't know how to do hardware but they want to just like build a skill for themselves they can already do it so you can buy all of that this is already online oh this is already being used this is $99 it has everything it actually looks pretty cool very geeky but I guess we like that here now talking at about about the blockchain so you've built a great skill and now you put it out on the App Store problem is that machine learning is not her percent in a foolproof sometimes people will be asking something but it's actually not going to work so in that case you do people to give you feedback and you want that feedback to be taking into account in your model so the way this happens is you can use a blockchain and tell users hey tell me what you meant and I'll pay you through the blockchain for that using a token the problem is if you do this then people are just gonna start randomly giving you you know fake data and then you're stuck having to manually validate everything which kind of kills a process so you can introduce third parties people from the community here again that could basically validate those transactions and so here there's also some interesting things you can put in place to make sure that those people don't cheat you can ask them to stake in order to participate in that anyway there's a lot of like very simple interesting dynamics here now this is one of the pieces of technology I'm actually pretty excited about which is decentralized private analytics again if you're building a skill you want to know how people are using it if you're gonna be serious about doing that you need to know about the usage the issue with analytics is that effectively you're asking people to send you their usage data on an individual basis to aggregate them and therefore that breaks privacy about a year ago we actually open-source a way to do analytics in completely secure way cryptographically speaking and so the way that this works is using a combination of multi-party computation and secret sharing and so effectively the user will generate some usage data that's going to be sent to a network of what we call clerks so basically random people doing computing and then this is then going to be aggregated cryptographically to send back to the user and so the developer has no idea about the individual user data and the but still knows about the aggregate a population level statistic so that works you can go under github there is an open source project called SDA we've deployed that on a few mobile apps with a few thousand users as a test what's missing still is the blockchain what are the reason why we didn't actually go further with this is because we didn't have finding a way to incentivize those clerks you know you've got basically people running you know computation for you and so again using a blockchain here is actually pretty straightforward use case for it is and if it's really quite nicely with that model to give you an idea for 10,000 users you would require two good security about 700 different clerks right so you know 7% of where number now the bigger part d centralized machine learning so this is something a lot of people talk about it's a super hot topic at the moment so again there's something called federated machine learning the idea of federated machine learning is that each user is basically updating the neural network on its own device so I've got a let's say a voice assistant and I'm using it and I'm basically going to be updating the model itself as I'm using it and I'm gonna send this updated neural network to this network of clerks again who are going to be securely aggregating those mini neural networks into a metal one that is basically going to be shared so we've got the exact same thing as before you've got people that you're asking to give data and you've got clerks that are asked to compute this data to offer the privacy angle and in this case here it's kind of a combination of the analytics part and the user feedback into one on the blockchain in terms of that you're paying everybody so here again you know it's a very very simple it's a very simple piece of technology you can use some morphic encryption if you really want to make sure it's super secure so that's actually pretty nice and it works really well we have also a version that works of that so anyway so that's just to show you a little bit about the sensitivity of the data the more data you want of course the more sensitive it becomes but the issue with federated learning is that very often people who do that assume that the users have pre annotated data meaning that the user will do the effort of saying you know this is what I said this is what it meant and so on so forth that might work for feedback when it's once in awhile but it doesn't work for federated learning where you might be using every single query someone does as an input and so effectively what you want in that case is to augment the data people give you where data that's generated by other people and so this idea of data generation is also something you have a lot in crypto and blockchain at the moment where people build those networks of workers that basically annotate machine learning day so we've built something like that that we've been selling commercially for about a year it's not decentralized at all for now it actually completely centralized you pay with a credit cards and it goes through you know a bunch of different Mechanical Turk providers but the goal is to eventually completely decentralized it and leverage this community of people to generate the actual data and here again the blockchain is used for payment but also use to make sure people don't cheat because the biggest issue with mechanical Turks in general is that when you're asking a random person to do a task they just basically answer something random and so here by asking them to stake typically you could try to avoid a problem so there's a very elegant and simple solution here anyway so that doesn't matter as much to give you an idea of why data generation is so important that's how much it improve the quality of natural language understanding so a typical developer will use about 70 fish queries to train during your AI assistance and the reason is because if you haven't launched your product well you don't have data and so what you end up doing is manually entering a bunch of examples annotating everything which kind of sucks and so after a while you're just bored of doing that or maybe you're not creative enough if asked you know how many ways can you ask a coffee you probably cannot think of a hundred different ways right however when you actually spread it out to a network of people you can just give a dozen examples click a button and then come back later and you can have thousands of training examples before you launch a product effectively getting the accuracy of those things to above 90% so for us you see there reason why we got interested in using a blockchain is because it made a lot of sense to build this product from a privacy perspective from an engagement of a community perspective from a incentivization perspective like if we were to do it with traditional payment systems and traditional incentivization schemes it just wouldn't work and so you know rather than a blockchain company were really more of an AI company this using a blockchain to solve a very specific product problem that we had and so this is how we're approaching this right it's a tool that hopefully parity is going to provide that we're basically going to be using to power this Alexa killer and the good thing about it is that we really have a community of almost 13,000 developers so we put that out this free version of our platform was out about a year ago not even like thinking in June last year a year ago and it grew organically to over 13,000 people so it turns out that people actually love building for snips because it's exactly the opposite of what it likes currently is thank you any questions I mean obviously I'm gonna be a lot more I can be a lot more technical and machine learning than it can be on blockchain so please you know be nice okay okay he was at the party yesterday that's why saying that yeah but do you agree on the goal of killing it like so okay so it's the same so Amazon so I think to be clear there is also a probability that might happen which is very low that Alexa is gonna be private by design simply because Amazon is making its money not of selling Alexa but of using the data of people using Alexa like they would need to change your entire business model so like in a sense you know we're kind of protected in our approach because those big companies are currently the big players have legacy business models from the 90s that they can't just like shift over I mean they need to find billions of dollars in another way potentially and so so that was just to say there is an economic argument that Alexa will never be private by design now assuming they do offer some type of privacy good enough you know maybe the speeches on device and they keep you know whatever query is on server or something like that then in that case you know you really want to make sure that you have a strong community as well you know I don't think Alexa is ever gonna run on top of a blockchain you know I mean that would be such a leap forward for Amazon like if you start combining every single thing so you would want Amazon to be open source so yeah that's not everything right the fact we're open source means that people can build a voice assistant with snips whichever way they want we're not forcing you and sandboxing you into one very specific way the way Alexa does like Alexa is effectively running Android by the way but you have zero access to the operating system for example there is nothing you can do aside from what Amazon enables you to do which means that you're essentially forced into the Amazon vision of building voice assistance whereas on the opposite we're giving you a complete control over it so I think it's worth philosophically so different and so opposed that you know if they do everything that we're doing quite frankly that's already a big win because it means that we will have proven that it worked to a point where it would have moved them and so that means we probably already have a hundred million users and so you know it's and and and it's also hard to build by the way there is no other team on the planet that can run machine learning on device like we do today so you know well sure I mean I do believe people are going to be doing a lot more edge computing so that's where open sourcing is I don't think our value will be in the model itself and the value will be in building community around it this is strategy right we have a bunch of patents which is you know we'll just use them not to not to protect against Alexa we're never gonna have enough money to sue Alexa right or Amazon but we use it so that Amazon cannot sue us and prevent us from using our own technology it's more defensive than offensive patents in that case correct correct yeah yeah you know you want to get the weather you still need to pull the weather from a weather API I agree but so in that case a privacy is very limited to whatever to the minimal this the service is needed that well as a matter of fact actually I think this is exactly where using a blockchain makes a lot of sense I'm not gonna vet them the community will right and that's something that works actually pretty well already it's you know yeah because people don't have an economical incentive to actually review correctly those apps which they can have here without an incentive for the community I agree like that's the key right right now there is no nobody's good I agree I agree and so of course you know I mean like it's that's a problem with any software on the planet effectively right like any software you download has the same issue it's impossible like even if we guaranteed that everything on our store is really internal like like Apple does which by the way would kind of like also not be cruel because that would create a lot of like centralization of power of who gets on the App Store or not the there will all be someone who might be able to distribute that outside you know we're not I Oh s you know like people can actually install whatever they want on the snip device and so we know it's impossible to guarantee this someone will not do that yeah yeah I mean the apps are itself but nothing prevents you from distributing it outside the App Store just like Android effectively there is no there is sandboxing between the skills on your smart assistant right so the skills cannot access the other skills data but like you know if you wanted to download the skill and install it on your SEO service store you can do that [Music] so and and I think and I think you know this is actually also why we're still working on the token economic suspects is because we want to make sure that that kind of behavior is disincentivized through the blockchain ideally I know these are open questions by the way yeah they're not if I had all the answers today I already have launched it okay there's no cloud it's network of people processing it's not the same like a cloud is by definition one big huge compute power than one person has access to whereas here you're basically distributing the computation on potential everybody in the room so you need all these people to collude essentially to to break the privacy or a certain number for the inlet for the analytics yeah so there is a threshold of security that you can choose according how much privacy one basically yeah so in that case of analytics this is actually pretty trivial because you're effectively only summing on vectors and so that can be done super easily it could be done with NPC could be done with partial homomorphic encryption like there's a bunch of ways that you can do that whereas none of the actual individual user data can be seen by anyone but the aggregation on the developer side is fine like there's a whole idea of NPC right multi-party computation and so this is actually published and there is an academic paper with it the story the code source is open is open sources in rust as well so you can actually go and check this out on github anything else yeah oh you did amazing thank you you see you're in my presentation yeah was it fun super yeah but that's because of the Bluetooth with the drone actually should not be more than 200 millisecond but for controlling drones like it's like voice to be honest is not so a funny story we have one prototype like that at the office as well and I had the like the Prime Minister of Quebec in Canada who came to the office and so I was doing a demo to one of his team members it was like look this is cool so I was like you know hey snips take off and he was like filming with coffee then I said snips you know go left and the drone smashed into the person's face the coffee like flew the security people are freaking out like it was like it was it was mayhem so that just basically shows that it's not a good user experience you use your voice to control the drone I put it there because it's actually really cool to show but it's really dangerous so thank you for contributing to you know me almost getting shot by secret services yeah it has been working like it's to be honest that we kind of even stashed it on the side because we're like you know until we figure out how to incentivize the clerk's you know there is no real use but we built it for mobile apps initially and so actually the good thing about using Shamir secret sharing is also that it makes this resilient to clerks going offline or not responding which in the case of you know a blockchain could very well happen and so you cannot guarantee that the clerks are always available and so you want to make sure you're robust against that and so the the privacy threshold effectively you know is one way that you can play on that you know and so again you know there is a bunch of way to incentivize you can you know ask clerks to actually stake and if they're not responding you can penalize them and like there is a million ways we're using a blockchain makes a lot of sense actually in that setting so we haven't adapted this yet for you know IOT and we haven't written the blockchain part of it at all but the actual code the rusco that runs on mobile has been open source for like a year or something it has just been sitting there we've just been waiting to have something to do with it like yeah it was sometimes we just build stuff like that you know my investors don't always like it but like I think it's cool so yeah so I can tell you that today our data generation service for example which I guess could be a proxy to measure that we sell queries 1 euro per query and so you know you need at least 500 queries to make a good intent and mostly assistants have you know five ten intents maybe so like if you really want to build like a super production grade consumer grade assistant you'll maybe ping be paying a few thousand euros every time you want to like you know retrain it effectively so it's not a lot of money it's a lot of money for just like a home developer just playing around but if you're like trying to build a consumer product it's actually not too bad so I don't know you know how that's gonna translate you know in a tokenize economy right I don't think anybody knows I don't think anybody actually has like a working tokenized you know application right now on these things so you know it's it's part what's exciting is actually you know when you have sixty people are doing machine learning in a company you can actually look at this from a data science perspective as well and try to get some good answers to that which you know we're gonna get over the next few months we're probably not gonna be launching you know this token until like a year from now so you know we've got a bit of room to explore just to have the flexibility for all the incentivization mechanisms effectively and the second reason also is because we actually like the approach of using an application-specific blockchain and eventually making that interoperability our blockchain which is why it made sense actually to work with piracy on that so a combination is just you know III I'm alone like the volume of transaction you have potentially in a system where every single user query is being sent and analyzed on a blockchain like you know you're talking even with a few thousand users tens of thousands transactions per day potentially and so that very quickly becomes a little bit difficult to put on a public network as it is today sure I agree so we looked at every single distributed like decentralized machine learning projects none of them today is at the level where you can actually use it and the reason why we're able to do it is because we're not building a general-purpose decentralized machine learning system we're actually building a decentralized voice assistant training system and so by specializing the type of machinery you do you can actually tweak the machine learning side as well as a crypto side and so that actually makes it work if you were trying to be a general platform there is there is actually project open mind which is doing that super cool guy actually a guy at my company who built the first version of that is not working with them right so like these are like super top top of the field kind of guys doing that they still haven't solved the problem it's a hard problem you know doing secure distributed machine learning is a difficult problem to solve especially if you want to do it homomorphic lean right anything else yeah yeah I mean it's gonna evolve a lot I mean I'm you know I mean it's I think anybody anybody who builds a product on top of any kind of cryptocurrency today who assumes that they have the answers to how this is gonna work you know with a million people like it's we're gonna find out as we're actually trying and that's a good thing of having Aradia communities we can experiment with our community and involve them in the process of trying out a bunch of things before we kind of like roll out a big consumer product so this whole consumer product will probably not be on the market until you know like Christmas 2019 just the hardware itself will take at least a year to build so you know where can we get a bit of time okay thank you [Applause]
Automatic transcript — names and jargon may be misspelled.