Skip to content

Conversation

@greged93
Copy link
Collaborator

Adds a skipped index and column on the l1 messages table in order to avoid sequencing skipped L1 messages.

@greged93 greged93 requested a review from frisitano October 21, 2025 12:13
@codspeed-hq
Copy link

codspeed-hq bot commented Oct 21, 2025

CodSpeed Performance Report

Merging #380 will not alter performance

Comparing feat/skipped-l1-messages (a0e7d00) with main (3d80ab8)

Summary

✅ 2 untouched

Copy link
Collaborator

@frisitano frisitano left a comment

Choose a reason for hiding this comment

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

Added a comment inline.

frisitano
frisitano previously approved these changes Oct 21, 2025
Copy link
Collaborator

@frisitano frisitano left a comment

Choose a reason for hiding this comment

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

lgtm

// queue index in descending order. This ensures that we get the latest message
// included in a block before the provided block number.
if let Some(record) = models::l1_message::Entity::find()
.filter(models::l1_message::Column::L2BlockNumber.lt(block_number as i64))
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should consider the case where the last message in a batch skipped and update the L1MessageKey::BlockNumber query to account for it.

@greged93 greged93 merged commit aac1ba7 into main Oct 21, 2025
14 of 15 checks passed
@greged93 greged93 deleted the feat/skipped-l1-messages branch October 21, 2025 13:10
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