# Mist: towards a decentralized, secure architecture

- Channel: [Devcon](https://streameth.org/devcon)
- Date: 2018-10-07
- Duration: 34:08
- Watch: https://streameth.org/watch/yt-69vkfHKyAGY
- YouTube: https://www.youtube.com/watch?v=69vkfHKyAGY

## 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/3/mist-towards-a-decentralized-secure-architecture

Everton Fraga will be talking about challenges and latest updates on Mist development and Victor Maia will be talking about Mist Lite, a moonshot project for a more decentralized app engine for Ethereum DApps.

Speaker(s): Everton Fraga, Victor Maia
Skill level: Intermediate
Track: Security


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 3 was held in Cancún, Mexico on Nov 1 - 4, 2017
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

morning everyone I am Everton frog I'm here to talk about mists project Alex when the sendee couldn't be here he is about to have baby so maybe next time well we're here to talk about meals project first of all let me go back here okay why missed what's the vision of the project it is to host the web three we have three projects the land of the decentralized applications and having the blockchain as the backend let's browse through the past versions okay at the first I've come there were no missed so that's why people would execute transactions that execute smile contract methods all in command line tools so it was really developer oriented and well no graphic interface he had to be a command-line guru therefore know that by the time of the of defqon.1 we had a few Mollett which was the foundation of the dab space it was the first one we built it was more like an advanced tools for specialists you had to click around and get to know all the the all the application and it pose it as a dynamic interface for contracts through a auto-generated based on the ABI of the contracts you could have executing contracts with all the parameters and it's like a boolean and you ain't and then you would execute methods well it was it did its job but for the general use there were some features missing of course such as that would require you to have either for instance then by the time of the DEFCON two we had released the mists better which was more like a Firefox or Netscape Navigator as the beginning of the Internet so focus on on the enthusiast user it presented the full power of the web for sbond smart contracts so you would from your JavaScript application from your website you would trigger transactions and then mist would handle it here you can see a confirmation window about the execution of a method in a contract we we have these the parameters that could be parsed via an ABI directory built by Piper so yes that led you to many other things so you could create your own Congress Dow ad contract and then build an interface out of it but you know as the block chains started to grow in size it was becoming less and less practical for the users to have the whole sink the whole blockchain sink so yeah this is one thing that we would talk later throughout this time we had the the ecosystem has grown like you know like crazy throughout these three years we have we have been downloaded many many times as well so here proud to share with you that if you mullet and mist combined has been downloaded more than 2.6 million dollars so that's so that shows a bit of the site of the trip we have actually because we are the most user forefront of Afyon projects and then we have to do with all those sort of problems that came as well well in order to solve that and organize all the the project we did a mist Summit in Rio where we get to have the whole team and we talked about lots and lots of things so it was sort of a whole week thinking and working so here's some proof of workshops for you notice that all those different clothing so it was really a whole week yeah and that was our team at that time so yeah we came up with really lots and lots of experiments you know there's only some interface wise experiments so let's get to the deliberate features this year first and foremost our main main concern is security because well we have a browser that handles private keys so it gets you know it's not so simple as would be a simple website that doesn't handle anything related to money Francis well let's put a ribbon this because it's so important so we've made an extensive audit by crew 53 which is a really really cool German company those guys are really skilled and they managed to found to find 22 issues work with Brian severity levels so it has some critical ones high medium and low all of those were fixed by us as soon as they reach this we were ready to fix and we increased our time sweet so no regressions here and also we had some really important if you bow to program submissions and here I like to thank general and new Hawk in really you know thank you and we have also some other exciting features such as the swarm integration in better version so a user now is is allowed to click on file upload to swarm then choose a file upload it to this swarm instance that's running local in his machine then the fire is in this warrant space this form view compute the hash out of it and communicate with other storm instances copying the files over them well that's actually the seed of the web 3 right you could upload a website then access like this pasting the same hash in your browser but well here's one thing swarm comes with DNS integrations so you can have this that's one of my favorite features and speaking of ENS integration we also did some of them in the wallet so well of course you're able to transfer ether to a certain address in foundation dot eath for instance or add a custom toking just putting the symbol of the token then he was search on our previews previously made list and get all the details then after so after these three years as I told you the sink was sort of a problem for the users we got many many people saying my balance is to zero I'm seeking here for you know hours and I can't still see my stuff so we have now integrated missed with the like client still in better version but they there we are aiming to reduce the sinking times by an order of magnitude and it's to using the version 1 of the protocol the version 2 is about to come maybe right after the dive calm so keep posted ongoing theme team and miss we have also buting remix IDE so we're seeing Hudson Jamison will see Young's talk right after mine actually and now we have the the possibility to for a developer to write code run on the main ad or on the test nets and that's quite powerful the developers also able to debug transactions to see what exactly what steps that transaction made what were the state the states of the variables so we also did and really easy way for the developer user which is solo Network you will make use of the Goethe on dab flag so you can have your own private GUI theorem blockchain so this is not actually a simulation is the real deal you run an empty block chain from scratch in your machine and you can manage mining from the interface so that is mist aiming to for a larger adoption of developers we also had by the end of the last year windows installer so people you know got happier and now some planning features account management is one of those really really important ones which would leverage the power of standalone transaction signer enabling remote node management and easy to switch between nodes here's the deal if we want to use in footer for instance for any reason we would sign those transactions from within designer all those account keys would be held at is at the same directory and we could even switch between notes could be going theorem by theorem or any other having all those keys managed by best couldn't be even harder wallets so this account management would lead to having those boots pool with your clients so you could use their own favorite node having nearly support to e theorem clients it's actually a JSON manifest which we already did so it only has gas for now all those accounts will be managed by mist so if you switch nodes you would cease to still see all the same accounts so we're under actually a major if factor being led by mark please yeah maybe yeah mark show yourself he's not here hi oh here yes mark is our new addition he's a Redux book author a really skilled developer so he is fixing ternal state issues for now which is mainly the foundation for major features to come we're also thinking about having a sink jumpstart which is something really awesome in order to fix that zero balance issues so you would start connected to a remote node so you would see all your balances all your all your stuff like real-time then you'd have a background sync so that would progress progress progress when it comes to the right point you would switch over so you would switch to lie client or foo node over choice there is also this important news for the DAP developers that we're planning to isolate local storage between networks so you would have different scopes to work with so the DAP developer wouldn't be worried anymore about having main at storage and that's net storage and you know I also transaction Spectre which is something you know it's time it for us to have we would show pending in past no more per dab setup because as taking the wallet as an example he handles all its transactions and pass in history so that wouldn't be necessary anymore always a bi look up so you'd see once that methods are on the direct research that would be so evident and you would see perfectly the transaction details and speaking of the iam wallet it's time for a change so back then you would it was one of the most ideal ways for you to kick start on your solidity project but now we have some powerful tools like remix and maybe we don't need some features that we have in the past so now we see it as the ideal way of starting as a solidity development is having Wow in remix itself so we're planning to deprecate some features in order to have more simplicity and we're planning to have a new wallet wallet contract there are some other audited and solid work around so we're playing to in the near future to change that well this is about developers yeah so we plan to have very integration with remix improving private net integrations kick-starts and purpose magic and of course we're totally open to suggestions so you can guys reach me out before before lunch or maybe something speaking of the ecosystem we're trying to build here I think it makes a lot of sense if we if we could have some depth rest meter because there is a fundamental question about about this should apps have access to your HTTP if the apps could be run from swarm could be loaded from swarm would they does that make sense even sense to have access to HTTP we all know the web now is full of trackers from all kinds and those trackers feeds a multi billion markets taking advantage out of all of our online habits and once that's our whole setting swarm users will be able to decide whether or not a certain that would have HTTP access and I'll talk about the blockchain has already proven itself secure of course such social engineering and trickery are important problems to deal with and we'd like to invest some time into ant efficient mechanisms and using some sort of reputation system or blacklist subscriptions that users will be able to easily manage so yes here at DEFCON 3 I present to you some this summary we've got harder than security this is March or gasps updates we're no longer having to release mists Burson's for each gas update ENS integrations for our better delight client remix integration so there's a key takeaway which is missed is a full browser that makes you run a full note you can be also a quite a light note but the thing is you should for the grid of the ecosystem run euro note well this is our current team and we also has some many in doses of contributors so I like to clap a little bit for them those guys helped us with translation with many bug fixes and lots of suggestions around and there's one more thing remember that I told you about the workshop back in June we working together for that whole week and discussed about many many things and Victor Maia kick-started a new track within the team so I invite him to stage to talk about his new project so hello everyone now we are gonna show you show you something new so already I think everyone here dreams about centralized well our world of abundance there are no companies where nobody owns anything there are just public adapts and the house that are easily resilient and free can you imagine that word well of course you can if you is that thing but for backyard services so what about the front end what about using the face well it has been 2 years since your launch and yet most laps are Stooges centralized companies with tokens they are hosted on central computer they use centralized api's so where's the decentralized web why it's not happening let's talk about mist what this is our code as you know it's not in a great state now right now miss little a little bit slow it has some bugs of course you're working to prove it and we believe you can make it much much better now with Mark on our team but even if you miss himself was perfect even if that thing was flawless would that be enough well what about those browsers like Miss depend on a huge web stack there are millions of lines of code that we do not control and you already had two major vulnerabilities because of those things so the point is how can we those things should be secured well we can't and that's a serious problem for a browser that deals with real money don't you think so and even if that was not the case if those things were perfect what about those things above well let's talk about JavaScript okay sorry I think I have some problem with this controller so would use that code on your that no really think about it is it safe to use that finger and that well of course it is it's just a pure function it's as simple as it gets there is nothing potential safe about it so what about this one would you use that thing on your deck well of course you do not I hope you I hope you not I mean you don't know what square that is does it could do anything for example this is a very implemented it's correct but there is something extra it also alters the global r3 object so this isn't like it it's not who this is the kind of you can do in JavaScript so by the way it's not only about practice hacking the global scope of adapt can cause it to for example show me is listening for track user actions mine cryptocurrencies on your computer so here's a lesson you should never import jeaious code you did not read it's not safe but oh my god something okay if I just use the arrows but do we know that that D lives with all the reports like this is not a real problem because that devs are doing all that audit work by themselves right so let me show something these are least refer to that as dependencies each one of those lines is an intern pocket with a lot of files perhaps hundreds of lines of code this is the first is the second return all those are but that just depends and my question is have you depth depth around here read all of them and of them hood behind in something like this anywhere so the point I tried to make is for that and many other reasons that I don't have the time to explain the web as we know it was not made and not very for crypto so what he needs not another web browser but a brand new thing made from scratch for etc as well we need an answer to the question how would the web look like if it came after a few and to answer that question we started the moon project thank you so much so this is not another web browser but an actual decentralized app engine that is lightweight and performant uses the scripting language with Safe Mode alert so people can share code without needing to audit everything and that language is kind of like JavaScript but without the bad things is Manoff to be formally prove insecure and if those words sound a little bit scary and that just means a computer not a human can verify that the whole thing does not have a single vulnerability and that's kind of big deal so in short oh sorry so in short this is very heavy and this is very building by the way I'd love to elaborate on how those things are possible but sadly I don't have the time for that right now so sorry yeah it'll be for another day and finally some of you may be thinking but I like the web the web has so many things are you just like showing the whole web away of course not and not that in saying everything is work compatible and mooned apps also work inside a browser moon Lang can be compiled to JavaScript in fact you could even use more languages a safe module system for JavaScript so for example here I import morning in normal JavaScript code then I use moon langage imports on library from ipfs or swarm and then I use that library inside normal JavaScript so you don't actually need to use my way to benefit from it and it also works on other languages so you can think of it as kind of like a safe coding sharing tool not an actual language you don't need to use it so demo time this is a video of the moon browser it's the web version of the moon engine this is a hundred kilobytes HTML file so yes it's really small you can use it kind of like a mighty wallet but if dubs so let's open up that by placing its ipfs hash I think I see this depths pretty simple there is an title there is an image and there's the button number it's connected to it whew so let's see how its holes look like one of the cool things about me is that you can always recover readable cold fronts byte code so it's not actually playing tags as we do on the web we recover readable code from the byte code above the we have imports with address ipfs hash and that's good because with that you can make sure that those imports will never change we have the main components with some things like its name its local state and a title there is on fetch function it gets data for children since moons are pure language we need to use something called mana to do that but you don't need to worry about that because that's very hidden and finally we have the handy function it's kind of like react so I guess some of you may be familiar with that already so let's change some things here will replace moon by Def Con on the body we also do that on the title and now I want you to pay attention to the hash bar the title above there as you can see not only the title but the hash itself has changed that means the new tab is already published on my PFS or in other words we just hard forked that's that that's kind of cool don't you think of course it's a very simple app so let's open something more useful this is a talking wallet there is some there's no written on this account so let's and submit it to it as you can see the confirmation window is a little bit ugly but the transaction was silent and sent so let's select the previous account and see the code okay so one of the cool things about me is that it has a component based back shot architecture so you can like get inside any component that is inside any dad so for example here we access a sub component of the wallets depth and we can also go all the way down to the most basic functions see how everything's hash addresses so one of the cool things about module is that for example if an application use that same function an equivalent function it will download the same thing so there is a lot of sharing and very good users of ipfs resource so ok let's go back to the wallet as you can see already has arrived so that's kind of cool and for a last thing let's open again the token table no there is a questions these are component from the wallet step how hard would it be to use that component inside the hello Def Con that that we just made well let's see so we copy that's hash we'll go back to the hello Def Con that we purchased by using that hash oh sorry and I'll actually go back so because I want to show something's and I press the arrow on the wrong timing so again here imports the token table I replaced the shoot component by the token table that I just imported I removed the moon image so it's the same place as the moon image would be and we click above that it's forked and as you can see that component is not working inside the hello Def Con that and doing that kind of thing is always safe so we can always take a component from some other that and what eating your that and because moon is pure and may to be secure you can always do that without worrying at all so in short add app engine that can be formally proven secure and a scripting language we're sharing code is always safe and actually word that's the moon project if you want to try it we have a live demo at that you are how thank you [Applause] by the way just a smaller point I would like to make that whole thing is actually decentralized so there is no central computer anywhere the back end of the Deb's is a film code is downloaded from ipfs so like you can just try it do something I don't like and there's not anything that me or anyone else in the world could do about it because mooned apps are actually public decentralized resilient and free is acting like smart contracts ah as I think that that should be
