Skip to content

Conversation

frisitano
Copy link
Collaborator

Overview

This PR modifies the indexing of L1 messages such that we correctly handle the boundary from V1 to V2. Additionally, we update the derivation pipeline to leverage the l1_v2_message_queue_start_index when it encounters a batch with a prev_l1_message_queue_hash == B256::ZERO (the first batch after the migration to the V2 message queue).

Testing

I have tested this on Sepolia and it is working fine. I would propose we open an issue to improve test coverage of this, but I would like to proceed with implementing an RPC endpoint for rolling back the database to an L1 block, as it is more pressing.

@frisitano frisitano requested a review from jonastheis September 3, 2025 05:13
jonastheis
jonastheis previously approved these changes Sep 3, 2025
}

/// Computes the queue hash by taking the previous queue hash and performing a 2-to-1 hash with the
/// current transaction hash using keccak. It then applies a mask which is required for the kzg
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: the mask is not required for kzg. We mask it because in the contract we also store the timestamp when the message was appended to the queue in the last few bits

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

thanks for clarifying, I updated the comment.

@frisitano frisitano merged commit 5509e7b into main Sep 3, 2025
12 of 13 checks passed
@frisitano frisitano deleted the fix/l1-message-indexing branch September 3, 2025 06:22
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