Skip to main content
After you have spun up your sequencer, you need to configure a batcher to submit L2 transaction batches to L1. The batcher is a critical component that ensures L2 transaction data is available on L1 for data availability and enables users to reconstruct the L2 state. This guide assumes you already have a functioning sequencer and the necessary L1 contracts deployed using op-deployer. If you haven’t set up your sequencer yet, please refer to the sequencer guide first.

Understanding the batcher’s role

The batcher (op-batcher) serves as a crucial component that bridges your L2 chain data to L1. Its primary responsibilities include:
  • Batch submission: Collecting L2 transactions and submitting them as batches to L1
  • Data availability: Ensuring L2 transaction data is available on L1 for verification
  • Cost optimization: Compressing and efficiently packing transaction data to minimize L1 costs
  • Channel management: Managing data channels for optimal batch submission timing
The batcher reads transaction data from your sequencer and submits compressed batches to the BatchInbox contract on L1.

Prerequisites

Before setting up your batcher, ensure you have: Running infrastructure:
  • An operational sequencer node
  • Access to a L1 RPC endpoint
Network information:
  • Your L2 chain ID and network configuration
  • L1 network details (chain ID, RPC endpoints)
  • BatchInbox contract address from your deployment

Software installation

Finding the current stable releases

To ensure you’re using the latest compatible versions of OP Stack components, always check the official releases page. Look for the latest op-batcher/v* release that’s compatible with your sequencer setup.
This guide uses op-batcher/v1.13.1 which is compatible with op-node/v1.13.3 and op-geth/v1.101511.0 from the sequencer setup. Always check the release notes for compatibility information.

Build from source

Clone and build op-batcher:
# If you don't already have the optimism repository from the sequencer setup
git clone https://github.com/ethereum-optimism/optimism.git
cd optimism

# Checkout the latest release tag
git checkout op-batcher/v1.13.1

# Build op-batcher
cd op-batcher
just

# Binary will be available at ./bin/op-batcher

Verify installation

Run this command to verify the installation:
./bin/op-batcher --version

Docker alternative (For containerized environments)

If you prefer containerized deployment, you can use the official Docker images.

Complete Docker setup guide

The rest of this guide assumes you’re using the build-from-source approach. If you chose Docker, refer to the collapsible section.

Next steps

Your batcher is now operational and will continuously submit L2 transaction batches to L1!
I