Bedrock upgrade on Optimism, which will reduce mainnet fees by 47% – a quick overview

The “Bedrock” upgrade is expected to bring a 47% cost reduction to the Optimism mainnet, which is a major leap forward. This not only greatly enhances the performance of Optimism, but is also expected to attract more developers and users to join the Optimism ecosystem. The roughly halved cost reduction is obviously a big advantage for Optimism in the fiercely competitive blockchain market, and also brings unprecedented convenience and affordability to users. In addition, this upgrade is seen as one of the catalysts for the continued strong growth of the Optimism ecosystem, indicating a broader and more hopeful development prospect for Optimism.

“TL;DR:

  • “Bedrock” is a major upgrade of the Optimism mainnet, aimed at significantly reducing usage costs. This change stems from a simple assumption: lower costs equal a better user experience.
  • Through a series of optimizations and innovations, the Bedrock upgrade is expected to bring a 47% reduction in protocol and security costs to the Optimism mainnet.
  • The main optimization measures include:
  • Efficient transmission of transaction data: optimization between Layer 1 (the first layer network) and Layer 2 (the second layer network), improving data compression efficiency, and reorganizing the way data is sent from Optimism to L1 to maximize the use of available data space on L1.
  • Improving data compression methods: among multiple compression algorithms, zlib was ultimately chosen because it provides good performance for Optimism’s needs.
  • Adopting a new batching system: the batching system is a linear format that converts traditional blocks into batches that eliminate as much additional information as possible, leaving only a minimal amount of necessary metadata.
  • In addition, the Bedrock version also minimizes Gas fees on Ethereum as much as possible. This is achieved by removing all executing Gas and lowering L1 data costs to the theoretical minimum.
  • Ultimately, these improvements will help Optimism mainnet users save a lot of transaction costs.
  • Once the upgrade is complete, the Optimism team will release updates through the OP Labs Twitter account, including post-Bedrock data (showing predicted accuracy), so stay tuned.

Bedrock Upgrade: A New Chapter for Optimism, Expected 47% Cost Reduction

Lowering costs is a major design principle in the Bedrock version, which has led to a complete re-architecture of how transactions are posted to Layer 1 (L1) and the reverse operation.

Despite the magnitude of this approach, it stems from a very simple assumption: Lower cost = better. We want our ecosystem to be the most accessible: the simplest, most fun, and with the lowest construction and transaction costs.

Ultimately, the Bedrock upgrade will bring a 47% reduction in protocol costs and security fees to the Optimism mainnet. Please read on to learn how we achieved this goal.

Where do the costs come from?

There are two sources of fees for sending transactions on the Optimism mainnet: L2 (layer 2) execution fees and L1 data/security fees.

L2 execution fees work similar to regular transaction fees on Ethereum, but with the added benefit that the execution gas price on the Optimism mainnet is very low due to the network not being as congested as L1.

L1 data fees are because all transactions on Optimism are also posted to Ethereum. This step is critical to the security of Optimism, as it means all the data that needs to be synchronized with Optimism nodes is always publicly available on Ethereum. This makes Optimism an L2. Users on Optimism must pay fees to submit their transactions to Ethereum. Because gas fees on Ethereum are very expensive, L1 data fees make up a significant portion of the total transaction cost on the Optimism mainnet.

Looking for Improvements

In the early stages of Bedrock development, we were able to identify several areas that were causing unnecessary costs to users. Specifically, the legacy system design of Optimism was not making the most efficient use of L1 data space. For example, the previous Bedrock system for posting data to Ethereum simply added as many transactions as possible to compressed data bundles that could fill a single L1 transaction.

To address this issue, the most logical starting point was to try to increase efficiency in compressing large amounts of data posted to Ethereum. We also found that reorganizing the way data is sent from Optimism to L1 could maximize the use of available data space on L1.

Iteration of Fix Methods

Once we had a proof-of-concept submission of a transaction group consisting of compressed data, which brought us closer to our goal, we focused on optimizing this method.

A key constraint in guiding development is the need to segment the body of an L2 block into multiple L1 transactions. If someone submits a large transaction to L2, it may need to be split to fit L1’s Calldata. Additionally, the algorithm we use to compress data yields better compression ratios the more input data there is. To address this constraint and maximize compression ratios, we designed a system that can leverage these properties.

Batches and Compressed Data

The key building block of this system is batches. Batches are a line format designed to minimize the cost of writing to L1 and software complexity. Traditional blocks are transformed into batches, eliminating as much extraneous information as possible and retaining only necessary, small amounts of metadata.

Next, L2 transaction lists, called sequence batches, are compressed into what are called channels. Each channel has a maximum size (initially around 9.5Mb). These channels will be compressed using compression algorithms before being submitted to L1. The efficiency of obtaining good compression ratios is achieved by compressing a large number of batches into each channel.

Channels are further divided into channel frames. This is a part of how we solve the key constraint described above. Splitting channels into frames allows us to handle very large L2 transactions by parallelizing the sending of these transactions to L1, filling up the corresponding L1 transaction as much as possible.

Compression Algorithm

When choosing compression algorithms, we considered candidates such as zstd, brotli, and LZW, but ultimately chose zlib because it provided good performance for our needs.

In this case, good performance means a good balance between compression ratio and the good compression and decompression speeds we are trying to achieve. This reflects the typical trade-off in choosing compression algorithms: speed/compression ratio performance.

Minimizing the Use of Ethereum Gas

The final part that helps reduce costs is that Bedrock removes all Gas execution, lowering L1 data costs to theoretical minimums. We discuss this in more detail in the Bedrock interpreter.

Here is an excerpt:

Bedrock has removed all execution gas used by the L1 system when sending transactions called batch transactions. All validation logic that previously occurred on L1 smart contracts has been moved to the block derivation logic instead. Instead, batch transactions are sent to a single EOA (Externally Owned Account) on Ethereum known as the batch inbox address.

Batches are still subject to validity checks (i.e., they must be properly encoded), as are individual transactions within the batch (e.g., the signature must be valid). Invalid batches and invalid individual transactions within otherwise valid batches are considered to be discarded and are not processed by the system.

Cost savings by the numbers

With the Bedrock upgrade, we expect **protocol costs/security fees to decrease by 47%**, including 99% of the state chain commitment and a 20% reduction in batch submission costs.

After the upgrade, we will be posting updates via the OP Labs Twitter account, including post-Bedrock data (showing how accurate our predictions were), so stay tuned.

Next Steps: Cost Optimization and EIP-4844

We’re very proud of the design and solutions we’ve built for Bedrock release to reduce costs. This is the result of our team’s inclination towards solid engineering foundations and clean execution.

Our team is continuing to optimize costs to reduce L2 data costs, so expect to see this in future releases after Bedrock. One specific thing we can do is timed batch submissions so that batches are guaranteed to be submitted within a specific time window (e.g., 10 minutes) and we can submit the batch when fees are lowest within that 10-minute window.

Even more exciting, EIP-4844 will be coming to Ethereum soon. When it does, the cost of publishing data to L1 will be further reduced.

If this article has you excited about building on Optimism, check out our docs to learn how to contribute to the community. Additionally, our Bedrock interpreter details many of the exciting features coming along with the Bedrock release.

Like what you're reading? Subscribe to our top stories.

We will continue to update Gambling Chain; if you have any questions or suggestions, please contact us!

Follow us on Twitter, Facebook, YouTube, and TikTok.

Share:

Was this article helpful?

93 out of 132 found this helpful

Gambling Chain Logo
Industry
Digital Asset Investment
Location
Real world, Metaverse and Network.
Goals
Build Daos that bring Decentralized finance to more and more persons Who love Web3.
Type
Website and other Media Daos

Products used

GC Wallet

Send targeted currencies to the right people at the right time.