On this article, we uncover what the sequencer node is, an integral part of the Ethereum rollup ecosystem.
This infrastructure entity is answerable for a sequence of processes that carry the transaction knowledge performed on the L2 into the principle L1, appearing as a connection level.
The operation and the diploma of decentralization of the sequencer straight impacts the safety, reliability, and resistance to censorship of those options.
Let’s see every part intimately beneath.
What’s the sequencer and what’s its function within the EVM world
Within the panorama of scalability options for Ethereum, the sequencer is an entity that orders, executes, and aggregates off-chain transactions earlier than publishing them on the layer-1 blockchain. Its predominant function is to enhance the scalability and effectivity of layer 2 options, reminiscent of rollups, by decreasing gasoline prices and accelerating transaction finalization.
Technically outlined as a node, the sequencer processes the transactions executed on the rollups and encapsulates them in a compressed “batch.” Then it sends this knowledge to Ethereum, the place they’re formally recorded and added to the first chain answerable for safety.
Relying on the structure of layer-2, the sequencer may be centralized or decentralized, and it might probably affect vital elements such because the order of transactions, knowledge availability, and censorship resistance.
Within the case of Optimistic rollup, reminiscent of Arbitrum and Optimism, the sequencer orders the tx and publishes them on Ethereum assuming they’re all legitimate until contested. In zk-rollup, nonetheless, reminiscent of Starknet and ZkSync, the sequencer not solely processes the transactions but additionally generates cryptographic proofs which can be then verified on Ethereum. Lastly, in rollups of the Validium sort like ZkFair and Rhino.fi, a hybrid course of happens as the information is partially verified off-chain.
You will need to emphasize that this determine can be utilized by different blockchains and scalability options, however to keep away from confusion, on this article we are going to focus solely on the EVM world. For information, we level out that there are parts analogous to sequencers in ecosystems like Cosmos, Avalanche Subnets, and Celestia.
The workflow of sequencers within the numerous Ethereum rollups
Diving deeper into the assorted duties carried out by the sequencers, we see how they handle the lifecycle of a transaction executed inside a rollup.
We are able to group their workflow into 3 elementary steps: the gathering and sorting of transactions, execution, and publication on Ethereum.
1) Assortment and sorting of transactions
Customers ship transactions to the sequencer as a substitute of on to the L1, which orders them in a selected block in line with an ordering technique. Usually, in rollups, we discover an “Public sale-Primarily based” technique, the place an public sale takes place to find out the execution order (those that pay extra charges have precedence and are ordered first).
Different methods may be of the “First Come First Served” sort, the place transactions are accepted and processed within the order they arrive.
2) Execution and calculation of the state
After deciding the order of the transactions, the sequencer executes them domestically, updating the state of the rollup off-chain.
This execution is deterministic and follows the foundations outlined by the sensible contract of the rollup on L1, thus guaranteeing the integrity of the operations.
3) Batch manufacturing and publication on L1
At this level, the transactions are grouped into batches and despatched to L1 Ethereum.
The sequencer publishes solely the important knowledge (calldata) for Knowledge Availability (DA), guaranteeing that Ethereum can all the time reconstruct the on-chain state. This step ensures that the minimal computational effort is employed to maintain the L2 community charges low
Primarily based on the kind of rollup, these 3 steps can fluctuate kind of considerably, as proven within the following desk.
“`html
Tipo di Rollup | Raccolta Dati | Esecuzione | Pubblicazione su L1 |
Optimistic Rollup (Arbitrum, Optimism) | The sequencer collects the transactions despatched by customers. | The sequencer orders and executes the transactions, then publishes them in batch. | The information is posted on-chain, and the transactions are accepted after the problem interval |
ZK-Rollup (Starknet, zkSync) | The sequencer collects the transactions, making a batch of knowledge for processing. | The sequencer executes the transactions and generates a ZK-proof to reveal validity. | The cryptographic proof ensures the validity of the transactions, with out the necessity for a problem |
Validium (StarkEx) | The sequencer collects the transaction knowledge however retains it off-chain. | The sequencer executes the transactions off-chain and updates the state. | The information will not be absolutely on-chain, decreasing prices however with much less safety in comparison with on-chain rollups. |
“`
“`html
The issue of the centralization of sequencer
“`
In the mean time, most sequencers on Ethereum are centralized, since nearly all rollups have a single node answerable for managing the connection between L2 and L1. This configuration is important within the “Stage 0” phases of rollups, the place a compromise between decentralization and scalability is important to make the complete infrastructure practical and environment friendly in its preliminary improvement section.
“`html
Transferring ahead with time, rollups purpose to decentralize their sequencers, introducing new options for node sharing and federation, thus shifting to “Stage 1” and “Stage 2.” Within the meantime, nonetheless, the extreme centralization of sequencers, even for a restricted time frame, may create critical structural issues for the second-level community in query.
“`
To start with, entrusting management to a single node introduces a “single level of failure”: if the sequencer had been to undergo an assault, a technical failure, or a manipulation, the complete infrastructure might be compromised, resulting in transaction delays and even service interruptions. Moreover, this focus of energy may facilitate the danger of censorship on transactions, as the one operator would have the flexibility to exclude or reorder transactions arbitrarily, making use of MEV methods.
One other vital facet issues belief: the shortage of a distributed validation mechanism makes it tough for customers to independently confirm that transactions have been dealt with accurately. All this undermines the precept of decentralization that’s on the base of Ethereum’s philosophy.
The centralization of nodes represents a double-edged sword: the sensible instance of the layer-2 Linea.
Extreme centralization of sequencers is configured as a double-edged sword, able to actually saving a whole ecosystem from collapse however on the identical time capable of result in a strongly arbitrary censorship of the community.
What occurred to layer-2 Linea in June of final 12 months, through the hack and exploit of the Velocore protocol, is a transparent instance of this.
On that event, through the cyber assault on the DEX, the crew at Consensys (which manages the Linea rollup) determined to cease block manufacturing, “shutting down” its sequencer. By doing so, with the chain virtually frozen, the Velocare crew managed to include the incident, resolving the code vulnerability encountered. In the meantime, Consensys censored the attacker’s handle, making communication with the sequencer inconceivable (which, as we recall, validates transactions and sends them to L1).
If the sequencer had not shut down, there would have been very critical financial penalties, with impacts not solely on Linea, but additionally on Ethereum.
The hackers may have drained extra funds from the susceptible sensible contracts, resulting in the depletion of the worth of the belongings based mostly on Linea. Moreover, the attacker may have altered the state of the community, making it tougher to detect and repair the difficulty.
This is able to have had repercussions on different DeFi protocols linked to Linea, inflicting many customers to undergo liquidations or irreversible losses.
The Velocore hack occasion led the Ethereum group to replicate on the delicate steadiness between safety and decentralization. On one hand, the swift intervention by Consensys prevented a monetary catastrophe, defending customers and protocols from important losses. However, the shutdown of the sequencer and the censorship of the attacker’s handle raised issues concerning the extreme centralized energy held by layer-2 operators.