> ## Documentation Index
> Fetch the complete documentation index at: https://docs.optimism.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Batcher configuration reference

> Reference for all op-batcher configuration options, covering CLI flags, environment variables, and default values.

This page catalogues every configuration option for the op-batcher, the service
that posts L2 sequencer data to L1 to make it available for verifiers.

The flag tables below are generated directly from the op-batcher's flag
definitions in the monorepo (`op-batcher/flags`) at the release
tag named in the provenance line, and are regenerated when a new finalized
release is published, so they cannot silently fall behind. Every flag can
also be set through the environment variable listed next to it.

For guidance on choosing values — the batcher policy, cost tuning, multi-blob
transactions, and sequencer throttling — see the
[batcher configuration guide](https://docs.optimism.io/chain-operators/guides/configuration/batcher.md).

## Flags

Generated from [`op-batcher/v1.16.11`](https://github.com/ethereum-optimism/optimism/releases/tag/op-batcher%2Fv1.16.11)
flag definitions. 87 flags: 3 required, 84 optional.

### Required flags

| Flag | Description | Environment variable |
| - | - | - |
| `--l1-eth-rpc` | HTTP provider URL for L1 | `OP_BATCHER_L1_ETH_RPC` |
| `--l2-eth-rpc` | HTTP provider URL for L2 execution engine. A comma-separated list enables the active L2 endpoint provider. Such a list needs to match the number of rollup-rpcs provided. | `OP_BATCHER_L2_ETH_RPC` |
| `--rollup-rpc` | HTTP provider URL for Rollup node. A comma-separated list enables the active L2 endpoint provider. Such a list needs to match the number of l2-eth-rpcs provided. | `OP_BATCHER_ROLLUP_RPC` |

### Optional flags

| Flag | Description | Default | Environment variable |
| - | - | - | - |
| `--active-sequencer-check-duration` | The duration between checks to determine the active sequencer endpoint. | `5s` | `OP_BATCHER_ACTIVE_SEQUENCER_CHECK_DURATION` |
| `--altda.da-server` | HTTP address of a DA Server | — | `OP_BATCHER_ALTDA_DA_SERVER` |
| `--altda.da-service` | Use DA service type where commitments are generated by Alt-DA server | `false` | `OP_BATCHER_ALTDA_DA_SERVICE` |
| `--altda.enabled` | Enable Alt-DA mode Alt-DA Mode is a Beta feature of the MIT licensed OP Stack. While it has received initial review from core contributors, it is still undergoing testing, and may have bugs or other issues. | `false` | `OP_BATCHER_ALTDA_ENABLED` |
| `--altda.get-timeout` | Timeout for get requests. 0 means no timeout. | `0s` | `OP_BATCHER_ALTDA_GET_TIMEOUT` |
| `--altda.max-concurrent-da-requests` | Maximum number of concurrent requests to the DA server | `1` | `OP_BATCHER_ALTDA_MAX_CONCURRENT_DA_REQUESTS` |
| `--altda.put-timeout` | Timeout for put requests. 0 means no timeout. | `0s` | `OP_BATCHER_ALTDA_PUT_TIMEOUT` |
| `--altda.verify-on-read` | Verify input data matches the commitments from the DA storage service | `true` | `OP_BATCHER_ALTDA_VERIFY_ON_READ` |
| `--approx-compr-ratio` | The approximate compression ratio (\<= 1.0). Only relevant for ratio compressor. | `0.6` | `OP_BATCHER_APPROX_COMPR_RATIO` |
| `--batch-type` | The batch type. 0 for SingularBatch and 1 for SpanBatch. | `singular` | `OP_BATCHER_BATCH_TYPE` |
| `--check-recent-txs-depth` | Indicates how many blocks back the batcher should look during startup for a recent batch tx on L1. This can speed up waiting for node sync. It should be set to the verifier confirmation depth of the sequencer (e.g. 4). | `0` | `OP_BATCHER_CHECK_RECENT_TXS_DEPTH` |
| `--compression-algo` | The compression algorithm to use. Valid options: zlib, brotli, brotli-9, brotli-10, brotli-11 | `zlib` | `OP_BATCHER_COMPRESSION_ALGO` |
| `--compressor` | The type of compressor. Valid options: none, ratio, shadow | `"shadow"` | `OP_BATCHER_COMPRESSOR` |
| `--data-availability-type` | The data availability type to use for submitting batches to the L1. Valid options: calldata, blobs, auto | `calldata` | `OP_BATCHER_DATA_AVAILABILITY_TYPE` |
| `--fee-limit-multiplier` | The multiplier applied to fee suggestions to put a hard limit on fee increases | `5` | `OP_BATCHER_TXMGR_FEE_LIMIT_MULTIPLIER` |
| `--hd-path` | The HD path used to derive the sequencer wallet from the mnemonic. The mnemonic flag must also be set. | — | `OP_BATCHER_HD_PATH` |
| `--log.color` | Color the log output if in terminal mode | `false` | `OP_BATCHER_LOG_COLOR` |
| `--log.format` | Format the log output. Supported formats: text, terminal, logfmt, logfmtms, json, jsonms | `text` | `OP_BATCHER_LOG_FORMAT` |
| `--log.level` | The lowest log level that will be output | `INFO` | `OP_BATCHER_LOG_LEVEL` |
| `--log.pid` | Show pid in the log | `false` | `OP_BATCHER_LOG_PID` |
| `--max-blocks-per-span-batch` | Maximum number of blocks to add to a span batch. Default is 0 - no maximum. | `0` | `OP_BATCHER_MAX_BLOCKS_PER_SPAN_BATCH` |
| `--max-channel-duration` | The maximum duration of L1-blocks to keep a channel open. 0 to disable. | `0` | `OP_BATCHER_MAX_CHANNEL_DURATION` |
| `--max-l1-tx-size-bytes` | The maximum size of a batch tx submitted to L1. Ignored for blobs, where max blob size will be used. | `120000` | `OP_BATCHER_MAX_L1_TX_SIZE_BYTES` |
| `--max-pending-tx` | The maximum number of pending transactions. 0 for no limit. | `1` | `OP_BATCHER_MAX_PENDING_TX` |
| `--metrics.addr` | Metrics listening address | `"0.0.0.0"` | `OP_BATCHER_METRICS_ADDR` |
| `--metrics.enabled` | Enable the metrics server | `false` | `OP_BATCHER_METRICS_ENABLED` |
| `--metrics.port` | Metrics listening port | `7300` | `OP_BATCHER_METRICS_PORT` |
| `--mnemonic` | The mnemonic used to derive the wallets for either the service | — | `OP_BATCHER_MNEMONIC` |
| `--network-timeout` | Timeout for all network operations | `10s` | `OP_BATCHER_NETWORK_TIMEOUT` |
| `--num-confirmations` | Number of confirmations which we will wait after sending a transaction | `10` | `OP_BATCHER_NUM_CONFIRMATIONS` |
| `--poll-interval` | How frequently to poll L2 for new blocks | `6s` | `OP_BATCHER_POLL_INTERVAL` |
| `--pprof.addr` | pprof listening address | `"0.0.0.0"` | `OP_BATCHER_PPROF_ADDR` |
| `--pprof.enabled` | Enable the pprof server | `false` | `OP_BATCHER_PPROF_ENABLED` |
| `--pprof.path` | pprof file path. If it is a directory, the path is \{dir}/\{profileType}.prof | — | `OP_BATCHER_PPROF_PATH` |
| `--pprof.port` | pprof listening port | `6060` | `OP_BATCHER_PPROF_PORT` |
| `--pprof.type` | pprof profile type. One of cpu, heap, goroutine, threadcreate, block, mutex, allocs | — | `OP_BATCHER_PPROF_TYPE` |
| `--private-key` | The private key to use with the service. Must not be used with mnemonic. | — | `OP_BATCHER_PRIVATE_KEY` |
| `--resubmission-timeout` | Duration we will wait before resubmitting a transaction to L1 | `48s` | `OP_BATCHER_RESUBMISSION_TIMEOUT` |
| `--rpc.addr` | rpc listening address | `"0.0.0.0"` | `OP_BATCHER_RPC_ADDR` |
| `--rpc.enable-admin` | Enable the admin API | `false` | `OP_BATCHER_RPC_ENABLE_ADMIN` |
| `--rpc.port` | rpc listening port | `8545` | `OP_BATCHER_RPC_PORT` |
| `--safe-abort-nonce-too-low-count` | Number of ErrNonceTooLow observations required to give up on a tx at a particular nonce without receiving confirmation | `3` | `OP_BATCHER_SAFE_ABORT_NONCE_TOO_LOW_COUNT` |
| `--sequencer-hd-path` | DEPRECATED: The HD path used to derive the sequencer wallet from the mnemonic. The mnemonic flag must also be set. | — | `OP_BATCHER_SEQUENCER_HD_PATH` |
| `--signer.address` | Address the signer is signing requests for | — | `OP_BATCHER_SIGNER_ADDRESS` |
| `--signer.endpoint` | Signer endpoint the client will connect to | — | `OP_BATCHER_SIGNER_ENDPOINT` |
| `--signer.header` | Headers to pass to the remote signer. Format `key=value`. Value can contain any character allowed in a HTTP header. When using env vars, split with commas. When using flags one key value pair per flag. | — | `OP_BATCHER_SIGNER_HEADER` |
| `--signer.tls.ca` | tls ca cert path | `"tls/ca.crt"` | `OP_BATCHER_SIGNER_TLS_CA` |
| `--signer.tls.cert` | tls cert path | `"tls/tls.crt"` | `OP_BATCHER_SIGNER_TLS_CERT` |
| `--signer.tls.enabled` | Enable or disable TLS client authentication for the signer | `true` | `OP_BATCHER_SIGNER_TLS_ENABLED` |
| `--signer.tls.key` | tls key | `"tls/tls.key"` | `OP_BATCHER_SIGNER_TLS_KEY` |
| `--stopped` | Initialize the batcher in a stopped state. The batcher can be started using the admin\_startBatcher RPC | `false` | `OP_BATCHER_STOPPED` |
| `--sub-safety-margin` | The batcher tx submission safety margin (in #L1-blocks) to subtract from a channel's timeout and sequencing window, to guarantee safe inclusion of a channel on L1. | `10` | `OP_BATCHER_SUB_SAFETY_MARGIN` |
| `--target-num-frames` | The target number of frames to create per channel. Controls number of blobs per blob tx, if using Blob DA. | `1` | `OP_BATCHER_TARGET_NUM_FRAMES` |
| `--throttle.additional-endpoints` | Comma-separated list of endpoints to distribute throttling configuration to (in addition to the L2 endpoints specified with --l2-eth-rpc). | — | `OP_BATCHER_THROTTLE_ADDITIONAL_ENDPOINTS` |
| `--throttle.block-size-lower-limit` | The limit on the DA size of blocks when we are at maximum throttle intensity (linear and quadratic controllers only). 0 means no limits will ever be applied, so consider 1 the smallest effective limit. | `2000` | `OP_BATCHER_THROTTLE_BLOCK_SIZE_LOWER_LIMIT` |
| `--throttle.block-size-upper-limit` | The limit on the DA size of blocks when we are at 0 throttle intensity (applied when throttling is inactive) | `130000` | `OP_BATCHER_THROTTLE_BLOCK_SIZE_UPPER_LIMIT` |
| `--throttle.controller-type` | Type of throttle controller to use: 'step', 'linear', 'quadratic' (default) or 'pid' (EXPERIMENTAL - use with caution) | `"quadratic"` | `OP_BATCHER_THROTTLE_CONTROLLER_TYPE` |
| `--throttle.pid-integral-max` | EXPERIMENTAL: PID controller maximum integral windup. Only relevant if --throttle-controller-type is set to 'pid' | `1000` | `OP_BATCHER_THROTTLE_PID_INTEGRAL_MAX` |
| `--throttle.pid-kd` | EXPERIMENTAL: PID controller derivative gain. Only relevant if --throttle-controller-type is set to 'pid' | `0.05` | `OP_BATCHER_THROTTLE_PID_KD` |
| `--throttle.pid-ki` | EXPERIMENTAL: PID controller integral gain. Only relevant if --throttle-controller-type is set to 'pid' | `0.01` | `OP_BATCHER_THROTTLE_PID_KI` |
| `--throttle.pid-kp` | EXPERIMENTAL: PID controller proportional gain. Only relevant if --throttle-controller-type is set to 'pid' | `0.33` | `OP_BATCHER_THROTTLE_PID_KP` |
| `--throttle.pid-output-max` | EXPERIMENTAL: PID controller maximum output. Only relevant if --throttle-controller-type is set to 'pid' | `1` | `OP_BATCHER_THROTTLE_PID_OUTPUT_MAX` |
| `--throttle.pid-sample-time` | EXPERIMENTAL: PID controller sample time interval, default is 2s | `2s` | `OP_BATCHER_THROTTLE_PID_SAMPLE_TIME` |
| `--throttle.tx-size-lower-limit` | The limit on the DA size of transactions when we are at maximum throttle intensity. 0 means no limits will ever be applied, so consider 1 the smallest effective limit. | `150` | `OP_BATCHER_THROTTLE_TX_SIZE_LOWER_LIMIT` |
| `--throttle.tx-size-upper-limit` | The limit on the DA size of transactions when we are at 0+ throttle intensity (limit of the intensity as it approaches 0 from positive values). Not applied when throttling is inactive. | `20000` | `OP_BATCHER_THROTTLE_TX_SIZE_UPPER_LIMIT` |
| `--throttle.unsafe-da-bytes-lower-threshold` | The threshold on unsafe\_da\_bytes beyond which the batcher will start to throttle the block builder. Zero disables throttling. | `3200000` | `OP_BATCHER_THROTTLE_UNSAFE_DA_BYTES_LOWER_THRESHOLD` |
| `--throttle.unsafe-da-bytes-upper-threshold` | Threshold on unsafe\_da\_bytes at which throttling has the maximum intensity (linear and quadratic controllers only) | `12800000` | `OP_BATCHER_THROTTLE_UNSAFE_DA_BYTES_UPPER_THRESHOLD` |
| `--txmgr.already-published-custom-errs` | List of custom RPC error messages that indicate that a transaction has already been published. | — | `OP_BATCHER_TXMGR_ALREADY_PUBLISHED_CUSTOM_ERRS` |
| `--txmgr.blob-tip-cap-dynamic` | Use dynamic blob tip cap from the blob tip oracle instead of static tip cap for blob transactions. Regular transactions still use min-tip-cap/max-tip-cap. | `false` | `OP_BATCHER_TXMGR_BLOB_TIP_CAP_DYNAMIC` |
| `--txmgr.blob-tip-cap-percentile` | Percentile of recent blob tx tips to use for suggestion (1-100). Only used when blob-tip-cap-dynamic is enabled. | `60` | `OP_BATCHER_TXMGR_BLOB_TIP_CAP_PERCENTILE` |
| `--txmgr.blob-tip-cap-range` | Number of recent blocks to analyze for blob tip cap distribution. Only used when blob-tip-cap-dynamic is enabled. | `20` | `OP_BATCHER_TXMGR_BLOB_TIP_CAP_RANGE` |
| `--txmgr.cell-proof-time` | Enables cell proofs in blob transactions for Fusaka (EIP-7742) compatibility from the provided unix timestamp. Should be set to the L1 Fusaka time. May be left blank for Ethereum Mainnet, Sepolia, Holesky, or Hoodi L1s. | `18446744073709551615` | `OP_BATCHER_TXMGR_CELL_PROOF_TIME` |
| `--txmgr.fee-limit-threshold` | The minimum threshold (in GWei) at which fee bumping starts to be capped. Allows arbitrary fee bumps below this threshold. | `100` | `OP_BATCHER_TXMGR_FEE_LIMIT_THRESHOLD` |
| `--txmgr.max-basefee` | Enforces a maximum base fee (in GWei) to assume when determining tx fees, `TxMgr` returns an error when exceeded. Disabled by default. | `0` | `OP_BATCHER_TXMGR_MAX_BASEFEE` |
| `--txmgr.max-retries` | Maximum number of times to resubmit a transaction to L1 on a transient error. Set to 0 to disable retries. | `10` | `OP_BATCHER_TXMGR_MAX_RETRIES` |
| `--txmgr.max-tip-cap` | Enforces a maximum tip cap (in GWei) to use when determining tx fees, `TxMgr` returns an error when exceeded. Disabled by default. | `0` | `OP_BATCHER_TXMGR_MAX_TIP_CAP` |
| `--txmgr.min-basefee` | Enforces a minimum base fee (in GWei) to assume when determining tx fees. 1 GWei by default. | `1` | `OP_BATCHER_TXMGR_MIN_BASEFEE` |
| `--txmgr.min-tip-cap` | Enforces a minimum tip cap (in GWei) to use when determining tx fees. 1 GWei by default. | `1` | `OP_BATCHER_TXMGR_MIN_TIP_CAP` |
| `--txmgr.not-in-mempool-timeout` | Timeout for aborting a tx send if the tx does not make it to the mempool. | `2m0s` | `OP_BATCHER_TXMGR_TX_NOT_IN_MEMPOOL_TIMEOUT` |
| `--txmgr.rebroadcast-interval` | Interval at which a published transaction will be rebroadcasted if it has not yet been mined. Should be less than ResubmissionTimeout to have an effect. | `12s` | `OP_BATCHER_TXMGR_REBROADCAST_INTERVAL` |
| `--txmgr.receipt-query-interval` | Frequency to poll for receipts | `12s` | `OP_BATCHER_TXMGR_RECEIPT_QUERY_INTERVAL` |
| `--txmgr.retry-interval` | Duration we will wait before resubmitting a transaction to L1 on a transient error. Values \<= 0 will result in retrying immediately. Should be less than ResubmissionTimeout to have an effect. | `1s` | `OP_BATCHER_TXMGR_RETRY_INTERVAL` |
| `--txmgr.send-timeout` | Timeout for sending transactions. If 0 it is disabled. | `0s` | `OP_BATCHER_TXMGR_TX_SEND_TIMEOUT` |
| `--wait-node-sync` | Indicates if, during startup, the batcher should wait for a recent batcher tx on L1 to finalize (via more block confirmations). This should help avoid duplicate batcher txs. | `false` | `OP_BATCHER_WAIT_NODE_SYNC` |

## Throttling

The `throttle.*` flags control how the batcher limits data availability (DA)
usage when a backlog builds up. When the amount of sequenced data that has not
yet been posted to L1 (the `unsafe_da_bytes` metric) exceeds
`--throttle.unsafe-da-bytes-lower-threshold`, the batcher instructs block
builders — over the `--l2-eth-rpc` endpoints, plus any endpoints listed in
`--throttle.additional-endpoints` — to limit transaction and block DA sizes,
scaling between the configured upper and lower size limits as the backlog
grows.

`--throttle.controller-type` selects how throttling intensity ramps with the
backlog: `step`, `linear`, `quadratic` (the default), or the experimental
`pid` controller, which is tuned with the six `throttle.pid-*` flags.

For the design of the throttling subsystem, including the PID controller, see
[`op-batcher/throttling.md`](https://github.com/ethereum-optimism/optimism/blob/develop/op-batcher/throttling.md)
in the monorepo.

## Notes on selected flags

### batch-type

Span batches (`--batch-type=1`) aggregate consecutive L2 blocks into a single
batch for better compression. See the
[span batch feature page](https://docs.optimism.io/op-stack/features/span-batches.md) to learn more.

### data-availability-type

> [!NOTE]
>
> Setting this flag to `auto` allows the batcher to automatically switch
> between `calldata` and `blobs` based on the current L1 gas price.

### altda.\*

The `altda.*` flags configure Alt-DA mode, a Beta feature of the OP Stack.
While it has received initial review from core contributors, it is still
undergoing testing, and may have bugs or other issues. See the
[Alt-DA mode guide](https://docs.optimism.io/chain-operators/guides/features/alt-da-mode-guide.md) for
setup instructions.
