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

Loading player…

Scaling Ethereum with Rollups and Zero-Knowledge Proofs with Orest Tarasiuk from Scroll

Ethereum DenverMon, Oct 9, 2023, 12:00 AM

Speaker

Orest Tarasiuk

Scaling Ethereum with Rollups and Zero-Knowledge Proofs. Join the Scroll team for a primer on zk tech. Orest Tarasiuk (Scroll) Feb 26, 202310:35 - 11:05 MST

Transcript

ah hello I think we need to restart the slides oh yeah great I allowed myself to post on Twitter about my colleague here and thanks so much for bearing with us um I'm here to tell you a bit more about scroll and the zkevm but first before we jump to that could I see a quick sign of hands who knows about scroll already who's heard about scroll before okay good good I adjusted the slides such that this makes sense I'm here to talk about scaling ethereum with rollups and zero knowledge proofs and so I hid the items that everyone understands probably and just left out left the ones that we probably need to talk about a bit more so I'm wondering given these keywords scaling ethereum Roll-Ups and zero knowledge proofs who is able to Define each of those three keywords hand up three people four okay yeah and that is a problem it sounds scary talking about Roll-Ups talking about scalability talking about all of these keywords it's kind of off-putting to many and so I'm here to do a small piece to changing this and I hope this will be a bit help a bit of help for for everyone now before we jump into the details I wanted to give you a quick outline of today's talk we have 30 minutes we'll start with possibilities of entering and understanding the world of crypto especially for people who might not have been around for 20 years and who don't work with roll ups on a daily basis second we'll talk about understanding ethereum's choice and the so-called blockchain trailer map and we also hear about why it's a bit of a stretch to call this a blockchain trailer next we'll talk about solutions to this scalability issue that ethereum is facing and here we will jump into a set of abstraction layers that we will be delving deeper into one by one just focusing on One path in this tree so we'll start with l2s we'll focus on roll ups we'll then focus on ZK Roll-Ups and finally talk about the zika evm and lastly we'll hear very briefly about where scroll positions itself in this whole scheme and also I'm told we have some bounties out there I think sixteen thousand dollars and so we'll see some details about that as well now I'd like to start with a bit of a personal story and something that I'm trying to used to to make crypto a bit less scary and that is myself a rest I only joined crypto as a developer quite recently some one and a half years ago um with the background in traditional computer science and traditional startups and and I think it's very important to talk about how people from less crypto native backgrounds can actually get into the space and uh what the what the pathways are and so in my case I uh actually did the startups and the very traditional sense of high tech which often means you start with the high-tech idea you have this idea of using technology to solve a human problem and then we are faced with the real world out there and you notice oh damn not everyone cares about text that much and it's not purely a computer science or a high-tech problem that we can we can solve here and so in in my case I um co-founded the startup called karaka with the idea of using technology to help people with Digestive Disease and we had all of those big ideas in in our minds of how inefficient it is for people to track Diaries of what they eat and how their symptoms develop in a paper form and we thought hey this is such a clear gain and win for for a high-tech company and then it turned out years later hey this is not a tech problem this is something where the human component is very important where compliance and empathy are actually stronger than the element of the high tech and I think there's a lesson to learn from this for crypto as in and people who attend events like these are often those who are into the nitty-gritty detail and they are so fascinated by this new framework that comes out of this new language of this new feature set and I'm here to tell you why developing an um crypto-centric or roll-up Centric World actually should feel boring you should feel like it's boring to deploy to this roll-up of yours because this is actually an advantage this is something that is going to make people use the roll up in the first place and this is something that is going to open up ethereum and this whole crypto bubble to the masses and so it's very important not to get caught up in thinking about those fascinating high-tech gadgets only and so what happened at our company caraca is that we found out we basically need to scale not via technology but via adding people and having people talk to to users and talk to clients and understand the pain points and only then can you think about scaling this with tech and it was also that company that made me get into crypto in the first place actually because all of our developers were big on crypto and they would convince us to lose some money with Ico stuff like that and so the the there were touch points but it was never a very active or a very Hands-On engagement for me and then my co-founder he also decided to leave that company and joined ethereum foundation and he had been working on secure multi-party computation for a long time he had studied theoretical physics and so on and so he would keep telling me ever since we left that startup hey Horace have you heard about secure multi-party computation like we can collaboratively be collaboratively collaboratively and compute a shared value without without actually trusting each other to follow the rules but then having full confidence in the result and so I thought to myself yeah this sounds cool but dunkrat is this theoretical guy and he doesn't really worry that much if this theoretical breakthrough doesn't have that many applications in the real world and that went on for a few years and it was only one and a half years later when my second startup failed I told that very guy who had been invested by then hey we we're afraid you will need to write off your investment and upon which he again bothered me about those secure multi-party computations and I actually checked what the state was and realized to my huge um I was very very surprised that actually zero knowledge proofs are reality now and they are something that you can actually use out the in the wild and that is no longer a dream of a researcher no longer something that only the theory or the researchers who are interested in theory get to value and appreciate but something that everyone in here will probably be very directly affected by Within is already and will be even more affected by internet in the next few years so I decided to get into the space and I figured the best way to to do that would be to join a company doing exactly The Cutting Edge research and and putting it down to practice and creating a product out of it and so this is something I can recommend to everyone hit me up if you guys need any input or feedback or ideas of how to get engaged in the space yourself so now let's talk ethereum we're all here because of ethereum and we all love it everyone loves it except it's not really the case if you Google ethereum problems the first thing you will find is oh damn ethereum doesn't scale you will see different numbers 15 transactions per second is approximately the average number you will see and that contrasts very sharply with all sorts of centralized systems such as Visa doing orders of magnitude more now is this an ethereum problem not really it's a blockchain problem or can we go more broadly can we escape this bubble of thinking that everything is crypto-centric well actually it turns out we can and if you come from a more traditional computer science background and you've been around for a bit longer than the last 11 years you will probably remember this databases out there blockchain is just a database and specifically for distributed databases we've had this cap theorem um that you can read up on Wikipedia and we've had this we've known around we've known about the cap theorem um since around the 80s that you basically can't fulfill three properties in a decentralized database at the same time that's what we call a trilemma so you need to decide which of the three desirable properties you want to focus on um which do you get to pick now in the ethereum or in the crypto bubble this came to be known a version of this came to be known as the blockchain trilemma and that's what we call the the thing from the 80s and the 2010s and it basically means that you have these three cool properties number one security number two decentralization and number three scalability and you are faced with this dramatic choice of only being able to go with two of them now what happened in the case of ethereum um ethereum sacrifice scalability that's where the 15 transactions per second um come from now what would the alternative be um if we don't sacrifice scalability as traditional chains Bitcoin or ethereum we could sacrifice decentralization that's what monolithic TPS chains do or alternatively we could sacrifice um security and that's what you might see in a multi-chain system ecosystems now did ethereum really sacrifice scalability if you go back and check out even vitalik's posts from The Early times of ethereum you will see first of all it was a very conscious deliberate choice to sacrifice scalability and to focus on security and decentralization second you will see that there have been ideas around working around this trilemma for a long time now layer twos are basically the result or the favorite or the something that that turns out to be most the most promising from those ideas back from the early days and so they sent for layer twos as in an embedded layer into the um ecosystem of the ethereum based layer now this again a problem of definitions here our crypto bubble is moving so quickly we don't really know what how to define terms so I gave two definitions about the l2s and I think the shared traits nowadays is that an L2 is a system that inherits most so ideally all security properties from the base layer the level one and one example of leatus are roll-ups um Roll-Ups are have gotten to be known as the end game for ethereum and they are supposed to basically win in scalability use cases in the long term according to many people in the space but let's talk about what the current state of the roll-up ecosystem is there's in fact two big categories of Roll-Ups optimistic ones and ZK based the optimistic rollups are simpler to build they because of that have been around for quite some time now and they have a pretty good adoption you might know arbitrum optimism you might probably have interacted on them and noteworthy at this point is to to to remind ourselves of the fact that if you go to l2b.com you will see even the main the so-called mainnet in optimistic rollups they have a lot of training wheels like you are not able to submit a fraud proof for instance we are in a very early stage even with the optimistic Roll-Ups and they are the simpler one now the problem with optimistic rollups is that they have a slow finality you basically need to Warrant a Time window for Network participants to submit a fraud proof um in which case the network then discards um such fraudulent State transaction now the alternative are Roll-Ups based on zero knowledge proofs zero knowledge proofs have been around since the late 70s and again and the crypto bubble we tend to think that zkp's b and ethereum thing and this new kid in the block but they are actually not if you've studied maths or computer science before ethereum you will have known this um but the cool thing about ZK is that they became practical now and so there's several teams building ZK Roll-Ups out there which promise to have fast finality because in the case of a ZK roll up you basically submit a validity proof to the L1 that doesn't require any other um additional delays for other node participants to convince themselves with very very high confidence that um the state transition was correct now the problem again is the complexity and so even though zkps have been around for a long time we've only had a few years of practical experience building them and that is very very little for the complexity of such systems and so that means this very low adoption right now nonetheless zkp ZK Roll-Ups are seen as the clear favorites in the mid to long term because of those restrictions that stem from the optimistic case of the time delay and so let's talk about what sorts of what does DK Roll Up is so there's two important properties to SDK roll-up number one in order to prove the state transition in such a roll-up we do not require every other node participant to re-execute all of the transactions in a block and instead we submit a small survey small in size cryptographic proof convincing other network participants that this resulting New State Route is correct and the important element in this case is that it's actually way faster to verify such a proof than to re-execute the whole thing which brings us to this very desirable property of scalability that we can Define as the cost being sub-linear and the size and the n as opposed to a linear situation that we face in the current decentralized ethereum ecosystem where every new node or every new transaction adds costs basically the same amount as the previous one so it means this a linear cost in expanding the network or expanding the network capacity and in this case we are able to skip that and have this sublinear cost and all of this is doable with a trustless assumption with respect to the approver with the approver being the entity that creates the zero knowledge proof this smart this succinct cryptographic validity proof so that's a very very important property because the prover is the entity that does the heavy heavy lifting so not everyone will be the approver so what types of ZK Roll-Ups are out there there is actually some ZK Roll-Ups that are live on the mainnet and those are application specific Roll-Ups um so for instance this ZK Roll-Ups that only allow sending transactions sending ether only allowed doing swaps and what interests us as the ethereum community though is having a general purpose roll up that would allow the entirety of the critical mass that the ethereum ecosystem has amassed to be directly ported to the to the roll up so that um ideally what we mean by that so that all of the up codes of the evm can be reflected in the ZK world what do we mean by the evm and and opcodes well the evm is just a VM a VM is a virtual machine and a virtual machine is basically a an abstract formal definition of a computer that makes it easy for all sorts of implementations to talk together to to follow the same standard and so an evm takes this input um solidity code or some other language that gets compiled into bytecode and that byte code gets executed within the engine of such a virtual machine this is important because there's different levels of a ZK evm roll up with respect to compatibility with the EVN and so you might have seen this chart by vitalik and it actually it's kind of outdated these days already but you will see there's all sorts of properties on this spectrum on this trade of between compatibility with the evm and the performance of such a ZK rollup and it's the important thing to note here is in the ecosystem we have teams working on basically each of those um EV ZK evm types so what are the benefits of such a zkevm why do we bother for this in the first place well the first big benefit is we get to reuse the existing infrastructure and in particular for zkevm of type 2.5 or less we get to reuse compiled byte codes and it's very easy to Port applications dabs from ethereum to um to the roll up and that's what we mean by hey let's have a boring developer experience let's just ask people to exchange the RPC endpoint and the chain ID and press the submit button again and the contract will be deployed to a roll up that's a very valuable property next we can encapsulate this complexity of those zero knowledge proofs highly complex mathematical Primitives and into a system where the end developer doesn't need to worry about that anymore this is in contrast to systems that Mr a ZK roll up but use a separate VM model where for instance the developer needs to think and Prime Fields when coding the contract and lastly we get to benefit from the security of the evm execution model which has been around for many years now so summary let's make Dev X boring now how is this possible why haven't we had this before if zkps have been around since 79. well in fact they haven't been plausible it doesn't really interest Us in the applied sphere that some crazy scientists in in the 70s found out that you could prove something and in the footer they added a note that it would take a thousand years to prove that thing if executing it takes one second now these days there have been huge improvements in improving systems and they have been breakthroughs and Hardware accelerating such systems and this has been possible with um actually a lot of interest in the community which basically created this self-fulfilling prophecy or this um positive feedback cycle where in more very smart people are working on this and so there's more breakthroughs and so even more people are interested in working on this so what does the zika evm in detail well you can think about this as a pipeline and there you already see potential for optimization um wherein the execution clients gathers traces of what's going on in the L2 those traces get passed into a circuit input Builder that creates then Witnesses for the individual elements of the VM that basically can be mapped to the ZK evm and those individual proofs get aggregated later and a aggregation circuit and posts it on chain on chain means onto the ethereum based layer what is the vision behind this whole thing and now I'm I'm coming to scroll which is one of the zkevm teams well the vision especially for scroll specifically is to scale ethereum itself to make it accessible to to more people and we believe that decentralization is key for that so we don't want to sacrifice and that third element of the trilemma but we want to work around it and ideally such that end developers can Port the dabs to develop easily without having to think about all of this complexity and we wanted to achieve that while working very closely with the EF and such that we benefit the entire community and we've been open source um since day one you can see a lot of contributions between the PSC team from the AF and scroll public on GitHub so where's the catch well the catch is the stood sub catches actually cut sub catch number one the computational cost to create those proofs is very very high like the direct computational cost um it takes a big machine to create such a proof and the second sub catch is on the metal level there's a lot of complexity involved and you need to actually have a lot of very smart people come up with those circuits and then even smarter people come and try to order them and try to find out where the bugs are in a code base that entails right now I think 40 000 lines of code and the PSE and Upstream alone so there will be bugs and so we need a lot of eyeballs to catch them as soon as possible where are we in this whole Endeavor well in fact um I uh I was sad I I I I I was told not to promise any Alpha so I won't be promising any Alpha today and and I can only say we are somewhere between phase two and phase three of um our roadmap which means we have a live free Alpha test net that you can access at scroll.io it's a permissionless one and anyone can access it and deploy that app and see how boring deploying the apps is and next up we will be working on Outsourcing the proof generation to a decentralized network of provers and launching a mainnet after that finally we will work on decentralizing the sequence as well so join us check us out check us out check out our Discord check out open roles and also try the test net finally we also have several hackathon bounties this week um we you get 1 000 bucks um just if you deploy to scroll so I think this is a very easy one to get this 10 up 10 10 slots for this one and and some more check them out at the uh official URL other than that I encourage everyone to um not be too afraid and too scared in spite of all the buzzwords that have been circulating around and hits up anyone from the scroll team or myself if you have any questions thank you so much yeah do you have a quick question when do you think the following is gonna happen instruction by instruction zero knowledge proofs evm so you can have totally obfuscated evm on Layer Two is it far in the future do you think so I think the question is about when we have something that some people refer to as enshrined roll up right in front ZK evm so that we get to prove mainnet blocks and I think that we are quite far away from that because this entails significant changes to the base layer but this is one of the big final goals for many roll-up teams and this is very attractive for for ethereum itself as well so I would see the roll ups right now in the midterm as a playing field to experiment with all sorts of different features and approaches and incentives and so on that could then be used and I think it will take a bit longer than the soon trademark from the EF that could then be used to actually prove mainnet blocks and make um snacks part of ethereum itself and the snack everything roadmap not soon um one second for the mic John um is the is the plan with the you know scroll ZK pvm2 um compensate provers Network for providing the ability proofs attention for the wanting to approve actually but you know computation to provide the proof themselves if I go the correctly the question is about um would the zkevm compensate proof generators for the work and the answer is absolutely that is crucial for decentralizing The Proven Network it's very important that not every that there's not one single foundation running previous and and in fact this is um quite a challenge because proof generation requires GPU machines with uh hundreds of gigabytes of RAM right now um and so you actually can get them for a few bucks an hour at Amazon but it's not like every note um or every Network participant like normal end users would be inclined to be running those so it's actually an important element of the decentralization strategy to set up to economics such that proofers can be incentivized and such that this incentive structure doesn't lead to centralization so for instance not rewarding the fastest proofers first yeah one more question ah hi um so on the same note the question is this now if you're gonna go if you need a GPU with all the stuff to do the proofs are we going to go back into the whole proof of work kind of environmental Thing versus some sort of proof of stake you have to have your own tokens does it get to that or how does it work is it a lot of energy very good question does proof generation basically mean going back to proof of work the answer is no luckily not for two reasons number one with proof of work you are fine you are hashing random nonsense to find the right hash this is useless work with the proof generation you are actually proving something useful um and second proving something useful means that not everyone needs to be running this dumb work in parallel so in particular this is an important element of the proof generation decentralization strategy as well in particular could the network distribute tasks of proof generation in parallel such that there's not too much redundancy with respect to um creating a proof for the same transactions the same blocks so it would only be maybe one or ten prove us that work on creating proofs for a set of blocks and not everyone creates proofs for everything so there's a big big against sublinear component to this hey um are you aware of uh any beginner friendly projects maybe on GitHub someone who's interested in getting involved can contribute to and whatnot yeah absolutely and are the beginner friendly projects and how to get involved well I guess given that people are here check out the hackathon check out some bounties I guess that's a nice um first uh step um also you can check out our GitHub we have some good for beginner issues out there and finally I can recommend a course on ZK if you want to dig deep into the maths behind the whole thing um called the ZK minuslearning.

org by actually those people who among others who in the 70s came up with zkps Dan Bonnet um Etc and it it's actually very up to date it's ongoing as we speak and it will go on for another I think two or three months any more questions okay thank you so much everyone hit me up anytime soon foreign

Automatic transcript — names and jargon may be misspelled.