Skip to content

Conversation

@frisitano
Copy link
Collaborator

Overview

We run into an issue in which, on startup, we do not correctly clear batches and set the starting L2 safe block. This edge case occurs when multiple batches are present in the same L1 block. This led to an invalid reorg.

Previously, we would only clear the latest batch, but when we resync the L1 and process the L1 block, it would trigger an L1 consolidation of all batches contained in the L1 block instead of just the latest, which was deleted. As such, we now delete all batches included in the L1 block on startup.

@frisitano frisitano requested a review from greged93 September 25, 2025 14:44
greged93
greged93 previously approved these changes Sep 25, 2025
Copy link
Collaborator

@greged93 greged93 left a comment

Choose a reason for hiding this comment

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

lgtm! left some small nits inline, feel free to merge

Co-authored-by: greg <82421016+greged93@users.noreply.github.com>
Co-authored-by: greg <82421016+greged93@users.noreply.github.com>
@frisitano frisitano requested a review from greged93 September 25, 2025 15:10
@frisitano frisitano merged commit 625686c into main Sep 25, 2025
13 checks passed
@frisitano frisitano deleted the fix/batches-on-startup branch September 25, 2025 15:34
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.

3 participants