L2s on WeaveVM: How to deploy an OP Stack Rollup with Permanent Storage

L2s on WeaveVM: How to deploy an OP Stack Rollup with Permanent Storage

October 02, 2024

You can now deploy L2s on WeaveVM using the OP Stack!

In this article, we will guide you through deploying your own OP Stack rollup on WeaveVM, leveraging WeaveVM for data settlement and data availability (DA).

About the OP Stack

The OP Stack is a generalizable framework spawned out of Optimism’s efforts to scale the Ethereum L1. It provides the tools for launching a production-quality Optimistic Rollup blockchain with a focus on modularity. Layers like the sequencer, data availability, and execution environment can be swapped out to create novel L2 setups.

The goal of optimistic rollups is to increase L1 transaction throughput while reducing transaction costs. For example, when Optimism users sign a transaction and pay the gas fee in ETH, the transaction is first stored in a private mempool before being executed by the sequencer. The sequencer generates blocks of executed transactions every two seconds and periodically batches them as call data submitted to Ethereum. The “optimistic” part comes from assuming transactions are valid unless proven otherwise.

In the case of WeaveVM, we have modified OP Stack components to use WeaveVM as the data availability and settlement layer for L2s deployed using this architecture.

About WeaveVM

WeaveVM is a sovereign EVM network built towards the goal of solving the EVM storage dilemma with Arweave. It gives the coming generation of high-performance chains a place to settle and store onchain data, without worrying about cost, availability, or permanence.

WeaveVM offers scalable and cost-effective storage by using Arweave as a decentralized hard drive, both at the node and smart contract layer. This makes it possible to store large data sets and run web2-like applications without incurring EVM storage fees. WeaveVM’s storage as calldata costs around $0.02/MB, compared with Ethereum’s $800/MB (calculate in realtime here).

OP Stack Rollups on WeaveVM

We’ve built on top of the Optimism Monorepo to enable the deployment of optimistic rollups using WeaveVM as the L1. The key difference between deploying OP rollups on WeaveVM versus Ethereum is that when you send data batches to WeaveVM, your rollup data is also permanently archived on Arweave via to WeaveVM’s Execution Extensions (ExExes).

As a result, OP Stack rollups using WeaveVM for data settlement and data availability (DA) will benefit from the cost-effective, permanent data storage offered by WeaveVM and Arweave. Rollups deployed on WeaveVM use the native WeaveVM gas token (tWVM on Alphanet), similar to how ETH is used for OP rollups on Ethereum.

We’ve released a detailed technical guide on GitHub for developers looking to deploy OP rollups on WeaveVM. Check it out here and the WeaveVM’s fork of Optimism Monorepo here.

Conclusion

OP Stack rollups have proven to be a powerful scaling solution for the Ethereum mainnet. WeaveVM Alphanet, as a hyperscalable EVM L1, offers long-term high-throughput DA and permanent ledger archiving on Arweave. Rollups deployed on WeaveVM benefit from scalable permanent data storage and high-throughput DA.

In the coming weeks, we will release another iteration of guides for the OP Stack rollups on WeaveVM, focusing on how to use WeaveVM as an alt-DA solution, working in parallel with other DA and data settlement solutions in any OP rollup. Stay tuned on X and Discord!