Skip to content

fix(pruner): skip pruning when L1 head or chain height is missing#3616

Merged
rodrodros merged 2 commits intomainfrom
fix/pruner-skip-on-missing-db-keys
May 9, 2026
Merged

fix(pruner): skip pruning when L1 head or chain height is missing#3616
rodrodros merged 2 commits intomainfrom
fix/pruner-skip-on-missing-db-keys

Conversation

@EgeCaner
Copy link
Copy Markdown
Contributor

@EgeCaner EgeCaner commented May 8, 2026

Skip pruning when the L1 head or chain height isn't yet in the DB. On a fresh node the sync and L1 services race during startup, so the first onNewL1Head / onNewBlock callback can fire before the counterpart has been persisted, treat that as a no-op instead of erroring out.

@EgeCaner EgeCaner requested a review from rodrodros May 8, 2026 10:21
@codecov
Copy link
Copy Markdown

codecov Bot commented May 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.92%. Comparing base (dd42f66) to head (808316a).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3616      +/-   ##
==========================================
+ Coverage   75.86%   75.92%   +0.06%     
==========================================
  Files         387      387              
  Lines       34909    34917       +8     
==========================================
+ Hits        26484    26512      +28     
+ Misses       6555     6541      -14     
+ Partials     1870     1864       -6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@rodrodros rodrodros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this doesn't solve the issue completely. I believe there is a better way of implementing this

Comment thread pruner/pruner.go
Comment thread pruner/pruner.go
@rodrodros rodrodros enabled auto-merge (squash) May 8, 2026 15:09
@rodrodros rodrodros merged commit ee24986 into main May 9, 2026
14 checks passed
@rodrodros rodrodros deleted the fix/pruner-skip-on-missing-db-keys branch May 9, 2026 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants