# Building dApps and IoT using the Incubed Ultra Light Client by Simon Jentzsch, Steffen Kux (Devcon5)

- Speakers: [Steffen Kux](https://streameth.org/speakers/steffen-kux)
- Channel: [Devcon](https://streameth.org/devcon)
- Date: 2020-10-09
- Duration: 1:09:18
- Topics: blockchain, smart contracts, distributed ledger, ethereum
- Watch: https://streameth.org/watch/yt-a_i3huGvkis
- YouTube: https://www.youtube.com/watch?v=a_i3huGvkis

## Description

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/5/building-dapps-and-iot-using-the-incubed-ultra-light-client

The Incubed protocol is an incentivized, secure and fully decentralized protocol for stateless ultra light clients. It is specially designed for devices or applications which are restricted in available resources like memory, calculation power, connectivity or bandwidth.
 During the workshop, we will discuss the advantages and disadvantages of non-synchronizing (stateless) clients and demonstrate with comprehensible programming examples how mobile apps, web applications and especially IoT applications can be realized with minimal resource consumption using the  Incubed client. 
 In the second part, we will take a closer look at the proofs used by the  Incubed protocol to verify the correctness of blockchain information. In a  programming challenge, we will examine how those proofs work in the application  context.

Speaker(s): Simon Jentzsch, Steffen Kux
Skill level: Intermediate
Track: Developer Infrastructure
Keywords: technical

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 5 was held in Osaka, Japan on Oct 8 - 11, 2019.
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

[Applause] now see some to doodle says good boy he wants to try to do some programming work with you together in the begin to my adversity I'm Jeff Brooks from sloppiness science Roget and today we want to talk with you about into our injured protocol and steer with a will perfect a to try to shoot which is the small smallest clients for determine other projects business in this type available and today I will give you a short introduction how the system grows and then we will have time to do some we are programming together assignment he will show something then you can also practice it on your own do to learn and try out assistant to be pretty helpful there or traveling if you want to participate live it's good to have some software available the easy thing would be to use a double match you know the internet is not stats create here so I have some sticks so if you want to install a double each time a computer you can just take one of these sticks there's the cooking image or you can download it directly okay [Music] but what we are doing today so in the first I want to talk about what it is how it works what are the benefits are the boundaries and then we reduce on from training different platforms power to integrate into the client and our second topic we will go a bit more in detail how to push we are using to understand of the sake and programming work how we can how these proofs are cooking how they can do it myself and in the end we will show how to install into the nodes that means node which connects to which provides services for them okay first I will I want to introduce your how does it work so this when you see this is the vision everyone heads in the beginning teacher water fortunes were constructed we have a decent decent price network with nodes which are connected directly in their apps which interact with these clients and accessed information of the table Jenny who thinks that this is the configuration which is growing at the moment in the moment it looks mostly like this we have this nice decent Westnet program but most of the depths by accessing the information of the Trojan War II sent by suppose these sentences are very important for the time now to put these apps but when you think to the future we need decentralized way to access the division for option so when we talk about clients then if different types of time so dinners for example the term for other opportunities almost the same we have these full notes or even archive notes which are very big in a lot of resources and then even if we have a food per note its way to pick to run it in a browser or on an int device and even though times are way too big to run but I achieve the rifle sense so the minimum configuration for a right time is a computer in the size of Grass Valley but most of IT devices are way smaller so when we designed the system we had something like this you cannot see it much because this is a small microphone this is my total which is written in the dual devices and of course such magnitude is not able to run and I tried that and what are doing the most tell you something more clients meaning they have asked the roads money in the internet and they have a remote of expertise but with this approach the owners disinterested want to be rely upon said last note and we are seeing a point of failure you don't know if he asked maybe attack so our solution our approach is the imputed client richness so he wants to have the abilities by plant the security by plant but this one's the easiness of remote management I will now explain how this system works before I thought this now impute we are able to hear the complete decentralized system it means we have deaf speech run such a tribute time and these clients are connecting through decentralized network of such even thoughts which are awesome goods of the decent life circle of the blockchain so I want I will use the term minimum magnification kind several times decide I want to give you a short definition what we mean with I said so this is the client which is able to and gratified information it receives and to validate that this vision video belong to project and then it's very small client means only a small amount of sources as only obviously publication ends which is all the interesting part of the concern it does not depend on a special project of course we did is for children because we are coming from the third world but it can grow the same and the very important thing is that this client is a stateless client that means to no time it needs to synchronize with the information of the object only but we need information we can connect to this network and then it gets information and if you don't need innovation you don't either pure life for the center of their in tube system is the future registry that means we have someone's this all footnotes maybe archive notes with additional piece of software the include notes of them and these notes register to a smart contract I guess the contract they give the deficit security person I will explain later by Benitez and give some information so then Dix lines they can get this list and with this list they know which notes belong to the network and then they can interact so and how does it work let's start with one client and this client has this list of positive notes so in this list is the newest outward XS this node it knows the securely deficit and this head has kind of the rotation system so for instance if the throws of a this road is not answering then it will be blacklisted or in some way so then now the client needs information it can excesses list when selects one of these nodes in this case it's an ex-world beam and since obviously request for I want to know for instance if I have access to this able to disprove and it receives the answer yes what about the answers so this is the same thing like a word client would receive but additional to this we proceed with broker food for this information and we receive to Proctor so in 50s information declined but itself can validate okay this information I received belongs to this partner but so at this point we don't know if would be maybe did send us a manipulated from you know this block and this information just belongs together but if this committee belongs in prop chain we don't know that's why we also sent for additional requests to visit visit like other words from the list so this whole time my clients no Desmond transmitters so and then we asked North beam the disk is a spoon a and also the note seen that the polity is that this block really belongs in culture and began this validation by getting a science job - so I introduced a branch because the progress is the only information we can validate in the past or the proper shape so it means remember this smart contract the registry all these nodes are registered in this registry and now within which we can't go to this registry and can check if this is that notice really the correct profession and if we find that one of these nodes is not this one in right thing meaning that he is science of all projects we can convict a project turned out after this gets his deficit so it is a stun we call it virtual box trucks it means if one of these nodes sense from nation he loses his deficit that's why this deficit is important hence is thrown out of the list so an images behave there will be no exactly with security we can trust them so it now is all of these deformations we get into the program per entity side perhaps we can validate that information really belongs to this block and this that this block is part of the rupture so additional to disruption constructs of course you could also run active hot stocks which is the additional security property so they can run in client which act as he would be only client but he has connections reduction and then if he finds one Road which answers gives him the front end zone he can direct him convict him an indirect sale so why is this third Horton so he wants to have a security so that when I as client asked for information then I can rely on the information so when I get information before of this proves then I can be sure that this information is secure of course including secure in the amount of debt were often in the deficit which these nodes this in registry so instance if these nodes made the deficit of one each other then I can be secure they will not wins to lose his sister Emma said and give me a firm hands of world for for infest hello Ruth princess divine send it to attention to pay for energy businesses the role of mong-joon and I know the system in here is a role of tenure or more or more can be secured if I would hope that much work a very expensive apartment of course I need a higher deficit to be secured that these notes are not trying to betrayed [Music] so it the disappointments we see that the only thing North's can do our Enzo incorrectly for if the ends went from then they lose the deficit so this is not a good like how can someone else check and see if they don't see what so you just if these new to make sure the client will never know whether they are answer is right because it kind of check out so to be able to check the watch that needs to see what the client is progressing so the poor children this example of course you cannot check directly but if I have a tool or if a complete hotel there's a lot of products in that endless construct which asks the same question as the normal rule of quiz tool and it randomly picks north network in Austin so that these nodes they are do not know if this the state line which is the door locked I thought this is too strong yes of course it's not free it would cost me something to make this request and can I just ask the same question of the lifetime of it which is kinda past again after this with another no that is if I could do this I think the important part here is also that again what would it comes down to it's just a location because everything is we can verify locations to only information we can't verify intrinsically meaning we have to rely on signatures from the other side and that's exactly what what Chuck is doing is just checking for Rockets because notate and see how all these signing the rocket you don't even know to be crest they have no idea what it they have this loop is simply asking please sign the block number X and what shocking make sure that he will never sign something publish these signatures interactively to because they send in transactions on track in connect them or they do that yeah so it because that's why you use the deficit because we can convict them directly on chain so when I ask you time ask me to ask AMC and what they actually do is they will sign that bar cash on chain rent because obviously note B cannot take the seepage from a the cement that to my idea for what the box like that work at yeah it's a doesn't have to pay it they are signing of the deposit on change that you know not the key that you know the statistic EMSA sights on system can recover and recover their property and you know that it is for them to know it because it gives us company should get back from know right like you just take a signal that you get back because it's about us of marketers you know if you get from the be the top hitter you can use it I mean we will do this we can look at the proof but you give the menu look through that and see exactly are we doing this against its it all caps out that blockage because they actually don't even provide the clock and by the does mean anything if you even the truth is right this light in see me to silence so the exact result having a fix for again old so in the beginning yes it was in this line after industry today in the first instance constant is dead polymers and then he asked his apostles from the list if he can yeah I think that's why a good as a people notes is even if you started peridot guess today there are some people to appear so you start with but if you don't trust them you can configure ok so now so we discuss that we have these notes they give us the sign information if they are from if the from information they can use the deficit so there's not a good incentive for people to run such notes right if I if only thing is to do some broke and do some money if I do something wrong it's not the best decision to run such a service that's when we also build an incentive system which means if the client asked for validators information then it pays a very small amount of money to these nodes for getting this information this edge is not really my cocaine is an appearance very very small amount of money so if some waters so I did not detail in this session here so but it originally began if you live so we can do some different incentive a shimada's could be a infrastructure ins and division being given reputation for as many hood or it can be monitoring this innovation that we give such a viable payment and it's this system we can build a resistor so the notes they run they give good information a list signed information and receive some money in the exchange for this put information so as I said the beginning it's this clients doesn't meet is not only in between talk to it can of course talk with several options in time because this kind of never stores some stages not supervised so we have to say ten reasons to talk to publicly to talk to any other human face for even out of jail and not only this also all data services which can give us a proof that the information sprites can be concluded that this profile is this idea of us so as I said we have different implementations the types of limitation which is good to be included in websites or mobile applications and we have was a see implementation which is small enough to run it on such money and instead we have several implementations and who only the validation of that explosives is the smallest addition and to fully to find its own EBM and can do even interactions with smart contracts so they can write the code in our own ppm okay they disappoint under some additional questions so this RPC request you can ask all the opportunities you could also send to a warrant so basically it's like yes it is the same option additional booster information we need for a new protocol means today by a professor but otherwise you can use the complete obviously this is the RPC request specific to your implementation no it's exactly the same additional parameter is just one it is the property anything else is just same as a municipality a property is in this request it defines exactly what kind of food but if the signatures we have knows who responds contains the truth but everything else exactly the same we go into the later part of secession over the Occupy us give me the head we th call I want to say it's upstate from country that this response actually corresponds to the real estate so that does have about the exactly these details how we do the proof because it's an very interesting thing to figure out to verify each detail okay otherwise [Music] necessity being a factor in network really how many of the actual Hardware comedians like a big process is not wrong you mean how big is already be a more direct the actual deployments was like piece of hardware like how many I do not wanna hear so it depends what you want to do with this type of course so if you only need some information on approaching you don't need them the only meet when you want to interact with small contracts but you want to read any storage they are distortion you can read without TVM there's no API for that and Paul to be anything and they have quite how I know it's true I have been in the enemy right exactly that's what if we have to EBM implemented but of course you can call east get storage rent if you know what yeah but in for it's called that was the reason why we started implementing the whole EBN because the only way to verify and this is correct is if you first of all have all the storage values and then verify Hollywood hotel and then and execute the code directly inside England right oh yeah that seems very happy to me but I don't know this might ask you it's not happy and that is heavy as you think because at least this chip can do it and if this chip can do it your computer can do it is so and this has this this chip here it has 256 kilobytes are you that's an F and not accept similar diagram and this means we're one thing my flash and this is usually the biggest limit tomorrow and you know that's why the biggest issue is getting the code inside the revenues because we need it down as a code from the small country before you execute it so if you have a huge contract you might have issue okay okay no no sighs see what time it can take over okay okay okay this is myself and Simon and the c2 from the socket and especially for the into protract and then also delete that so a lot of code of the code was written back and it's white on a piece of magnet so in order to get prepared for that I wanted one in actual code somethig because they only wanted to re-enter this is the token image this is a similar image has all the food chain that you need through two mains to compile some C code to each other but no java code if you want you can already or not you can also take this beast exclude too much to download because all the things I will show I will just call talk a run and use the same type of containers away as the same environment we don't have to figure out why something does it's done okay [Music] attached anymore-- put a capital buddy [Music] anybody else okay [Music] ky you're downloading some imagery and I would like to give a short overview also nice because we need to give you where are we standing today just a few weeks ago what we did this VM prepare the googlies candidate one set of final release yet because we went to a security audit and this video is not finished yet I mean that's why we cannot have been productive release the students finish but we already published everything so it's ready to be used to be tested and we also would like to invite you to do this to test it out try it out to see how it works for you what we have here is if you want to go and get hot you will see a lot of repositories I just want to show they explain them with what you can expect when you can see that the first thing is as the step mentioned we have two fermentation the typescript implementation is was the first one we did actually empowered a little bit over a year ago this time of the tax code first and more like a feasibility study can we really verify everything and we can that's why that okay looks great the times good but of course statute itself and around the bike controllers that's why we said we need a special implementation for the microcontrollers and of course we thought about how what what kind of language are we gonna use it would I would have loved to use brass for something but if you look at the industry today all the people that are building stuff on my an IOT device control of all the two trains and all the merriment is written for see if you write something in C it will light them about that's why as well so we did some tests you can get very very small binary service so so that's how we did it after implementing the whole thing in C as well that's alright that's one repository it's just a three it should have been called iDream minus TS because actually that's good but first we will be set up in his name and we have this item minus C which is the same limitation that's why between repositories and of course that's what we postulate that this that will represent this node then we talked about these notes it will provide clues this time three months story this is what we connector and then we have two other repositories the common is more like youth utils and default configurations of the default lowest who don't are configure there and I think contracts this is just on the closet or rather than all this mother comment it's not they are just actually two small contracts we do all the work but of course they are very crucial with all the tests so this is the common github we have to toughen images published this one is into client itself so if you don't want to install it you can run the into plan directly as a toggle run command and this is sometimes very helpful if you want to replace a light client for example you can run commander Zhou Popovich and this will open up the chest obviously ports in every weakness that comes into it if you will then you communicate with all the words so it can replace that running client and of course the other one is there and we load which list and one point is not this is also what you can talk about later how you say you know you should run and then of course was presented for the typescript JavaScript we have something epic address we have the most important ones in the plan itself the target for the C version we also compiled to Bosman this what we are the second and the moment it's experimental at the system book very nicely and they keep cool to see if you come at them I mean even will bring the same result but this one the tax conversion has only took the dependencies that you all know and well then tha has libraries and all this stuff and usually gave a lot of different modules so if you package it comes down to the size but two megabyte you can look at it Boston the Boston planet is about 170 kilo byte and everything in them completely VM and all the stuff in his no dependency at all so which is pretty cool aspect was from a security point of view if you think about it and having an module with no penances where I cannot mess around with brother-type so all the stuff really despite that in this quite fast yeah seen this year we've covered it's just a few tips how to centralize so this is the most important thing and if you want you can also put it up in video Doc's we have documentation here we try to put in as much as we can and this information so hopefully in and you will be able to find almost any answer in there if not let us know that we if this is something to document that's what I'm out there when you look for information it's usually a good starting point to start with redox salts also explain the content of chestnuts then explain the background and all the details references okay good so I don't I are you ready so far to start the topic image oh you're still downloading or installing maybe we can switch cables now because especially that's on this okay what maybe just you know with you what we want to do some you know better things okay maybe to give you okay what we wanted to is I will first sure a small example how to use to Tashkent because I think the touchdown is targeted for a study most def developers because javascript today's the most used language when it comes to the use of the face there's almost no alternative right now it's fine if you putting it there and do not want to rely on their brakes ever an extra bucket or night or environment where somebody checks that we object for you then you would be very interested in favor is that's why the first thing we've just to the JavaScript coding party types of time and then we work and used its C client and because you proceed like there's different targets you comparator what is it like it just a similar executable that you can even use a man in the best foot we will play around with that bit to do with it it's actually quite a lot but you could just use command line you tell and then we look at the seat directly by this small sample application and see how to use the ink you climb there and then maybe we'll look in the choppa because we all have binding to each other into the Chava fly itself will only use the C client in every night interface but binds world and the natural feeling for child develop why drama because especially when you were appointed develop native Android apps and then in the end also time and what we almost wanted to do is them to a deep dive and may actually think about switching that if you in more interested in fact when university-type about how the verification work what you want to do it the practical things first right okay maybe a nice to think that now because they're already a few question about that and I think that will help to understand a little bit more how exactly very few works we have X ok so well as mentioned before what we said what we do is we said obviously we trust first of all this is a design decision because something's mm why do wrapped up used to delight time to do well there are reasons why we don't one of them is in these clients if they're not only stateless some of them don't even have internet connection being made using like temporal power means you have to be part of the peer to peer network and this is a requirement we do not have we don't have because the industry does not have internet connection but we can still use it because we can use the and he is supposed to tools for itself so it's used internet connection out of your phone that's what we have subtracted this transport layer completely it tastes obviously exactly perfect for that this is also one reason why we cannot rely on the p2p network where you have to require men to have an active internet connection so that books also for offline devices that's yeah thing is of course usually what you want to do is most these mice will sleep all the time I'll go along and once you want to poke the door he needs an instant answer and if you want to let me like time for the call you will start finding ups for us so that's why you get instance [Music] but in order to do this that's all we have these note this so you will know your peers deployment that's important and you know exactly when centers you randomly choose one and say okay I want this prove this and for you but that's really how it looks like you see this is Petra extra seat chest obviously and here you have this entry property where we define okay what kind of education do we want and the signatures from which above notes so then okay the response looks the same way you see it gets a result as usual to us now you see the truth out there so that intrusion I'll talk about it in an event what kind of who exactly are but we won't approve you two signatures where requested last time temperatures other lights last notice this is the Bruckner home where the last event have the registry meaning whenever a new note was edit this last note list will change and that's why the client will figure out oh it's time to act in my own system so that's why it because it I need to always be sure that these notes are still male positive yes it also Victor is the exact if they ever convicted get kicked out of course you've won make sure they don't ask what you can't withdraw it if there is a timeout actually before you can be tried because the one of the attack vectors would be you can do the wrong enzyme and then with a 42 yeah so when you register you even came to finance a maybe it does exploration time for maybe one day or maybe one hour need to find that this is also something that inclined it's considered because even if I'm getting the signature from this guy I have only maybe one hour to convicted if this is wrong well this guy have little more time so this means I would probably choose what somebody who has more time does come as a hurricane as - it's hot the impetus for contract information so he knows exactly how long he could but okay now whatever we explain that this is a good poem on how this deal works internally because this is how these booths actually work trooping the information we get heads of what kind of initially asked so if you can ask for example for plug that would be the easiest use kids if you call ISKCON up a number you get is the data of the block head of an example the block cannon itself can be easily verified all you have to do is you take this data and sterilize them as block that's the way we do it here so you just need to make sure you bring it except in the right all the end and there are some small things you have to consider but if you do it right you can create the data I'll be encoded and this byte array if you if you like get a location so this means we can just take the data rate the pro cache then compare the design projects and if this is correct you know the $20 right this is probably the easiest step to verify your data now the next thing is transactions if we want to make sure they would render from the poison let's say we call this get transaction perhentian where the transaction data we wanted now verify that this thing about correct what we need to do is we already have to block anyway also will always need to verify the project first and as one film the pocket has called the transaction would the transaction would is just a hash 32 PI and this traditional to be specific with an attrition of the tree and each transaction in the clock is part of this poetry and if you want want to verified you need to know the path inside remember tree and business are included protection you take the pen actually index call all the encode and then you have to pass inside a transaction tree like this now the truth they don't deserve a we'll give you is just about the truth of this protection would sterilize each node on the way to the protection self we will have a look how this think he looks like but this way you can then create a hash of all these noise if this hash and executed protection would you know what to do that's correct but in what is of here again the transaction bill I need to be sterilized in the current way that's the way you do it it's estate on these values the nonce the gas price to put it India whose Albion code and get the bar transaction this one transaction can then verify the movie if this is correct the transaction was c-notes exactly the same way so if I ask for transaction receipt we does a different field in the block and escorted to the seafood and then we can verify it exactly only difference here is the way we sterilize it DBC desert that two different fields have events for example are all part of this protection c2 need to sterilize them as well this code will give you the raw bytes for the transaction receipt which is 10 poverty's look at the tree then the next thing is with you call each get balanced myself or you get storage that or get friends actually count these information they come from the account object and then account object are verified as all apart from the retreat by the different one this is a statement so if we're in statehood as part of them the prop Hanna and then you have this mode tree where Ali's accounts upon stolen so it's him then she count it has four fields we have to dance of the transaction count we have their balance after account the storage nation which is again in the mutant for another country and left cortex in case that is code doesn't is that more code and we get always this fixed value for rotation the h4 empty cold so if you so you can help verify they counted out correct it wasn't long about this is for example than the stomach cash that we need to verify that did not and his last year and was not really part of any how physically you were not able to get this information to RBC so that was one reason why we need another function for that and dysfunction that's why we created this VIP from East get proof and I implemented full crest for gas it was a cavity and then they were up so it's in there's at least for almost a year now and you can truth is exactly the spectrum it will he developed rules if you need for that the other things for the transaction and traffic Lucy is something you can build up from the existing data you can just collect all the transactions each stratum oh good free and and get through but here you need the special function this is now in there and I guess which has been put a little more now to make it official because it's still trapped it should go through a lot of people already using it yeah once it's why we here like two steps actually for a count of ten first we verify the account object and then all the storage values did you meet this one contract are also stored in the tree and this tree is that particle so you go two steps yeah yeah this is how you paralyze the account object go and ask that's some small things to have to watch out for example events and then if this doesn't exist that that doesn't mean you get zero out of it usually because you get the nth temp that's why it's checks if it's in that existing want you to a different kind of proof because this was more than a challenge there we are the tools are great but the challenge is how to verify something does not exist for example device called East get balanced and get zero how do you have verified with the whirlpool then this is correct and it works you can do it but you can with a Patricia movie three either to a little bit tricky to figure out the correlations where you can't be sure that this cannot exist because there's remove branches and some French nodes is dimensional for example lead 2-0 mehendi branch can you know a can it sister [Music] yeah then the hardest one was actually there the truth for youth coal because if you calling a function you need to execute it locally there is no way you can simply run the proof on the door time to verify the truth so what we did here is the first thing is to know itself it's collect all the proofs how does it work for cavity we used actually a trace calls which is quite nice meaning we are asperity it give us a trace of this call and we went to each of court and look at whenever we found something that they realize that some kind of storage value then we know we need to verify this we need to create a proof of this torture or even if there's a balance of cold as a so Apple s load or I will call some other contracts we collect them and then continue through the process so then we have a and just the proof all the storage is class we needed of course the code itself this can be cached at least so the client has that we tell her to education the code every time the code can be easily verified because we have to call attention as part of their account truth so after we collected all of this then the client needs to go through and execute the code itself this means that's what is called kind of Cho Seon what we did here is VM credit and above the tree we created in new EVM to verify that we went through all the comp objects in quantities data in this and after this we create a transaction and ran it in this together and then afterwards we just pick up the result but it's a little bit simplified but it's basic what we do and it's what the tax plan is to keep in the time scale and we used a steam she has a limitation we don't want to be able to be a platform for the C client we have implement house ups because this is not the same way so example first of all verify everything and then won the Court itself in what running it also needs to check for example if all the values needed apology it cannot be anything that's terrifying because we need about codes we didn't know which of course will be executed when you do this is goal to because we need to find it as load and balance of great self and then is called at least makes it easy because you get it all in one week rest and then we absolutely need to find the ones and people collect the food a bit if again it's a little bit more difficult because these trace functions that gets us currently supporting only for existing transaction but there are already mind it doesn't help with it it's gone that's why what we do at the moment it's a little bit slow and because we get to the code execute code whenever we hit something out of court make simpler then we ask it give us the storage value and then we collect this in this way but this means it is way slower because you need more than one request for getting Norwich storage unit ascendant Integra yeah so that's why the canola collectors it has all information but the stateless client needs to receive all information needed to toe area fries within the response that's why that's how he's cold [Music] okay let's do some practical things I don't know how many of you actually but what I'd like to do is I would like to go through to manually verify just look for the transaction I think it's very interesting this to it at least once I mean I I hate to do it a lot of times when I was debugging all this stuff really something says okay the hash doesn't match nice why so it's why when you go to the mill the trees and to all these things but when you do this you really try to understand how this one fits together I think it's very interesting do it at least once here to go through that to actually manually go to a real good proof and see how this works okay okay so if you for example can start to talk to them you can also do it [Music] a decision you see one screen good is it hope it gets his Camaro I get hospitalized just the very top the plenty the right home for the right to the net Delta team site probably miss your presentation escape the presentation one tuck it so so what existed here thought the same time container that we mentioned here beginning and as part of decency China was a small beautiful that this is Allah P utility I can simply given any data and it will automatically not like ok pika even though pickup will be hot because you see will see a lot of numbers ok let's see if it fits in there [Music] let's pick something that also to show you all the stills nation from all test data so this is a request a transaction by hench as you can see here and the result is the transaction data itself and this is the truth and now let let's just go through this process in detail what it is the first thing that we see here is this proof contains the Kolkata this is the complete we have here and if you were to take this if I do this I just did alveta code this bucket up and you will see here a parent ash - improve detection with all these data and pulse it will calculate the hash of the deal itself if we look in here the response head of this project if we compare them it matches so maybe we know at least this is the bucket up and of course if we have the signature for this block engine we can also confirm with this with so now that we know that the project was correct we can now come and look at the transaction data itself this is the Moga truth for the transaction the first thing we need to know is if you want to verify the truth transaction index we noted transaction X's 171 or it is also the same now we're here it's actually a B so now we have to actually fix what we can do with this go exactly the same things and through what I explained we stopped with dead transsexual which is this one and go now this path the path itself I mean we can simply calculate the transaction index [Music] so this is what you see here this is the path inside the military now and now what we can do is we take the first note of them and these surveillance in what the cesium is that's how we didn't know the new military looks like this is a French note and these are in each member has 16 spots can say and these are the six is not in this especially the henna the first node must be at the root H it's also broken up to the v8 b5 suddenly very small screen we with here at age 45 this is the one Ventress so that's why we know okay that's one now we looked at our path eight 118 so the first part will be here 8 which is this distant attention of the next node and then if we go in we can now take the next thought this is next month this is fish and eight is yellow matches so this would I can do this now all the way it will look bad at the last note the last one is at least a leaf node meaning this this is the actual value what governments were just a bastard and this week note had developed is known is here this this is a bra transaction so I can take now these data from the spot transactions and in compared to the one we have here to solve so we have to guess for example which is this value matches we have to address which is this one matches and that exactly in to tie this to it very fast to know the truth just as we've been mainly here now and then compare each data so response make sure it's product and they should we have a lot of chase and test that if I promise try to fuss around manipulate and make sure that it will detect each change okay because of the are any questions for that how how this works all this I mean we did not invent this move this is publish the same protocol but we are using exactly this to marry five it's our choice of those accomplishments those nation LP because we had to implement some being cooking for the season anyways into it that was its mark events and due to that that just released a part of yours it's part of you about I didn't see client down but it was quite helpful I mean I know guess also has an alky code I think goes up like this the only thing he entered will be easier I put a lot of tea pockets after that because you it kind of guests what it is looking at now appears looks like a blockhead out of this look like a transaction and so it used to be names of it makes it easier to read but this is more like in total 12 to play around it but really helps understand a bit what's going on inside okay if you want you can try I mean in the target [Music] okay maybe what about whatever back to do next is just to show you that execution action would after if you can do it for yourself if you first attach the client and then maybe you can also use the seat line how to use it how to install attending theme it's not very hard because of all these things that we have seen here are going on directly inside the client from a developer's perspective you trustfully use it you don't even have to care about them the verification is just taking place meaning you just use it and when you do this this [Music] then screen of every single and chance cook I do in terms community so it's even easier than taps good to go sittin after except a pastor but the implementation is completely done typescript zone in the image itself I hope we've also done it all the node modules is all install to don't have to call Indian install but if you will start what you usually return we'd call NPM install nine three more positive you'll save it like this I guess that's where everybody goes home but in the solid include by modules it's already done here that's why I don't have to do it that's why you see that's right simple theme on the first thing you have you do is you just require this [Music] because we just did default meaning this is the class that into class and now we can create a client so this is pretty easy and straightforward if you do it like this it will create a client with the defaults but if you want to can of course pass there's a lot of configuration meaning even you can define your notes that you want to use became a time like there because count how many mystery of all descent on the signatures you want to have one important parameters explain the chain ID which scene you want to use in the moment we have to provide on a girly on comment on the main net but we will probably head into wrong change that how do you establish these proofs are going through their roots and the treatment is part of the head to the chamber such a mood recently belongs to the chain this block the block belongs to the tail okay yeah and then the way we do this is by getting a signature from gather notes they need to sign but this location is correct and the reason why this is this works is because the signature can can then be passed to the smart contract itself they can call you a couple to make sure that's right not and they can also verify system that at this location is correct because there's opcode ok popcorn at least for the last 150 six blocks you can directing the spot contract find out if this is correct so then we can compare and we know even the if this was correct I decide it was not and it was not then Cuba two systems and even for all the clocks because this was in the beginning we had only this 256 box these are the likely low-hanging food is the easy one but also if you further back that we created a second contract it's a professional interest rate where you can then construct you know Lovelock's you need to deliver the proof set to work on the truck headers and out of these block letters you can then prove that certain locations - one for this bubble exactly that we've put a lot of thoughts in it as well because you're right this is something again that too many vegetables don't think that much but fidelity then at the moment there is a configuration and I get middle box height that is how many stalks do I need away before I actually signing location because the quality's not we'll just can we trust please sign up number X and then what it will to say is this really final because if it's not final I would risk losing that deficit chest because I know they're on the wrong foot I mean at the moment if you eat ur skin packs and what the f this is nice that there were max greenbox some Reeboks this kind of um but it moment as a people we use for six blocks so it usually the note will not sign any drop that is younger than six box so that's why if you ask for something that's under this you will not get any signature the latest book is not fine whose RTC qualify us for latest kind of support right you would probably have the latest but tomorrow for latest life checking the decision for the thing so nobody thinks about it asking for us or four days ago but it is also not the security vision because so Sergio puree is the only little pain if you asked for today's product you will never get the signature because no note will sign it I mean s exactly what happened we can test it body what's happening is that if you climb more than simply say you will be tracked them to respond to us to set I want to have two signatures [Applause] you
