The Optimism Interop Monitor is a service that monitors Executing Messages between OP Protocol chains to detect and report any invalid messages on chains. It helps ensure the reliability and correctness of cross-chain communication.
Interop Monitor’s primary output is a collection of metrics which can alert operators for fast response and insight. The design of this service follows the Design Doc.
The service consists of several key components working together:
InteropMonitorService) that coordinates everythingFinder instances that scan chains for relevant transactionsUpdater instances that take jobs for their chain and update themMetricCollector that regularly scans ongoing jobs to emit gauge metricsThe components use a collection of channels, callbacks and visitor-pattern style data collection to share Job information.
flowchart TD
subgraph execution-client A
ra[RPC]
end
subgraph execution-client B
rb[RPC]
end
subgraph grafana
g[Grafana]
end
%% Main Monitoring Group
subgraph service["op-interop-mon"]
s[Service Routing]
m[Metric Collector]
fa[Chain A Finder]
fb[Chain B Finder]
ua[Chain A Updater️]
ub[Chain B Updater]
end
ra --"New Unsafe and Finalized Blocks"--> fa
ra --"Receipt Data for EM Validation"--> ua
fa --"Executing Messages and Finalized Block Info" --> s
s --"New Jobs and Finalized Block Info" --> ub
rb --"New Unsafe and Finalized Blocks"--> fb
rb --"Receipt Data for EM Validation"--> ub
fb --"Executing Messages and Finalized Block Info" --> s
s --"New Jobs and Finalized Block Info" --> ua
ua --"All Current Jobs"--> m
ub --"All Current Jobs"--> m
m --"Executing and Initiating Message Prometheus Stats"--> g
The MetricCollector consolidates metrics from all jobs across chains. It:
Updaters are chain specific processors that take jobs and update them:
jobs it is updatingjobs regularlyjobs based on Finality of both Initiating and Executing sideFinders scan individual chains for relevant transactions. Each Finder:
jobs for each relevant transaction foundjobs to the Finders (via a centralized router)jobs represent individual Executing Messages that need to be tracked. A job contains:
jobs move through different states (unknown -> valid/invalid/missing) as the updater processes them.