'Eth 2 Sweet Tooth: Rollups and date-a availability' - Ben Jones
ETHGlobal·Sat, Oct 9, 2021, 12:00 AM
Speaker
An overview of how rollups will use Eth2 as a data availability layer.
Transcript
all right so we're now moving into our last talk of the day uh we have ben jones from optimism talking about uh roll-ups uh and especially using roll-ups um with the data availability that eth2 will soon offer us this is the most creative title award one today um so ben i'll let you take it from here and explain this really important topic to us all right thanks josh um hang on let me go ahead and share my screen hello hello everyone um let's see here wonderful all right we're in hey guys um thank you josh for that wonderful intro i will take uh that uh that title of most uh most creative talk title but i actually have to give it to the rest of my team because we ran an experiment where i gave them control over my talk title so that's what we that's what we were left with um anyway cool so hey everyone uh my name is ben jones that is my real name not internet pseudonym i promise you um and i work with a team called optimism um and we're building something called optimistic ethereum and it's basically a scaling solution that makes ethereum super super extra awesome because it's already amazingly awesome and today we're going to talk about as josh said sort of roll ups and eat two and how they fit into the sort of ethereum scaling landscape and ecosystem and also i'm going to talk a little bit about the synergies there really in particular because i think that that's very important to cover cool so i guess i came at this talk with the title of the thing in mind which is the future of ethereum but i do think that before we talk about the future we need to understand a little bit about the past so i'm going to share a little bit of very brief points of context before i talk about the future and the other thing that i want to say is that the reason that this is not a recording and i'm sitting here in front of you guys talking live in a way where i'm going to almost really say something embarrassing and slip up is that y'all can ask questions so i'm gonna try to keep this quick because i'm much more interested in responding to you know people that are you know tuned in around the world um than me just doing something that could be recorded anyway so bring the questions on get them ready i want good questions but but we'll go over some slides first okay so let's talk about the first little bit of context and this is ethereum scaling as a general concept so i've talked a lot about these concepts i've actually done in east global talk in the past where i talked about what i call the cambrian explosion of layer twos and i think really it's even accurate to say that there's a cambrian explosion of blockchain scaling generally and certainly eth2 and sharding while it may not technically fit into the category of layer 2 because it is a layer 1. i think it's worth talking about and that's the important thing that i want to drive home about what's been going on in ethereum is that the number and designs and uh space of scaling this chain is just booming it's absolutely exploding right cambrian explosion um one thing about the explosion terminology actually that i don't really like in some sense is that it sounds like very violent and like things are moving away from each other in this sort of explosion but remember that the ethereum that the cambrian explosion resulted in a very diverse ecosystem where everything worked together and that's what i'm going to talk about today is how some of these things work together and in particular i'm going to talk about eth2 sharding and roll-ups and really particularly eth2 phase numero 1 numero uno e2 phase 1. okay oh and the other so the other crazy thing that i wanted to say is that the other alternative to explosion that i was thinking about for cambrian explosion because that has a negative context is implosion right because somehow what i want to communicate is that there's a lot of energy going on in scaling right now and it's really important that it all comes together and so i googled implosion and it turns out that like the first google image result is like a high-level diagram on creating a nuclear weapon which i just thought was ridiculous and i figured if i'm on the list i'll put you all on the list too so very interesting and maybe we'll even get back to that diagram okay so that's the first sort of point that i wanted to make is that things are popping off right now super awesome the second little bit of history i want to share or at least catch catch people up to speed on is what is going on with eth2 and sharding and in particular what i really want to do is work in this joke that i've been trying to crack for a very long time unsuccessfully which is to say that eth2 phase one is like a hotel uh during cobid because it has a lot of availability ah okay i've been trying to figure out how to get that idea into a good joke form i tried to do a visual pun it's it's okay i i i don't know but i hope you can see that i put way too much effort into it uh for with some photoshop cool okay so what does data availability actually mean um this is something that the term data availability right i think is thrown along a lot on like the twitter sphere and the sort of crypto community and i think it's worth diving into a little bit more about what that means but the approach that i don't want to take is diving into what it means by sharing things like this right so this is like this crazy eth2 sort of spec and i think it's too much into the weeds so what i'm going to share is my quick tldr high level vision simple description of what we can think of eth2 phase one as what does it mean that there's a bunch of data being made available okay so i'm going to do that by recommending a great website that some of you may have visited called down for everyone or justme.com okay so this is a very useful website you can just go to it if a website isn't working and this website will tell you whether it's working to them right so if you go to google or in this case i tried to go to rollupblockdata.com and down for everyone or just me also tried to go there and check whether or not the site was up and of course that was just a made up url but of course it's like relevant to you know what i'm going to be talking about but it but it was down so the very simple way of imagining what eath 2.
0 is is we take that functionality of a website or another party checking for you whether or not they can download some data right download this webpage and we decentralize it and there's a lot of stuff about random sampling and proof of stake and all that sort of uh you know super important stuff in in that spec and in how it technically works but at the end of the day the way to think about e2 phase one is that we select a decentralized pool of people and they all start downloading the block data from each other and making sure that everyone else can access it because what they want to do right is make a censorship resistant chain this is one of the awesome properties of blockchains and we really want to preserve it but we want to scale it and so this is like sort of a funny high level intuition for how we do that okay cool and then the last last context that i will share is just a little bit about roll-ups and in particular i'm going to talk about optimistic roll-ups because it's the thing that i'm spending all my time on and the basic intuition for why this thing that's a roll-up which i'll talk about later is called optimistic is i think this slide is like the best summary that i've seen is you don't go to court to cash a check you go to court if the check bounces right so this is a very obvious statement but if we think of a blockchain as a court it can give us a lot of intuition for what a optimistic scaling solution does okay so we can go into a little more technically what that means right it's uh relatively simple so you have up here your l1 which is ethereum and you know of course in parentheses and this will be eth2 in this sort of synergistic future i'm going to be talking about and of course we have an l2 down below and this is what we call the roll-up the optimistic roll-up and the basic idea is that you start off with some state say state 0 over here on the left and then someone then you have a process that picks a transaction and along with that transaction someone proposes what the result of that transaction is right so fairly simple if we started off with state zero and then tx0 sent alice uh some money then state one would have bought alice with that much more money right and then we could do the same thing for tx1 and that would produce state two and so on and so forth okay so the important thing about an optimistic scheme is that it is expensive to calculate uh what the result of tx0 is on state zero uh especially in a decentralized consensus with this crazy low you know gas limit that we have in ethereum and crazy spike in gas prices so what we do instead is we simply post that data but we do not do any computation on it instead what we do is we basically say we're going to make this notarized we're going to like cement this as this new proposal and if we ever get to a point in time in which there's a fraudulent proposal right so transaction two here let's say doesn't shouldn't result in state three but someone proposed it only then do we go ahead and prove fraud right we say hey look i'm going to prove it to you we didn't want to at first because we wanted scalability but i have no choice now let's execute this transaction and show you what really happens because it's not s3 right and that's a fraud proof and this allows you to you know basically in a happy case know that the chain progresses for cheap but in the sad case you can prove that that it was misbehaving or some party was misbehaved cool okay so normally if i had like a chat in front of me i'd be like all right does that make sense i'm just gonna have to believe that it makes amazing sense to y'all but if it doesn't now's the time to write down your questions and ask more okay and then the last thing that i'll talk about is just in practical terms uh one of the most important things to us about this system is that execute l2 tx can be execute evm tx so this took a lot of work for us to figure out and we have a deep dive article called obm deep dive if you're interested in checking it out so we call the version of the evm that can work in this execute ovm tx we call it the optimistic virtual machine instead of the ethereum virtual machine and we're very very excited that we can have something that is so close to ethereum but works on l2 so worth even giving the classic mind blow jif which i do pronounce it okay so uh i guess the last thing that i'll say is as i was putting together these slides i started i like my mind kept coming back to this nuclear bob diagram and i actually realized that like it's kind of at least graphically speaking a good analogy for the synergy that i'm talking about because if i go back a few slides right this rolled up right this notarized as we call it here is exactly the same thing that eth2 phase one gives us if i keep going backwards here because obviously the most important property of keeping this system secure is that if tx1 or s2 you could not download them then you could never pass them into this function you could never make the transaction that proves fraud because you can't give the input so it's very very important for this optimistic rollup system to work that the data is made available and that is exactly what eth2 phase one does it makes sure that it's not down it's up for everyone including me right okay so if we were to imagine this diagram as sort of as sort of what we're talking about here right what we can imagine is on the outside we have these rollups and they are able to basically surface disputes inward and then in the in the inner part instead of a supercritical mass a subcritical mass of plutonium 239 we have a supercritical mass of eth2 validators you guys just saw the talk on how to spin up a staker go do that get us to that super critical mass and we will explode with so much availability and then of course at the end what happens is not nuclear fallout but it's sort of uh a nuclear ethereum adoption explosion right if we can get transactions down cheap and we can make them fast and we can make them easy to do then we can really drive ethereum adoption which is super super awesome because right now things are very expensive and it's hard for people to be able to use it okay so that is sort of the high level description that i would that i would use to describe what ease 2 phase 1 is what roll-ups are and how they relate to each other and why that's so critical that both of them come hand-in-hand uh wonderful and the next thing i'm going to talk about is just a little bit about the system that we're building and sort of our philosophy and how we're approaching building optimistic ethereum cool so one of the big important pieces of philosophy that i think we are taking is pragmatism so very important scaling is an issue today right gas prices are going through the roof on the ethereum main chain today and it's extremely important that we solve this issue it's not a hypothetical it's not a a research problem that we can sync years into we have you know many awesome research things coming together but we need to find and use solutions today so it's extremely important that we do that and the other property that the other philosophy related to pragmatism that i think is relevant is don't reinvent the wheel so on one hand uh we have it's a great thing that the evm can be used for developers because who wants to rewrite their application to deploy it to a more scalable version but what's equally as important is that we can reuse all the infrastructure that ethereum uses so down here in the bottom i have a little diagram which you may not a little clip art which you may or may not be able to see but that is a that is a diff and the point is that it is a get diff that is very very small so not only do we provide evm uh just just like developers known love from an interface level we have actual implementations of geth and of the evm that are very very very similar it does not require changing an entire architecture to be able to get the ovm to work and to scale the evm with optimistic roll-ups cool so that's that's one of our philosophies let's see if i can click there another very important philosophy for us is collaboration so we're a public benefit corp and we think it's very important that we have a charter that promotes access to scalable and cheap financial infrastructure more concretely the two things that we've been making sure that we do that's very very important one is develop out in the open so if you go to our code base every single commit everything that you look at there is public and there's no staging you can just go and see the weird things that we're trying and maybe sometimes failing at and the other thing that i think is super important for us to do is to lean very heavily into eth one point x um so i think we had a talk from alexei from turbo geth earlier today there's a very awesome very large community of people working to make ethereum core infrastructure better and the great thing about having a tiny diff is all of the things that people do to make ethereum better we can use to make ethereum better and all of the things that we do to make our system better ethereum can use to be made better so we're super excited about that and the other thing is that it's very hard to get eth1 to get ethereum forks because there's a very high coordination cost you have to get a you know core dev call going you've got to have some people angry on twitter and discussions there right but layer twos because their smart contracts have permissionless innervation a much lower switching cost and so we're very very excited about being able to do things like stateless ethereum so i found a cool stateless ethereum diagram on the internet very exciting and also things like parallelizing ethereum which is something that's very very important cool and then the last thing that i'll say is as far as our philosophy goes is that iteration for us is extremely important so it's very important that we don't build we built don't build in a vacuum and we take a lot of care to make sure that that doesn't happen we've launched two test nets and every time that we've done that getting real users using a system has taught us so so much about what we need to build and what people desire so we learn from the community and we work for the community so if you want to teach us things you should reach out and if you want to work with us you should also do that speaking oh man i did that transition and i forgot this was the next slide but i'm gonna oh well i guess i can't pretend it's intentional now we'll pretend it's intentional yes as i was saying uh you can you can you know find us on the internet unsurprisingly we got a twitter here we got our website which has a link to our discord in it go check that out and like i said all of our code is open source and ready to be torn apart and viewed by anyone watching so go check that out okay how we doing on time great okay i wanted to leave time for questions and i think we've succeeded so uh that's my talk awesome thanks ben uh yeah we do have some questions uh so let's jump right into it um how long do you estimate the existing ethereum chain data will get us assuming full roll ups until we hit capacity and need additional layer 1 data provided by these two hey josh i can't hear you oh okay oh you're back sorry about that did you hear my question at all or i'll just say it over again i'm gonna be honest up until that point i heard nothing ask it again all right all right uh how long do you estimate the existing ethereum chain data will get us assuming full rollups until we hit capacity and the additional layer one data are provided by youtube right so the eth2 data availability gets us like orders of magnitude better right and this is sort of the point of sharding has been from the beginning by the way eth2 phase two is all about doing the same thing that it does for availability which is just like your ability to sort of timestamp things into the ethereum chain makes a very provable very accessible very downloadable for every one way to put some data but of course the other thing that ethereum does is give you a trustless way to do computation this is your smart contracts so both of these things are massively improved by by eth2 in in some phases but the easier phase thankfully and also the most important phase for rollups is that data availability and so eth2 has you know been on a long track knowing that we need to scale orders of magnitude up today that said we can get a lot a lot of uh transactions out of eth1 um in the short term and this is like the important pragmatic thing it's why we're not building a system that uses eth2 availability first we're building a system that uses eth1 availability and so you can get 10 to 100x scalability the the scalability for a rollup is interesting and that it is a little bit dependent on what you're scaling so for example if you are scaling transactions that are very very very large but then only a very small bit of computation is done on them it's not as useful in rollup because you still have to pay your transaction fee to make sure that that big data is downloadable for everyone and all that you save on is the tiny little computation whereas you could have a very small transaction that is not a lot of data to post but then it does a lot of things a lot of addition and subtraction multiplication storage storage loading storage setting creating other contracts then that's going to give you a lot more scaling but we you know we can throw around 10 to 100 x 3 000 tps there's lots of there's lots of numbers you can throw around the truth is it's really a little application dependent okay um and kind of follow up to that um you know just understanding like how these things fit into each other in sequence once we have data availability from phase one from youth to progress uh will there be any reason to use rollups that use like eth1 data availability or at that point is it just going to make sense that really all autistic roll-ups are going to be using um excluded availability right so it depends i think it depends on what you mean by uh makes sense so on one hand the point of e2 phase one is going to be making available data way cheaper and so it definitely makes sense uh if if you think that the roll up even a rollup centric eth1 is getting congested to move that to e2 because it's going to be cheaper um so there's no question there and it and really what it comes down to again i'll go back to like pragmatism the answer that question will really just be what is the development changes that we need to make how does youth 2 phase 1 how do we get available data into the computation layer where we do disputes um but as soon as we can do that it makes a lot of sense got it okay moving on uh are there any like really major open problems that need to be solved before this is possible or is it really just a matter of like look optimistic roll-ups need to be on mainnet for a while and of course we have to you know deploy data shards but like once we have those things are there major unsolved problems or we should be able to implement at that point um so i love research and so i would be very very sad if the answer that question was nope everything is solved and so that's definitely not the case what i can say is that you know i and other members of my team spent a lot of time working on plasma which was the scaling technology before that and doing research and one of the one of our motivations for its time to act on rollups was that it was a very pragmatic very uh implementable thing as it stands today and so i don't think that that i don't think that that i think that that's very true and very important certainly there are tons of things beyond that that are going to be important in my opinion some of the biggest are basically what i said before which is all of the eth 1.x stuff so stateless state bloat is a huge problem on eth1 and we can do crazy awesome things that eath 1.x people have been trying to figure out how to do and actually deploy them in a practical manner on rollups today and so i think that's very exciting those research problems are underway but that's where that's some examples of future important research okay okay and we got a couple questions specifically about optimism as well so let's jump in there um what are the advantages of optimism's uh roll-up solution uh as opposed to arbitram's optimus rule of solution oh spicy question um so i mean the first thing that i'd say is like everyone takes their own approach and so the answer to this is not is going to depend on the system that you're building absolutely um the things that i will highlight are honestly things that i've already highlighted about the ovm which is that we are reusing everything from the evm humanly possible and so our our view is that taking that approach to the roadmap is going to have huge huge huge payoffs as the ecosystem evolves i think that's going to be really really really important um yeah i can tell you having spent a lot of time working on me on doing things in the evm i've i've become so grateful any time that we can do something that has already been done with the evm because it is so much easier than reinventing the wheel um so that would that would be the main thing that i would that i would say there yeah okay um and i mean kind of building on that what if any like extended capabilities do you want to add to the ovm that's beyond the baseline of what evm gives us today ooh yeah so i mean i'll hit you again i'll hit you again josh with the eth one point x but one of the coolest things that we've done in this release is built out something called account abstraction so this is a concept that you can go you know and read tons of youth research posts on all over the place but basically what it comes down to is ditching the notion of ethereum wallets as being something that is uh enshrined and ethereum transaction formats as being something that is enshrined and instead uh just making everything be smart contract wallets right and so this uh sounds sort of obvious and smart contract wallets are you know especially because of meta transactions are really booming at the moment but the ability to do this natively in the protocol is super super super powerful so that's one that's one that's one thing that concretely we have now the other things like i said i'll just i'll just keep parking on each one point x is uh stateless clients are going to be huge and especially when we have a lot of data available statelessness is super super super awesome um another one that i'll that i'll lay out is um parallelism so right now the evm is sort of this single threaded beast but we're going to be able to basically split that out into something that is uh asymmetrically relevant or asymmetrically uh biased towards the people that are defending the chain um and so we think that that's gonna be something that's super exciting and it's gonna basically get us a higher gas limit without having to sacrifice in other areas and uh can kind of continue on this thread a bit actually i should say if anyone watching is interested in learning about account extraction we had a great talk earlier in the day from sam and angstar um so check that out it's going to be on our twitter it's going to be on our youtube you can go check it out um but continuing on this thread ben so you know we presume that offers and will roll version one um but still have some things on the roadmap subsequent versions etc what does upgrading you know from autism v1 to v2 look like in practice ooh that is a very great question and that's something that we've been thinking a lot a lot about as we gear up for mainnet release so the most the first thing that i'll say is that we want to make sure that people have optionality and there's sort of a trade-off sometimes between giving users optional optionality and giving them a horrible experience but one thing that we've been very very strongly opinionated about is making sure that the actions that you take in rollup are as generalized as sort of the evm was if you compare it to bitcoin and so what this means is that there's not really actually any sort of function in in the ovm uh that is like deposit or withdrawal instead there is like what you could consider a message passing layer and so instead what happens is you have a contract that holds deposited money on l1 and a contract on l2 that makes deposited funds appear if they are held on l1 and these two contracts have an authenticated way to communicate with each other so anytime you lock up some money here it mints it down here and if you want to withdrawal it'll burn it up down here and it'll release the funds to you up here and so this sort of arbitrary message passing construction gives you a lot of flexibility in how you want to design an upgrade mechanism um the the thing that we are that we are a big fan of is basically opt-in or opt-out mechanisms where you have a period of time in which the state is going to be forked to you to have a basically a better improved vm or better improved contracts and users will have a period of time where where in that time they will be able to say i want to to use this upgrade and they'll basically be able to convert their tokens into the same amount of like about to be upgraded tokens and they'll go there and so that's that's one approach another approach is using that mechanism in the opposite way and saying by default there will be some governance mechanism that get that will promote an upgrade and if you don't like that upgrade then you can do the exact same thing to opt out and you will be left behind in the old chain which will still continue running um so yeah that's that's how we think about it is basically like give people flexibility and when you do upgrades make it a new chain don't like destroy the old chain and make a new one just make a new one and give people an easy way to migrate over great okay if you still got time we got two i think what should be really short questions and then we'll wrap um so this is right from the chat this very recently um is the fraud proof executing the entire transaction or sampling certain steps of it ooh that's a great question so it honestly depends on how you define a transaction i think the way that i would assume you're defining it the answer is it does the whole thing um so there are you know a pretty large design space actually of ways to sort of distribute like interactivity into these fraud proofs um but again our focus is pragmatism and the pragmatic way to do it is you just run the transaction so that's what we've gone with because this is like the fraud proofs are the sad path not the happy path and so we have something that works we want to get it to people because we really need to scale ethereum um okay next um what techniques do you use to keep fraud proofs a tractable size um rather than having to replay massive blocks or full transactions entirely on main chain so that is a great question so there's two things that i'll say um so the first thing is that this is yet another example of us being so thankful that we're able to reuse the evm because something that the evm has that's very important is gas metering and because the evm has it the ovm has it and so you can bound transaction size and therefore fraud proof size if you're playing the whole transaction by having a gas limit right on a per transaction basis um so that's that's one part of the answer the other part of the answer is that we have a bonding system whereby anyone who might be able to take an action that you would have to prove fraudulent to secure your funds requires that you post a bond you basically take some eath and you lock it up and you say hey i promise to tell the truth if i don't tell the truth and fraud is proven this money will be slashed and so not only does the money get slashed but some of it is also used to pay back for the gas that people spent doing the fraud proof and so this is the other sort of mvp detractor from fraud proofs being big and expensive on l1 is make sure people get reimbursed okay and final question ben um uh it seemed like explosions were on your mind earlier i it appears that you're joining us from a bunker right now uh tell us a little more about your environment tell you a little more oh great well i'll dox myself a little say that i'm uh in the wonderful city of new york uh what you are looking at above me is not a bunker actually it is a shelving unit that i took a hacksaw to and cut cut some slots in and put put some of the shelving things across between these two shelves so there's another shelf there and my bed is actually up above me right now oh okay we had we had lots of guesses coming in the chat and i hope that someone wants some money on that okay thank you ben really appreciate it i think there are more questions in the chat if you've got a minute to jump in and and chat with people i'm sure that they'd appreciate it um and of course you can find ben on twitter i'm sure and you know maybe he'll answer there as well oh yeah at ben underscore chain it's another horrible pun that's my twitter handle i totally didn't put that but i appreciate it josh all right all right everyone thanks man
Automatic transcript — names and jargon may be misspelled.