The Semantics of Rollup Finality
ETHCC 6 · July 2023 · 16:45
Mads Mathiesen examines what finality means for rollups. The speaker distinguishes questions about data availability from withdrawal bridges and dispute periods to clarify terminology that is often conflated.
Speakers
Topics
From ETHCC 6, hosted by Ethereum France.
Transcript
let's go down okay sounds good thank you all right hey guys my name is mass I go by rain and coffee on Twitter and I do research at Main 11 which is a fund out of Amsterdam uh this talk is going to be about the semantics of roll-up finality it's going to be relatively high level because we only have 15 minutes but regardless semantics are pretty important when it touches users fund and there's a lot of when talking to people that's a lot of people don't understand why our withdrawal times to roll ups seven days for optimistic one for example and why am I forced to go to a specific third-party bridge to even get out um so this is sort of to cover all the
different types of semantics around finality and also to cover the different types of Roll-Ups we'll do current Roll-Ups on ethereum seven Roll-Ups based Roll-Ups and also shared sequencing rollups so what's really important to understand about finality is that a lot of it is semantics so it's arbitrary it's something we've come up with socially in Social consensus and it's very much based on who you ask so people all have different views of what's actual finality is um but there is a few things we can look at that will explain what you know final final finality is and a lot of this depends on what the underlying layer is so with ethereum there's different reasons for when we get finality if it is on Celestia or Avail or something
else entirely we'll have different views so it's very dependent on the underlying layer as well um and basically we get this idea of a certainty of Truth and a guarantee of inclusion and these are different so if I'm guaranteed to be included in a roll-up block I have pretty decent convenience to convince I'm very convinced that I'll have an early at Sonic's at some point but when we have once we have certainty of Truth it means that there's no way we can essentially roll back my transaction unless we do a hard Fork and this canonical truth we preferably want to have with Economic Security um so what you can say with a high degree of convinced conviction that this is true so maybe a quick question before we get really into it if I say phenology is
when all data is made available so all transaction data on ethereum optimism is usually between one to two minutes would you would you say that we have finality is it final no so if we ask the the bridge the official Bridge optimism Optimum bridge I have to wait seven days if I want to go back to ethereum which means that it's not really finality if I can't get out within those two minutes um and this is because we have to recompute and watch for any fraud or we have to provide a proof that all of these transactions were correctly executed now if you are a user of rollups and do you guys use roll ups good if you have use of a roll up if you're on a single roll up you don't go
anywhere else finality feels pretty fast right it feels almost instantaneous but as soon as you start moving elsewhere this becomes quite difficult and the reason it feels good is because we have a centralized sequencer that can basically promise you that your transaction will eventually go to ethereum and it'll be finalized so it feels pretty good from my Google's perspective but if I'm an advanced user and I start using roll ups that are different I go from optimism to arbitrim I go back to ethereum I suddenly start to feel down like these finality things deaf hands like they can really fight back and it's difficult to get out and this forces us to go to a third party bridge and this adds extra trust assumptions so I have to go to bridges that have varying different degrees of
trust assumptions smart contract risks and arguably you'd say you'd want to do the the canonical Bridge the bridge that is official or native um and some people do say that these this finalism and all this reduction data is posted but the problem here is that we either have to asset before verify this is true and we have to recompute of what 24 has happened so if we ask the verifying Bridge usually it's seven days the most optimistic roll ups or for CK roller some of them have just said an arbitrary period of one day just to make sure nothing goes wrong on the proving side but usually would say after Sue super majority epochs so this would be 12 minutes we have finality when a ckp has been posted so that's pretty quick
now as I said before if you really haven't checked for any fraud or we haven't proven things to be valid for anything that's off chain can we really say we have finality judging by the bridge we can't really say that it becomes easier here if you're centralized to a single L2 because of decentralized trusted entity that we have so we can sort of come up with an idea of what finality is we can say that it is when a transaction is irreversible beyond the hard Fork that's pretty good conviction of analogy or we can say that we we can say just when we can guarantee that fraud hasn't happened so we have waited enough time allowed enough people to recompute to watch although we've proven it to be valid with a ckp or availability proof now we came up with this model to sort
of understand finality and Roll-Ups this is all for Q and Roll-Ups on ethereum so this is what we did was saying we have pending on L2 so this is the commitment or the guarantee given by the centralized sequencer that us transaction will eventually get Central ethereum and there will be computers a new state on this um but we can sort of say here is that that's this is when we get when I send a transaction on the arbitrary mode optimism we get the spending L2 and it feels Final on the L2 side and then finally on L2 is when we have committed to the state transaction function of this transaction list that we have on ethereum we can then commit to that and add to add it to the roller blocks and that's the sort of finale on the L2 side then we have pending on L1 so this is
when you have either the transaction input what we call call data or we have the straight transition function uh this could be the outputs and this differs from roll up to roll up on the CK side um and we still haven't waited for the challenge period so seven days or we haven't waited for the village proof yet and then we have finality on L1 for roll ups is when we have the dispute period that has ended generally seven days or we have a ckp that's been verified and waited for two super majority epochs then we have a small change that is happening after EAP 4844 so things change a bit here so instead of sending call data to ethereum to a Smart contact we instead set it to the consensus
clients on ethereum and we posed a list of transactions um a state route and approved for the state route being valid um so this is different from roller to roll up so sequencing and stacknet put the state differences to the outputs of distance actions we get and polygon ckvm and scroller publishing the full-on transaction inputs um just as call data and these State differences now provide a big adjust assumption because we don't have the full transaction list available on ethereum um so I just unless I want to roll up full node I can't compute that this data is actually correct so it doesn't make the trust assumptions added here what has to be said though we can get a lot quicker finality on ckp side when we get a cost equilibrium so we can put a lot
more transactions into the same size proof and it'll be the same price to verify it on ethereum so once you get more users most of them don't have that many at this point but hopefully we'll get to that point it becomes a lot easier to get very quick finality with pretty low cost of verification now we have Sovereign Roll-Ups and and base Roll-Ups these work a bit different because they're to some extent reliant on The Ordering of transactions on the underlying layer so if your base Roll-Ups you get you send this you send a detection data to the underlying layer and you get included in an actual L1 block and it gives us pretty strong guarantees of things being correct because we can trust the entire economic finale you said and we can trust the
validators of the L1 that have recomputed all transactions um the downside is that you give away all the Mev and all your sort of extractability of profitability so that is pretty bad beyond that if you want finality for like clients for example you have to convince them because they have to either trust you a honest full node or you can provide a state proofs for example that a test to this being true if you're on the Sovereign side this depends on someone like a sovereign so it's in the name right they might have a consensus algorithm leadership election algorithm that sort of decides on their own when a traditionally final but they will all be looking at the da layer and they might have a fork Choice rule that says every n number of blocks we need to have all the transactions that were sent to the namespace middle 3
on Celestia or smart contract on ethereum included in that block otherwise they'll get slashed um this will be a bond or it could be verifying even as a proof then on the shared sequencing side things start looking a little bit similar to base sequencing so in base sequencing we get block out of analogy from the underlying layer this is the same thing with lazy shared sequencing so the full list of transactions are already available on the underlying layer and I can compute the new state from that on the rollout nodes but the roll of nodes still have to execute this and start a new state but the actual list of transaction is already valid on the online layer and we sort of have two types of analogy we have to solve finale
guarantees which is when all the data is available on Celestial ethereum but hasn't been computed yet and then we have provable finality which is when develop nodes have computed the new state and then have either peer-to-peer verified this or verified it in a smart contract but as long as you look at the underlying layer we can guarantee that ordering has been correct in the block then how do we get strong enough security guarantees in these things well we can either do what sort of most people will likely do is proof of State committees so we have some economic bond that is here that comes to consensus over a state route being correct and science on this being correct and here you want 66 of all the valid areas to
attest to this being correct you can also provide a velology proof so this is what CK wallet does to this computation being correct or you can have the optimistic route which is where we have signatures from for example a single actor or more in the centralized sequence aside that has a bond that will get slashed if transaction has proven to be invalid um the problem here could be that there might be more plus EV to commit fraud if the bond is too small and as we said in the beginning the L1 has different finale trade-offs that might be depending on what you're using and for now the way it just works is with a single centralized sequencer and this changes a lot when we go to the
centralized set now why is finale this way why is it seven days well if we want to prove fraud on chain we usually play this interactive fraud proof game which is quite computationally expensive and obviously if they're in Block space because of how they decided to say decentralized and how usable it is it is very very expensive and we also have a humongous validity set I think we're narrowing like 900 000 and sending messages between all these things all these well they just take a long long time um and we have to allow all of them to come to agreement um and I honor this is a good thing so having this big of a validated side I think it's a very good thing but it does add a lot of strain to the network now one thing we can do on the optimistic
side is that we can actually CK a fraud proof so we can off chain verify that this fraud proof is correct and then we can send this velocity proof that proves that throws was done and we can verify that instead so we can get these hybrid type roll ups which is quite a nice thing now when we start to decentralize these sequences we run into a problem where it could be like on ethereum where we have an unbounded set that's permissionless and that's fantastic but it's very hard to prove that all of the actors in the roll up have actually attested to things being true so it's difficult to get what we call single single slide finality now with a bounded set like we have a customers and tenement chains which is usually 100 to 200 validators we know exactly who's active and who needs to
sign and this could mean that we can get pretty fast and quick finality times but you do sacrifice centralization to some extent and we always know who is who's available and it's hard to scale this to a very large set as well um so that's one thing to keep in mind now we sort of come to the end here um so I know some of you might have read about John chavino and others that have said roll ups are real they're not real I do think they're real but I don't really think they scale ethereum block space I think they scale ethereum liquidity by providing separate block space that can utilize native e-liquidity in smart contracts on ethereum um and they also inherit the sensitive resistance although this is only really partly through through at this point
because of the fact that a lot of these smart contracts are controlled by a multi-stick they're upgradable they need to be because most Roll-Ups don't have fraud proofs so we are not quite there yet but roll ups are definitely real and what's really important to understand here is that finality is really just social consensus all the way down so we agree on some setups that fit us and can allow our Network and our systems to work and then we wait for the protocol rules that we have in place to deem things final um and thank you [Applause] yeah if we have any questions we have okay sure yeah thank you for the talk it really
deep in my understanding um so I as like you know like the chapter of uh public blockchains we are living in now is like the L2 Wars which is horrible as someone creating a dab because which L2 do we build on and what happens if the if the roll up we build on fails it gets hacked it gets rugged it like doesn't exist anymore can we still retrieve our transaction data or only the account balances as of the last date we if we have all the transaction data available on the L1 and it's not pruned we can sort of reclaim everything but if we're in a situation where we are pruning data after three weeks or a month uh you have to go trust archival notes that is holding all the state which is a bit of a problem because then you're trusting in most
cases not a lot of people um and on the the side where you're saying with a lot of roll-up Wars and Roll-Ups happening um what you can do with Roll-Ups that you can do a lot of very cool customizable things um so you could for example have different sequencing rules it could be if you're a dexame and you want uh rules for trades that if they're not they have to be you know Buy sell Buy sell buy sell um and then it can only be bye bye or sell sell if they have um a better execution on the trade than the beginning of the block so there's some cool things you can do on the application side as well hey thanks for the talk uh two questions if I may first one is what's your preferred design uh to kind of achieve
you know the the best possible finale on L2 and second um uh do you have a view on sellers recently announced plans to convert to an L2 with using eigen da and also a decentralized sequencer using their kind of L1 node operator set yeah I think on on the first answer I think for now with the amount of users we have I think optimistic rollups make more sense but as we scale the amount of users in in web 3 CK will start to make a lot more sense because of the density in transactions that we can put into a ckp but I could also Imagine a hybrid world and what are my thoughts on on the the seller announcement um I think it's cool I I think the way
eigenda works to some extent now it's more like a data availability committee and I haven't seen anything about having ordering on the transactions you have there just data availability which in some case if you want to do like a page roll up you kind of need that to some extent but one thing that's cool with Slash JaVale eigenthia is that it's very easy to scalably scale da it becomes more hard to scale consensus for example like consented security so in interchange security and others move on into a problem where supporting changes are not extremely economically Advantage advantageous becomes quite difficult because they're paying more in devops and Hardware costs as well yeah guys unfortunately sorry the the time is over you can answer the extra questions outside as we have to set the
second speech but thank you so much [Applause]