Skip to content

feat: use log id for interop root indexing#1143

Open
Artemka374-claude wants to merge 1 commit intomatter-labs:mainfrom
Artemka374-claude:track/dispatch-1775216888307594605
Open

feat: use log id for interop root indexing#1143
Artemka374-claude wants to merge 1 commit intomatter-labs:mainfrom
Artemka374-claude:track/dispatch-1775216888307594605

Conversation

@Artemka374-claude
Copy link
Copy Markdown
Contributor

Summary

Replaces the compound InteropRootsLogIndex (block number + index-in-block) with a plain u64 log ID (totalPublishedInteropRoots counter from the IMessageRoot contract) everywhere interop root indexing was used.

  • InteropRootsLogIndex is 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.
  • The interop watcher now uses a binary search over MessageRoot.totalPublishedInteropRoots to find the correct starting L1 block, replacing the previous approach of storing the block number directly.
  • SystemTxEnvelope::import_interop_roots now takes log_id as an explicit salt to ensure transaction uniqueness.
  • The RocksDB WAL column family is renamed from starting_interop_event_index to starting_interop_root_id (note: existing DBs will not have this column and will fall back to 0).

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_tests
  • PATH="$HOME/.foundry/bin:$PATH" cargo nextest run -p zksync_os_integration_tests --profile no-pig

Rebased onto current main and supersedes the outdated merge-follow-up flow.
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.

1 participant