feat: use log id for interop root indexing#1143
Open
Artemka374-claude wants to merge 1 commit intomatter-labs:mainfrom
Open
feat: use log id for interop root indexing#1143Artemka374-claude wants to merge 1 commit intomatter-labs:mainfrom
Artemka374-claude wants to merge 1 commit intomatter-labs:mainfrom
Conversation
Rebased onto current main and supersedes the outdated merge-follow-up flow.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the compound
InteropRootsLogIndex(block number + index-in-block) with a plainu64log ID (totalPublishedInteropRootscounter from theIMessageRootcontract) everywhere interop root indexing was used.InteropRootsLogIndexis removed from all live codepaths (mempool, sequencer, storage, block context provider, interop watcher). It is kept only for backward-compat with the v1 and v2 network wire format.MessageRoot.totalPublishedInteropRootsto find the correct starting L1 block, replacing the previous approach of storing the block number directly.SystemTxEnvelope::import_interop_rootsnow takeslog_idas an explicit salt to ensure transaction uniqueness.starting_interop_event_indextostarting_interop_root_id(note: existing DBs will not have this column and will fall back to0).This PR is the clean rebased replacement for the outdated merge-follow-up flow from #1092 / #1142.
Testing
cargo nextest run --workspace --exclude zksync_os_integration_testsPATH="$HOME/.foundry/bin:$PATH" cargo nextest run -p zksync_os_integration_tests --profile no-pig