Skip to content
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

feat: add assertion monitor #1837

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions .github/workflows/core-assertion-monitor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Monitor Core Assertion Events

on:
workflow_dispatch:
schedule:
# Run every 6 hours
- cron: "0 */6 * * *"

env:
NEXT_PUBLIC_INFURA_KEY: ${{ secrets.NEXT_PUBLIC_INFURA_KEY }}
ASSERTION_MONITORING_SLACK_TOKEN: ${{ secrets.CORE_CHAIN_ASSERTION_MONITORING_SLACK_TOKEN }}
ASSERTION_MONITORING_SLACK_CHANNEL: ${{ secrets.CORE_CHAIN_ASSERTION_MONITORING_SLACK_CHANNEL }}
NOVA_MONITOR_RPC_URL: ${{ secrets.NOVA_MONITOR_RPC_URL }}
ARB_ONE_MONITOR_RPC_URL: ${{ secrets.ARB_ONE_MONITOR_RPC_URL }}

jobs:
run-alerting:
runs-on: ubuntu-latest

steps:
- name: Checkout Bridge
uses: actions/checkout@v4
with:
repository: OffchainLabs/arbitrum-token-bridge

- name: Install node_modules
uses: OffchainLabs/actions/node-modules/install@main

- name: Generate chains JSON
run: yarn workspace arb-token-bridge-ui generateCoreChainsToMonitor
env:
NOVA_MONITOR_RPC_URL: ${{ secrets.NOVA_MONITOR_RPC_URL }}
ARB_ONE_MONITOR_RPC_URL: ${{ secrets.ARB_ONE_MONITOR_RPC_URL }}
ASSERTION_MONITORING: true

- name: Checkout Arbitrum Monitoring repository
uses: actions/checkout@v4
with:
repository: OffchainLabs/arbitrum-monitoring
path: arbitrum-monitoring
- name: Copy chains JSON to Arbitrum Monitoring
run: cp ./packages/arb-token-bridge-ui/public/__auto-generated-core-chains.json ./arbitrum-monitoring/packages/assertion-monitor/config.json

- name: Setup Node for Arbitrum Monitoring
uses: actions/setup-node@v4
with:
node-version: latest

- name: Install dependencies for Arbitrum Monitoring
run: cd ./arbitrum-monitoring && yarn install

- name: Run alerting command
run: cd ./arbitrum-monitoring && yarn assertion-monitor --enableAlerting
env:
NODE_ENV: "CI"
ASSERTION_MONITORING_SLACK_TOKEN: ${{ secrets.CORE_CHAIN_ASSERTION_MONITORING_SLACK_TOKEN }}
ASSERTION_MONITORING_SLACK_CHANNEL: ${{ secrets.CORE_CHAIN_ASSERTION_MONITORING_SLACK_CHANNEL }}

- name: Clean up
run: rm ./packages/arb-token-bridge-ui/public/__auto-generated-core-chains.json
56 changes: 56 additions & 0 deletions .github/workflows/orbit-assertion-monitor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Monitor Orbit Assertion Events

on:
workflow_dispatch:
schedule:
# Run every 6 hours
- cron: "0 */6 * * *"

env:
NEXT_PUBLIC_INFURA_KEY: ${{ secrets.NEXT_PUBLIC_INFURA_KEY }}
ASSERTION_MONITORING_SLACK_TOKEN: ${{ secrets.ORBIT_CHAIN_ASSERTION_MONITORING_SLACK_TOKEN }}
ASSERTION_MONITORING_SLACK_CHANNEL: ${{ secrets.ORBIT_CHAIN_ASSERTION_MONITORING_SLACK_CHANNEL }}

jobs:
run-alerting:
runs-on: ubuntu-latest

steps:
- name: Checkout Bridge
uses: actions/checkout@v4
with:
repository: OffchainLabs/arbitrum-token-bridge

- name: Install node_modules
uses: OffchainLabs/actions/node-modules/install@main

- name: Generate chains JSON
run: yarn workspace arb-token-bridge-ui generateOrbitChainsToMonitor

- name: Checkout Arbitrum Monitoring repository
uses: actions/checkout@v4
with:
repository: OffchainLabs/arbitrum-monitoring
path: arbitrum-monitoring

- name: Copy chains JSON to Arbitrum Monitoring
run: cp ./packages/arb-token-bridge-ui/public/__auto-generated-orbit-chains.json ./arbitrum-monitoring/packages/assertion-monitor/config.json

- name: Setup Node for Arbitrum Monitoring
uses: actions/setup-node@v4
with:
node-version: latest

- name: Install dependencies for Arbitrum Monitoring
run: cd ./arbitrum-monitoring && yarn install

- name: Run alerting command
run: cd ./arbitrum-monitoring && yarn assertion-monitor --enableAlerting
env:
NODE_ENV: "CI"
ASSERTION_MONITORING_SLACK_TOKEN: ${{ secrets.ORBIT_CHAIN_ASSERTION_MONITORING_SLACK_TOKEN }}
ASSERTION_MONITORING_SLACK_CHANNEL: ${{ secrets.ORBIT_CHAIN_ASSERTION_MONITORING_SLACK_CHANNEL }}


- name: Clean up
run: rm ./packages/arb-token-bridge-ui/public/__auto-generated-orbit-chains.json
Loading