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

batcher: fix state inconsistency #12981

Merged
merged 7 commits into from
Nov 27, 2024
Merged

batcher: fix state inconsistency #12981

merged 7 commits into from
Nov 27, 2024

Conversation

geoknee
Copy link
Contributor

@geoknee geoknee commented Nov 19, 2024

The new batcher got into a bad state when rolled out to devnet.

  1. The batcher started up and behaved normally
  2. The sequencer restarted
  3. When it came back up, it's safe head went backwards
  4. The batcher detected this, and tried to clear out its state and start work from the new safe head
  5. It did not clear its state properly, and the consistency caused it to constantly run into 4 over and over.

This PR removes some redundant state which was not being cleared, which should fix the problem.

@sebastianst sebastianst added the A-op-batcher Area: op-batcher label Nov 20, 2024
@sebastianst sebastianst added this to the Holocene: Derivation milestone Nov 20, 2024
op-batcher/batcher/driver.go Outdated Show resolved Hide resolved
Copy link

codecov bot commented Nov 27, 2024

Codecov Report

Attention: Patch coverage is 4.34783% with 22 lines in your changes missing coverage. Please review.

Project coverage is 42.85%. Comparing base (601af96) to head (2234b92).
Report is 5 commits behind head on develop.

Files with missing lines Patch % Lines
op-batcher/batcher/driver.go 0.00% 17 Missing ⚠️
op-batcher/batcher/channel_manager.go 16.66% 5 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #12981      +/-   ##
===========================================
- Coverage    44.55%   42.85%   -1.70%     
===========================================
  Files          799      743      -56     
  Lines        71845    67184    -4661     
===========================================
- Hits         32009    28792    -3217     
+ Misses       37230    35968    -1262     
+ Partials      2606     2424     -182     
Flag Coverage Δ
cannon-go-tests-32 ?
cannon-go-tests-64 ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
op-batcher/batcher/channel_manager.go 86.92% <16.66%> (-1.17%) ⬇️
op-batcher/batcher/driver.go 3.84% <0.00%> (+0.01%) ⬆️

... and 62 files with indirect coverage changes

@geoknee geoknee marked this pull request as ready for review November 27, 2024 21:06
@geoknee geoknee requested review from a team as code owners November 27, 2024 21:06
@geoknee geoknee requested a review from axelKingsley November 27, 2024 21:06
@geoknee geoknee enabled auto-merge November 27, 2024 21:21
@geoknee geoknee added this pull request to the merge queue Nov 27, 2024
Merged via the queue into develop with commit 8ee0387 Nov 27, 2024
45 checks passed
@geoknee geoknee deleted the gk/new-batcher-fix branch November 27, 2024 21:34
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
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

batcher: live-lock caused by incomplete state clearing when sequencer restarts
3 participants