# Falling into the Optimism rabbit hole: Bedrock, OP Stack, and Superchain

By [Test In Prod](https://paragraph.com/@testinprod-io) · 2023-01-11

---

### TL;DR

1.  _Bedrock_ is an epic software update that Optimism put everything they learned. Optimism started splitting the code into **three parts** to become a rollup framework -- Consensus, Execution, and Proof.
    
2.  _OP Stack_ is a rollup framework that allows anyone to plug different modules for rollup’s **three parts** based on the Bedrock update’s modularization.
    
3.  _Superchain_ is a collective of chains that use _OP Stack_. Superchain provides a single-chain experience for users by leveraging a **single** set of sequencers.
    

Intro
-----

Hey there! We are TiP. We build stuff that scales Ethereum.

Bedrock update is coming to Optimism, but none of our team knew Bedrock exactly. We couldn’t also find a blog that explains Bedrock exactly. Everyone is talking about block time and gas cost, but we felt **it’s more than block time or gas cost.**

We started to dig deeper into Bedrock and **fell into the Optimism rabbit hole**. It was amazing. This article takes you down the same rabbit hole we fell: **the big picture of Optimism** connecting Bedrock, OP Stack, and Superchain.

![Me at 2 am googling OP on the bed](https://storage.googleapis.com/papyrus_images/5542ef7e0e0b5e8d5e2ada5d7cc6af2b3614318f71757976e747b56a38a1e900.png)

Me at 2 am googling OP on the bed

Bedrock
-------

_Bedrock_ is **a)** an epic _software update_ that Optimism put everything they learned while operating the chain, and **b)** a _gentle announcement_ that Optimism is not just a single rollup but also a rollup framework.

### Software Update

Bedrock contains a bunch of enhancements. Here are some of the key topics -

*   [**Theoretically optimal data submission**](https://github.com/ethereum-optimism/optimism/blob/develop/specs/derivation.md#batch-submission)**:** Rollups regularly submit data to Ethereum. Bedrock doesn’t waste a byte and gwei upon data submission, which **saves the gas cost**.
    
*   [**Smarter sync, sequencing, and state submission**](https://github.com/ethereum-optimism/optimism/blob/9a198e90b1a7ab90a2ca85a3277576103eba6548/specs/derivation.md)**:** Syncing update enables Optimism to provide users **stable service though L1 is shaking.**
    
*   [**Modularization**](https://github.com/ethereum-optimism/optimism/blob/9a198e90b1a7ab90a2ca85a3277576103eba6548/README.md#directory-structure)**:** It enabled the preceding updates and the transition to the **rollup framework**.
    

We see **modularization** as the 👑 **crown jewel** of the Bedrock update.

### Modularization

Optimism had a **monolithic codebase** which caused a big problem. Engineers couldn't have flexibly modified the code because the entire codebase is tangled. Therefore, Optimism decided to separate the proof system, which had the most dependencies on the system.

After Optimism initiated the **modularization**, amazing things happened. The new codebase was so intuitive that the community could’ve forked the code and implemented a whole new rollup, such as [Minecraft rollup](https://opcraft.mud.dev/) and [Game boy rollup](https://www.youtube.com/watch?v=a5NIGmu9Lv8). Modularization ended up enabling the community to accessibly build variations of Optimism rollup and advance the rollup community at the end of the day.

As a result, the Optimism team **built a bedrock for the _OP Stack_.**

OP Stack
--------

![Source: Introducing the OP Stack (https://optimism.mirror.xyz/fLk5UGjZDiXFuvQh6R_HscMQuuY9ABYNF7PI76-qJYs)](https://storage.googleapis.com/papyrus_images/bdeef51695b5ae9384beb91a6a6e84ae19d9b3673fb4e0dab948eecf996c54c4.png)

Source: Introducing the OP Stack (https://optimism.mirror.xyz/fLk5UGjZDiXFuvQh6R\_HscMQuuY9ABYNF7PI76-qJYs)

_OP Stack_ is a rollup framework that allows anyone to plug different modules for rollup’s **three parts** -- Consensus, Execution, and Settlement. It could be possible thanks to _Bedrock’s_ modularization!

_OP Stack_ allows you to build various kinds of chains! You can build an EVM chain that uses ZK-proof and stores data to the blob on Ethereum; or a Game Boy chain that uses fault-proof and stores data on your desktop computer. I’m not joking; it’s happening!

Optimism defined consensus, execution, and settlement as a mental model representing the rollup’s technical stack. This means you can **make your new rollup by combining** a consensus module, an execution module, and a settlement module, like a burrito!

The wordings are pretty hard. But don’t you worry, Anon. In short, the **Consensus Layer** saves, retrieves, and interprets the data; the **Execution Layer** executes interpreted data; and the **Settlement Layer** checks if everything is valid.

### Consensus Layer

The Consensus Layer is responsible for storing, retrieving, and interpreting data. It contains **two** layers -- the Data Availability Layer and the Derivation Layer.

The **Data Availability Layer** is responsible for storing and retrieving the chain’s **data**. It’s **data storage** for your rollup. You can put the rollup’s data on Ethereum calldata, Ethereum blob, IPFS, or even your desktop computer.

The **Derivation Layer** is responsible for interpreting the data retrieved from the **Data Availability Layer**.

> _FYI,_ `S` _represents_ `State` _and_ `DA` _represents_ `Data Availability` _in the formula._

![Source: Modular Rollup Theory Through the Lens of the OP Stack by Kelvin Fichter (https://youtu.be/jnVjhp41pcc?t=596)](https://storage.googleapis.com/papyrus_images/9a35621aa4d371773b5cbcdc98701b636552bb6629f7a882120474897d3cfbb5.png)

Source: Modular Rollup Theory Through the Lens of the OP Stack by Kelvin Fichter (https://youtu.be/jnVjhp41pcc?t=596)

### Execution Layer

The **Execution Layer** is responsible for the execution. It **takes** interpreted data from the Consensus Layer, **executes** it, and **generates** the following status of the chain.

You can use various execution engines—for example, EVM (of course), Game Boy, and Minecraft. The sky is the limit!

![Source: Modular Rollup Theory Through the Lens of the OP Stack by Kelvin Fichter (https://youtu.be/jnVjhp41pcc?t=828)](https://storage.googleapis.com/papyrus_images/f0b3638cfb45c2f93a18ff788c86b10cac4789f09112d045d77865601d7bdff9.png)

Source: Modular Rollup Theory Through the Lens of the OP Stack by Kelvin Fichter (https://youtu.be/jnVjhp41pcc?t=828)

### Settlement Layer

The **Settlement Layer** is responsible for settling the chain. The Settlement Layer checks if the data and execution are right by putting everything all together. If the Settlement Layer verifies everything is correct, then the chain is settled to the next state.

You can use various methods to build the Settlement Layer—for example, [Fault Proof](https://ethereum.org/en/developers/docs/scaling/optimistic-rollups/) and [Validity Proof](https://ethereum.org/en/developers/docs/scaling/zk-rollups).

![Source: Modular Rollup Theory Through the Lens of the OP Stack by Kelvin Fichter (https://youtu.be/jnVjhp41pcc?t=1206)](https://storage.googleapis.com/papyrus_images/27dd6b66e2e298255cd725f065a602bd66358b3833ff1d38ef1995745fe62645.png)

Source: Modular Rollup Theory Through the Lens of the OP Stack by Kelvin Fichter (https://youtu.be/jnVjhp41pcc?t=1206)

Superchain
----------

![Source: Optimism’s OP Stack by Karl Floersch (https://youtu.be/HiU-g8XHi5s?t=1290)](https://storage.googleapis.com/papyrus_images/7ad14b6e3e20a1550b4f7f2c8dc8e835cdbb48f3af82bb6565d17fb81cf91099.png)

Source: Optimism’s OP Stack by Karl Floersch (https://youtu.be/HiU-g8XHi5s?t=1290)

_Superchain_ is a collective of chains that uses _OP Stack_. From the revealed information, _Superchain_ leverages **_OP Stack_’s modular architecture** and a **single shared sequencer set,** allowing **a)** atomic cross-chain composability between chains and **b)** trustless rollup maintenance.

If we dare speculate Optimism’s intention for a Superchain, we see intentions to make a rollup like a **smart contract**. With a smart contract, a deployer doesn’t have to maintain their own infra to run their own code. But the code frictionlessly runs on the nodes; most importantly, the code executor doesn’t have to trust the deployer.

Similarly, when there is a **shared _Superchain_ sequencers set** that commit to sequence and execute rollups on behalf of the deployers, both rollup deployers and users are happy. Because deployers don’t have to maintain their infra and put efforts into deploying a rollup, and users don’t have to trust the deployer. **Nothing was compromised** from the initial vision of trustless computing but only scales enough to serve everyone on the internet.

Therefore, with _Superchain_, we get a world where **builders** can _build a new rollup by combining_ modules, _deploy a rollup easily_ like a smart contract, and _don’t have to maintain a thing_; **users** can interact easily with other rollups as if they are using single big chain (single-chain experience); the **trustless execution** is guaranteed because nodes are well-decentralized.

Of course, realistically, we have some **to-dos** to make the _Superchain_ possible. Here are some notable to-dos for the Superchain.

*   **Multiple chains run on a sequencer.** We call it `M:1` problem.
    
*   **Multiple sequencers that run a single chain.** We call it `1:N` problem.
    
*   **Combining** `1:N` **and** `M:1` for the `M:N` network.
    
*   **A communication protocol between rollups** for atomic transactions between rollups.
    
*   **Diverse modules and implementations** for Consensus Layer, Execution Layer, and Settlement Layer.
    

Each to-do is quite a topic, but I know we can make it. We are talking about **_Optimism_**, my friends!

In conclusion
-------------

As a team commits to scaling Ethereum, Superchain is a mission that flutters our hearts. The most amazing part is that Optimism is a public good for the community’s public benefit. The entire codebase is under the MIT Licence, which allows everyone to contribute new ideas and redistribute freely.

Optimism is building days and nights for everyone’s public benefit. They are especially working harder at the moment since Bedrock is merging to test net soon. When each feature is shipped, we are getting one step closer to the _Superchain._

Lastly, I would like to thank the Optimism team for building an amazing product for the community. Their positive impact is not something I’ve ever seen in my life.

**_Let’s stay optimistic!_**

Sources
-------

*   [Introducing Optimism Bedrock](https://dev.optimism.io/introducing-optimism-bedrock/)
    
*   [Introducing the OP Stack](https://optimism.mirror.xyz/fLk5UGjZDiXFuvQh6R_HscMQuuY9ABYNF7PI76-qJYs)
    
*     
    
*     
    
*   [Optimism Specs](https://github.com/ethereum-optimism/optimism/tree/9a198e90b1a7ab90a2ca85a3277576103eba6548/specs)
    
*   [How is Bedrock Different?](https://community.optimism.io/docs/developers/bedrock/)
    
*     
    

Have a question?
----------------

Email us to `contact[at]testinprod.io` 🙌

---

*Originally published on [Test In Prod](https://paragraph.com/@testinprod-io/falling-into-the-optimism-rabbit-hole-bedrock-op-stack-and-superchain)*
