How High Availability Sequencers Enable The Best Possible Rollup Uptime
High availability sequencers provide better uptime for rollups and allow them to continue operating through upgrades.
As the node responsible for ordering, batching, and sending transactions to Ethereum, the sequencer is the infrastructural center of the rollup. The chain can’t function without it, so the sequencer needs to be resilient and operate with the highest possible uptime, in addition to providing high performance.
That need for uptime is why many rollups are embracing high availability sequencers. The high availability sequencer refers to a model in which rollups have several sequencers working in concert with one another to ensure that a backup sequencer can take over and keep the chain running if the active sequencer goes offline. Below, we’ll explain how high availability sequencers work and give rollups the highest possible uptime.
The role of the sequencer for rollups
First, a quick refresher on what sequencers do for rollups and how they’re traditionally set up.
Rollups solve the scaling and congestion issues of Ethereum by processing transactions on their own blockchain first, then submitting them to Ethereum later in batches for final settlement. The sequencer is the node on the rollup responsible for actually getting the transactions onto Ethereum. The sequencer needs to do several things in order to make that happen:
- Ordering transactions. The sequencer receives transactions from users and then determines the order in which they’re processed, which also makes the sequencer crucial to MEV activity on the rollup.
- Batching transactions. The sequencer then batches groups of transactions and compresses them so that they can be submitted to Ethereum as efficiently as possible.
- Updating rollup state. Sequencers update the rollup’s state — account balances, smart contract statuses, and other key information for the network. The sequencer creates a state root for each batch of transactions processed, which is a cryptographic hash representing the rollup’s full state following that batch.
- Posting to Ethereum. Finally, the sequencer posts each compressed batch of transactions along with that batch’s state root to Ethereum, or to their alt-DA provider if they use one.
The sequencer is a core, mission-critical part of the rollup’s infrastructure.
What happens when the sequencer fails?
A sequencer can fail or go offline for any number of reasons, including:
- Hardware failure, e.g. a malfunction in the cloud infrastructure hosting the sequencer
- Crashing due to excessive load from e.g. a traffic surge
- Planned downtime to implement an upgrade to the rollup framework
Under a traditional single sequencer setup, any of these will lead to downtime during which the rollup can’t produce new blocks. That means that transactions can’t be finalized, apps won’t work, and users can’t interact with the chain. In a context where users have a significant financial stake in your chain, such failures are unacceptable.
High availability sequencers to the rescue
High availability sequencers prevent that nightmare scenario by equipping rollups with multiple sequencers rather than just one. If the primary sequencer needs to go offline for any reason, another one can take its place automatically, without losing synchronization or forcing the chain to be forked.
We can see an example of this in the video below, which shows the sequencer setup and logs for a live OP Stack rollup.
When the video begins, the op-sequencer-0 is the active sequencer for the rollup. We then delete op-sequencer-0 at the 0:03 second mark, and a new sequencer, op-sequencer-1, immediately takes over. The sequencers are synchronized, so the chain doesn’t need to fork or pause for any reason.
How high availability sequencers work
In a high availability sequencer architecture like the one we saw demonstrated above, multiple sequencers operate in parallel, but only one is active at any given time. The system uses an election protocol to set a consensus on which sequencer is actively producing blocks for the rollup at any given time. The election protocol for Conduit’s high availability sequencer setup is Conduit Elector. The primary sequencer will automatically give up its active role if it’s scheduled to undergo a code upgrade or any other form of planned downtime. If it fails unexpectedly, the election protocol will detect the resulting timeout and automatically elect a new sequencer to take over the primary role, a functionality known as automatic failover.
The key to maintaining the high availability sequencer architecture is ensuring that all sequencers maintain consistent state synchronization. This is important because we need to ensure that when one sequencer takes over from another, it does so without failing to include any prior transaction data, or creating inconsistencies in the transaction data, which would necessitate the chain being forked. In order to maintain state synchronization, the primary sequencer shares new state changes with the backup sequencers in real time as it processes transaction batches. The backup sequencers also maintain a record of the latest transaction batches that have been posted to Ethereum so that they can take over that process seamlessly as well, in addition to maintaining the rollup’s current state.
High availability sequencer needs to be the standard for rollups
The high availability sequencer setup is crucial for rollups, as it prevents downtime, enhances user trust in the chain, and allows rollups to scale smoothly through periods of high growth that put stress on their infrastructure. We believe that as rollups continue to scale Ethereum and enable more and more people to transact onchain, the single sequencer setup will become a thing of the past — only high availability sequencer architecture can ensure users get the uptime and reliability they expect. And Conduit has been providing rollups with a high availability sequencer longer than any other provider.
If you’d like to see for yourself how Conduit provides rollups with high availability sequencer infrastructure for maximum reliability, contact us here.