# What is Espresso?

By [pengem](https://paragraph.com/@pengem) · 2024-10-14

---

Espresso is a **decentralized sequencer and data system** designed for **Layer 2 blockchains and rollups**. Projects can easily integrate their rollups with Espresso’s sequencer by modifying specific code to connect with Espresso. The system offers **customization options** to enhance integration and is actively collaborating with multiple rollup projects.

* * *

### **How Espresso Works**

Espresso plays a crucial role in managing the **transaction flow** between **Layer 1 (e.g., Ethereum)** and **Layer 2 or rollups**. Below are the key components and processes involved in Espresso's system:

1.  **Sequencer:**
    
    *   Aggregates transactions from users into batches and organizes them into blocks.
        
    *   Assigns a specific order to the blocks, which may follow arbitrary or predefined rules set by the rollups.
        
2.  **Executor and Prover:**
    
    *   Execute state transitions for transactions, simulating the required programs and functions.
        
    *   Compute and store the **virtual machine (VM) state** based on the ordered transactions produced by the sequencer.
        
3.  **Rollup Contracts:**
    
    *   Validate **zero-knowledge proofs (ZK-proofs)** generated by the prover.
        
    *   Store the latest state root on **Layer 1 blockchains** (like Ethereum) for record-keeping.
        

* * *

### **Transaction Flow with Espresso**

There are two possible scenarios for how transactions interact with Espresso’s sequencer:

1.  **Direct User Interaction with Espresso’s Sequencer:**
    
    *   Users submit transactions directly to the sequencer. These transactions are batched, added to blocks, and entered into the **order book**.
        
    *   The results are then sent to **Layer 1** for final recording.
        
2.  **User Interaction through Rollups with Espresso’s Sequencer:**
    
    *   Users submit transactions to the rollup, where the **executor and prover** validate state transitions.
        
    *   These states are transmitted to the sequencer, following the same process as the direct interaction scenario.
        

* * *

### **Impact on Rollups Using Espresso’s Sequencer**

Espresso introduces several architectural changes when integrated with **ZK-rollups**. These adjustments, while abstract, can also be applied to popular **Layer 2 solutions** like **Starknet** and **Optimism**:

1.  **JSON-RPC Modifications:**
    
    *   Adjust the RPC server to forward transactions from users to Espresso’s sequencer.
        
2.  **Executor Updates:**
    
    *   Modify the executor to send updates about new blocks and download specific block subsets from Espresso’s API.
        
3.  **Transition Proof Adjustments:**
    
    *   Replace standard block commitments with **Espresso sequencer commitments**.
        
4.  **Prover Updates:**
    
    *   Implement changes in the prover to generate **new types of proofs** aligned with Espresso’s requirements.
        

* * *

Espresso’s decentralized sequencer enhances transaction ordering, interoperability, and scalability for rollups, making it easier for projects to manage state transitions across multiple layers while maintaining **security and decentralization**.

---

*Originally published on [pengem](https://paragraph.com/@pengem/what-is-espresso)*
