In this article, we discover what the sequencer node is, an essential component of the Ethereum rollup ecosystem.
This infrastructure entity is responsible for a series of processes that bring the transaction data conducted on the L2 into the main L1, acting as a connection point.
The operation and the degree of decentralization of the sequencer directly affects the security, reliability, and resistance to censorship of these solutions.
Let’s see everything in detail below.
What is the sequencer and what is its role in the EVM world
In the landscape of scalability solutions for Ethereum, the sequencer is an entity that orders, executes, and aggregates off-chain transactions before publishing them on the layer-1 blockchain. Its main role is to improve the scalability and efficiency of layer 2 solutions, such as rollups, by reducing gas costs and accelerating transaction finalization.
Technically defined as a node, the sequencer processes the transactions executed on the rollups and encapsulates them in a compressed “batch.” Then it sends this data to Ethereum, where they are officially recorded and added to the primary chain responsible for security.
Depending on the architecture of layer-2, the sequencer can be centralized or decentralized, and it can influence critical aspects such as the order of transactions, data availability, and censorship resistance.
In the case of Optimistic rollup, such as Arbitrum and Optimism, the sequencer orders the tx and publishes them on Ethereum assuming they are all valid unless contested. In zk-rollup, however, such as Starknet and ZkSync, the sequencer not only processes the transactions but also generates cryptographic proofs that are then verified on Ethereum. Finally, in rollups of the Validium type like ZkFair and Rhino.fi, a hybrid process occurs as the data is partially verified off-chain.
It is important to emphasize that this figure is also used by other blockchains and scalability solutions, but to avoid confusion, in this article we will focus only on the EVM world. For knowledge, we point out that there are components analogous to sequencers in ecosystems like Cosmos, Avalanche Subnets, and Celestia.
The workflow of sequencers in the various Ethereum rollups
Diving deeper into the various tasks performed by the sequencers, we see how they manage the lifecycle of a transaction executed within a rollup.
We can group their workflow into 3 fundamental steps: the collection and sorting of transactions, execution, and publication on Ethereum.
1) Collection and sorting of transactions
Users send transactions to the sequencer instead of directly to the L1, which orders them in a specific block according to an ordering strategy. Generally, in rollups, we find an “Auction-Based” strategy, where an auction takes place to determine the execution order (those who pay more fees have priority and are ordered first).
Other strategies can be of the “First Come First Served” type, where transactions are accepted and processed in the order they arrive.
2) Execution and calculation of the state
After deciding the order of the transactions, the sequencer executes them locally, updating the state of the rollup off-chain.
This execution is deterministic and follows the rules defined by the smart contract of the rollup on L1, thus ensuring the integrity of the operations.
3) Batch production and publication on L1
At this point, the transactions are grouped into batches and sent to L1 Ethereum.
The sequencer publishes only the essential data (calldata) for Data Availability (DA), ensuring that Ethereum can always reconstruct the on-chain state. This step ensures that the minimum computational effort is employed to keep the L2 network fees low
Based on the type of rollup, these 3 steps can vary more or less significantly, as shown in the following table.
“`html
“` “`html
The problem of the centralization of sequencer
“`
At the moment, most sequencers on Ethereum are centralized, since almost all rollups have a single node responsible for managing the connection between L2 and L1. This configuration is essential in the “Stage 0” phases of rollups, where a compromise between decentralization and scalability is necessary to make the entire infrastructure functional and efficient in its initial development phase.
“`html
Moving forward with time, rollups aim to decentralize their sequencers, introducing new solutions for node sharing and federation, thus moving to “Stage 1” and “Stage 2.” In the meantime, however, the excessive centralization of sequencers, even for a limited period of time, could create serious structural problems for the second-level network in question.
“`
First of all, entrusting control to a single node introduces a “single point of failure”: if the sequencer were to suffer an attack, a technical failure, or a manipulation, the entire infrastructure could be compromised, leading to transaction delays or even service interruptions. Furthermore, this concentration of power could facilitate the risk of censorship on transactions, as the single operator would have the ability to exclude or reorder transactions arbitrarily, applying MEV strategies.
Another critical aspect concerns trust: the lack of a distributed validation mechanism makes it difficult for users to independently verify that transactions have been handled correctly. All this undermines the principle of decentralization that is at the base of Ethereum’s philosophy.
The centralization of nodes represents a double-edged sword: the practical example of the layer-2 Linea.
Excessive centralization of sequencers is configured as a double-edged sword, capable of literally saving an entire ecosystem from collapse but at the same time able to lead to a strongly arbitrary censorship of the network.
What happened to layer-2 Linea in June of last year, during the hack and exploit of the Velocore protocol, is a clear example of this.
On that occasion, during the cyber attack on the DEX, the team at Consensys (which manages the Linea rollup) decided to stop block production, “shutting down” its sequencer. By doing so, with the chain practically frozen, the Velocare team managed to contain the incident, resolving the code vulnerability encountered. Meanwhile, Consensys censored the attacker’s address, making communication with the sequencer impossible (which, as we recall, validates transactions and sends them to L1).
If the sequencer had not shut down, there would have been very serious economic consequences, with impacts not only on Linea, but also on Ethereum.
The hackers could have drained more funds from the vulnerable smart contracts, leading to the depletion of the value of the assets based on Linea. Additionally, the attacker could have altered the state of the network, making it more difficult to detect and fix the issue.
This would have had repercussions on other DeFi protocols connected to Linea, causing many users to suffer liquidations or irreversible losses.
The Velocore hack event led the Ethereum community to reflect on the delicate balance between security and decentralization. On one hand, the swift intervention by Consensys prevented a financial disaster, protecting users and protocols from significant losses. On the other hand, the shutdown of the sequencer and the censorship of the attacker’s address raised concerns about the excessive centralized power held by layer-2 operators.