-
Notifications
You must be signed in to change notification settings - Fork 3
fix: l1 message indexing #295
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
Conversation
crates/chain-orchestrator/src/lib.rs
Outdated
} | ||
|
||
/// 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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
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 aprev_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.