Rollup Decentralization: the Present and the Future
ETHCC 7 · 10 Jul 2024 · 20:28
Toghrul Maharramov explains why rollups should decentralize sequencers: by default they inherit only eventual liveness and censorship resistance from Ethereum, which can mean waiting hours. He compares based sequencing with sovereign sequencing, which offers stronger pre-confirmations but needs a based fallback, and notes that major rollups still run centralized sequencers. His team plans sovereign sequencing and merging the sequencer and prover roles, backed by multi-provers, multi-verifiers and formal verification.
Speakers
Topics
From ETHCC 7, hosted by Ethereum France.
Transcript
Okay. Hello everyone. Uh my name is Togirl. I m I don't know what I do. I mostly complain about things on Twitter. Sometimes I do research, but it's happens rarely. And today I'm gonna be talking about rollup decentralization, what's happening in the present and what's gonna happen in the future. So I get a lot of questions like these, when sequencer decentralization, when prover decentralization. But not a lot of people tend to ask why sequencer decentralization or why prover decentralization. And we'll ignore the provers for now.
The provers are quite trivial to decentralize, so let's assume that they're already are. Let's talk about sequencers more. So by default, rollups should inherit a few properties from the base layer. So validity guarantees. So what that means is you have a zero-knowledge proof system or fraud proof system that attests to the validity of the state transition function that is happening on the rollup. You have ordering guarantees, which means that w by uh once you submit the data on the L1, that data can no longer be reordered, so the ordering of the transactions within that data. You have data availability guarantees, which means that once the data is published on Dell 1, it's there for everyone to access.
And censorship resistance guarantees, which means that as long as Ethereum is functioning as normal, your rollup should be able to enforce the censorship resistance, which means that let's say if your transaction is being censored temporarily for some reason, you still can't get the transaction included after some time. So those are the guarantees from the base layer that the rollup should get. But by default, what a lot of people don't actually highlight is rollups inherit eventual liveness guarantees and eventual censorship resistance guarantees, which means that a transaction or a block can be uh is guaranteed to order to be ordered after a certain minimum of time of T, which currently is measured in hours, sometimes days. And there are multiple reasons why that's the case, primarily because Ethereum has super slow finality, and also Ethereum consensus has two paths: the optimistic path and the path that guarantees safety.
And because there's no way for the rollup to check whether the safety path was has been completed on a certain order transaction, it has to add an additional buffer in order to be safe in case there's like a deep reorg that happens after uh a period where uh the optimistic path is being taken without being finalized. It actually the the this the last part actually happened before in in Ethereum like a few years ago. I think it was last year when uh there was a bug in one of the clients and it resulted in Ethereum not finalizing blocks for 10 epochs, which is roughly a few a couple of hours. So yeah, so it and that's why all the rollups make a precaution of adding this buffer of like a few hours or a day in order to ensure that the transaction has actually been finalized on the L1 so you don't have to re-org later.
And sequencer decentralization is necessary for a few things. So like as I said before, by default, we only get eventual uh liveness. But with sequencer decentralization, you can actually get maximize your real-time liveness guarantees uh and also real-time censorship resistance guarantees. And what I mean by that, you don't have to wait for this minimum period of T in case the rollup is censoring, but you want to make sure that that option is a nuclear option. You want to make sure that your transaction is included as soon as possible.
And there are a few use cases where waiting for a few hours is not even an option. So, for example, if you're updating an Oracle price and the and uh an asset is volatile, waiting for a few hours can result in like let's say lending protocol having an under-collateralized pool, which will leave the protocol with a bad debt. And so it's kind of important to maximize that real-time censorship resistance and liveness properties in order to ensure that this doesn't happen, or at least it uh it happens where things go completely wrong rather than being an ordery thing that people have to use on a daily basis. So currently every single major L2 has decentralized sequencing.
There are a few exceptions, so Tyco has base sequencing. Uh Meta's claim to have decentralized sequencing. Spoiler alertor, they don't have decentralized sequencing. And I used hashtag because that's what they like to do on Twitter. It's hashtag decentralized sequencing, it's not just sequencing. But they do have a head of decentralization position on their team. So I guess that means that they'll eventually decentralize. Also, fuel v1 has permissionless sequencing, but the problem there is that Fuel V1 has like hundred dollars of TVL and hasn't been used in years at this point. So it's you can consider it deprecated.
But if you look at all the major rollups, including ourselves, by the way, none of them have decentralized sequencing. And while it is acceptable now by a lot of users, I don't think it should be acceptable long term. And we should work on how to decentrali on decentralizing things. So how do I actually get decentralized? So there are two flavors of decentralized sequencers, the sequencing that have emerged in the last few years. One is base sequencing, and one is sovereign sequencing, or as Justin Drake likes to call it, cringe sequencing. I don't know.
I guess he's really, really trying to show base sequencing. Well, surprise, surprise, pull it. It doesn't actually. But what it does, it provides strong real-time liveness and central resistance guarantees. So in essence, that means that for the vast majority of applications and use cases, you're almost never gonna need to force include transactions.
It's always gonna be this that takes care of it. So basically that that provides a very strong basis on which you can build your protocol. But there's a downside here. By default, base sequencing has no uh pre-confirmation guarantees. And what I mean by pre-confirmation guarantees is because Ethereum is relatively slow in terms of achieving finality, uh, you have to wait for on average 12 minutes to uh for your transaction to finalize. Your base rollup has the same property, and there's no way by default for it to guarantee strongly that uh your transaction will be finalized in a specific ordering, which is fine for now because most of the rollups just use trust me, bro sequencing, which means that like a centralized operator says, yeah, um trust me, bro, I'm gonna order it in this sequence, and then we all trust them.
But eventually that's not gonna be the case, and this provides a significantly worse UX versus something that puts basically money on the line. Let's say if you have one billion dollars securing your pre-confirmation, that means that if somebody lies and reneges on that promise on the commitment, they get slashed and they lose like a big chunk of money. So you can add strong pre-confirmation guarantees to uh base sequence rollup, but it actually comes from a classic consensus instance. So think about Tendermint or Hot Stuff or any other classic consensus.
You could do that, but yeah, but but at that point you might as well just use sovereign sequencing. So sovereign sequencing by default usually deploys class a classic consensus. There are other ways how you can get sovereign sequencing. So for example, you can get a build a longest chain protocol, knock them out of style. So similar to how Bitcoin works, uh, with proofs instead of doing the work instead of proof of work, but it's wasteful and it's also not very necessary here. You might as well just use a consensus.
And that provides the roll-up with a strong uh strong pre-confirmation guarantees because you have this consensus and you usually have quite a significant amount of money staked and or delegated, you have that amount of money backing uh the fact that the participants in the consensus are not gonna renege because if they renege they get slashed, and I there are not a lot of attack vectors that basically need uh need you to have security guarantees of more than a few billion for let's say 12 minutes, and with non-based sequencing or sovereign sequencing, another advantage is that you can have fast block times by default. You can also have fast block times in vanilla-based sequencing, but if the same uh proposer is building those blocks and there's no way to uh guarantee have strong pre-confirmations, you might as well have one long block.
Uh the the same basically the block that has the same time as uh produced at at the same frequency as the L1 blocks. There's no difference there. Obviously, just to add here, with if you add strong pre-confirmations to base sequencing, then yes, you it makes sense to have faster blocks. So but there's one thing to note in sovereign sequencing is that you actually need a fallback, a base fallback to ensure that the liveness is always guaranteed, even if the consensus fails, because there is a possibility that the consensus will fail. And uh the if you don't have that base fallback, the trade-off is basically you have to wait for governance or some form of a multi-sig to upgrade the consensus to upgrade the smart contracts, which can take days or even weeks, months, I don't know.
Uh it'll take a long time to fix. So the fallback allows you to basically set a timer. Let's say if the block is not produced within 10 minutes, by the consensus, you can say, okay, whatever, screw it, anyone can propose a new block. And that way you can always have the best of both worlds, fast consensus with strong pre-confirmations, and then if that doesn't work for some reason, you fall back and just use base sequencing until the consensus is fixed. And sometimes in the case of sovereign um consensus, sovereign sequencing, uh people refer to based fallback as forced batches, but it's the same thing. Basically, you ensure that the contract uh the validating bridge can include a batch on the L1 without relying on the L2 consensus for that.
So uh with that out of the way, I'll give a short rundown of what we're doing. So we are working on sovereign sequencing. And the reason for that is because we want to maximize the UX, and we think at the moment sovereign sequencing provides you with a better UX than base sequencing. And we also are going to implement a base fallback to maximize our security guarantees. And on top of that, we are actually planning to merge the roles of the sequencers and the provers. Optimistic rollups also have multiple roles, so you have an executor and a sequencer, etc.
But in uh in um, but they can be merged relatively easily. But in ZK rollups, you have two distinct roles, which are the sequencers and the provers. The provers are responsible for computing the ZK proofs, and they're usually quite specialized. And so making that uh merging them together and making those two roles as a same role will solve quite a few issues, and I'll go through them now. So, one, it allows us to avoid balance uh incentive imbalances that you get when you have a separate sequencer and prover role. And the reason for that is uh because the sequencer controls the ordering and controls the MEV and all their rewards, but actually the prover costs are higher.
So we need to make sure that a lot of the incentives that are by default accrue to the sequencer are actually funneled to the prover. And but how do you do it by default? It's quite difficult. You can set a constant, but that doesn't really work because the costs can change, etc. So the best way you can do it is an auction-based mechanism. But auction-based mechanisms add latency and they add complexity, and we want to avoid that. And two, it reduces value leakage. So in a setup where you have a decentralized sequencer and a decentralized prover, one of the problems that you can you have is basically because the sequencers are usually not specialized in optimizing the ordering of transactions, they're likely to outsource ordering to a handful of builders.
And at that point, the sequencer just adds as a acts as a glorified middleman in between this the prover and the builder. And so why not deprecate the sequencer and just give the pre-confirmation rise to the prover? It doesn't really add a lot of overhead there. And finally, all of this makes the protocol less complex, which is really important because one of the things that rollups struggle with is complexity. Rollups are very complex. Their bridges are very complex. I would argue that uh most of the validating bridges are the most complex smart contracts currently deployed.
And so whatever it takes to reduce complexity is good for us because that means we reduce the surface area, the attack surface area. So why have more roll-ups not decentralized until now? Why most of the rollups that I showed before are still centralized? Well, it might seem easy, just slap, I don't know, tenderment, hot stuff, whatever, whatever your preference is. Slap it on top of your roll-up, call it a data that's a decentralized sequencer.
Congrats. Well, unfortunately, it's not that easy. So is basic uh sequencing real requires sequencing decentralization requires strong protocol security. And what I mean by that is basically you need to ensure that the core of your provers, smart contracts, etc. are very, very strong and uh are difficult to exploit. Because otherwise, for example, a decentralized sequencer can trivially exploit a block bug and a prover. In a protocol, for example, that has a decentralized prover but has a centralized sequencer, the sequencer acts as a cushion in between uh the prover decentralized provers and the product and the bridge itself, which means that let's say if there's a bug in the prover and uh uh and the pro one of the proof decentralized provers want to exploit it, there's no way they can exploit it because the sequencer the centralized sequencer will just reject that uh proof. But once we decentralize the sequencer, there's it's no longer the case, so you need to ensure that it's very hard to exploit the validating bridge and the prover.
So a solution to that is a combination of multi-provers, multi-verifiers, and formal verification. And multi-provers just mean that you have multiple proof systems running in parallel, and basically the protocol uh doesn't accept the state transition, the bridge doesn't accept the state transition until you have two or more different provers attesting to the same uh to the same state route. And multi-verififiers do the same thing, but on the smart contract level. Imagine if you have like two simultaneous implementations running in parallel.
So let's say uh an implementation in Solidity and an implementation in Viper, and then you have a contract in between called let's call it entry point or whatever, which is quite minimal that just manages the communication between the two. And basically the only way you can enforce a state transition is if both of them agree on the same state rights, which means that uh in this scenario smart contract bugs become much less of an issue than what they are right now. But those two things don't really solve the problem that can come on the protocol specification side because you can have a bug less, like a completely uh ideal implementation of the prover or the validating bridge.
But if you have a problem on the on the protocol side at the specification side, so let's say you miss a certain check or whatever, this can still screw up the system and result in funds being stolen, and that's why it's important to also do formal verification. Obviously, that doesn't completely uh eliminate the probability of you having a vulnerability or some soundness bug, but it gets us as close as we can get at the moment. So for us specifically, we've already built an SGX-based multi-prover.
It's not live on the mainnet yet, but we have run it through our for all the blocks in our test net, and it works fine. There are a few things that we need to solve in terms of gas optimizations before you can go live on the mainnet, but it should be live fairly soon. The multi-verififiers are still a bit of a research problem because the main issue with them is that they introduce additional cost and a non-negligible cost at that in terms of settlement. Yeah, that's it from me.
Thank you very much. And if you have any questions, feel free to ask you to do that.
Related talks
- The Semantics of Rollup Finality
- A Rollup Vision for Ethereum: Zk vs Optimistic - Panel
- Sequencers unveiled: Fact vs Fiction in Blockchain Scaling
- Rollups are decentralized, right? Right?? - Tyler Tarsi
- Metis: The Infrastructure to Empower Web3 Economy
- Getting started with MorphL2: A new EVM L2 scaling solution. by Abril Zucchi
- Sequencer-Prover Separation in Zero-Knowledge Rollups / Toghrul Maharramov
- The Cosmos SDK of Rollups | Preston Evans, Sovereign Labs
- Why One Chain Can't Rule Them All: Polygon Aggregation Layer Deep Dive | Brendan Farmer