ethereum-optimism / ethereum-optimism/optimism
op-batcher: stay in sync with op-node rollup config
- Dominant language
- Go
- Stars
- 6.5k
- Forks
- 4k
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 145
Description
Upon startup, the op-batcher fetches the rollup config from the op-node over RPC. It never fetches the rollup config after that.
https://github.com/ethereum-optimism/optimism/blob/40554025301e5adde90191adba6ad432e185fa50/op-batcher/batcher/service.go#L238-L253
This is problematic during hard forks when the system deposit transaction format changes: an outdated rollup config will result in an error from which the batcher cannot recover without restarting.
https://github.com/ethereum-optimism/optimism/blob/40554025301e5adde90191adba6ad432e185fa50/op-batcher/batcher/driver.go#L310
```
failed to parse L1 info deposit tx from L2 block: data is unexpected length: 178
```
The op-batcher should stay in sync with the op-node's rollup config.
One solution is to fetch the rollup config if the above error is hit. An alternative is to for the batcher to restart itself automatically.
Contributor guide
Research direction
Read op-batcher/batcher/service.go around lines 238-253 to understand the startup rollup-config fetch, then inspect op-batcher/batcher/driver.go around line 310 and the reported deposit-transaction error. Define how the batcher should refresh or recover when the rollup config becomes outdated, and verify that it can continue after the hard-fork format change without a manual restart.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend, distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100