Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

op-batcher: DA metrics not reset when state is cleared #14764

Closed
geoknee opened this issue Mar 10, 2025 · 0 comments · Fixed by #14780
Closed

op-batcher: DA metrics not reset when state is cleared #14764

geoknee opened this issue Mar 10, 2025 · 0 comments · Fixed by #14780
Assignees
Labels
A-op-batcher Area: op-batcher C-bug Category: bugs

Comments

@geoknee
Copy link
Contributor

geoknee commented Mar 10, 2025

Under certain conditions, the batcher will clear it's state and "start fresh". However, it is not always resetting metrics which need to stay in sync with the state which is now cleared.

// Clear clears the entire state of the channel manager.
// It is intended to be used before launching op-batcher and after an L2 reorg.
func (s *channelManager) Clear(l1OriginLastSubmittedChannel eth.BlockID) {
s.log.Trace("clearing channel manager state")
s.blocks.Clear()
s.blockCursor = 0
s.l1OriginLastSubmittedChannel = l1OriginLastSubmittedChannel
s.tip = common.Hash{}
s.currentChannel = nil
s.channelQueue = nil
s.metr.RecordChannelQueueLength(0)
s.txChannels = make(map[string]*channel)
}

The channel queue length metric is correctly reset, but we need to do something similar for pendingDABytes, otherwise the batcher may needlessly be throttling the sequencer.

@geoknee geoknee added M-needs-triage Meta: this issue needs to be labelled A-op-batcher Area: op-batcher labels Mar 10, 2025
@geoknee geoknee self-assigned this Mar 10, 2025
@geoknee geoknee removed the M-needs-triage Meta: this issue needs to be labelled label Mar 10, 2025
@sebastianst sebastianst added the C-bug Category: bugs label Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-op-batcher Area: op-batcher C-bug Category: bugs
Projects
None yet
2 participants