Forget the theory. Here's how you deploy an OP Stack chain that won't shit itself in production. I've done this six times, fucked it up twice, and learned where it breaks.
Pre-Deployment: The Stuff That Prevents 3am Pages
Keys first. You need separate keys for sequencer, batcher, proposer, and admin stuff. Don't be an idiot and use the same key for everything. Get a hardware wallet or at least cold storage for admin keys.
Test on Sepolia. Deploy there first and run it for a week. Break things on purpose, fix them, test your monitoring. I've saved myself hours of mainnet debugging by catching stupid mistakes on testnet.
Have enough ETH. Deployment costs are all over the place. I've seen 2-8 ETH depending on gas prices and how many times the deployment fails. Have more than you think you need or you'll get stuck halfway through.
Step 1: Install op-deployer (And Actually Build It)
Build from source because their binaries are often outdated or missing dependencies:
git clone https://github.com/ethereum-optimism/optimism.git
cd optimism
git checkout v1.8.0-rc.4 # Don't use develop branch
cd op-deployer
just build
This will fail with ERROR: go version go1.20.x is not supported
because you need Go 1.21+. Then it fails again because you don't have just
installed. Then it takes forever and eats all your RAM because their build system is massive.
Step 2: Generate Your Intent File (The Configuration That Matters)
op-deployer init \
--l1-chain-id 1 \
--l2-chain-ids 42069 \
--workdir .deployer \
--intent-type standard-overrides
This creates an `intent.toml` with placeholder values. Don't deploy the defaults - they use the "test test test" mnemonic and your funds will get stolen immediately.
Change these or you're fucked:
Use multisigs for admin stuff, don't be lazy and use EOA wallets in production.
Step 3: Deploy L1 Contracts (The Expensive Part)
op-deployer apply \
--workdir .deployer \
--l1-rpc-url $MAINNET_RPC \
--private-key $DEPLOYER_PRIVATE_KEY
This deploys 20+ contracts and burns ETH like crazy. It will fail. Here's how:
Error: timeout of 60000ms exceeded
when your RPC shits itself
INSUFFICIENT_FUNDS
halfway through because you didn't budget enough
nonce too high
errors when transactions get stuck in mempool
transaction underpriced
because gas spikes mid-deployment
I deploy Tuesday mornings when gas is theoretically cheaper. Use Alchemy/Infura with high rate limits. Budget 2+ hours because something always breaks.
Step 4: Generate Genesis Files and Chain Artifacts
## Generate the files you need to start your L2
op-deployer inspect genesis --workdir .deployer 42069 > genesis.json
op-deployer inspect rollup --workdir .deployer 42069 > rollup.json
These files configure your L2 chain. Store them securely - if you lose them, you'll need to re-derive from L1 state which is a massive pain.
Verify the genesis is correct:
- Check predeployed contract addresses match expectations
- Verify bridge contract addresses point to your L1 deployment
- Confirm chain ID, gas limits, and economic parameters
Step 5: Launch Your Sequencer (The Heart of Your Chain)
Your sequencer is the most critical component. It dies, your chain stops producing blocks. Set up monitoring before you start it.
op-node \
--l2=ws://localhost:8546 \
--l1=$L1_RPC_URL \
--l1.beacon=$BEACON_RPC_URL \
--rollup.config=rollup.json \
--p2p.disable \
--rpc.addr=0.0.0.0 \
--rpc.port=8547
Sequencer operational requirements:
- Run on dedicated hardware (c5.xlarge minimum)
- SSD storage with 1TB+ capacity (chain data grows fast)
- Reliable internet (sequencer downtime = chain downtime)
- Monitoring for block production, sync status, resource usage
Step 6: Start Batcher and Proposer (The Money Burning Services)
The batcher submits L2 transaction data to L1. This is where you spend most of your operational budget:
op-batcher \
--l2-eth-rpc=http://localhost:8545 \
--rollup-rpc=http://localhost:8547 \
--l1-eth-rpc=$L1_RPC_URL \
--private-key=$BATCHER_PRIVATE_KEY \
--data-availability-type=blobs
Batcher cost optimization:
The Production Monitoring You Actually Need
Sequencer health checks:
- Block production (new block every 2 seconds)
- Sync status (L1 head lag <30 seconds)
- Memory/disk usage (before it runs out)
Economic monitoring:
- Batcher wallet balance (fund before it runs dry)
- L1 gas costs (alert when daily spend exceeds budget)
- Transaction throughput vs capacity
User-facing metrics:
- RPC response times (users notice >500ms delays)
- Bridge deposit/withdrawal success rates
- Transaction confirmation times
When Things Go Wrong (And They Will)
Sequencer crashes at some ungodly hour: Chain stops producing blocks. No new transactions, users freaking out on Discord. I keep state snapshots every hour now because recovery from genesis takes 6+ hours.
Batcher wallet hits zero: L2 keeps humming but nothing gets posted to L1. Takes me hours to notice because my alerts sucked. Now I have PagerDuty spam me when balance drops under 0.5 ETH.
Gas spikes overnight: L1 costs can go from $800 to several thousand in one day. Circuit breakers now pause batching when gas gets too high, but then users complain about "slow confirmations."
Deposits vanish into the void: User sends 5 ETH, nothing shows up on L2. Turns out the RPC was returning stale block numbers so the bridge indexer missed the transaction. Took forever to debug and manually process.
Post-Launch: The Ongoing Nightmare
Deploying is the easy part. Operating a production rollup involves:
Daily operations:
- Monitor sequencer health and restart failures
- Check batcher ETH balance and refund as needed
- Review transaction volumes and adjust capacity
- Respond to user support tickets about "missing" transactions
Weekly tasks:
- Review costs vs revenue and adjust fee parameters
- Check for OP Stack upgrades and plan deployment
- Update monitoring dashboards and runbooks
- Backup critical data and test recovery procedures
Monthly planning:
- Capacity planning for growth
- Security reviews and key rotation
- Business development and ecosystem growth
- Financial reconciliation and cost optimization
The honest truth: Most teams underestimate ongoing operational complexity by 5-10x. Plan accordingly or you'll burn out your engineering team dealing with production issues.
Success Metrics That Actually Matter
Technical KPIs:
- Sequencer uptime >99.9%
- Average transaction confirmation <2 seconds
- RPC success rate >99.5%
- Bridge deposit success rate >99%
Economic KPIs:
- Transaction volume growth month-over-month
- Revenue vs operational costs ratio
- User acquisition cost vs lifetime value
- Ecosystem developer activity
User experience KPIs:
- Support ticket volume and resolution time
- Bridge UI success rates and user feedback
- Wallet integration and dApp compatibility
- Community growth and engagement
The infrastructure is battle-tested. The operational discipline is what separates successful rollups from abandoned experiments. Build with production operations in mind from day one, or you'll be rewriting everything when it actually matters.