Roll On: Exploring The State of Tezos Rollups With Trilitech's Emma Turner

A chat with Trilitech's senior software engineer Emma Turner about how rollups are moving Tezos forward into the Web 3.0-driven future ahead.

By Stu Elmes


1,800 words, 9 minute read

Roll On Exploring The State of Tezos Rollups With Trilitechs Emma Turner image 1

There’s a lot of chatter around the Tezos ecosystem these days, and much of it centers around “rollups”. These layer-2 tools are a central facet of Tezos 2.0 and the impending ultra high throughput iteration of the Tezos ecosystem. With an already demoed 1 million transactions per second benchmark, the question of whether rollups can play a key role in helping Tezos scale vertically for the demands of a Web 3.0-driven era ahead have been asked and answered.

But, even as rollups move to the forefront of the blockchain scalability conversation, their specific role in moving this technology toward the future remains murky to some (this writer included). So, when Trilitech’sSenior Software Engineer Emma Turner decided to field a few questions about rollups, how they work, and why they’re so important to Tezos’ quest to scale for the future, I listened up. Here’s what Emma had to say…

Roll On: Exploring The State of Tezos Rollups With Trilitech's Emma Turner, image 2

“At a very high level, there are 2 or 3 things that are often competing in the blockchain space. We call this ‘the blockchain trilemma’. Execution scaling is sort of set up against decentralization and also data throughput. Various other things sort of play into that. Rollups are very much targeted at being able to scale execution. They give you a mechanism to say ‘OK, I want some computation to be done, and that computation can happen off chain, but I still want to have very good security guarantees about how that computation is done and that it’s done correctly’. That turns into this thing where you sort of post messages to the rollups, and those messages are included in the blocks. They get picked up by the rollups and processed, they can update their own internal state, and then they send messages back to Layer-1.”

This push to transition certain kinds of computation away from layer-1 and onto layer-2 for rollups to deal with is an important one to keep the layer-1 functioning as well as possible, but it has raised concerns in many circles about security, but not so much on Tezos. To hear Emma Turner tell it, Tezos’ “optimistic” approach to verifying such transactions may actually be a more elegant solution to the problem of transaction security…

“There are some mechanisms in place to ensure that as long as you have one person operating a rollup correctly, the rollup is completely secure, which is actually almost a better security guarantee than layer-1 itself has. On layer-1 on a lot of chains you need an honest majority assumption — where you need at least half the people to be following the rules correctly for the chain to be secure. If we can assume layer-1 is secure, then the rollup security guarantees are much better.”

The Tezos ecosystem has implemented this approach via “optimistic rollups”, where the presumption is that all it takes is one honest person managing a rollup in order for it to function effectively, maintain its integrity, and weed out bad actors…

“The term ‘optimistic’ is effectively saying ‘by default we can probably assume that the people operating the rollup are doing so correctly’. But we have a mechanism in place so that if one or more people start trying to cheat the system or do a state transition that isn’t allowed — a classic example being ‘all the L-2 funds go into my account’- as long as there is one person there sort of defending the rollup, all those people will be stopped. This is where the ‘optimism’ comes into it. If nobody challenges the transaction, then the commitment of the transaction can be assumed to be correct. We leave a two week period to allow the honest operator to challenge transactions.”

At their core, rollups are, effectively, scaling mechanisms to help offload computational workload from a blockchain’s core protocol, thus preventing high transactional volume from gumming up the L-1 works. Simply beefing up layer-1’s computational capacity via increasing the computing power of the machines within the network could theoretically achieve the same result, but, as Emma makes clear, this presents even more complex challenges…

“You could scale layer-1 by requiring everybody to run much beefier machines, and this would provide higher throughput, but that discourages decentralization. People may not be able to afford the hardware requirements anymore, or decide that it’s just not worth the effort and stop validating. Over time that can have a very centralizing effect. If, on the other hand, we can say ‘we want the execution to take place, and the execution can take place on more powerful hardware, but we only need a handful of people to actually be running that and those who aren’t can still participate’, then it’s OK.”

With rollups having been identified and proven as a viable alternative that circumvents this centralization dilemma, it seems like rollups may be the crucial key here. But even within the world of rollups, there are several ways to skin a cat…

“There’s a bunch of different flavors of rollups. In Tezos, we have optimistic enshrined rollups. On the optimistic vs zero knowledge (ZK) side, zero knowledge rollups may have some advantages in terms of instant finality rather than having to wait that 2 week period, but their throughput is much, much lower — orders of magnitude lower than what you can achieve with an optimistic rollup. That’s because, as you do the computation with a zero knowledge rollup, you’re having to constantly prove that you’re doing the computation correctly. That creates a very high computational overhead. With optimistic rollups, you can just run the code with almost no overhead.”

Tezos’ optimistic and enshrined approach to rollups sets it apart from many other blockchains in the space, and this could give the Tezos ecosystem a decided edge in the race to scale for the growing needs of those building in the Web 3.0 space, which is something Emma spoke at length about during her recent appearance on TezTalks Radio

Roll On: Exploring The State of Tezos Rollups With Trilitech's Emma Turner, image 3

"On many other chains - Arbitrum and Optimism on Ethereum being good examples, the logic of who’s allowed to validate the rollup or how disagreements are handled is all addressed in smart contracts. This can be quite complicated and hard to implement. It can also have quite a centralizing effect on the rollup. If it only allows certain people to be validators, then that obviously prevents a lot of users from participating in the rollup. The trust assumption there is quite a lot.

On Tezos, the rollups are enshrined, so this layer-1/layer-2 bridge is actually implemented in the protocol itself, rather than inside any sort of smart contract. That allows many more powerful tools to actually implement the bridge correctly, upgrade the rollups themselves, and give rollups new powers with layer-1 protocol migrations."

The specific needs of those building for the Web 3.0-driven days ahead are evolving rapidly. The Tezos ecosystem has already implemented 14 protocol upgrades since its inception to rise to meet them, and the need for layer-2 rollups to have the capacity to evolve right along with it is something that absolutely must be taken into account. With its most recent protocol upgrade, the Tezos blockchain and ecosystem have already demonstrated that capacity, and this proof of concept is already beginning to bear fruit…

"Tezos’ Nairobi protocol upgrade actually introduced new features for rollups, including new functions for the kernels that run inside the rollups to be able to call to interact with the outside world a bit differently. Kernels are informed when a protocol upgrade takes place, they can react to it. They themselves are upgradable and can implement their own logic to do so. It’s something that, as deployed rollups evolve, they can evolve together with layer-1 and get better and better over time. "

Before we go on though, what exactly is a “kernel”…

"A rollup is 2 parts. It’s the infrastructure which communicates with layer-1 and makes things like storage available. The kernel is the program that actually runs inside the rollup itself. It effectively determines what the rollup does with the information it’s given. "

These high-level conversations have historically felt somewhat disconnected from the realities of the user-blockchain interface as it currently exists today. What Emma Turner wants to make crystal clear, however, is that this likely won’t be the case for long…

“Most people who will be users in the Tezos ecosystem won’t be programming rollups directly, but they may interact with them. Rollups unlock quite a few different use cases, but one of the exciting ones that’s actually coming up in the near(ish) future is the EVM rollup. Etherlink was announced at ETHCC and also again at Tez/Dev, and it’s the public good Ethereum-compatible rollup for Tezos. It allows end users who may have experience in the Ethereum world and experience with Ethereum dApps to actually interact within the Tezos ecosystem with Ethereum dApps deployed on the Tezos rollup.”

Better still, as questions swirl throughout the blockchain space about how to scale a blockchain to enable the Web 3.0 use cases that will soon be the crucial bridge between blockchain technology and the public at large, Tezos has already made significant progress in this area. The 1 million transaction per second demo at Tez/Dev 2023 stands as positive proof that solutions to the blockchain scaling dilemma are not only theoretically possible, but already alive and well right here in the Tezos ecosystem…

"We wanted to make sure that rollups could actually be used for horizontal scalability and much higher throughput. The demo was conceived as a nice way to showcase that we have achieved the goal of horizontal scalability. It was never the goal to have 1 million transactions per second on a single rollup, but we knew it was a nice round number that we could hit if we deployed lots of rollups working in parallel. It showed that computation can scale as you deploy more rollups. It really showcased that Tezos has rollups, that they work, and that we built them for real. Where there are use cases for people who need very high transactional throughput, Tezos is the place that they can actually come and build those things for real.

Roll On: Exploring The State of Tezos Rollups With Trilitech's Emma Turner, image 4

And, as more and more builders, brands, and innovators step into the world of blockchain to stake their claim in the Web 3.0-powered world ahead, that’s all very good news for the future of the Tezos ecosystem indeed. I can’t wait to see what comes of this and how Tezos is meeting the future of scaling head-on!