diff --git a/pages/operators/chain-operators/configuration/batcher.mdx b/pages/operators/chain-operators/configuration/batcher.mdx index 532967765..7bc356c17 100644 --- a/pages/operators/chain-operators/configuration/batcher.mdx +++ b/pages/operators/chain-operators/configuration/batcher.mdx @@ -23,7 +23,7 @@ This page lists all configuration options for the op-batcher. The op-batcher pos L2 sequencer data to the L1, to make it available for verifiers. The following options are from the `--help` in [v1.10.0](https://github.com/ethereum-optimism/optimism/releases/tag/op-batcher%2Fv1.10.0). -## Batcher Policy +## Batcher policy The batcher policy defines high-level constraints and responsibilities regarding how L2 data is posted to L1. Below are the [standard guidelines](/superchain/standard-configuration) for configuring the batcher within the OP Stack. @@ -31,9 +31,6 @@ The batcher policy defines high-level constraints and responsibilities regarding | -------------------------- | -------------------------------------------------------------------------------------------------------------- | ----------------------- | ------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Data Availability Type | Specifies whether the batcher uses **blobs**, **calldata**, or **auto** to post transaction data to L1. | Batch submitter address | Ethereum (Blobs or Calldata) | - Alternative data availability (Alt-DA) is not yet supported in the standard configuration.
- The sequencer can switch at will between blob transactions and calldata, with no restrictions, because both are fully secured by L1. | | Batch Submission Frequency | Determines how frequently the batcher submits aggregated transaction data to L1 (via the batcher transaction). | Batch submitter address | Must target **1,800 L1 blocks** (6 hours on Ethereum, assuming 12s L1 block time) or lower | - Batches must be posted before the sequencing window closes (commonly 12 hours by default).
- Leave a buffer for L1 network congestion and data size to ensure that each batch is fully committed in a timely manner. | -| Output Frequency | Defines how frequently L2 output roots are submitted to L1 (via the output oracle). | L1 Proxy Admin | **43,200 L2 blocks** (24 hours at 2s block times) or lower | - Once fault proofs are implemented, this value may become deprecated.
- It cannot be set to 0 (there must be some cadence for outputs). | - -### Additional Guidance * **Data Availability Types**: * **Calldata** is generally simpler but can be more expensive on mainnet Ethereum, depending on gas prices. @@ -45,12 +42,7 @@ The batcher policy defines high-level constraints and responsibilities regarding * Your chain should never exceed your L2's sequencing window (commonly 12 hours). * If targeting a longer submission window (e.g., 5 or 6 hours), be aware that the [safe head](https://github.com/ethereum-optimism/specs/blob/main/specs/glossary.md#safe-l2-head) can stall up to that duration. -* **Output Frequency**: - * Used to post output roots to L1 for verification. - * The recommended maximum is 24 hours (43,200 blocks at 2s each), though many chains choose smaller intervals. - * Will eventually be replaced or significantly changed by the introduction of fault proofs. - -Include these high-level "policy" requirements when you set up or modify your `op-batcher` configuration. See the [Batcher Configuration](#global-options) reference, which explains each CLI flag and environment variable in depth. +Include these high-level "policy" requirements when you set up or modify your `op-batcher` configuration. See the [batcher configuration](#all-configuration-variables) reference, which explains each CLI flag and environment variable in depth. ## Recommendations @@ -105,7 +97,7 @@ Span batches reduce the overhead of OP Stack chains, introduced in the Delta net The overhead is reduced by representing a span of consecutive L2 blocks in a more efficient manner, while preserving the same consistency checks as regular batch data. -### Batcher Sequencer Throttling +## Batcher sequencer throttling This feature is a batcher-driven sequencer-throttling control loop. This is to avoid sudden spikes in L1 DA-usage consuming too much available gas and causing a backlog in batcher transactions. The batcher can throttle the sequencer's data throughput instantly when it sees too much batcher data built up. @@ -149,109 +141,43 @@ GETH_WS_API: debug,eth,txpool,net,miner It is recommended to add it to both, HTTP and WS. -## Global options - -### active-sequencer-check-duration - -The duration between checks to determine the active sequencer endpoint. The -default value is `2m0s`. - - - `--active-sequencer-check-duration=` - `--active-sequencer-check-duration=2m0s` - `OP_BATCHER_ACTIVE_SEQUENCER_CHECK_DURATION=2m0s` - - -### altda.da-server - -HTTP address of a DA Server. - - - `--altda.da-server=` - `--altda.da-server=http://da.example.com:1234` - `$OP_BATCHER_ALTDA_DA_SERVER=http://da.example.com:1234` - - -### altda.da-service - -Use DA service type where commitments are generated by Alt-DA server. The default -value is `false`. - - - `--altda.da-service=` - `--altda.da-service=true` - `$OP_BATCHER_ALTDA_DA_SERVER=true` - - -### 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. -The default value is `false`. - - - `--altda.enabled=` - `--altda.enabled=false` - `$OP_BATCHER_ALTDA_ENABLED=false` - - -### altda.get-timeout - -Timeout for get requests. **0 means no timeout**. - - - `--altda.get-timeout=` - `--altda.get-timeout=5s` - `OP_BATCHER_ALTDA_GET_TIMEOUT=5s` - - -### altda.max-concurrent-da-requests - -Maximum number of concurrent requests to the DA server. - - - `--altda.max-concurrent-da-requests=` - `--altda.max-concurrent-da-requests=4` - `OP_BATCHER_ALTDA_MAX_CONCURRENT_DA_REQUESTS=4` - - -### altda.put-timeout - -Timeout for put requests. **0 means no timeout**. - - - `--altda.put-timeout=` - `--altda.put-timeout=10s` - `OP_BATCHER_ALTDA_PUT_TIMEOUT=10s` - - -### altda.verify-on-read +## Example configuration -Verify input data matches the commitments from the DA storage service. +This is a basic example of a batcher configuration. Optimal batcher configuration is going to differ for each chain, +however you can see some of the most important variables configured below: - - `--altda.verify-on-read=` - `--altda.verify-on-read=true` - `OP_BATCHER_ALTDA_VERIFY_ON_READ=true` - +``` + OP_BATCHER_WAIT_NODE_SYNC: true + OP_BATCHER_CHECK_RECENT_TXS_DEPTH: 5 + OP_BATCHER_POLL_INTERVAL: "5s" + OP_BATCHER_BATCH_TYPE: "1" # span + OP_BATCHER_COMPRESSION_ALGO: brotli-10 + OP_BATCHER_DATA_AVAILABILITY_TYPE: auto + OP_BATCHER_MAX_CHANNEL_DURATION: "150" # up to 30 min to fill blobs + OP_BATCHER_TARGET_NUM_FRAMES: "5" # 5 blobs, can go to 6 with Pectra activated on L1 + OP_BATCHER_SUB_SAFETY_MARGIN: "300" # 1h safety margin to prevent seq window elapse + OP_BATCHER_NUM_CONFIRMATIONS: "4" + OP_BATCHER_NETWORK_TIMEOUT: "10s" + OP_BATCHER_TXMGR_MIN_BASEFEE: "2.0" + OP_BATCHER_TXMGR_MIN_TIP_CAP: "2.0" + OP_BATCHER_TXMGR_FEE_LIMIT_MULTIPLIER: 16 # allow up to 4 doublings + OP_BATCHER_MAX_PENDING_TX: "10" + OP_BATCHER_RESUBMISSION_TIMEOUT: "180s" # wait 3 min before bumping fees + OP_BATCHER_ACTIVE_SEQUENCER_CHECK_DURATION: 5s +``` -### approx-compr-ratio +Lower throughput chains, which aren't filling up channels before the `MAX_CHANNEL_DURATION` is hit, +may save gas by increasing the `MAX_CHANNEL_DURATION`. See the [recommendations section](#set-your--op_batcher_max_channel_duration). -The approximate compression ratio (`<=1.0`). Only relevant for ratio -compressor. The default value is `0.6`. +## All configuration variables - - `--approx-compr-ratio=` - `--approx-compr-ratio=0.6` - `OP_BATCHER_APPROX_COMPR_RATIO=0.6` - +### Batch generation -### batch-type +#### batch-type The batch type. 0 for `SingularBatch` and 1 for `SpanBatch`. The default value is `0` for `SingularBatch`. +See the [span batch feature page](/operators/chain-operators/features/span-batches) to learn more. `--batch-type=` @@ -259,7 +185,7 @@ is `0` for `SingularBatch`. `OP_BATCHER_BATCH_TYPE=` -### check-recent-txs-depth +#### max-blocks-per-span-batch 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 @@ -272,7 +198,7 @@ value is `0`. `OP_BATCHER_CHECK_RECENT_TXS_DEPTH=0` -### compression-algo +#### compression-algo The compression algorithm to use. Valid options: zlib, brotli, brotli-9, brotli-10, brotli-11. The default value is `zlib`. @@ -283,7 +209,7 @@ brotli-10, brotli-11. The default value is `zlib`. `OP_BATCHER_COMPRESSION_ALGO=zlib` -### compressor +#### compressor The type of compressor. Valid options: none, ratio, shadow. The default value is `shadow`. @@ -294,7 +220,29 @@ is `shadow`. `OP_BATCHER_COMPRESSOR=shadow` -### data-availability-type +#### approx-compr-ratio + +Only relevant for ratio compressor. The approximate compression ratio (`<=1.0`). The default value is `0.6`. + + + `--approx-compr-ratio=` + `--approx-compr-ratio=0.6` + `OP_BATCHER_APPROX_COMPR_RATIO=0.6` + + +#### poll-interval + +How frequently to poll L2 for new blocks. The default value is `6s`. + + + `--poll-interval=` + `--poll-interval=6s` + `OP_BATCHER_POLL_INTERVAL=6s` + + +### Batch submission + +#### data-availability-type Setting this flag to `auto` will allow the batcher to automatically switch between `calldata` and `blobs` based on the current L1 gas price. @@ -309,124 +257,146 @@ options: `calldata`, `blobs`, and `auto`. The default value is `calldata`. `OP_BATCHER_DATA_AVAILABILITY_TYPE=calldata` -### fee-limit-multiplier +#### target-num-frames -The multiplier applied to fee suggestions to put a hard limit on fee increases. -The default value is `5`. +The target number of frames to create per channel. Controls number of blobs per +blob tx, if using Blob DA. The default value is `1`. - `--fee-limit-multiplier=` - `--fee-limit-multiplier=5` - `OP_BATCHER_TXMGR_FEE_LIMIT_MULTIPLIER=5` + `--target-num-frames=` + `--target-num-frames=1` + `OP_BATCHER_TARGET_NUM_FRAMES=1` -### hd-path +#### max-channel-duration -The HD path used to derive the sequencer wallet from the mnemonic. The mnemonic -flag must also be set. +The maximum duration of L1-blocks to keep a channel open. 0 to disable. The +default value is `0`. - `--hd-path=` - `--hd-path=` - `OP_BATCHER_HD_PATH=` + `--max-channel-duration=` + `--max-channel-duration=0` + `OP_BATCHER_MAX_CHANNEL_DURATION=0` -### l1-eth-rpc +#### sub-safety-margin -HTTP provider URL for L1. +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. The default value is `10`. - `--l1-eth-rpc=` - `--l1-eth-rpc` - `OP_BATCHER_L1_ETH_RPC=` + `--sub-safety-margin=` + `--sub-safety-margin=10` + `OP_BATCHER_SUB_SAFETY_MARGIN=10s` -### l2-eth-rpc +#### max-l1-tx-size-bytes -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. +The maximum size of a batch tx submitted to L1. Ignored for blobs, where max +blob size will be used. The default value is `120000`. - `--l2-eth-rpc=` - `--l2-eth-rpc=` - `OP_BATCHER_L2_ETH_RPC=` + `--max-l1-tx-size-bytes=` + `--max-l1-tx-size-bytes=120000` + `OP_BATCHER_MAX_L1_TX_SIZE_BYTES=120000` -### log.color +### Batcher startup -Color the log output if in terminal mode. The default value is `false`. +#### 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. The default value is `false`. - `--log.color=` - `--log.color=false` - `OP_BATCHER_LOG_COLOR=false` + `--wait-node-sync=` + `--wait-node-sync=false` + `OP_BATCHER_WAIT_NODE_SYNC=false` -### log.format +#### check-recent-txs-depth -Format the log output. Supported formats: 'text', 'terminal', 'logfmt', 'json', -'json-pretty'. The default value is `text`. +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). The default +value is `0`. - `--log.format=` - `--log.format=text` - `OP_BATCHER_LOG_FORMAT=text` + `--check-recent-txs-depth=` + `--check-recent-txs-depth=0` + `OP_BATCHER_CHECK_RECENT_TXS_DEPTH=0` -### log.level +#### stopped -The lowest log level that will be output. The default value is `INFO`. +Initialize the batcher in a stopped state. The batcher can be started using the +admin\_startBatcher RPC. The default value is `false`. - `--log.level=` - `--log.level=INFO` - `OP_BATCHER_LOG_LEVEL=INFO` + `--stopped=` + `--stopped=false` + `OP_BATCHER_STOPPED=false` -### log.pid +### Throttling -Show PID in the log. +#### throttle-threshold + +Threshold on `pending-blocks-bytes-current` beyond which the batcher instructs the\ +block builder to start throttling transactions with larger DA demands. **Zero disables throttling**. - `--log.pid=` - `--log.pid=true` - `OP_BATCHER_LOG_PID=true` + `--throttle-threshold=` + `--throttle-threshold=1500000` + `OP_BATCHER_THROTTLE_THRESHOLD=1500000` -### max-blocks-per-span-batch +#### throttle-tx-size -Maximum number of blocks to add to a span batch. **Default is 0 (no maximum)**. +The DA size of transactions at which throttling begins **when we are over the throttle threshold**. - `--max-blocks-per-span-batch=` - `--max-blocks-per-span-batch=100` - `OP_BATCHER_MAX_BLOCKS_PER_SPAN_BATCH=100` + `--throttle-tx-size=` + `--throttle-tx-size=10000` + `OP_BATCHER_THROTTLE_TX_SIZE=10000` -### max-channel-duration +#### throttle-block-size -The maximum duration of L1-blocks to keep a channel open. 0 to disable. The -default value is `0`. +The total DA limit to start imposing on block building **when we are over the throttle threshold**. - `--max-channel-duration=` - `--max-channel-duration=0` - `OP_BATCHER_MAX_CHANNEL_DURATION=0` + `--throttle-block-size=` + `--throttle-block-size=50000` + `OP_BATCHER_THROTTLE_BLOCK_SIZE=50000` -### max-l1-tx-size-bytes +#### throttle-always-block-size -The maximum size of a batch tx submitted to L1. Ignored for blobs, where max -blob size will be used. The default value is `120000`. +The total DA limit to start imposing on block building **at all times**. - `--max-l1-tx-size-bytes=` - `--max-l1-tx-size-bytes=120000` - `OP_BATCHER_MAX_L1_TX_SIZE_BYTES=120000` + `--throttle-always-block-size=` + `--throttle-always-block-size=250000` + `OP_BATCHER_THROTTLE_ALWAYS_BLOCK_SIZE=250000` + + +### Transaction manager + +#### num-confirmations + +Number of confirmations which we will wait after sending a transaction. The +default value is `10`. + + + `--num-confirmations=` + `--num-confirmations=10` + `OP_BATCHER_NUM_CONFIRMATIONS=10` -### max-pending-tx +#### max-pending-tx The maximum number of pending transactions. 0 for no limit. The default value is `1`. @@ -437,192 +407,226 @@ is `1`. `OP_BATCHER_MAX_PENDING_TX=1` -### metrics.addr +#### resubmission-timeout -Metrics listening address. The default value is `0.0.0.0`. +Duration we will wait before resubmitting a transaction to L1. The default +value is `48s`. - `--metrics.addr=` - `--metrics.addr=0.0.0.0` - `OP_BATCHER_METRICS_ADDR=0.0.0.0` + `--resubmission-timeout=` + `--resubmission-timeout=48s` + `OP_BATCHER_RESUBMISSION_TIMEOUT=48s` -### metrics.enabled +#### safe-abort-nonce-too-low-count -Enable the metrics server. The default value is `false`. +Number of ErrNonceTooLow observations required to give up on a tx at a +particular nonce without receiving confirmation. The default value is `3`. - `--metrics.enabled=` - `--metrics.enabled=false` - `OP_BATCHER_METRICS_ENABLED=false` + `--safe-abort-nonce-too-low-count=` + `--safe-abort-nonce-too-low-count=3` + `OP_BATCHER_SAFE_ABORT_NONCE_TOO_LOW_COUNT=3` -### metrics.port +#### txmgr.min-basefee -Metrics listening port. The default value is `7300`. +Enforces a minimum base fee (in GWei) to assume when determining tx fees. 1 +GWei by default. The default value is `1`. - `--metrics.port=` - `--metrics.port=7300` - `OP_BATCHER_METRICS_PORT=7300` + `--txmgr.min-basefee=` + `--txmgr.min-basefee=1` + `OP_BATCHER_TXMGR_MIN_BASEFEE=1` -### mnemonic +#### txmgr.min-tip-cap -The mnemonic used to derive the wallets for either the service. +Enforces a minimum tip cap (in GWei) to use when determining tx fees. 1 GWei by +default. The default value is `1`. - `--mnemonic=` - `--mnemonic=` - `OP_BATCHER_MNEMONIC=` + `--txmgr.min-tip-cap=` + `--txmgr.min-tip-cap=1` + `OP_BATCHER_TXMGR_MIN_TIP_CAP=1` -### network-timeout +#### fee-limit-multiplier -Timeout for all network operations. The default value is `10s`. +The multiplier applied to fee suggestions to put a hard limit on fee increases. +The default value is `5`. - `--network-timeout=` - `--network-timeout=10s` - `OP_BATCHER_NETWORK_TIMEOUT=10s` + `--fee-limit-multiplier=` + `--fee-limit-multiplier=5` + `OP_BATCHER_TXMGR_FEE_LIMIT_MULTIPLIER=5` -### num-confirmations +#### txmgr.fee-limit-threshold -Number of confirmations which we will wait after sending a transaction. The -default value is `10`. +The minimum threshold (in GWei) at which fee bumping starts to be capped. +Allows arbitrary fee bumps below this threshold. The default value is `100`. - `--num-confirmations=` - `--num-confirmations=10` - `OP_BATCHER_NUM_CONFIRMATIONS=10` + `--txmgr.fee-limit-threshold=` + `--txmgr.fee-limit-threshold=100` + `OP_BATCHER_TXMGR_FEE_LIMIT_THRESHOLD=100` -### altda.da-server +#### txmgr.receipt-query-interval -HTTP address of a DA Server. +Frequency to poll for receipts. The default value is `12s`. - `--altda.da-server=` - `--altda.da-server=` - `OP_BATCHER_ALTDA_DA_SERVER=` + `--txmgr.receipt-query-interval=` + `--txmgr.receipt-query-interval=12s` + `OP_BATCHER_TXMGR_RECEIPT_QUERY_INTERVAL=12s` -### altda.da-service +#### txmgr.not-in-mempool-timeout -Use DA service type where commitments are generated by altda server. The -default value is `false`. +Timeout for aborting a tx send if the tx does not make it to the mempool. The +default value is `2m0s`. - `--altda.da-service=` - `--altda.da-service=false` - `OP_BATCHER_ALTDA_DA_SERVICE=false` + `--txmgr.not-in-mempool-timeout=` + `--txmgr.not-in-mempool-timeout=2m0s` + `OP_BATCHER_TXMGR_TX_NOT_IN_MEMPOOL_TIMEOUT=2m0s` -### altda.enabled +#### txmgr.send-timeout -Enable altda mode. The default value is `false`. +Timeout for sending transactions. If 0 it is disabled. The default value is +`0s`. - `--altda.enabled=` - `--altda.enabled=false` - `OP_BATCHER_ALTDA_ENABLED=false` + `--txmgr.send-timeout=` + `--txmgr.send-timeout=0s` + `OP_BATCHER_TXMGR_TX_SEND_TIMEOUT=0s` -### altda.verify-on-read +### Authentication and wallet + +#### private-key -Verify input data matches the commitments from the DA storage service. The -default value is `true`. +The private key to use with the service. Must not be used with mnemonic. - `--altda.verify-on-read=` - `--altda.verify-on-read=true` - `OP_BATCHER_ALTDA_VERIFY_ON_READ=true` + `--private-key=` + `--private-key=` + `OP_BATCHER_PRIVATE_KEY=` -### poll-interval +#### mnemonic -How frequently to poll L2 for new blocks. The default value is `6s`. +The mnemonic used to derive the wallets for either the service. - `--poll-interval=` - `--poll-interval=6s` - `OP_BATCHER_POLL_INTERVAL=6s` + `--mnemonic=` + `--mnemonic=` + `OP_BATCHER_MNEMONIC=` -### pprof.addr +#### hd-path -pprof listening address. The default value is `0.0.0.0`. +The HD path used to derive the sequencer wallet from the mnemonic. The mnemonic +flag must also be set. - `--pprof.addr=` - `--pprof.addr=0.0.0.0` - `OP_BATCHER_PPROF_ADDR=0.0.0.0` + `--hd-path=` + `--hd-path=` + `OP_BATCHER_HD_PATH=` -### pprof.enabled -Enable the pprof server. The default value is `false`. +#### signer.address + +Address the signer is signing transactions for. - `--pprof.enabled=` - `--pprof.enabled=false` - `OP_BATCHER_PPROF_ENABLED=false` + `--signer.address=` + `--signer.address=` + `OP_BATCHER_SIGNER_ADDRESS=` -### pprof.path +#### signer.endpoint -pprof file path. If it is a directory, the path is `{dir}/{profileType}.prof`. +Signer endpoint the client will connect to. - `--pprof.path=` - `--pprof.path=` - `OP_BATCHER_PPROF_PATH=` + `--signer.endpoint=` + `--signer.endpoint=` + `OP_BATCHER_SIGNER_ENDPOINT=` -### pprof.port +#### signer.header -pprof listening port. The default value is `6060`. +Headers to pass to the remote signer. Format `key=value`.\ +Value can contain any character allowed in an HTTP header.\ +When using env vars, split multiple headers with commas.\ +When using flags, provide one key-value pair per flag. - `--pprof.port=` - `--pprof.port=6060` - `OP_BATCHER_PPROF_PORT=6060` + `--signer.header=` + `--signer.header="Authorization=Bearer 123abc"` + `OP_BATCHER_SIGNER_HEADER=Authorization=Bearer 123abc` -### pprof.type +#### signer.tls.ca -pprof profile type. One of cpu, heap, goroutine, threadcreate, block, mutex, -allocs. +tls ca cert path. The default value is `tls/ca.crt`. - `--pprof.type=` - `--pprof.type` - `OP_BATCHER_PPROF_TYPE=` + `--signer.tls.ca=` + `--signer.tls.ca=tls/ca.crt` + `OP_BATCHER_SIGNER_TLS_CA=tls/ca.crt` -### private-key +#### signer.tls.cert -The private key to use with the service. Must not be used with mnemonic. +tls cert path. The default value is `tls/tls.crt`. - `--private-key=` - `--private-key=` - `OP_BATCHER_PRIVATE_KEY=` + `--signer.tls.cert=` + `--signer.tls.cert=tls/tls.crt` + `OP_BATCHER_SIGNER_TLS_CERT=` -### resubmission-timeout +#### signer.tls.key -Duration we will wait before resubmitting a transaction to L1. The default -value is `48s`. +tls key. The default value is `tls/tls.key`. - `--resubmission-timeout=` - `--resubmission-timeout=48s` - `OP_BATCHER_RESUBMISSION_TIMEOUT=48s` + `--signer.tls.key=` + `--signer.tls.key=tls/tls.key` + `OP_BATCHER_SIGNER_TLS_KEY=` + + +### Network connections + +#### l1-eth-rpc + +HTTP provider URL for L1. + + + `--l1-eth-rpc=` + `--l1-eth-rpc` + `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. + + + `--l2-eth-rpc=` + `--l2-eth-rpc=` + `OP_BATCHER_L2_ETH_RPC=` -### rollup-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 @@ -634,7 +638,7 @@ provided. `OP_BATCHER_ROLLUP_RPC=` -### rpc.addr +#### rpc.addr rpc listening address. The default value is `0.0.0.0`. @@ -644,7 +648,7 @@ rpc listening address. The default value is `0.0.0.0`. `OP_BATCHER_RPC_ADDR=0.0.0.0` -### rpc.enable-admin +#### rpc.enable-admin Enable the admin API. The default value is `false`. @@ -654,7 +658,7 @@ Enable the admin API. The default value is `false`. `OP_BATCHER_RPC_ENABLE_ADMIN=false` -### rpc.port +#### rpc.port rpc listening port. The default value is `8545`. @@ -664,250 +668,210 @@ rpc listening port. The default value is `8545`. `OP_BATCHER_RPC_PORT=8545` -### safe-abort-nonce-too-low-count +#### network-timeout -Number of ErrNonceTooLow observations required to give up on a tx at a -particular nonce without receiving confirmation. The default value is `3`. +Timeout for all network operations. The default value is `10s`. - `--safe-abort-nonce-too-low-count=` - `--safe-abort-nonce-too-low-count=3` - `OP_BATCHER_SAFE_ABORT_NONCE_TOO_LOW_COUNT=3` + `--network-timeout=` + `--network-timeout=10s` + `OP_BATCHER_NETWORK_TIMEOUT=10s` -### sequencer-hd-path - -DEPRECATED: The HD path used to derive the sequencer wallet from the mnemonic. -The mnemonic flag must also be set. - - - `--sequencer-hd-path=` - `--sequencer-hd-path` - `OP_BATCHER_SEQUENCER_HD_PATH=` - +### Alt-DA mode (Beta feature) -### signer.address +#### altda.enabled -Address the signer is signing transactions for. +Enable Alt-DA mode, Alt-DA mode is 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. +The default value is `false`. - `--signer.address=` - `--signer.address=` - `OP_BATCHER_SIGNER_ADDRESS=` + `--altda.enabled=` + `--altda.enabled=false` + `OP_BATCHER_ALTDA_ENABLED=false` -### signer.endpoint +#### altda.da-server -Signer endpoint the client will connect to. +HTTP address of a DA Server. - `--signer.endpoint=` - `--signer.endpoint=` - `OP_BATCHER_SIGNER_ENDPOINT=` + `--altda.da-server=` + `--altda.da-server=http://da.example.com:1234` + `$OP_BATCHER_ALTDA_DA_SERVER=http://da.example.com:1234` -### signer.header +#### altda.da-service -Headers to pass to the remote signer. Format `key=value`.\ -Value can contain any character allowed in an HTTP header.\ -When using env vars, split multiple headers with commas.\ -When using flags, provide one key-value pair per flag. +Use DA service type where commitments are generated by Alt-DA server. The default +value is `false`. - `--signer.header=` - `--signer.header="Authorization=Bearer 123abc"` - `OP_BATCHER_SIGNER_HEADER=Authorization=Bearer 123abc` + `--altda.da-service=` + `--altda.da-service=true` + `$OP_BATCHER_ALTDA_DA_SERVER=true` -### signer.tls.ca +#### altda.get-timeout -tls ca cert path. The default value is `tls/ca.crt`. +Timeout for get requests. **0 means no timeout**. - `--signer.tls.ca=` - `--signer.tls.ca=tls/ca.crt` - `OP_BATCHER_SIGNER_TLS_CA=tls/ca.crt` + `--altda.get-timeout=` + `--altda.get-timeout=5s` + `OP_BATCHER_ALTDA_GET_TIMEOUT=5s` -### signer.tls.cert +#### altda.put-timeout -tls cert path. The default value is `tls/tls.crt`. +Timeout for put requests. **0 means no timeout**. - `--signer.tls.cert=` - `--signer.tls.cert=tls/tls.crt` - `OP_BATCHER_SIGNER_TLS_CERT=` + `--altda.put-timeout=` + `--altda.put-timeout=10s` + `OP_BATCHER_ALTDA_PUT_TIMEOUT=10s` -### signer.tls.key +#### altda.max-concurrent-da-requests -tls key. The default value is `tls/tls.key`. +Maximum number of concurrent requests to the DA server. - `--signer.tls.key=` - `--signer.tls.key=tls/tls.key` - `OP_BATCHER_SIGNER_TLS_KEY=` + `--altda.max-concurrent-da-requests=` + `--altda.max-concurrent-da-requests=4` + `OP_BATCHER_ALTDA_MAX_CONCURRENT_DA_REQUESTS=4` -### stopped +#### altda.verify-on-read -Initialize the batcher in a stopped state. The batcher can be started using the -admin\_startBatcher RPC. The default value is `false`. +Verify input data matches the commitments from the DA storage service. - `--stopped=` - `--stopped=false` - `OP_BATCHER_STOPPED=false` + `--altda.verify-on-read=` + `--altda.verify-on-read=true` + `OP_BATCHER_ALTDA_VERIFY_ON_READ=true` -### sub-safety-margin +### Logging and monitoring -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. The default value is `10`. - - - `--sub-safety-margin=` - `--sub-safety-margin=10` - `OP_BATCHER_SUB_SAFETY_MARGIN=10s` - - -### target-num-frames +#### log.level -The target number of frames to create per channel. Controls number of blobs per -blob tx, if using Blob DA. The default value is `1`. +The lowest log level that will be output. The default value is `INFO`. - `--target-num-frames=` - `--target-num-frames=1` - `OP_BATCHER_TARGET_NUM_FRAMES=1` + `--log.level=` + `--log.level=INFO` + `OP_BATCHER_LOG_LEVEL=INFO` -### throttle-always-block-size +#### log.format -The total DA limit to start imposing on block building **at all times**. +Format the log output. Supported formats: 'text', 'terminal', 'logfmt', 'json', +'json-pretty'. The default value is `text`. - `--throttle-always-block-size=` - `--throttle-always-block-size=250000` - `OP_BATCHER_THROTTLE_ALWAYS_BLOCK_SIZE=250000` + `--log.format=` + `--log.format=text` + `OP_BATCHER_LOG_FORMAT=text` -### throttle-block-size +#### log.color -The total DA limit to start imposing on block building **when we are over the throttle threshold**. +Color the log output if in terminal mode. The default value is `false`. - `--throttle-block-size=` - `--throttle-block-size=50000` - `OP_BATCHER_THROTTLE_BLOCK_SIZE=50000` + `--log.color=` + `--log.color=false` + `OP_BATCHER_LOG_COLOR=false` -*** - -### throttle-threshold +#### log.pid -Threshold on `pending-blocks-bytes-current` beyond which the batcher instructs the\ -block builder to start throttling transactions with larger DA demands. **Zero disables throttling**. +Show PID in the log. - `--throttle-threshold=` - `--throttle-threshold=1500000` - `OP_BATCHER_THROTTLE_THRESHOLD=1500000` + `--log.pid=` + `--log.pid=true` + `OP_BATCHER_LOG_PID=true` -*** - -### throttle-tx-size +#### metrics.enabled -The DA size of transactions at which throttling begins **when we are over the throttle threshold**. +Enable the metrics server. The default value is `false`. - `--throttle-tx-size=` - `--throttle-tx-size=10000` - `OP_BATCHER_THROTTLE_TX_SIZE=10000` + `--version=` + `--version=false` -### txmgr.fee-limit-threshold - -The minimum threshold (in GWei) at which fee bumping starts to be capped. -Allows arbitrary fee bumps below this threshold. The default value is `100`. - - `--txmgr.fee-limit-threshold=` - `--txmgr.fee-limit-threshold=100` - `OP_BATCHER_TXMGR_FEE_LIMIT_THRESHOLD=100` - +### Miscellaneous -### txmgr.min-basefee +#### active-sequencer-check-duration -Enforces a minimum base fee (in GWei) to assume when determining tx fees. 1 -GWei by default. The default value is `1`. +The duration between checks to determine the active sequencer endpoint. The +default value is `2m0s`. - `--txmgr.min-basefee=` - `--txmgr.min-basefee=1` - `OP_BATCHER_TXMGR_MIN_BASEFEE=1` + `--active-sequencer-check-duration=` + `--active-sequencer-check-duration=2m0s` + `OP_BATCHER_ACTIVE_SEQUENCER_CHECK_DURATION=2m0s` -### txmgr.min-tip-cap +#### pprof.addr -Enforces a minimum tip cap (in GWei) to use when determining tx fees. 1 GWei by -default. The default value is `1`. +pprof listening address. The default value is `0.0.0.0`. - `--txmgr.min-tip-cap=` - `--txmgr.min-tip-cap=1` - `OP_BATCHER_TXMGR_MIN_TIP_CAP=1` + `--pprof.addr=` + `--pprof.addr=0.0.0.0` + `OP_BATCHER_PPROF_ADDR=0.0.0.0` -### txmgr.not-in-mempool-timeout +#### pprof.enabled -Timeout for aborting a tx send if the tx does not make it to the mempool. The -default value is `2m0s`. +Enable the pprof server. The default value is `false`. - `--txmgr.not-in-mempool-timeout=` - `--txmgr.not-in-mempool-timeout=2m0s` - `OP_BATCHER_TXMGR_TX_NOT_IN_MEMPOOL_TIMEOUT=2m0s` + `--pprof.enabled=` + `--pprof.enabled=false` + `OP_BATCHER_PPROF_ENABLED=false` -### txmgr.receipt-query-interval +#### pprof.path -Frequency to poll for receipts. The default value is `12s`. +pprof file path. If it is a directory, the path is `{dir}/{profileType}.prof`. - `--txmgr.receipt-query-interval=` - `--txmgr.receipt-query-interval=12s` - `OP_BATCHER_TXMGR_RECEIPT_QUERY_INTERVAL=12s` + `--pprof.path=` + `--pprof.path=` + `OP_BATCHER_PPROF_PATH=` -### txmgr.send-timeout +#### pprof.port -Timeout for sending transactions. If 0 it is disabled. The default value is -`0s`. +pprof listening port. The default value is `6060`. - `--txmgr.send-timeout=` - `--txmgr.send-timeout=0s` - `OP_BATCHER_TXMGR_TX_SEND_TIMEOUT=0s` + `--pprof.port=` + `--pprof.port=6060` + `OP_BATCHER_PPROF_PORT=6060` -### wait-node-sync +#### pprof.type -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. The default value is `false`. +pprof profile type. One of cpu, heap, goroutine, threadcreate, block, mutex, +allocs. - `--wait-node-sync=` - `--wait-node-sync=false` - `OP_BATCHER_WAIT_NODE_SYNC=false` + `--pprof.type=` + `--pprof.type` + `OP_BATCHER_PPROF_TYPE=` -## Miscellaneous - -### help +#### help Show help. The default value is false. @@ -916,7 +880,7 @@ Show help. The default value is false. `--help=false` -### version +#### version Print the version. The default value is false. @@ -924,4 +888,3 @@ Print the version. The default value is false. `--version=` `--version=false` -