optimism

Optimism Interop Monitor

Purpose

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.

Architecture

The service consists of several key components working together:

The 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

MetricCollector

The MetricCollector consolidates metrics from all jobs across chains. It:

Updaters

Updaters are chain specific processors that take jobs and update them:

Finders

Finders scan individual chains for relevant transactions. Each Finder:

Jobs

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.