Celestiums: Scaling Ethereum Rollups by using Celestia for Data Availability

ETHCC 5 · July 2022 · 24:11

Evan Forbes examines using Celestia for data availability in Ethereum rollups. The presentation discusses how that design works and its tradeoffs compared with other approaches.

Speakers

Topics

From ETHCC 5, hosted by Ethereum France.

Transcript

so hello my name is evan i'm very happy to be here i work at celestia the first modular blockchain network here's my twitter and github if you have any questions during either this talk or about celestia in general you can go ahead and ping me whenever you feel like it i'll also be here all week so i do i work on celestia core and celestia app celestia core is our fork of tendermint and then celestia app is our state machine so effectively i work closely on the blockchain part so the title of this talk is celestiums scaling ethereum l2s by using celestia for data availability

so the main problem is with with roll-up transactions is like they still get pretty expensive and that cost has to go somewhere someone has to pay for it maybe you have some very like ambitious vcs that pay for these things but most of the time we have to pass that cost onto our users which is not very desirable you can kind of see here i think the light blue is arbitrary and this wasn't even that long ago so it's not like a raging bull market and it was like i don't know like 70 or 80k a day at peak it's like that can get pretty expensive so like what do you do if um or it's like why is this so expensive

so there's a reason why uh the ethereum two roadmap isn't just increasing call data it's because it's not scalable it's like all the full nodes in the network have to download that data and then along with downloading all that data you have to run the entire rest of the state machine right you have a lot of smart contracts that are on the l1 and not only that but the call data is priced in the same way that the rest of the contracts are it's just priced and gas so you have to compete against everyone else for like millions like whether it's like a million dollar arbitrage or someone's uh minting some nfts it's like you have to compete against that just for your

call data for your rollup and again that can get expensive so it would be nice if we had more options it's like what what can you do if you have a project that isn't or you want to have a project that you you want to have some really good security you want to be involved with ethereum but you don't have high profit transactions it's not necessarily that the transactions aren't valuable it's just that they don't have a lot of profit so people have to pay for them so what do you do when you have a lot of transactions that aren't profitable okay so if we there is another option that some people use and it's called a data

availability committee no joke it's just a multi-sig and it just tells the contracts it's like yes this data is available that's it it's like it's a multi-sig like this these are used all over the place we um we know they're not secure especially compared to the security of a roll-up so like with the security of the roll-up effectively if you have your contracts right organized correctly then you effectively inherit the entire security from the l1 which is amazing that's an amazing scalability property because now the l1 doesn't have to have transactions be executed on it but it can be expensive um using a roll-up on ethereum like programming a roll-up on ethereum is

actually really easy it has out of the box solution for call data so it's it's like really simple to implement a data availability committee on the other hand you have to build yourself it's like there's not that many good open source battle tested implementations of these things so that's like a thing that you have to audit and you have to make sure that there's no bugs in it it's like what if there's a bug that erases everything for all the nodes it's like well that's a pretty big deal and then um so it's it's it's difficult to implement it is cheaper but it's also incredibly insecure so it's just it's just not a good option um so enter celestiums that's what we're um trying to do at celestia that's where

you take the block data which is a significant chunk of the cost of your rollup right the call data that we were talking about earlier and effectively you just post that on celestia and then we have a way to prove that that data is uh was posted on celestia on ethereum and this essentially gives you the security that you would your call data has the security of celestia you use ethereum for settlement and consensus you get a significantly cheaper price because again your call data is going on celestia and importantly from an engineering perspective it's built for you you don't have to implement these things

these things are like already out of the box you just post data on celestia already done for you contracts that you use already done for you it's like a single method and we'll cover these things in depth a little bit more later but here's like a nice little graph you can kind of see like what we're aiming for so celestions no they're not as secure as a roll up like um but at the same time they do have like a really good trap like trade-off space like a really really good happy medium and again we will cover a little bit more of the that later like why celestions are more secure and why data availability committees are not oh but um i highly encourage you to go

check out our blog in general but we have a great specific blog post shout out to adidi and john who cover like more in depth this specific concept and go into like a deeper uh cost analysis so this is kind of the whole idea of celestions what we were talking about is um you publish your data on celestia you publish the proofs for your roll-up on ethereum it's pretty simple we have a bridge right here that is a um a light client relay that we'll get to talk about in a little bit and you move your you prove that your data was posted to celestia on ethereum that's basically all you have to do the implementation is probably um well

it is a little bit different for an optimistic roll-up or zk roll up or whatever your use case is but again it's still pretty easy to implement so why use celestia for data availability in the first place and because like if celestia isn't very good at data availability or then it's not really going to help you that much or if a lot of people use it then effectively you'll you'll just run into the same issues that you were having on ethereum so we have to we want to use celestia mainly because it's really scalable and um this is like one of my favorite like uh reasons why celestia is so scalable

is because it doesn't have an execution environment so that doesn't really sound like a feature it's like no that sounds like that's not a feature but in fact the design of it is so elegant that removing things is actually provides you more it provides you more scalability more data throughput and um you just have to get a a little clever in the design so this this no execution also enables modularity so we have like a normal monolithic chain you have your execution your settlement your consensus and your data availability everything happens on one chain um this is just every normal blockchain that exists

today and then enter celestia it doesn't have an execution environment instead it only does consensus and data availability it focuses just on those things and then it lets the rollup decide what it wants to do for settlement or for execution so going back to that there's no execution environment what's like the main bottleneck for every single blockchain it's the state database it's like it's it costs a lot of money to run and this is why like bsc um we we don't consider bsc consent or decentralized it's like one it has a few validators but also you can't really run

a full node yourself it costs too much money so this is like the main bottleneck so for a blockchain if you're just trying to build like the most the blockchain that can hold the most data it's like one really good way to do that is to get rid of the execution environment and then now you can essentially all the money that you were spending on that state machine you can spend on bandwidth instead ah yes and if you don't have a x if you don't have an execution layer or yeah if you don't have an execution layer you're obviously the the data that you're paying to store isn't competing for l1 transactions that are very high

profit oh yeah and this is just to show how small our state machine is this is the additional state machine so it's not the it's not the full one like we have to run some proof of stake logic and a few other things but besides that it's it's basically just tendermint and then you can see this one little function up here that says consume gas for the amount of for the size of the message that's it that's it that's kind of crazy um that's like the most of the state machine for celestia and that is one big reason for why we are so scalable now the other reasons is actually has to do with trust minimization so like you can't really

become a modular blockchain you can't really focus on data availability and consensus and let other people focus on what they're good at if you're not if you don't do it in a trust minimized way right so ideally you have you run a light client and you have so much confidence in the rest of the network that you don't have to run a full node because otherwise that's not really scaling if you also have to run a full node along with your rollup full node to have the full security of the network then that's not really scaling so celestia has been designed around the fact to have something that's never been done before and that's trust minimized light clients so the light clients themselves they we we organize the block data in into

this thing that's a square it's called a two-dimensional reed solomon uh merkel tree and we effectively have the light clients sample it and now there's a lot better explanations and just for time wise i'm not going to go into like the little details on how this gets done but again go if you do have more questions we there's plenty of other talks on youtube or you can go to our blog but effectively the like clients when they sample they basically convince themselves that the block data is available and not only that but they listen for different types of fraud proofs so if you're listening for fraud proofs and you know that the data is available then effectively you have the same security as a full node

which is really crazy it's like you only have to run a light client plus sampling plus listening for fraud first which isn't very heavy but then you have the same security or essentially the same security as a full node that's crazy and it's a very very very powerful scaling primitive and we'll dig into this in the next slide or two but you also as a light client you contribute to the security of the network so this is kind of another amazing thing with celestia and why it's such a good data availability layer so um yeah oh yeah so the first point here is the data downloaded by light clients

increases only by a square root so like the amount of data that you have to download as a light client compared to the actual size of the block has this great scaling primitive where again like you only have to download a very small portion of the actual block and then more light clients means that larger blocks are more secure because one of the one of the security aspects that could happen is like all the validators could collude and they could stop serving all the data and if you're a light client you've already sampled you've already convinced yourself that the data is available but then the validators don't serve it

when you ask for it again so you have to basically have a way around that and the way around that is you just ask other light clients for the data that they sampled and then you can reconstruct the entire block you use the errors codes that we were talking about earlier in the 2d square and um so the the more light clients that you have the larger block that you can have in a secure way so again for trust me minimization if you are using a celestium you can also sample the data yourself now it's not as good as a normal roll-up or the smart contracts being able to sample

they obviously can't sample but you can at least sample and know for a fact that the data is available or if you just wanted to download your data directly this is also a convenient way to just download your rollups block data if you wanted to do that or not you roll up your l2 your celestion data and just some random other cool things about celestia is uh we talked about we're the first modular blockchain actually we weren't made to um post data on ethereum we were made for something that's called like sovereign rollups so this is you it's basically just a normal it gets the benefits of being a

normal blockchain right you can hard fork you're sovereign you have full control over that that part of the blockchain but then you also get the scalability benefits of a rollup so there's other posts on on our blog and i would um really encourage you to dig up those um they're like my favorite thing in the world anyway um it's also very easy to use you don't need to spin up a validator set or anything like that you just use the data api same thing with your the roll up for your celestion is you basically just use celestia as an api to post your data and to fetch your data oh yeah and then um we'll also we also have mustafa al-basam he's our ceo i'll

just leave it at that you should go search him um so yeah so this this is getting us back to sort of like the first point is how do we actually prove that any data was posted to celestia via the evm so if we go back to here we have a uh you publish your transaction data on celestia you publish your proofs but this thing down here the relay validator signatures in merkle root we still haven't talked about that and that is called the quantum gravity bridge so this is a light client relay it's a light client meaning that you still have to trust the validator set

you don't verify the state but you do verify the commit so you have to trust that two-thirds of the validator set effectively don't collude that's the trust assumption that you're making but so this is equivalent to kind of ibc so if anyone's familiar with ibc the qgb is to a data availability committee as ibc is to a multi-sig bridge uh if you want to compare the two ibc i have like a green check mark and sparkles next to it it's very nice um it's been up for oh boy i don't know like at least 18 months it transfers billions of dollars every month it's very secure as opposed to a multi-sig bridge

it loses billions per year it helps fund north korea it's permissioned as opposed to ibc and the qgp which are permissionless the multi-sig bridge is almost always the weakest link of security between um whatever you're using to multisig for so um again you you want to avoid them ibc and the qgb are crypto economically secure so you can slash people if data isn't available on celestia then that block is invalid and effectively we have to go to social consensus because the chain halts and we have to slash the validators and start the chain from scratch or not from

not from scratch but we just have to hard fork and continue on from there so the ibc and the qgb are cryptoeconomically secure the multi-sig bridge and the uh data availability committee are not they're basically just reputation based that's great that's not secure we all know what happens ronin harmony nate probably another one since then um but yeah i i cover these things again but they're they're identical to what they were before okay so the qgb has a lot of optimizations um we we batch a lot of things so we batch like our data commitments and our

validator set updates so that effectively um the relayer the thing that that bridges the data from or bridges the commitments from celestia to an evm chain um it really doesn't use that much gas another great thing is that um it only requires a single relayer to be live this layer is completely trust minimized you don't have to trust it at all so you only really need one which is kind of really nice um all the block data on celestia is committed to so the qgb transfers all the block data which again is really nice this kind of means like if your roll-up like in this specific scenario if you have a optimistic roll-up that is

using celestia for data availability and then or a celestium that is using uh celestia for data availability and you um you effectively don't have to pay more like you have to pay celestia more but your gas usage on ethereum doesn't increase at all so again it's it's a really really good scalability primitive and then we also the qgb is a one-to-many design so if you post data on celestia then any evm chain can effectively run the qgb and you just you just need one more layer to uh relate to each of them and that's it okay so we can cover some slides i'm kind of rushing i'm sorry i'm running

out of time um the we so i won't cover like details into slashing but effectively if the chain goes down or if the qgb goes down we can slash same thing with incorrect signatures or equivocation um i wanted to go over very quickly over how the qgb is actually used so this is the single smart contract method that you would use and effectively you just verify at a station you want to prove that some data was included into the commitment and that's basically it um that's that's literally all you have to do for your contracts to use the qgb

and posting data i don't think i updated that image but um yeah i forgot to update the image but effectively there was there was some other like light client code it's effectively a rest endpoint it's like you you submit data via rest endpoint done okay so very quickly for the conclusions celestia is a really really scalable data availability layer and um now we can finally have like another option just something decent besides the data availability committee which are absolutely terrible but also if you can't afford the full security of ethereum with a rollup

and it's coming to a test net near you we have like working versions of these things um pretty soon we'll update our test net so we have a test net going on right now called mamaki and we'll update it to be able to run the qgb and then we will um run the qgb on some ethereum test night and we'll be able to play with it ah yes we're hiring go check out our website i think we're just celestia.org and that's it questions we only have two minutes for questions i'm super sorry i was wondering how um

how how how is it proven that data isn't available on celestia like how does that happen well if you're a light client and you're sampling for data availability then effectively one of the samples that you ask for won't be returned and then that's good enough for you to say that the data isn't available okay but you're pretty sure on that you also said the chain will hold in that case like clients halt all the likes so yeah yeah the like clients halt so all honest nodes in the network will halt if something if something bad happens all honest nodes halt and um the validators just like any chain can like if over two-thirds technically they can

produce blocks but all the rest of the nodes will halt and then we'll just hard fork at that point i will definitely be one of the ones hard forking at that point so but we will slash them and then move on with our lives oh okay yeah one of the great things about tinderman is it's very like fully accountable so it's very easy to trace these things and um like we even like run through like test runs of hard forking like um there's a lot of other things but anyway next do we have any more questions okay so let's say that uh we have a gk roll up and of course we need to prove the data that uh it's behind the transition so we have a

hash a hash representing this data how much would it cost to prove that this hash it's included on celestia as in all the data that it's on the blog so with the zika rollup it is it's definitely doable but the main cost is from the prover so you have to prove we we use sha-256 currently so and we we don't plan on changing that so you have to effectively like prove the merkle root of all your data to that hash using uh shot 256. so that's the expensive part now we do have some interesting solutions to that and um but i don't think we have time to talk about that now find me sometime

okay oh timeout all right well thank you all sorry i didn't have enough time [Applause] you