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

Loading player…

Building Trustless Scaling Solutions: Security/Audits

ETHGlobalMon, Oct 9, 2023, 12:00 AM

Join Brendan Farmer, Barry Whitehat, Vahe Karapetyan, Jordi Baylina, Vitalik Buterin, Daniel Lubarov and Alex Beregszaszi for talk titled Building Trustless Scaling Solutions: Security/Audits. Polygon zkEVM is a leading ZK scaling solution that is equivalent to Ethereum Virtual Machine: The existing smart contracts, developer tools and wallets work seamlessly. Polygon zkEVM harnesses the power of ZK proofs to reduce transaction cost and increase throughput, all while inheriting the security of Ethereum L1. For Ethereum developers, Polygon zkEVM allows them to seamlessly deploy their Ethereum Smart Contracts while retaining the inherent security of Ethereum with fast finality and low costs. As Polygon zkEVM launches on mainnet beta, a roadmap towards EVM equivalence type 2 category zkEVM rollup, TPS performance and cost reduction starts the next stage of optimizations. ----------------- Follow us: https://twitter.com/ETHGlobal​ Check us out: https://ethglobal.co​m Email us at: hello@ethglobal.com

Transcript

foreign [Applause] [Music] Solutions particularly around security and auditing um I think I I guess for for those of us who are new to the event um Alex Daniel Barry uh would you like to briefly introduce yourselves I guess Alex starting your thoughts and yeah sure um I hope you can hear me now yep yeah I spent um a significant number of years on ebm Research um mostly at the Eternal Foundation um and you know regarding polygon ckvm at Spirit we assembled a number of different teams um to to conduct review and I've been participating on the evm side and mostly on on um you know even compatibility uh questions um how the the cko VM would compare to to minet and if there's any differences what kind of risks um those could pose to you know on multiple facets including language languages um yeah I think that's like a short intro cool uh uh yeah sure Daniel from polygon zero so we work on our separate GK EDM which is focused on type 1 compatibility and also working on related technology like wonky 2 and now Punky three cool I guess I I also work with with Daniel and then last but definitely not least uh Barry do you want to briefly introduce yourself oh um can you hear me yeah yeah hey Adam I'm very I I worked on an old bunch of like AKA things and including I had a lot of fun working with Shorty being uh on the earliest DHD kbm stuff so I'm happy to be here today and edibles cool cool well I I think we can just jump into it I I think it's safe to say you know Geordie from conversations that we've had that security is oh yeah Chris yes I'm sorry but we do have money now okay everyone is late uh five do you want to introduce yourself all right uh yeah so so I I think it said to say Jordy from you know conversations that we've had uh internally at polygon that security has sort of been the guiding principle uh of the development of this interview and so I I wonder if you could just talk at a super high level about the philosophy and the perspective around security and auditing and sort of building a system that that fundamentally protects uh use your funds so we would love to you're yeah because it has been probably uh probably it has been the biggest challenge uh the biggest challenge of the whole system you know because uh these systems are really complex and it gives a lot of new pieces that are built on top uh built for me so one single piece that goes wrong and the system is just insecure and and this is really I mean this is really problematic and this has been difficult here uh when we Face a security uh we just uh we just it has been uh I mean just trying to isolate um the the things that can go wrong and and and just try to and just trying to find the right mitigations uh for the things that you know that can go wrong so in the case of uh uh polygon we just distinguish like four four things that can go around one is a spark contracts we know very much about what can go wrong with smart contract and this is what type of case the other is the correctness uh this is really bad the brightness of the product means you are proving something that's correct but this this correctness goes to uh we admit that you know some balance is wrong this is really bad that we cannot do much about that the good the good things on this point is that because it's ethereum compatible we just leverage on top so we just run all the ethereum uh all the video uh tests all the other so I'm under passing order whenever and ethereum tests there that's more than thousands of them this give us a good uh confidentiality that uh there are no uh no correctness uh errors whatever this is difficult to get the correctness servers because it means all the best opacity so everything is working as it's supposed to be this is not exactly so there are some exceptions and there are things that can go wrong but we find something at some point about that that we will be very decision but really difficult uh the one that's really easy uh is the the soul Messer salt nicer in the brewery just for adding some constraint this is really easy and this is what uh I mean and uh we can go wrong and here the the mitigation is that was actually was proposed by vitalik at some point but there are two mitigations the first is that if you are running uh if you have a priority proverb so if you are running the rules you are not going to prove something that's wrong so I mean this is difficult but the proverb may stop or or if you want to have a decent right system you need anybody to write a cougar and here is where maybe do if two groupers go from the same mistake different with the central different states then you can detect that automatic in the smart contract and how about the system these these two mitigations are good for the solvent which is really easy to have a realistic and the other the forward is more technical but it's like uh that you just stopped the program just gets stop it because you can not generate the proof but this is just notification is very silicone with the system just to stop seven days in a demo you just upgrade the system to continue so here yeah so this is how the things that's why you feel comfortable for launching but again you know security is you never have the 100 uh security that the system is is is correct right so so we we sort of have this framework where uh errors can be either correctness um soundness are as an approver and then smart contract uh bugs is that is that sort of yeah that dollar is not the problem but you are not able to do anything okay so yeah yeah it's a Relentless issues okay okay so so given that framework um I I guess it would be really interesting to hear from Alex and then uh via uh we didn't get adjusted here you're interested so if you could provide that but but just um like what the experience has been auditing different parts of uh the system uh sort of within that framework of different arms like like how do you approach auditing for correctness and you approach auditing for prover sadness um so it'd be cool to share with your perspective to uh thank you Brendan sorry guys I had some issues with the video so I skipped the intro uh so I'm I'm the studio and co-founder of exas we did they audit for the ckvm uh so about the question I would say that um with the soundness it I wouldn't say that there is uh a lot of things different than testing for completeness and soundness I would say that it's about the approach that you take in auditing the different layers of the of the zika evm because basically it has like if you we can call it like Hardware layer firmware layer and application layer and uh one thing that we're trying to do is that uh when further we go down into the layers for example we were when when we were auditing like Hardware uh layer we're trying to use also some toolings there because like static analysis uh and like Dynamic analysis trying to write like a small small tools uh some toolings that will help us out because basically that's where almost everything is connected with some edge cases and like the the bigger the camera the coverage them the better and you have a lot of for example auditing peel uh State machines you have a lot of constraints and a lot of assumptions it's hard to just remember all of them sometimes so uh yeah it's better to use some toolings in that kind of situations and also like the manual review uh it's it's always the manual review for every layer that you do I mean you you sometimes you cannot find edge cases that will be found programmatically you just need to watch them just that's pretty much it yeah I would I would say a single like a word answer to the question and what was the what did it felt like it felt like scary like extremely scary getting into it um because you know the the ckvm team has built a number of languages a lot of tooling um a lot of different parts um and you know they were also constantly improving and the system and conducting a neutral review um but they were super helpful in in setting up trainings um training workshops and being available to to answer any kind of questions um when looking at any of the different layers um I think what's what has been challenging of course is um the the different layers and you know what kind of understanding and knowledge and background and those different layers required and then the connection between the layers um I think generally it has been you know initially it was like extremely scary scary but as you get into it um you build up confidence um and especially um you know the the fact that um polygons equation is able to execute most of the ethereum state tests um that was a reassuring fact and there was in fact a good starting point to to dig deeper and see why any of those um test cases uh would have been disabled there could have been a number of reasons um mostly because um the test case is required and gas higher than what the approval would support um so even just investigating from that level down um it is possible to to find a number of different uh issues um but I think generally we had a number of different teams looking at the different parts um the state machines have been looked in isolation um um the the evm instructions have been looked in isolation and then then there is like a stage where you try to connect these dots together um I think tooling is is um we did try to to invent some tooling especially for the peel uh for the peer layer um but I think given um you know the harmony Center's technology is there's just not left tooling um what I've seen to be uh somewhat use for this is pattern matching um and you know once you identified a given issue which may look which may look like something you want to to investigate further um fix some of those patterns were emerging in multiple Parts um so yeah I think pattern matching is is um you know when you look at such nascent technology that's that's uh more useful than trying to invent um complex tooling cool cool that makes a lot of sense um I want to add that I definitely share the sense of scare that that's the thing yeah I'll just try to be more pragmatic on the announcer but yeah sure uh yeah about the tooling part so um it was a lot of uh other matches like we're in the analysis thing of course yeah I mean creating a complex tooling here I move it Harding and Overkill other than you things like variant analysis techniques cool makes sense um so so Barry we we already heard that uh your conversations with Jordy sort of served as the Genesis for this entire project and you guys are multitime friends um I I I'm really curious to hear from both you and vitalik uh sort of how the EF sees its role it's like shepherding and stewarding these protocols and projects um into maturity and into production and particularly in the context of security and audits sure thank you brother Tom so yeah like the way I think about this is that like there's a lot of different layered shoes that are sort of like working to scale ethereum and one thing that I would really like to see on the security Dimension is more collaboration between the different layer tubes I feel like a very nice security problem that we could have is if we had a ZK roll up that also on a bulletproof and the fraud proof was just like the Frog proof was one of the members of the security Council for example and if the fraud purchase agreed with the Z with the zkp then then we would have to fall back to the security Council to like decide and unbreak the type I think that this is a very nice kind of underrated feature where we have all these teams working independently but I I would like to see eventually everyone sort of joining forces and working together because at the end of the day like you get a lot more security having a roll up with like a fault proof and a validity cool and then you have uh vitalik would just be really cool to get yourself yeah I mean I think uh in general like in the development of all these new technologies like the ethereum foundation tries its best to uh play a supporting role and at the same time you know try to avoid picking winners in the yeah kind of middle projects and application space and I'm going to try to support projects so that kind of uplift the entire ecosystem and uh you know kind of play those more and like supportive tasks that are you know valuable things across the entire ecosystem that are more kind of coordination related that I would make much more sense for each individual team to do on its own and so forth um so uh you know some so sometimes that has meant a great like rating and contributing to a specific pieces of code though I think even there like we're we've been striving to not have the foundation dominate that and like you know bring in contributions from uh other middle words museums and uh someone and some other teams uh sometimes that involves being supportive on the security and auditing side some uh sometimes that supports other things but like it generally yeah you know trying it's a kind of foregrounds the people um you know in the ecosystem that are that are doing all these yeah amazing work as much as possible cool oh very quick um and so Daniel it would be uh really interesting to hear from your perspective being internal to polygon um how sort of the culture of uh collaboration around security and auditing actually functions I I know that you were uh one of the participants uh on the internal audit of flock um so yeah it would be great to get your perspective yeah yeah it's been a nice really nice collaboration between polygon zero the Hermes and the Maiden team so together we're sort of the the ZK side of polygon um yeah so my involvement in Hermes CK AVM was fairly small but yeah one thing I was able to do was help to to do an internal audit of the flock code which was very very interesting to learn about and see how they were doing things um yeah they'd say we we've just had a lot of really good discussions with with these internal teams about what the right approach is especially when it comes to sort of training wheels or or backup layers of security What's um what sort of backup layers can we come up with to make sure that worst case if there is a sadness bug then uh we we have some kind of fallback option and it's not just game over yeah cool and so back to Jordy it it would be really interesting to hear about your uh sort of perspective on the road map for you know what training wheels we have now like what the process of taking them all look like um and and sort of like the the end said that you'd like to to get to now first of all I mean let me let me point one thing that just to to answer the big bar right here and is that uh all the audits uh are are public I don't know if the last ones maybe I even draft mode but if they are not public now they will probably like uh tomorrow uh you can check that in the repos so what the repos they have a direct me without it I mean School transparency here I I would recommend all the uh the space to read those audits because uh as the people say here that it's there is a lot of patterns a lot of things that will discover and you can learn a lot just and I think it's it's called uh for the security there and of course we are absolutely open I mean just I think collaboration is is key here I mean sharing and being transparent in southeast I think is the one step in in that direction for the future uh we will we just started I think was last Friday about the about PE program I think that continuous ability is is fundamental um here um we will continue to you know we plan some operators I mentioned just including this supercompact smart contract so we this will be complemented with some Audits and we probably will do uh some real dates of some of the parts so we already have identified some of the teachers that maybe should be more check out more closely or you know just talking with different Auditors to hear we have a good feedback or what are the more dark you know dark zones and clear zones and what are the concerns and we are sharing a lot this this feeling with the different things and yeah Securities uh just uh invest as much as you can and and put as much effort as you can it's never it's going to be enough so here is uh we have a full full team full security team just working in that direction they have a full budget in security and it's a huge commitment yeah and the worst thing is that you never have the you never have this this confidence but uh that doesn't mean that you will have the best if it makes sense um yeah I I I I used to be interesting to hear about um like where this space can sort of go because I I know that we've invested a lot of time and developing tooling for pill and ZK assembly and I I wonder like in the future uh do you feel like the burden of auditing will be reduced as we build more tooling like how do we get to to sort of a state where we can do uh more kind of Rapid development without as much of a burden on auditing do you think that's possible should be interested to get your perspective uh I think uh that two links are something that needs to be done I mean it will never interchange the the audits the review from people at least in the foreseen future I think uh but the tooling is a must-have in any case so because it will help uh it will shorten the time uh of the of the reviews it will help help a lot of ways like for example if you can fuzz something it it helps a lot an exception that just going through by hands and doing everything manually but it it's it it will never interchange the the outlets maybe not never but like near future yeah it seems like to say that formal verification for zkdbm is uh pretty far aware of uh Alex yeah maybe not uh Alex anything to add on on tooling and sort of automating certain parts of the audit yeah I think certainly I mean the tools we have created were more about um transforming pill to be more readable um in certain aspects and then maybe being able to create some proofs for certain properties um we did initially um in the first engagement we did try to do that and you can see um some of the the results of that in the first report we learned that actually polygon also has a similar inspection tool um with a web interface um but regarding you know more rapid development um I think what we found generally is um um you know the separation of Peel and cksm um may have proved to to be a tiny bit of a bottleneck at least for us um because you have two this you know disjoint systems which then are connected to various paths um and we kind of felt that maybe if there would be you know a language um in between the two um so you wouldn't have like two separate systems maybe that would have helped but it's really hard to tell you at this point um and then I think the other two switch would be useful is more like um you know IDE plugins to help you navigate the the system much better so one example in in zksm the syntax itself uh it took um you know a bit of time to get used to um and as you have um generally a lot of utilities um just jumping to utilities and seeing what kind of constraints or registers the clobber um that is like a big question right um it is it is really basically like what assembly is with calling conventions where you have to be aware what kind of pieces could be overwritten what pieces are saved um and I think some kind of an ID extension to help navigate these um could definitely improve the review process um and then also how to actually generate some of this code um the arithmetic State machine seemed to have been generated um you know by a different piece of code and if you have such pieces where you can generate the bill code or the cdsm code and you can be uh you know certain that the generator is correct maybe it is possible to formally verify the generator that is something which could also reduce the the time um you know to review um but you know as it stands today um I think the the really big Saving Grace is the testing Suite um but unfortunately as you can as you see over time in in mainnet no matter how many tests you have there always going to be edge cases found um if especially if you look at the pre-compiles those those are like cards but for issues um and you know more complex cold related instructions I mean one um big one in the past has been written data and I think these pieces maybe even even more you know complicated in ckv and just a way um you know memory and any of these constraints are handled so yeah I would definitely welcome a lot of tooling um and I think over time um we may get closer to to have more velocity um in reviewing this but I don't think many review will ever really stop um in any of these systems um because you you need to have realistic View and um you know some intuition into something which may not be a pattern cool well that makes sense um I I I'm curious George about the uh sort of the upgrade path for zkvm so suppose that um uh the evm on L1 introduces new eips or uh for some reason we want to change like the hash function um in the state tree how do you see that functioning I actually Daniel if we could also get your perspective on this as well but starting with Jordan um what sort of like do like do you see the optimal path being sort of upgraded in place with a multi-sig is it migrate entry to roll up like how what what what's sort of the optimal uh [Music] to be a just upgrade in place so I mean just doing summer breaks of course there are some you know some pieces that could be a little become complex for example imagine that people want to upgrade uh the the hash function okay then maybe that would be just a full brief state of the system you can do a proof of a state nutrition actually with aggregation we can we can actually build that but I think it's maybe it may be wrong so here we need to see if I guess and see what kind of upgrade we do but most of their creates that we have planets in the short run are going to be just adding functionality or maybe just uh adjusting some compatibility issues so at least for a while it's going to be that way so the idea is to be as close as possible to uh ethereum so it's just sitting from type 3 to Tech through type 2 Italy in the year we should be attached to pull up if it goes uh okay listen Mixels didn't know anything to add on upgrading robes yeah I think I think most upgrades are fairly straightforward because uh well the the ones that would be difficult would be once the touch State and like changing the hash function for example with the more complicated migration but others would be fairly easy and I think it shouldn't be that much work to keep up with changes to ethereum because um you know for good reason they happen very slowly um yeah on our side we've implemented some things already like BLS which is not not actually uh you know it's still a EIP it doesn't hasn't fully landed yet but we just have it ready in for it if or when that happens um yeah but but overall I don't think upgrades will be a big deal unless we need to do something like change the hash function cool cool um and then I I I'd like to go off script a little bit and ask I I'm actually very curious on italics perspective on this um to to what extent do you think that it's uh important for um for ethereum to eventually be sort of success and obviously we're talking about uh incorporating eif one L2 like to what extent do you think that should the future design of the Ethereal one should have sort of taken to account like CK friendliness and uh so that we get to to the point where we might have actually I think that's crucially important I mean I think uh like I've been talking a lot about the you know the importance of uh preserving and improving upon the decentralization of the ethereum network and I think in the long term a really important part of the decentralization of the network is going to be just everyone being able to really easily it verify the rules of the chain right like I've talked about how like I think it should be possible to stake not even just out of laptop but on a phone and for something like that to be a reality like like phones are very good at bandwidth right but they're very bad at computation um and so um you know you were basically are going to have to you know use something like a snark or a stark to uh replace the computation or verifying an ethereum block with uh something much simpler and the nice thing is that like especially with things like PBS and the various stuff that's coming down the MEP pipeline the computational load of running a node actually should be pretty low like it literally should be possible to make it literally just be verifying once like downloading a bunch of data hashing it and verifying a snark and like that is a yeah like to me definitely a dream long-term future for ethereum like um actually if you uh look at these yet the roadmap like you know picture that I published on Twitter I think at the end of uh last year like uh in The Verge um I get after the vertical trees you know the Verge is no longer just about vocal trees diverges the outbound verification and you know adding I added in um you know a section where kind of the ultimate goal basically is I mean all removing reducing the cost of verifying the chain down to verifying one proof so uh I would absolutely love it if the yeah layer one could uh eventually make its way over to uh satisfying that goal over the next five or ten years oh wizard that's cool I uh my my cell phone is often dead so I I'm sort of uh terrified of the inactivity penalty if I were to stick from my phone but I'm sure for uh more responsible people that that would be a very workable model uh oh cool I I think this has been a really yeah I mean I have two old phones with me that I'm no longer using so you know like I just like put one of those up for staking and like I'll leave it ads yeah yeah that's uh this panel has been uh really interesting really fun um I guess uh I I think we're right at a time but um I I guess Jordy do you want to leave us with a closing thought um about uh you know security auditing zkbm and in production I would say that uh especially for the users just be responsible uh I mean it's a new thing I mean it's a new there is many things I've done overall so we need to find you know we do we need to be responsible of course we want this to use we want this to happen security is also about uh people using uh this is called the things get stronger just having this maturity uh of the things but at the same time uh uh we need to understand and here so it's important to put the effort to explain to the people that this is a very new technology that's a very mixed technology it's a very good technology it's probably the technology of the future but it's a just you it's just important so do not go crazy and understand that we are in the early days of this technology and making a call back to the money either you know you don't put all the savings and start asking for mortgage and putting them on there so just things like that cool more Grace I'm pretty well yes well thank you very much I I thank you all the all the panelists for this uh gray panel and also just wanted to say that we we encourage collaboration and I'm happy that Barry actually mentioned that between the ckvm roll-ups and now we leave Brendan and vitalik in this panel

Automatic transcript — names and jargon may be misspelled.