What Is a Sequencer?
Sequencers are special nodes in layer two (L2) rollups that order L2 transactions, batch them, and post the transaction data to a layer one (L1) blockchain.
Sequencers play critical roles in L2 blockchains, such as confirming transactions and maintaining the security and integrity of the chain. They earn fees paid by L2 users to process transactions.
Key Takeaways
- Sequencers order L2 transactions, batch them, and post the transaction data to an L1 blockchain.
- When building a batch, the sequencer uses compression to reduce data size and the cost of posting to the L1 chain.
- Sequencers earn gas fees paid by L2 users to process transactions.
- The majority of L2 chains used centralized sequencers. Popular rollup chains such as Arbitrum, Base, and OP Mainnet, each have only one sequencer.
- A shared sequencer refers to a rollup sequencing model where multiple L2 chains use a common set of sequencer nodes.
How Do Sequencers Work?
There are two key functions performed by Layer 2 sequencers:
- Real-time sequencer feed: The sequencer publishes a live broadcast of transactions as they are sequenced. Any nodes or clients subscribed to the sequencer feed will receive information about ongoing transactions instantly.
- Batch-posting: The sequencer aggregates L2 transaction data and posts them to the L1 chain for finality at regular intervals.
Sequencer Batch-Posting
Let’s talk about batch-posting in further detail below.
Batch-posting is a process where roll-up sequencers collect transactions, organize them into batches, compress the data, and post them to a smart contract on the parent L1 chain:
- During the batch-posting process, the sequencer continuously receives transactions conducted by users on the L2 network. The sequencer orders the transactions in the sequence in which they are received. The received transactions are then temporarily stored in a buffer zone.
- The size of a batch of transactions will depend on a predetermined limit that optimizes the cost of posting transaction data to the L1 chain. Additionally, the sequencer also monitors the time elapsed between adjoining batches to prevent delays.
- Once the criteria for forming a transaction batch are reached, the sequencer combines the selected transactions into a single batch. When building a batch, the sequencer uses compression to reduce data size and the cost of posting to the L1 chain.
- Next, the batched and compressed transaction data set is set to a batch poster responsible for submitting the compressed transaction batches to a Sequencer inbox smart contract on the L1 chain. Note that the batch poster is an externally owned account (EOA) controlled by the sequencer.
Evolution of Sequencers
Sequencers in blockchain technology have changed the way they behave and perform tasks as new technologies and decentralization standards are implemented. Let’s read about the three ways sequencers have changed over the years.
Introduction of Data Blobs on Ethereum
In March 2024, Ethereum implemented a series of network upgrades collectively known as the Dencun upgrade. Proto-danksharding, or EIP-4844, was one of the nine Ethereum improvement proposals (EIP) that went live.
Proto-danksharding introduced temporary “data blobs” to Ethereum blocks for rollups to post L2 data, thereby allowing more transactions to be processed at a given time.
Depending on the availability of proto-danksharding data blobs on the L1 chain, a sequencer will post transaction batches to the L1 chain differently:
Decentralization Standards
Today, there are increasing calls for L2 rollups to decentralize their sequencer nodes. General-purpose rollups such as Arbitrum (ARB) have voiced their intention to decentralize their sequencers to prevent the censorship and failure risks of having a centralized sequencer.
Meanwhile, purpose-built rollups such as Unichain (UNI) plan to stick to a single sequencer architecture to optimize performance. Instead, Unichain will introduce a decentralized network of node operators that can independently validate the latest blockchain state to keep the sequencer in check.
Shared Sequencers
A shared sequencer refers to a rollup sequencing model where multiple L2 chains use a common set of sequencer nodes to process, batch, and submit transactions to a parent chain. The shared sequencer model improves interoperability between isolated rollups as it enables chains to share consensus, data availability, and settlement layers.
At the time of writing, shared sequencers had not been adopted by the Ethereum L2 sector. It is still a fairly novel idea to rollup architecture.
Types of Sequencers
This brings us to the different types of sequencer setups in rollup chains.
Centralized vs. Decentralized Sequencers
The majority of L2 chains use centralized sequencers. Popular rollup chains such as Arbitrum, Base, and OP Mainnet, each have only one sequencer.
On Arbitrum, its sequencer is maintained by the Arbitrum Foundation. Coinbase operates the only sequencer node on Base. Meanwhile, the Optimism Foundation runs the single sequencer node responsible for processing and ordering transactions on OP Mainnet.
On the other hand, decentralized sequencers refer to a rollup sequencing model where the process of ordering, batching, and posting L2 transactions is distributed among multiple honest participants. Decentralized sequencing reduces the influence of any single party, prevents censorship and front-running, and enhances security and transparency.
Sequencers in Optimistic Rollups vs. ZK Rollups
For the most part, sequencers in ZK rollups function the same way as sequencers in optimistic rollups. In both setups, they are responsible for ordering L2 transactions, batching them, and posting data to the underlying L1 chain. However, the process differs in using validity proofs in ZK rollups.
Validity proofs are cryptographic proofs generated by ZK rollups to guarantee the correctness of all transactions in a batch submitted to the L1 chain. In a sequencing model, once a new transaction batch is submitted to the sequencer inbox smart contract on the L1 chain, the rollup may rely on a randomly selected zkEVM prover to verify the data and generate proof for it.
In optimistic rollups, validity proofs are not produced. Instead, the rollup optimistically assumes that all transactions are honest. There is a challenging period during which anyone can challenge the validity of the transactions. Assets cannot be bridged out of an optimistic rollup before the end of a challenge period.
Based Rollups
Based rollups are L2 chains that allow the existing validator set on the parent L1 chain to order, batch, and settle its transactions. Taiko is an example of a based rollup that uses the existing consensus layer on Ethereum to process its transactions.
“Rollups have three modules (assuming they’re already settled on Ethereum); DA, Execution, and Sequencing. Current rollups only use Ethereum for one of these modules, DA. Unlike other rollups, based rollups also use Ethereum for sequencing. All blocks of the based rollup are part of the L1 block building pipeline, and therefore, they are completely intertwined with the base layer,” explained Taiko.
Sequencer Example
An example of a sequencer is the Arbitrum One sequencer, operated by the Arbitrum DAO. This sequencer orders and batches transactions on the Arbitrum One L2 chain. It then publishes the transaction data to Ethereum L1. The sequencer collects gas fees paid by users on the Arbitrum One L2 chain.
According to Arbitrum DAO, the sequencer operator can delay the inclusion of a user’s transaction by up to 24 hours and reorder transactions over short time horizons. However, a sequencer cannot compromise the system’s safety or prevent a transaction from ultimately being executed.
Sequencer Pros & Cons
Pros
- L2 sequencers enable instant confirmations, unlike the Ethereum L1 chain
- Sequencers batch L2 transactions resulting in reduced costs for L2 users through shared gas fees
- Offloading transaction execution from L1 to L2 reduces congestion on the Ethereum mainnet
- A centralized sequencer can enhance network performance
Cons
- Most L2 chains today use a centralized sequencing model
- A centralized sequencer can delay or reorder user transactions
- Centralized sequencers create a single point of failure for an L2 chain
- Can exploit transactions for maximal extractable value (MEV) through reordering and front-running
The Bottom Line
Sequencers are key pieces of infrastructure on which Ethereum’s future is dependent. The Ethereum community has compromised on its decentralization values to allow rollups the room to grow and establish themselves.
However, calls to decentralize rollup sequencing models are growing by the minute. Popular chains like Arbitrum have promised to ultimately transition away from their centralized sequencers in the future. Performance-focused chains like Unichain have disclosed that they will continue to take advantage of centralized sequencers while introducing systems to keep their powers in check.
FAQs
What is a sequencer in crypto?
What is the purpose of a sequencer?
What are centralized vs. decentralized sequencers?
References
- What Based Rollups Need from the L1? (Taiko Labs)