Ethereumverse... loading. Or: Why we NEED horizontal scaling
ETHCC 6 · July 2023 · 29:13
Friederike Ernst argues for horizontal Ethereum scaling. The speaker uses rough throughput calculations to challenge the idea that settling everything on Layer 1 can provide enough capacity.
Speakers
Topics
From ETHCC 6, hosted by Ethereum France.
Transcript
[Music] thank you hey my name is and I'm one of the co-founders of gnosis and I will talk to you about l2s and the nuances in different l2s and kind of um and kind of contrast it with horizontal scaling and hopefully convince you that they're not actually all that different from one another and that basically there's a lot of different shades um when it when it kind of comes to to
scaling so problem you all know this ethereum itself doesn't scale it so this is a meme that actually went around um about the Bitcoin people right so basically uh lightning was introduced in the Bitcoin and we're like oh fantastic this is going to help us make Bitcoin kind of the peer-to-peer peer cash that it was meant to be and then basically you do the back of the envelope maths or ethereums at the back of the envelope Mass um and they calculated that it does not have sufficient bandwidth even to open um a state channel for every human at Birth and close it 80 years later so uh kind of this is a far cry from
peer-to-peer um cash which they were happy to point out but we're not actually doing any better so this uh this is kind of that talk so basically if you look at kind of ethereum today we see that there's around 1.25 million transactions per day varies a bit because obviously transactions have varying amounts of gas but that's kind of that's kind of where we're at and there's nothing to substantially change that on the roadmap for the next three years so this is kind of what we have to live with kind of let's let's kind of make examples for this so let's assume 10
every 10th person in the world want to register an ens domain that's 800 million names would take two years to actually register 10 of the population um even one ens name right and you're not doing anything else on either meanwhile right basically you're literally just registering ens names you're not renewing them you're also not updating content literally just renewal uh just uh registration example two there are 45 000 publicly listed companies in the world so if you kind of look at 1.25 million transactions per day that's less than 30 transfers per stock
so kind of ethereum itself doesn't even suffice to kind of just clear trades between the largest Brokers or kind of varying attitudes that are on ethereum to kind of to to do that so basically yeah so the the solution that we came up with was make ethereum scale via l2s so resources we have put are put into a kind of uh put into Roll-Ups as a solution um the eth layer one cool roadmap was dedicated to making this happen with things like dank sharding and so on and that's it
not really so um but basically this decision was actually made several years ago so since then kind of many more things have happened and kind of parameters have changed for instance um it's kind of uh it's uh it's kind of become really uh obvious that kind of building decentralized sequences so basically the entities that you that are allowed to build blocks on the layer twos building decentralized versions of them super hard that means almost well actually all L tools actually have one entity or very small set of entities that are allowed to actually build
blocks okay and this is um uh this is something that was much harder than anticipated something that was much easier than anticipated um not to say that it was easy but was trust minimized and trustless bridges so they came first which kind of a couple of years ago no one would have thought um so kind of what I want I want to confuse you confuse you with this talk right so basically the picture that is often painted is kind of very black and white and I kind of want to go you uh I want you guys to go out of this lecture and go like oh this is more complicated than I would have thought maybe kind of things are not that clear cut cut so um and kind of I want you to come away
with two different uh bottom lines one is we really need to work on bridging and the second one even even for l2s right even for l2s we need to work on bridging and secondly we need more credibly neutral ao1 block space okay so let me back way up okay so what makes a layer to a layer two this is a super broad definition and I'm super happy to debate it with anyone but I can I think this is actually the hill I would kind of maybe not die on but I would at least fight on it um so a layer 2 is a network on which your assets cannot be taken from you um and from which you know you can
always Bridge back to L1 okay super it's a super broad definition doesn't tell you anything about the tech stack or anything but this is kind of essentially at the heart what an L2 should be is what does this mean for state machine l2s so I'm just talking to evm uh L Jews there used to be plasma and stage and state channels and so on I'm just talking about State machine issues so you need four things first thing is you need regular checkpoints on the L1 that cannot revert so the L2 needs to tell the L1 this is my state okay and it needs to do that periodically say every hour every day
doesn't matter this is something that's out to the L2 okay but it needs that and the these checkpoints they they have to be um they have to be irreversible so then you have to bring a proof that from checkpoint to checkpoint you're good that you're kind of other other transitions you did are correct in the state of in in the case of ZK rollups or basically you have to just uh posit that they're good and basically incentivize people to point out if they're not good um on an optimistic rollup Okay the third thing you need is data availability so that you can reconstruct the entire state if needed right this is also why
you only need it for a set amount of time I think currently um the uh the um this is kind of targeted with Dank shotting so basically you get the data availability blobs and then the data is available for I think two weeks but I think this is a parameter that's still up for discussion um so you can reconstruct reconstruct the entire State even if you just have the checkpoints from checkpoint to checkpoint right um and then the fourth Point um is you kind of you need a forced inclusion so basically if you're on an L2 and somehow the um the sequencer does not put your transaction into the block you have to have a way to kind of escalate this right so basically you have to go be able to go to L1 and say look I wasn't
included here I need I need my transaction to be included and that's for instance I want to withdraw from this error tool right I want to go back to L1 you can force um the L2 to kind of include your transaction by escalating to L1 and then the next checkpoint is only going to be valid um if the forced inclusion is contained in the next checkpoint okay this is kind of sorry this was super technical this is kind of how um how a state machine I'll choose work in terms of um in terms of the requirements okay so what other benefits and costs um you inherit the security guarantees for your L2 from your L1 okay not only
do you get that you also inherit the security guarantees for your Bridges both the ones between you L1 and the L2 as well as the one between different l2s this has so basically this is true in theory the bridges between the different attitudes they're not quite here yet but I believe this this is fine I will I will let this stand the costs that you have uh you have to pay regularly for the checkpoints right so basically for the checkpoints you actually need to post transaction data to layer one and uh for that you kind of have to pay layer one yes okay so basically say you have a thousand transactions between checkpoints then these thousand transactions between the checkpoints on
L2 have to pay for the gas on L1 and surprisingly the main cost actually at the moment for El choose is data availability okay so that people that can in principle reconstruct the full state um and kind of build a a different block on top of that because you need to know the state for that um you need to have data availability and this is kind of why you post the transaction data into um into the into the blobs okay this is something that is different for validium Roll-Ups so Silo Silo and polygon are not gonna do this they're going to deal with data availability in another way um I will come back to that later kind
of in the kind of different nuances of of attitudes okay so uh benefits um you inherit security both for your L2 as well as for the bridges between L1 and L2 and different l2s that are on the same L1 um but you pay okay those are kind of that's kind of the very simple picture okay that's kind of uh you know have a simple reminder um Native Native assets um on any L1 I'm inherently secure okay so if you have a sufficiently if you have a any L1 more or less actually any other one let me just make this you know super Bland statement
um natively issued assets are secure if you have one for another owner or kind of have a trusted full note okay so even if like almost every other validator tells you that there's an invalid State transition you would not accept it okay so basically on on the blockchain and that's kind of the beauty of blockchains so on any A1 chain native assets inherent dcq so the assets okay so basically these are examples of native and Native acids so second DBI for instance it's it's on knows the chain as it's monarium in fact it's also known as the same usdc has started issuing on many chains natively um okay so
um what you actually need to worry about is the bridges right so basically the bridged assets okay let's go you know one step further so what was the actual original plan for Roll-Ups was meant to be a temporary space okay so all assets assets were going to be issued on L1 and live natively on the L1 and then basically you have like certain applications that would kind of have a lot of transactions um that could have could somehow be rolled together this works well for for summed up so things like um Futures exchanges where you kind of you have a lot of back and forth trading that happens on the L2 and then you kind of put the final balance
back to L1 okay this was kind of the original version of of roll ups so it it actually wrote UPS by you an incredible amount of space uh oh scaling um for depths whose State doesn't bloat there are also dabs who State loads so um for instance Circle CBI um this is um a blockchain based Universal basic income project that's also incubated by us um you basically you have a decentralized to above trust and this is not something that you can simply pull down to L1 right because it's not just a simple token balance it's it's a very
complex uh Matrix of token balances so the state is too large to feasibly export to L1 PowerApp for instance is the same many other nft projects too so um in the original version of rollups um Road ups only worked for um for adapts whose State doesn't bloat so this is clearly not what we're having today right so right now what you actually have is you have rollaps as permanent spaces so um this is actually a tweet that I really liked so roll up Centric roadmap summarized you will live in an L2 you will consume the blobs those are the
data ability blobs you will own nothing on L1 and you will be happy um so um now kind of your token gets issued on L2 it lives on L2 it dies on L2 so let's look at kind of live on L2 okay so the fees on L2 are still proportional to the fees on L1 because as I told you earlier kind of you have to you have to frequently checkpoint oh yeah at least periodically checkpoint to A1 right so basically this kind of cost gets distributed to other transactions on L2 um so if you actually look at l2vs.info or something you can you can see that often they still Spike to well above a dollar per transaction and for
many I mean that's good for many applications that's also um economically unviable for many others um when we have uh the blobs so so the Proto dank sharding uh eip4844 um this will get uh basically uh costs will come down by 90 um but that's also only until demand increases right a factor of tense not actually all that much it's not going to last us you know three years which is how much how much how long it will take for ethium to kind of actually scale better okay also when you're on an edge shoe um you have to deal with stock users
okay so um if you you I mean I told you earlier that you can you can um you can force your an inclusion of your transaction on L1 but then you have to pay for L1 gas okay so basically if the cost of exiting exceeds the value of the of the actual assets the user is not factually but economically stuck on Layer Two right and even if everyone could afford to pay and you know it would be worth it not everyone can actually exit at the same time because then you have the L1 again that doesn't scale and basically other forced inclusions have to be included on L1 so if everyone needed to exit the L2 in an emergency it would take a super long
time it's kind of like evacuating a huge building through a single fire escape door okay there's other problems I don't really want to go into them um but I think I also can't skip them so I will kind of just gloss over them um okay I tools that are currently around around are actually mutable from a single Mighty sick and there's good reasons for this okay so there's reasons they're mutable from a single um Mighty sick but this also means basically you know billions of funds uh um uh de facto kind of stored you know attackable by attacking a single might just think
um so that's kind of the compromise Keys attack right um then there's uh nope fraud proofs for both optimism and for arbitrim only certain people are allowed to submit them um the website l2bit.com I can totally recommend it kind of lists are the scary details um then we have centralized sequences so sequences are the entities that are actually allowed to build the block okay and this is currently all L Jews um yeah so uh if you if you uh yeah so basically this is this is meme I like you you can tell I like memes um select all base chain validators and the joke
being of course that all of them uh Brian Armstrong um okay so how how much does kind of um a network in which there's only one or very small number of known entities who are allowed to build blocks in us how much can that actually give you a credibly neutral platform even if it's well intentioned okay so we we actually saw this um after uh the merge in the wake of um the tornado ofac um action um uh that a lot of that a lot of block Builders actually um adhered by certain rules because they kind of they were running the same
software um so basically even on a network that is actually pretty decentralized like ethereum um kind of the the veil of decentralization is is thin and kind of um so even if say the coinbase uh sequence or any other L2 sequence I don't mean to pick on coinbase um uh where to receive a letter from a three-letter agency they would be forced to kind of censor certain transactions and basically that kind of even if they don't want to right and they they would have to do it so kind of there's power in decentralization okay it was on ethereum um ethereum still um
sees frequent updates and that's not gonna change so um ethereum is not going to osify so um the l2s will kind of have to be able to kind of adapt to changing ethereum and for that you kind of need upgrade rights for your um for your L2 does it have to be a single mic to think no but also kind of any sort of upgrade rights always comes with kind of um with drawbacks um so an example of this is Snapshot X that is going to be uh trees okay so now let's go back to the beginning so I told you that l2s provide
security guarantees primarily for bridged assets okay so the native assets of any chain are already secure if you have the option of kind of running um A4 node yourself okay so what about if we just fix the bridges okay so this is this is a map of zones from Cosmos Cosmos actually does this so basically customers actually has um many networks that are kind of trustlessly connected with one another but they don't technically settle on one another okay so this is kind of the eighth of us uh you know as an analogon to the cosmos that we see in Cosmos okay so basically what you what you will actually have in
The Ether verse is you have you will have um execution consensus layer chains like ethereum that kind of look very much like um that look very much like ethereum with kind of trust minimized or even trustless Bridges we'll get to how we make them in just a second um and in a in a way that would kind of give you a network of networks and then you can have roll ups on ethereum and you will need them um but you can also have rollups on other chains so kind of it's kind of there's if you look at kind of how ethereum currently skates it's kind of this inverted pyramid basically and I would make the I would make the case that um not only do we do we
basically is that I mean that's fantastic you kind of you need the attitudes you need the l3s but you kind of you also need friendly networks that kind of connect with ethereum trustee and offer more L1 block space um okay so ZK Bridges uh Game Changer so basically the way that the ZK Bridge works is you kind of you have a um you have a uh like client um that runs in a zero knowledge circuit on either chain and that way kind of you can the the the target chain can always know um the state of the origin chain okay so this allows us to kind of come up
with this equivalent of cosmos's IBC um I want to call it into a theorem protocol just because it's basically the same as uh uh in Cosmos okay then let's talk about kind of securing the theory and secure in practice okay so I told you that Bridges between um between l1s and l2s are inherently secure this is not quite true okay so this if you actually look at the data of historic Bridge exploits there's a very specific category of bridge exploits that are prevented um from kind of being in L2 okay and I can recommend this this GitHub basically lists all the different Bridge exploits and you can actually look at them as I
did here and basically if you look at the full list the ones I marked in yellow those are the ones that would have been prevented by being an air troop okay compromise keys are the other ones smart contract bugs those are not um uh those are not vulnerabilities that would have been prevented from these chains being in L2 on ethereum okay so um that's I mean basically if you do the math um it's of the ones in the last a year and a half it would have been 25 percent of bridge hacks that would have been prevented by B by the uh by the chain being in there too on ethereum okay so solution to this is Hashi um
Hashi is the Japanese word for bridge and the way what it actually does it's super simple it basically just looks at different Bridges between the same two chains and C is whether they whether the um Bridge header as relayed by these uh by these different Bridges um is the same or different okay so if it's the same um then you can act under the assumption that everything is well if it's not the same one of the bridges is broken and you stop okay you kind of need to fix it via governance and so on but in principle it's kind of like a mighty Sig of bridges okay it gives you additive security is agnostic to the underlying mechanisms so it kind of works with any kind of bridge and this is kind of the hearty
architecture I'm leaving the repo here so you can check it um so so Altus they leverage decentralization of L1 that's fantastic but we can't stop investing in decentralization and producing more credibly neutral block space this is what we're doing at gnosis so gnosis has 130 000 validators around the world that's 20 of ethereum in uh 76 countries ethereum is in 86 countries so basically this is kind of like this is a decentralized network and kind of having a choose built or noses and kind of having these intact this is kind of this kind of solves your first problem kind of trusting the
network um and then kind of trusting the bridges has to be something that kind of is um and uh it comes kind of in several uh in several waves right so basically having trustless Bridges um having Hashi and so on basically just building in redundancy because basically being an L2 in and of itself is not going to save you okay so let's come for a second and look at the definition of an LG so an L2 is a network on which you your assets cannot be taken from you and from which you know you can always Bridge back to an L1 if you actually think about this it's possible for um for a chain to kind of be and choose to each other okay so basically a chain a could be an L2 two chain B and chain B
could likewise be an l22 chain a probably should find a different name than L2 for this um so uh I I have no good suggestions you guys come up with suggestions so BFF chains or Federation of networks whatever um so what would that look like so you would have regular checkpoints and proof of correctness on both chains um you would have optimistic data availability on both chains and you would have forced inclusion on in both directions and you can actually um kind of make this more gas efficient efficient than um than l2s are today from kind of making data availability optimistic okay this is kind of what L2 is currently spend the most money on and
then you can kind of have this Federate this kind of Federation of networks that are just trustlessly um connected to one another so I know I kind of overwhelmed you with lots of information if I confused you I did it right because kind of I just wanted to kind of make sure every you know to poke everyone and kind of um tell you that kind of the simple narrative that we have what I choose is um is too simple um yeah so but I'm super happy to kind of chat after this or at another time if you kind of uh if you're interested you can find out more here we are hiring as always and we are organizing our own conference
called depcon in September in Berlin it's very much like ECC but much smaller so thank you [Applause] there is some questions I confused everyone sufficiently that there's no questions maybe I have questions uh do you have any release dates for the AC thanks [Music] Russian yeah nice
thanks Frederica I was just curious is actually similar to what layer zero is doing and could you like comment further on the trust assumptions on the bridging yeah it's it's kind of it's the same idea um so basically so basically the trust assumptions on the bridging is basically you just have um you mean fahashi right okay yeah so basically uh so basically what what you do is kind of you you kind of look at multiple Bridges um in parallel and if they all agree you act under the assumption that everything's good I mean clearly it could be possible that all bridges are hacked at the same time right but basically since it's since they may have different mechanisms or at least be different builds that's unlike it's kind
of like all clients um for a network going down at the same time um so basically it kind of gives you additive security and kind of it also protects you from Smart contract bugs right so basically because not everything is always malicious um sometimes it's also just neglect for kind of you know didn't see it coming sort of thing um so kind of yeah Hashi kind of gives you it's kind of like there's a little bit disrespectful to like the bridge Engineers but it's kind of like putting a sieve in a sieve in a sieve and it's even a sieve and then basically you will have no uh no leakage that's kind of the idea the only the only downside is that basically um I I mean there's two small downsides one is kind of that um there's a minimal uh gas overhead kind of by kind of
aggregating these Bridge headers and the second one is that um the the speed of your of your Oracle is the slowest speed of the oracles you're aggregating right so uh yeah so thanks thanks [Music]