The Sequencer of Tomorrow
EDCON 2024 · 29 Jul 2024 · 18:46
Jan Gorzny surveys how rollup sequencers could evolve beyond simply ordering transactions. After explaining rollup architecture, he compares shared, based and decentralized sequencing and introduces Zircuit’s sequencer-level security, considering the coordination, liveness and security trade-offs behind different approaches.
Speakers
Topics
From EDCON 2024, hosted by EDCON.
Transcript
think I got the clinker just waiting for the slides hi that a great panel hard uh hard group to follow there but uh I think the talk will be kind of on point for all the topics that were discussed so I guess I can go ahead and start because I see my slides up there so I'm going to uh so hi welcome to edcon uh my name is Yan I'm a co-founder and Technical lead at zerit and zerit a layer too uh we're a zero knowledge roll up doing some special stuff which I'll talk about a little bit later in the um in the present ation itself uh but really this is a sort of very topical um deck because you just heard people like Justin Drake in the last panel say a whole bunch of cool things about sequencers um there's a lot of
innovation in this space there's a lot of things sequencers are doing or claiming to be doing or wanting to be doing and uh as we go forward this will only sort of grow and evolve the future set will change and so I'm going to talk to you about what some of those features could be namely what you could see in the sequencer of moral so probably this would have been better better before the panel but here we are either way I'll just start getting into it so if you're here you probably have heard of the concept of rollups um the last panel did introduce it uh Roll-Ups are Layer Two Solutions essentially trying to put a blockchain on a blockchain in some you know nice way that makes sense and they've become incredibly popular these
days uh there's you know 30 or 40 or something like this in development uh alter be website that tracks shows even more of that upcoming including circuit and uh as a result you know there's a lot of competition in the space there's a lot of things people are doing in different ways there's a lot of ways these um systems are trying to differentiate themselves and while doing that they're also trying to improve a lot of the features they have uh one area where they can do this is in their sequencer the general AR architecture of a rollup you know is sort of the same everywhere there's some changes in some places but uh a sequencer is is pretty common to every rollup out there and as these rollups evolve and as these sequencers evolve um you know there's
going to be new things added and this talk will explore what those new things are and how um you know we can expect the sequencer to look in the coming years and Beyond so quick outline of the talk we're just going to introduce the the rollups and preliminaries of a sequencer just in case you've been lost to this point then I'll talk about some of the really hot topics that are uh in this space um that were actually talked upon in the last uh section or last panel uh so shared sequencers base sequencers some stuff that's new and unique to zerit like sequencer level security decentralized sequencers and More in short this is a very active area of research um but I'll do my best to sort of give a highlight and educate at least some of the core features that you'll see in some rollups in the coming
months before I do that I should pause and make sure that we're all on the same page While most of you uh you know know what a rollup is if you've been in the space if you haven't uh I want to take take a chance to to give a quick intro to that so rollups are a way of taking a blockchain a layer two blockchain um that partially or totally derive state from an underlying blockchain like ethereum and so what you do is you have some system to generate layer two blocks namely the rollup blocks and um you sort of take transactions from appropriate places you build L2 blocks you can see them on the top and then you say this is the state that I propose for the L2 block uh or the L2 chain and after some conditions are met finality mechanism is
is executed uh everyone sort of agrees that the L2 is what everyone thinks it is and to be a little bit more specific you need something to generate blocks this is called a sequencer it's it can take transactions either from sort of the layer 2 Network itself so Layer Two transactions where they're cheap and fast or you know they can take bridged assets from the layer one itself so you could take ethereum or ether rather from ethereum and put it onto a rollup and you want to be able to use that you know it has a representation so sequencer is going to take transactions from two places it's going to take all these transactions it's going to do some some of its sequencing if you will ordering I'll talk about more on the next slide produce some layer to blocks and then every once in a while um we're going to
post some State roots from the layer two onto the layer one this will be done through some generalized component called a state proposer where we say this is the state route of the layer two and then everyone needs to sort of agree that this is in fact you know the nice little state route for the entire chain and so there's some finality mechanism that needs to come into it you've probably heard optimistic rollups and zero knowledge rollups those are the two popular um finality mechanisms out there optimistic ones say you know this is legitimate and good if no one challenges me on the output for the next you know period of time let's say seven days uh or Zer knowledge of proofs uh zero knowledge will UPS use zero knowledge validity proofs that say actually this
is the state route and it's final because I have a mathematical proof that there's no way I cheated in this in this um block construction process and and both are really cool but let's ignore all that because although uh there's very many interesting topics there the sequencer is what I'm here to talk about today so the sequencer unsurprisingly sequences transactions it provides an ordering for layer or two transactions uh and it does this for transactions that come from either other Layer Two nodes uh if they exist like replicas of the sequencer or from people signing you know transactions through wallets like metamask onto the layer 2 or from a deposit transaction that uh results or that originates on the um layer one itself so if you want to take assets
from ethereum to to a layer two you need to do a deposit transaction but more generally we've also talked about um sort of cross-chain calls coming through as deposit transactions and then what it does is it tries to give two things first the layer two block looks and feels like a block that you're expecting on layer one usually faster maybe more gas limits different requirements there but blocks that look and feel like blocks and it also writes the data of the blocks it's going to write uh in some way on the chain in the past before EIP 4844 this was done through call data so that people could verify what was supposed to be in the blocks now um after EIP 4844 uh most people are using kcg commitments and that's also really cool I won't talk about that itself I'll talk
about what's going on inside that box and where some of these arrows can change so now that we're on a sequence now that we're on the same page for what sequencers we can talk about some unique functions uh one thing that's really cool and it was talked about in the last panel is shared sequencers so what happens if you have two layer twos um being generated by sort of the same sequencing entity this is maybe the concept of the super block that was just mentioned on the previous panel but essentially you can have a sequence or take responsibility for producing layer two blocks across multiple Layer Two Chains this is really nice for a couple of reasons um first what you could do is very nice uh synchronous transactions between the chains on this on these on the shared sequencer so on the super
chain for example in principle you could have very quick swaps between base and optimism or things like this um there's actually other benefits um you know you might get some nice me resistance because if things are a cross change a little harder um you have a little bit of better liveness guarantees you certainly have shared infrastructure which means the engineering overhead can also be uh a lot nicer for a lot of people the downside is uh you know you might get things like constrain sequencing so as a layer two you sort of have to be on the same page or at least have to talk to another actor when you uh want to change how your sequencing Works nonetheless it's a really cool exciting idea it's actually related to the next topic which is one that I think is really popular these days this notion
of Base sequencing so the idea of Base sequencing um is not mutually incompatible with the idea of a shared sequencer but the idea is if you're generating an order U maybe you know you don't trust how the sequencer is doing it or or you just want to do it in a different way because you can um and you can use the layer one to actually provide an ordering for uh the sequencer and you can do this you know through a couple of ways and we'll get into the details of how this works but uh essentially you know you can have uh ethereum itself do something so that the the sequencer sort of committed or or pre-confirmation a lot of liveness as long as layer one
is online you sort of know what the sequencer should be doing maybe the sequencer is down but someone else could possibly pick up the node and run it very quickly because the orderings already on L1 it's already known they don't need to do a lot of the work um this is got some very nice economic things for ethereum you know everything sort of aligned with ether and and using the native acids there that's really good and you get some sovereignty too on the downside again possibly you know you don't have meev extraction so if you're a sequencer some chains maybe want to extract that value uh maybe you know as a user you don't want that so it's not a negative but certainly for some projects it might be and you also get some constraint sequencing because if you want to do something very fancy uh maybe
the L1 you know doesn't do that very efficiently if there's Randomness or something like this I don't know there there's definitely options but you can also do other things so it's not just about um sort of combining chains or you know decentralizing where the um where the ordering comes you can add other features and I think this is what's really cool this is one of the unique things that that zerit is doing um zerit pioneered this concept of sequencer level security so we actually want to have the sequencer be a first class entity and do something for the greater good of the uh ecosystem that we're building um as a layer two we were looking at all these other layer twos and and thought well you know we want to do something where we can add an additional level of security on top of
um the blockchain that you can't really do in a smart contract smart contract you can put some require statements and and you know be very careful with your engineering but as we've seen time and time again um hacks and exploits will happen on these blockchains so what we did was we invented a system where we can actually ask some sort of an Oracle in the computer science sense not a price Oracle but a sort of malicious Oracle to say you know is a transaction going to be good or bad and if it's bad we're going to put that um transaction into quarantine it's not going to hit the chain and what this means is the sequencer is now taking an active role in the secur secur of our ecosystem and if you're a user or AAP developer on zirc you get this level of security for
free that you can't get anywhere else so this is really really nice now the difficulty with doing this is that it's you know a first engineered thing and uh we need to get some work to decentralize it make all the other things uh work that are very nice you know in principle it's not uh incompatible with either shared sequencing or uh base sequencing but it is going to take some time to get that rolled out and so you know we're starting centralized but I think that's okay because we're providing a nice value to our our um our ecosystem of course though we would love to go decentralize like most other blockchains out there and one way we can do that uh or sorry first what is it uh so to decentralize a sequencer is really
just what it sounds like you want to have anyone run a sequencer so basically you're sort of going closer to the original idea of ethereum where anyone can run a node uh and you sort of sounds like this should be easy to do and and quick in the sense that if everything's just a fork of gu anyways why not do it uh but it turns out you know there might be some some issues with this in particular to keep the system as performant it needs to be or unless you do something clever like make it based or something like this uh in which case you can get all these uh goals and um requirements engineered but I think it is going to take some time on the other hand if you can do it you get really nice security functionalities for if the chain is offline uh in particular strong
live liveness guarantees say that that if you know the operator goes down you just run your own node you recover your own funds and there's there's no issues um the downside though is as I've said the complexity is sort of non-trivial to overcome especially if you want your system to be performant or if you want to do something that is sort of unique to uh your chain or if you're doing multiple chains or something like this there's added complexity here uh and of course because it's decentralized system you need to make sure your whole uh sort of ecosystem and group is is on the same page so those are the big features but there's actually more I'm sort of going through this quite fast but I'll talk about some other ones so some things that we haven't talked about I think
that would be really interesting I think uh are things like um me extraction or um sort of giving yield back to users this is something that comes up very often in informal discussions but I haven't seen too many teams actually uh attempt to implement this or realize this in practice and I'm not really sure why it sort of seems like a natural fit uh it would be kind of interesting to see if you could have a sequencer where the unique functionality isn't secury per se but something like M extraction where you get funds back to users now maybe there's some dangers there that I'm not aware of but I think uh actually it's the most natural thing to do given the popularity of Di and other things would also be very nice is uh some additional zero knowledge stuff if it
can be performant so uh all of those features I've talked about on um the the sequencer can probably benefit from zero knowledge maybe the only one you don't need to worry about in this situation is a based uh sequencer because everything's on chain and you don't need to prove it but otherwise if you're trying to claim that you're doing something unique in your sequence or especially something like um me sort of protection or no me extraction you might want to have a provably fair sequencer you might want to say look I'm definitely not cheating and I'll have a zero knowledge proof uh that might be very difficult with performance issues it might be easier to just do it in a based fashion but I would bet there's a lot of really interesting questions and approaches uh if you try to answer this question without saying your sequencer
has got to be based um Additionally you know what I haven't talked about a lot either is um integration with other chains or networks so uh the idea of a shared sequencer definitely talks to multiple layer to blockchains and networks um it will Super it will uh sequence for many chains on it creating these super blocks uh but there's other networks you could consider talking to or talking from so in particular if you're a base sequencer U maybe you want to actually get an ordering from a different chain I don't think it would still be called based in that sense but maybe you could get it from somewhere else uh or where you're posting the data for these soft commitments or or getting these pre-confirmation from you change that there are data availability layers out there now that have become
relatively popular uh a lot of them have sort of sprung up overnight in the last couple of I don't know you years uh months or year something like this uh and and all of that has its own sort of special niches uh in terms of approaches to sequencing so your sequencer can start to choose where data is posted and and maybe that will mean even cheaper costs for you uh maybe it'll change the trust assumptions maybe it won't maybe you know there's some clever ways around some of these things and then finally sort of one of the biggest things that that uh I've been sort of talking about for years uh is this the notion of security of a sequence are being offline with base sequencing it's actually a really nice approach because maybe you don't need to worry about this as much
but for everyone else out there the idea that you should be able to have um liveness of the layer two uh just as robust as layer one livess is very important so we would need some functional uh versions of forced inclusion and forced exit mechanism so these are ideas that if you uh have a layer 2 Network um it should be operational just as often as the layer one and so that will mean somehow bypassing the sequencer to put transactions into layer 2 blocks possibly generating them you know directly onto the L1 in some way or uh being able to recover assets that are trapped within that uh Layer Two in the event that the sequencer is offline and honestly a lot of rollups are still um you know leaving this as future work if
you look at the al2 beat site for uh rollup statuses you know a lot of them are stage zero which maybe is not where you have this type of complete functionality so you end up you know needing a lot of stuff that needs to be done nonetheless uh I think there's still a lot of research that can be done there and some interesting ideas again without just possibly taking the approach of going Bas maybe Bas solves all of it okay so that's most of the talk I've got just a couple minutes I will just wrap up essentially the key takeaway here if I if you don't remember anything else is that um sequencers are evolving in the future um we're going to see sequencers differentiate themselves in in in very very unique ways in the past the question has been optimistic or
zero knowledge I think in the future the question will be well what does your sequencer do differently and that might be shared that might be base that might be security that might be something else entirely um but the point is uh the research and development in this component should not be overlooked and should not be uh one that we disregard um and we have to take it very seriously for a bunch of reasons uh there are thankfully a lot of teams working on this look included uh where we are doing some really cool stuff and everyone's doing some really cool stuff and we're early still uh you know despite the large number of rollups out there uh the unique features are are still yet to come um and we're going to see more I didn't talk about even things like different languages being sequenced or
you know different support for entire ecosystems but I think there's a lot uh and and what this will mean is that you won't see layer twos as just scaling ethereum you won't see things that uh deal with just cheaper and faster transactions you'll see Extra Value propositions or extra ideas for securing ecosystems or onboarding users which I think this is very very valuable and so I don't think we should rush to necessarily shared sequencing or some other sort of popular idea just because those ideas come quick there are other ways we can grow the ecosystem at the end of the day that's what's important and so the takeaway is sequencers are definitely going to differentiate themselves going forward and if there's a feature in a in a rollup that you want to see but you don't yet know what's out
there uh I bet it'll come soon or you know post on E3 search or somewhere or talk to me and and you know talk about this idea maybe it's worth building there's still a lot of space for other different rollups and uh I think it's going to be really exciting to see how it goes so that's mostly my talk I'll end with you know the thank you so thank you from zerit thanks for having me here at edcon this is a great venue uh and I appreciate it and uh if you have questions feel free to reach out and build and stake on Zer thank you