[1/2 Thread]Let's delve into @EspressoSys - The Anatomy of Decentralized Sequencers.Special thank to @jillrgunter and Espresso team who helped us to review .1/Centralized Sequencer Layer 2 solutions, such as rollups, can be considered modular blockchains because they function as independent off-chain execution engines for Ethereum. They delegate less intensive tasks like state checkpointing, consensus, and data availability to Ethereum. These functions are essential for ensuring the decentralization and security of the rollups.2/However, rollups face challenges with composability and interoperability, even though most of them use the same base layer by checkpointing their state on Ethereum. The main reason for this problem is simple: each rollup is operated by its own centralized sequencer, making it hard for different rollups to trust each other's intermediate states. This means if L2-L2 interactions are needed, they must rely on a third party to provide soft commitments, like bridge providers, or worse, wait for finality from Ethereum.3/Centralized sequencers also lead to:1.Centralization: Rather than waiting for the finality of their rollup states on Ethereum, users may choose to trust the state provided by the rollup operator. This requires significant trust, as only one operator maintains the rollup in a centralized sequencer. Additionally, large-scale MEV (Miner Extractable Value) is possible if one sequencer has full control over transaction ordering.2.Single Point of Failure: The liveness of a rollup is guaranteed by its operator. If the operator goes offline, the rollup temporarily halts, which means user funds get locked on the rollup.3.Censorship Resistance: An operator can reject user transactions at will. Although solutions like escape hatches or force inclusion on layer 1 exist, they require complex operations on the user side and incur high layer 1 gas fees.These concerns contradict Ethereum's intention to be a permissionless platform open to everyone.4/Decentralized Shared SequencingA practical solution is to leverage a decentralized system that can enable shared sequencing—allowing many rollups to use the same sequencer for a given period of time. By having a mechanism for rollups to cooperate to sequence transactions, build blocks, and reach consensus on the underlying data, this coordination network can provide stronger soft finality than a centralized approach and faster finality compared to layer 1.Another key feature is composability. Since many rollups' blocks are (pre)confirmed by the same trusted layer, bridging and atomic operations can be carried out more seamlessly and efficiently than relying on third parties or settlement layers like Ethereum.5/ Espresso: the Coordination Layer for RollupsIn this article, we will explore a project that seeks to enable shared sequencing, Espresso Systems. Espresso aims to create a coordination layer for rollups that can achieve high throughput, support a large number of nodes, have low commit latency, and deliver Web2-like performance in an optimistic case.There are two components of Espresso that make this work: the Espresso Network and the Espresso Marketplace.6/Since rollups already handle off-chain execution tasks where the validity of execution results is guaranteed by fraud and validity proofs, a coordination layer like Espresso only needs to manage a relaxed version of a monolithic blockchain, focusing on ordering, consensus, and data availability. Espresso tackles this with the Espresso Network - a proof-of-stake consensus system run by a network of nodes and consisting of two modular components:1.HotShot Consensus: HotShot is a BFT protocol used in Espresso to reach consensus among nodes, determine a set of sequencers for rollups, and finalize proposed blocks. HotShot is an extended version of the HotStuff-2 consensus protocol. HotShot is designed to support the scale that rollup users are used to in the majority of network conditions, without compromising on decentralization.2.Tiramisu DA: Working alongside HotShot is Tiramisu, a highly efficient data availability layer that ensures data availability and retrievability for clients and the consensus layer. Tiramisu consists of three layers—Cocoa, Mascarpone, and Savoiardi—each contributing unique features that enable Espresso to achieve the best of both Web2 and Web3 worlds, being both decentralized and highly efficient.7/HotShot ConsensusHotShot is the consensus layer of the Espresso system, allowing nodes to agree on the Espresso state and playing three essential roles:1.- Ensuring that a quorum of nodes receives data chunks and a quorum of the DA committee receives full block data.2.- Providing a shared (pre) finality layer for all connected rollups and users.3.- Determining a set of shared sequencers for rollups.Notably, HotShot can achieve all of this without performing execution and data availability, as these tasks are delegated to rollup operators and Tiramisu, respectively. This leads to a more efficient system, with each stack operating concurrently and being separately optimized.8/Consensus and FinalityEspresso develops the consensus protocol called HotShot, an extended version of HotStuff-2 tailored to support proof of stake and fit Espresso's use cases. Given Espresso's aim to support thousands of nodes, finding a robust consensus protocol that maintains high performance with a large set of nodes is crucial. This is why HotStuff-2 is chosen, offering two main benefits:1. - - Linear Communication Complexity: HotStuff-2 relies on leader-centric communication, where a leader takes the main responsibility of accumulating votes from and distributing messages to every node. This leads to communication complexity growing linearly with the number of nodes in the network.2. - - Pipelining Compatibility: HotStuff-2 supports pipelining, allowing multiple blocks to be processed simultaneously in the same round but with different phases. For example, at round k+2, the k-th block is being committed while the k+2-th block is being proposed.***Readers can find the details of how HotStuff-2 works in our Monad article [https://t.co/13YFRl6B9p].9/Although the above discussion suggests that HotShot, based on HotStuff-2, is sufficient for achieving high throughput and scalability, it is not entirely enough. Since HotShot must provide finality for multiple rollups, the data a leader handles and disseminates to other nodes can be very large, as a block must include transactions from all rollups. This can lead to efficiency degradation if a leader has to propagate a large block of transactions, even with linear communication complexity.If Espresso purely relies on HotShot, the communication complexity required for the network is equal to the size of a block (|B|) multiplied by the number of nodes (n), resulting in O(n|B|) complexity. Fortunately, Espresso introduces Tiramisu DA, which helps reduce the complexity down to just linear in the block size, O(|B|). We will further discuss this in the Tiramisu DA section.10/Tiramisu DAIn HotShot, if a leader were responsible for propagating a whole block to every node, it would result in high communication complexity of O(n|B|). Espresso introduces Tiramisu, a three-layered data availability solution composed of the Cocoa, Mascarpone, and Savoiardi layers, which helps reduce communication complexity down to O(|B|). These layers work together to achieve Web2-like performance in optimistic cases and can switch to more resilient layers in pessimistic cases, trading off some performance.*Let's delve into the details of each layer👇.11/The Top Layer: Cocoa - Web2-Like Performance LayerThis layer implements a centralized content distribution network (CDN) called Cocoa, which provides Web2-like performance to Tiramisu. The CDN is a powerful centralized hardware that facilitates message passing between the leader and other nodes in the network. To ensure data availability, the leader can upload an entire block to Cocoa, and anyone can request the block content from this centralized CDN. As a result, only O(|B|) communication is required for the leader to upload block data to Cocoa.It is important to note that Cocoa is not a trusted layer and doesn’t guarantee safety and liveness, as it is a centralized system. Cocoa is utilized solely for its efficiency. In the event that Cocoa is corrupted, under attack, or experiencing downtime, Espresso can switch to a more robust layer, Mascarpone.Espresso describes the Cocoa layer as an additional feature, akin to cocoa powder sprinkled on top of a Tiramisu dessert. While not essential for the dessert, it makes a Tiramisu look more appetizing. Similarly, in the Tiramisu DA system, the Cocoa layer adds an attractive feature, such as Web2 performance. However, Tiramisu can still guarantee data availability and function perfectly well without it.