ethereum-optimism / ethereum-optimism/optimism

Improve safe guards when updating the batcher on the SystemConfig

Open
#18,246 1 comment 0 reactions 0 assignees View on GitHub
M-needs-triage
Dominant language
Go
Stars
6.5k
Forks
4k
Avg merge
2d 15h
Merged PRs (30d)
145

Description

**Is your feature request related to a problem? Please describe.**

- If you want to update the batcher address on your OP Stack chain, you do so via the SystemConfig contract's `setBatcherHash` function ([src](https://github.com/ethereum-optimism/optimism/blob/6275d2836c2740adad0668eb67cb8a00f7268df7/packages/contracts-bedrock/src/L1/SystemConfig.sol#L333-L346)).
- However, if you make a mistake when updating the address (which we've seen someone do by accidentally not setting left-padded zeros), you will put the op-node into a critical error state when they derive that L1 block. ([l1_traversal.go](https://github.com/ethereum-optimism/optimism/blob/84152b267a0787c3f8eba092ce3b687cc8c21463/op-node/rollup/derive/l1_traversal.go#L78-L81) and [system_config.go](https://github.com/ethereum-optimism/optimism/blob/84152b267a0787c3f8eba092ce3b687cc8c21463/op-node/rollup/derive/system_config.go#L91-L94))

**Describe the solution you'd like**

If a malformed batcher hash is used on the SystemConfig, it should be a failure to update and maybe also add in a check around version/event where it doesn't know the version, then it's a critical error.

**Describe alternatives you've considered**

You can mitigate this with a local build which ignores this error, but is inappropriate for general use.

**Additional context**

We had one of our partners who was working on a staging network hit this

Contributor guide

Open the contributing guide

Research direction

Start with setBatcherHash in packages/contracts-bedrock/src/L1/SystemConfig.sol, then trace the related handling in op-node/rollup/derive/l1_traversal.go and system_config.go. Review how malformed batcher hashes and unknown versions or events reach critical errors. Done means malformed batcher updates fail safely without putting op-node into a critical error state.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, solidity
Domain
backend, blockchain
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.