github ethereum-optimism/optimism v1.9.5
op-stack v1.9.5 - Batcher Sequencer Throttling

2 days ago

❗ It is strongly recommended for all chain operators to upgrade to this release.

Highlights

Batcher Sequencer Throttling (ethereum-optimism/op-geth#421 #12735)

This release contains a new 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.

🎛️ There are two throttling knobs:

  • transaction L1 data throttling, which skips individual transactions whose estimated compressed L1 DA usage goes over a certain threshold, and
  • block L1 data throttling, which caps a block’s estimated total L1 DA usage and leads to not including transactions during block building that would move the block’s L1 DA usage past a certain threshold.

Upgrade path

This new feature is enabled by default and requires running op-geth version v1.101411.1 or later. It can be disabled by setting --throttle-interval to 0. The sequencer's op-geth node has to be updated first, before updating the batcher, so that the new required RPC is available at the time of the batcher restart.

op-conductor

It is required to upgrade to op-conductor/v0.2.0 if you are using conductor’s leader-aware rpc proxy feature. This conductor release includes support for the miner_setMaxDASize op-geth rpc proxy.

Configuration

Batcher

⚠️ Note that this feature requires the batcher to correctly follow the sequencer at all times, or it would set throttling parameters on a non-sequencer EL client. That means, active sequencer follow mode has to be enabled correctly by listing all the possible sequencers in the L2 rollup and EL endpoint flags.

The batcher can be configures with the following new flags and default parameters:

  • interval at which throttling operations happen (besides when loading an L2 block in the batcher) via --throttle-interval: 2s (env var OP_BATCHER_THROTTLE_INTERVAL)
    • This can be set to zero to completely disable this feature. Since it’s set to 2s by default, the feature is enabled by default.
  • backlog of pending block bytes beyond which the batcher will enable throttling on the sequencer via --throttle-threshold: 1_000_000 (batcher backlog of 1MB of data to batch)
    • env var OP_BATCHER_THROTTLE_THRESHOLD
  • individual tx size throttling via --throttle-tx-size: 300 (estimated compressed bytes)
    • env var OP_BATCHER_THROTTLE_TX_SIZE
  • block size throttling via --throttle-block-size: 21_000 (estimated total compressed bytes, at least 70 transactions per block of up to 300 compressed bytes each)
    • env var OP_BATCHER_THROTTLE_BLOCK_SIZE
  • block size throttling that’s always active via --throttle-always-block-size: 130_000
    • env var OP_BATCHER_THROTTLE_ALWAYS_BLOCK_SIZE
    • This block size limit is enforced on the sequencer at all times, even if there isn’t any backlog in the batcher. Normal network usage shouldn’t be impacted by this. This is to prevent a too fast build up of data to batch.

If the batcher at startup has throttling enabled and the sequencer’s op-geth node to which it’s talking hasn’t the miner_setMaxDASize RPC enabled, it will fail with an error message like

lvl=warn msg="Served miner_setMaxDASize" reqid=1 duration=11.22µs err="the method miner_setMaxDASize does not exist/is not available"

In this case, make sure the miner API namespace is enabled for the correct transport protocol (HTTP or WS), see next paragraph.

Sequencer

The new RPC miner_setMaxDASize is available in op-geth since v1.101411.1. It has to be enabled by adding the miner namespace to the correct API flags, like

  • GETH_HTTP_API: web3,debug,eth,txpool,net,miner
  • GETH_WS_API: debug,eth,txpool,net,miner

It is recommended to add it to both, HTTP and WS.

Other

  • A bug in the sequencer is fixed that may cause derivation to stall on flaky L1 connections (#12258).
  • This release also contains many incremental changes regarding Holocene and Interop feature development.

What's Changed

New Contributors (full monorepo)

Full Changelog: v1.9.4...v1.9.5

🚢 Docker Images:

https://us-docker.pkg.dev/oplabs-tools-artifacts/images/op-node:v1.9.5
https://us-docker.pkg.dev/oplabs-tools-artifacts/images/op-batcher:v1.9.5
https://us-docker.pkg.dev/oplabs-tools-artifacts/images/op-proposer:v1.9.5

Don't miss a new optimism release

NewReleases is sending notifications on new releases.