Zircuit: A Security-Focused ZK Rollup Built on the OP Stack | Jan Gorzny - Zircuit
Ethereum Denver·Wed, Oct 9, 2024, 12:00 AM
Speaker
In this talk, we’ll describe Zircuit - a zero-knowledge rollup built on the OP stack. We’ll highlight the benefits of building on the OP stack as well as the architecture of Zircuit and its unique features. We’ll highlight the key features that the OP stack provides rollup developers and highlight what needs to be added to make the result use validity proofs instead of fraud proofs. We’ll illustrate how Zircuit built the remaining infrastructure and provide insights into how Zircuit is built differently. Finally, we’ll talk about the security-focused features that makes Zircuit unique. APPLICATIONS FOR ETHDenver 2024: #YearOfTheSpork ARE OPEN APPLY NOW https://ethdenver.com/apply
Transcript
[Music] hello are we good I guess we're good all right hi so uh my name is Yan uh I'm here to talk to you about zerit which is a security focused uh zero knowledge rollup that I've been working on uh I'm a technical lead at the project and uh I'll touch a little bit on related points like the op stack but really I want to talk to you about the unique features that uh Zur is going to be introducing in uh into the rollup ecosystem so what is zerit let's jump right to the uh to the sort of key takeaway it's a zero knowledge rollup that's fully evm equivalent or at least there will be by the time it hits midet and um the idea was to start off as a sort of research project and do some cool stuff and take her own approach um in order to leverage the best sort of things that are out there uh but to come up with new ideas and actually have a a place to implement them and use them and see the benefits uh of that research so zerit is you know full evm compatible uh Zer knowledge rollup and we'll talk about the stack uh that it's built on and all the cool ideas but the key takeaway is you know it's going to have fast finality just like your typical zero knowledge rollup uh so it's not going to have days long finality it's going to have you know minutes or hours uh and because of the compatibility it's going to be you know very seamless for developers to pick up if you can deploy on ethereum you will be able to deploy on on zerit without um any major issues so uh let's talk about the origin I already said it's a bit of a a research project that sort of um you know came from this idea that there's a lot of uh cool things that people can do on layer twos or layer ones or blockchains or smart contracts or spread anything in this web through space and um uh myself and some others were were looking around around and saying hey you know there there's some uh some things that we would do differently you know there there's some things that uh probably the ecosystem can benefit from in a lot of ways uh some of that is what we call sort of Security First mindset some of that is sort of technical improvements on the research so uh on the technical side there's research to be done on things like near proof systems or custom optimizations or ways to you know check that code is secure uh on the security side of things the there's always an option to do better in this space maybe you have to give something up but as I'll talk about um in the coming slides uh we think it's really important to to sort of look at security as a first class you know research direction for a rollup because um you know it could be the next major existential threat in this field right Bridges have been notoriously sort of problematic obviously most of them work pretty well but there's been some pretty high profile issues and what we definitely don't want is is a repeat of the situation uh inside of a rollup or you know anything else in this ecosystem and uh since we're playing around with rollups you know let's see what we can do here but at the end of the day the result is a pretty unique um new layer to which is circuit which I'm here to talk to you about today so without uh further Ado let's talk about some of that actual research that went into this project to get it sort of off the ground uh what we wanted to do was see what was out there and see what we could improve on right away uh there's no point Reinventing the wheel uh and there's some really good you know strong players in this field doing really good things publicly and open so you know you might be familiar with optimism and the op stack so uh you know they have really great great code in a lot of ways they they give you stuff for sort of free uh things like sequencers or batchers and and smart contracts and bridges and all of this so if you're if you're familiar with that uh ecosystem you know there there's there's this nice familiarity that you get from using in the system and it's it's reasonably well uh engineered and it's you know quite a good starting point and so we saw that and said oh you know what that's pretty cool we can probably build on that but we didn't want to be optimistic so we're not going to be optimistic and we want to you know shove in some proofs to make it get a little bit closer on the finality to something that we want so we started looking around at other things uh and of course there's people doing that too in public you know doing really good things for example uh the psse team at the ethereum foundation you know they have a lot of research on this area they have zkm specs things like this and we wanted to start looking at that and um see what we could do to put these systems together or any other systems right there's other people building in public as well um but you know maybe they're not talking to each other maybe some people aren't talking the combinations we want and most importantly you know what about our own ideas that we had that we wanted to explore right if we have our own way of of computing MSM where does it go does it go into one of these things or into our own system or something else entirely and we decided to go with our own so I'll talk a little bit about these Origins um specifically the ones we get from the op stack because that's in the title of the talk uh and honestly it's pretty good uh the the op stack uh gives you a lot as I mentioned but it's not necessarily ready for ZK Prime Time right it's very easy to get an optimistic rollup out the gate with very minimal effort uh they've done a really good job at producing a lot of those artifacts setting up good documentation um you know the public good is is is very much public and good it is uh a very quality starting point for for these things uh the license is friendly the community is active you probably hear some talks from them here and everywhere else you go uh I think they're a great team and generally they're they're modern and up to- dat so when you when you look at their code base you know they use gu as a starting point it's not some old version of gu it's actually pretty up to date when the suppo uh upgrade for example happened a couple weeks ago you know they were pretty on the ball they had things coming so it's a really good starting point um and of course they're operating a main net with real funds so they're sort of putting their money where their mouth is in the sense that uh you know it works and there haven't been any major issues on the on the network which is great so this is actually good Tech that not only sort of looks good on paper but works and hasn't been subject to any major issues and we hope that continues to be the case of course that being said you don't get everything for free the optimism side of it gives you the optimistic parts and a lot of the core infrastructure but if you're trying to put a a zero knowledge proof system in there uh the codee's just not ready for that yet or at least it wasn't when we started doing this uh and so there's actually a lot of challenges that come come with this it's not as simple as I'm going to download you know the op um repo some other repo say from psse and I'll just point some things to each other and it'll just work there's actually a lot that has to uh go on in order to make all of those systems talk to each other in a way that makes sense in a way that works and then you know there's just engineering behind the scenes that need to happen happen I can talk a lot about that uh so much so that actually have a separate talk about just those issues of getting you know zero knowledge proofs into the op stack please uh find me somewhere here at e Denver on Friday for for that talk um for now I'll talk about what we did achieve through circuit and uh in particular what we were trying to do was answer some new questions right like we saw these two uh Frameworks for example like the PSC circuit description or evm and and the optimism stack and said what else is necessary is it really that hard right as a as I said there's a talk where I will say it actually is a little bit harder than that um but you know it's not just a sequencer and and some circuits there's a lot of gluing that happens there's a lot of engineering that happens obviously if you're building a product there's probably also marketing and all of these things but I'm the technical guy so I'm going to Sid stop all of that uh but the point is what else is necessary and what else can we do differently and when we talk about what else we can do differently you know is is it good to question everything are things really you know done properly in some areas you know what happens if we change some small functionality because we have a different requirement uh is there something we can do that actually lets us deviate from being very evm equivalent in order to get something that people want for example uh we haven't done that yet to be totally clear and not sure that we will but we wanted to have a space where we could explore these options right we wanted to see if we change something what goes wrong or what goes right hope everything goes right and we won't do anything that'll go wrong intentionally of course um but we also wanted to understand why some decisions were made there's actually a lot of really cool stuff you know in these systems but not necessarily really strong justification for some of them some of it's very clear some of it's the most obvious thing in the world and you'll look at a system and you'll say yeah that's that's the way everyone should do it of course other things are uh a little bit less clear right like if you have a zero knowledge rollup do you need to premit a bunch of e to some account in order to fund deposits or why do you need deposit transactions to begin with OR system transactions rather sorry deposits you're probably always going to need but uh you know there's there's these questions that are implicit with some talks and some you know documentation others that are just left totally open and by actually starting to build the system we're actually able to understand those and you know the appropriate amount of time we'll be able to share all of those justifications with you either by just saying oh this is why someone did it or here's why they did it we think and here's how we're going to do it better because we think we have a different option uh and in particular you know what are we want in the future right right now evm equivalence and um you know being a very seamless development experience is is a very good gold standard it's not likely to change but I bet there's also things we can do better in different areas whether that's on the development experience the evm itself or something entirely different uh that remains to be seen because we're still building the actual main sort of product but uh you know we wanted to be able to ask this question and talk to the community about it of course a lot of what we want in the future is some of this custom functionality right I talked a lot about how it started off as a research project um that's absolutely true and part of that was we saw things like Computing msms or you know proof aggregation systems and they said oh they're doing it really cool well what if you changed it to something else and so circuit came along and said hey we can we can try to see what happens if we change it and if we change it what do we get and so far it's been pretty positive we've liked a lot of the things um there's also a lot of things that aren't necessarily open and really well um shared so a lot of the end backend infrastructure right as I said a sequencer and smart contracts do not ANL to make uh you need to do a lot of other things especially in a zero knowledge system right if you actually want to prove a block you need to either set up a Marketplace or talk you know talk to have systems talk to each other inside your back end in some way that isn't necessarily clear and for which there isn't necessarily a good gold standard um public good for that just yet that'll probably change and certainly when we open SCE you'll be able to see whatever we're doing um but also maybe we just have different requirements right maybe we're going to do something different in particular if we think about how to secure this space one of the key things we might want to do is you know just add some security features which we'll talk about but other things might be different from the open source standards uh so if PSC is you know really um committed to always doing things exactly evm equivalent with all the same hash functions maybe we're not because you get better Prov uh performance if you change it to something that's more uh ZK friendly and so where you need to explore all of these things and as I said we'll talk about security which will actually come next so there's a lot of research questions that we we can answer and we will answer but actually the biggest one we really cared about was security what can we do differently to make sure that rollups uh are actually very very secure um as I've mentioned Bridges sort of have a really bad track record in the past I think in the last couple years there been billions of of dollars lost or hacked and my biggest fear is that you know this is going to come to the rollup space I really hope it doesn't I sincerely hope it doesn't um but you know the point is security should be always Paramount and always be the first thing you're talking about um and you know depending on who you ask rollups are just complicated Bridges uh certainly they're very big complex systems it's not you know surprising that there's a large uh surface for attacks because of this there's smart contracts you can attack there's sequencers you know there's probably a whole bunch of other things that can go really wrong in this and so thinking about security from the get-go was really really important to us in order to make sure that nothing goes wrong in our system but that's all technical stuff and that sort of air quotes obvious right you should build your system the best way you possibly can you should not introduce bugs you should configure things correctly etc etc etc uh maybe you can actually do more and this is maybe where we get a little controversial but we think it's something very interesting um we can actually say security sorry wrong slide uh security should actually try to do something for the end user not just be built correctly right so for daps building on our um on our Network maybe we can actually help them right we're in a privileged position by operating this network what can we do with that privilege can we do something useful and maybe some people won't really like that but maybe others will certainly really really like it so in particular what we can what we can do and what we sort of coined the phrase we here is uh sequencer level security so the sequencer can actually be involved in helping to secure the system Beyond just you know being well engineered and not having bugs and doing its job we can say it has other specific jobs that can do so in particular what we could try to do is something like um have the sequencer simulate transactions before they hit the chain and say oh if this is going to you know do some damage to some some def5 protocol we're going to hit the pause button on that transaction now note that I said pause and not cancel or stop uh we don't want to necessarily censor people that's not the goal but um you know aliveness guarantee doesn't necessarily mean you have to do it in the next two minutes or five minutes it can be the next 24 hours uh and and maybe that's something that's really valuable because if we can prevent issues occurring on um this chain that might be really really interesting and uh this sort is sort of akin to this notion of a of a def5 circuit breaker where we break composability in some settings uh in order to get some additional security uh in the future you know if that idea is is the one we're going to sort of try and it works out and everyone sort of has a pretty good idea of of its um potency and its power we can do even more cool things right and this is why this is also a research project uh we can do things like add custom invariance because what you probably didn't hear me say on the last slide if I was careful was like I don't know what a bad transaction is and so having a a sequencer go in there and trying to figure it out is not something that we're all going to agree on that's a very uh different notion for different daps something that's bad for your dap might be actually okay for my dap or even favorable it would be really cool as if we could have this um sequencer level security take custom invariance so you could come Deploy on our chain and say Hey you know don't allow any of these transactions that break this invariant to happen very quickly because those are really problematic to us or you could do things like like uh yeah anything problematic you know can be done by me because I'm going to put up a stake and if it's actually problematic you can just slash me and I'll take you know you can take that slack um but beyond that you know there's other research directions like what happens when we decentralize the system we're going to start off you know centralized like most of most of the people uh but also just what else can we do if there are ways that the privileged roles that we operate or that the decentralized actors of these roles operate uh can they do more to secure the the ecosystem in some sense now exactly what that will look like you know is very very different for each person and of course there will be a lot of discussion and if you're interested please come find me come talk to me talk to me about what you think security is and what you'd want security to be on your chain Beyond of course just having everything engineered correctly which is always going to be a nice little goal and so uh the combination of these ideas which are you know a lot of research background and a lot of uh you know interesting takes on on how the security of an ecosystem can actually be uh positively impacted by these privilege roles gets us to you know zerit the network I'm here to talk about which is uh essentially you know just a zero knowledge rollup as I've said where we have these key features on the left the sequencer level security I talked about where we'll have some extra protections for the users and daps deploying on our chain on testnet that functionality doesn't yet exist but it will very soon in the middle you know we have things that look like like L1 blocks so the developer experience is exactly what you'd expect from uh evm equivalent ZK rollup your L2 blocks look like L1 blocks maybe the gas size is a little different maybe the the timing is a bit different but more or less from the development point of view no change and then we'll also do a whole bunch of unique optimizations on the prover which some of you are probably very interested in and I would like to share more about but again it'll be a separate talk it's a different point uh and uh the idea is to get some really good performance gains there and it'll be really cool to talk about these ideas and at the end of the day we have circuit which is a nice ZK rollup where we get security through you know modern research and good ideas that's the goal so where are we I've coming to the end um we launched our our public test net at devc connect so it's been up and running for the most part for a couple of months uh that's still ongoing we just did some upgrades to the network we'll probably do a couple more upgrades we're optimizing the approver getting all the PRS merged you know cleaning everything up getting it ready for sort of prime time uh will open source the repos at some point and then you know hopefully later this year the plan is to actually go live uh and then afterwards we'll explore even more of these ideas right you know what happens with these these invariants for dabs and things like this um so if you're interested please please come talk to me I would love to hear uh what you're interested in um but at the end of the day what we have is a new research backed um zero knowledge evm uh equivalent Zer knowledge rollup sorry said that in too many ways um and and what we want to do is really just have a play ground where we do things through through good research with a little bit of experimentation you know we're not going to go so fast that we break things and everyone's funds go you know down but we want to be able to have cool ideas and a place to implement them uh when it comes to securing these ecosystems so you know we' like to say circuit is um is a new role up that's greater than some of its parts right we have a small small improvements in in some areas uh bigger improvements and others and together it's something that's like actually pretty different than a lot of the stuff that's out there where the standard is just you know the same old but faster so thank you um please uh Reach Out Janet zerit or my telegram or Discord or whatever uh and and we've got a staking system a reaking system going on right now too you can check out at ster.com so thank you
Automatic transcript — names and jargon may be misspelled.