Skip to Content
Welcome to our new docs! šŸŽ‰
BuildStacksOptimismLocal OP Stack Devnet

Local OP Stack devnet

This guide will teach you how to spin up a complete local OP Stack rollup with Celestia DA for testing.

What pop-deployer does: It spins up a temporary Anvil instance, deploys all OP Stack contracts (SystemConfig, L1CrossDomainMessenger, OptimismPortal, etc.), captures the chain state to a snapshot, then packages everything into a tarball. When you run the bundle, Anvil loads the pre-deployed state instantly - no waiting for contract deployments.

Prerequisites

See overview of Popsigner and Popkins.

Option 1: In the UI

Log in to Popkins

Go to https://popkins.popsigner.comĀ  and login.

Set up the local chain

New chain

Click ā€+ NEW CHAINā€ in the top right of the Popkins UI.

Select ā€œPOPKINS BUNDLEā€ and click continue:

1.deploy-new-chain

Pick stack

Then select ā€œOP STACKā€, put a chain name and chain ID into the fields, and click ā€šŸš€ CREATE BUNDLEā€.

2.pick_op

Wait for bundle generation

Wait for the bundle to be generated:

3.wait-for-deploy.png

Review details

After it has generated, review the details:

4.download-bundle

4.1.look-at-details

Download the bundle

Download the bundle by clicking the ā€œDOWNLOAD BUNDLEā€ button.

5.download

Extract the tarball

Extract the tarball by running the following command:

unzip my-local-devnet-pop-bundle-artifacts.tar.gz cd my-local-devnet-pop-bundle-artifacts

Set up the .env:

cp .env.example .env

Run the bundle

Run the bundle by running the following command:

docker compose up -d

Option 2: In the terminal

Clone Popsigner

git clone https://github.com/celestiaorg/popsigner.git

Build the bundle generator

cd popsigner/control-plane/cmd/pop-deployer go build -o pop-deployer .

Generate the pre-deployed bundle

./pop-deployer --stack opstack

Extract and run

The bundle comes with all contracts already deployed and configured - just extract and run.

tar xzf opstack-local-devnet-bundle.tar.gz docker compose up -d

Verify it’s running:

cast block-number --rpc-url http://localhost:8545 # 55

This starts:

  • Anvil - L1 chain with pre-deployed OP Stack contracts
  • OP-Geth - L2 execution client
  • OP-Node - L2 consensus/derivation
  • Localestia - Mock Celestia DA layer
  • POPSigner-Lite - Local signing service

Feel stuck? Go to our Discord!

Last updated on