From 1f5c87a9a349bb7728489e007bbb184e8cea4802 Mon Sep 17 00:00:00 2001 From: Doug <4741454+douglance@users.noreply.github.com> Date: Mon, 12 Aug 2024 11:42:31 -0400 Subject: [PATCH 1/6] add assertion monitor in CI --- .github/workflows/orbit-assertion-monitor.yml | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/workflows/orbit-assertion-monitor.yml diff --git a/.github/workflows/orbit-assertion-monitor.yml b/.github/workflows/orbit-assertion-monitor.yml new file mode 100644 index 0000000000..2befb8d73f --- /dev/null +++ b/.github/workflows/orbit-assertion-monitor.yml @@ -0,0 +1,57 @@ +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 + ref: dl/add-assertion-monitor + + - 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 From f71b1850b5e7707e83ad5e68c2bdf09f1df045b7 Mon Sep 17 00:00:00 2001 From: Doug <4741454+douglance@users.noreply.github.com> Date: Mon, 12 Aug 2024 13:31:51 -0400 Subject: [PATCH 2/6] adds core assertion monitor --- .github/workflows/core-assertion-monitor.yml | 61 ++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .github/workflows/core-assertion-monitor.yml diff --git a/.github/workflows/core-assertion-monitor.yml b/.github/workflows/core-assertion-monitor.yml new file mode 100644 index 0000000000..f83e62b115 --- /dev/null +++ b/.github/workflows/core-assertion-monitor.yml @@ -0,0 +1,61 @@ +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 From f30c9ed1e02d0929bd8ea4125fcd43809c00016c Mon Sep 17 00:00:00 2001 From: Doug <4741454+douglance@users.noreply.github.com> Date: Mon, 12 Aug 2024 13:32:07 -0400 Subject: [PATCH 3/6] fix ref --- .github/workflows/core-assertion-monitor.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/core-assertion-monitor.yml b/.github/workflows/core-assertion-monitor.yml index f83e62b115..8e871f051b 100644 --- a/.github/workflows/core-assertion-monitor.yml +++ b/.github/workflows/core-assertion-monitor.yml @@ -38,6 +38,7 @@ jobs: with: repository: OffchainLabs/arbitrum-monitoring path: arbitrum-monitoring + ref: dl/add-assertion-monitor - 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 From d3f9bf5ad8873109568084182e82cdbd9afcaee2 Mon Sep 17 00:00:00 2001 From: Doug <4741454+douglance@users.noreply.github.com> Date: Mon, 12 Aug 2024 13:33:08 -0400 Subject: [PATCH 4/6] updates trigger --- .github/workflows/core-assertion-monitor.yml | 1 + .github/workflows/orbit-assertion-monitor.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/core-assertion-monitor.yml b/.github/workflows/core-assertion-monitor.yml index 8e871f051b..48436912f3 100644 --- a/.github/workflows/core-assertion-monitor.yml +++ b/.github/workflows/core-assertion-monitor.yml @@ -1,6 +1,7 @@ name: Monitor Core Assertion Events on: + push: workflow_dispatch: schedule: # Run every 6 hours diff --git a/.github/workflows/orbit-assertion-monitor.yml b/.github/workflows/orbit-assertion-monitor.yml index 2befb8d73f..006f49a5eb 100644 --- a/.github/workflows/orbit-assertion-monitor.yml +++ b/.github/workflows/orbit-assertion-monitor.yml @@ -1,6 +1,7 @@ name: Monitor Orbit Assertion Events on: + push: workflow_dispatch: schedule: # Run every 6 hours From 8090d6688860691bc9ccd14429caca85057f1001 Mon Sep 17 00:00:00 2001 From: Doug <4741454+douglance@users.noreply.github.com> Date: Wed, 14 Aug 2024 13:03:34 -0400 Subject: [PATCH 5/6] update refs to main --- .github/workflows/core-assertion-monitor.yml | 2 -- .github/workflows/orbit-assertion-monitor.yml | 1 - 2 files changed, 3 deletions(-) diff --git a/.github/workflows/core-assertion-monitor.yml b/.github/workflows/core-assertion-monitor.yml index 48436912f3..92e559d219 100644 --- a/.github/workflows/core-assertion-monitor.yml +++ b/.github/workflows/core-assertion-monitor.yml @@ -39,8 +39,6 @@ jobs: with: repository: OffchainLabs/arbitrum-monitoring path: arbitrum-monitoring - ref: dl/add-assertion-monitor - - 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 diff --git a/.github/workflows/orbit-assertion-monitor.yml b/.github/workflows/orbit-assertion-monitor.yml index 006f49a5eb..bd21ed0633 100644 --- a/.github/workflows/orbit-assertion-monitor.yml +++ b/.github/workflows/orbit-assertion-monitor.yml @@ -33,7 +33,6 @@ jobs: with: repository: OffchainLabs/arbitrum-monitoring path: arbitrum-monitoring - ref: dl/add-assertion-monitor - 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 From 6dba9fbe316812fb6a97f60e2464eef78a6c3b63 Mon Sep 17 00:00:00 2001 From: Doug <4741454+douglance@users.noreply.github.com> Date: Wed, 14 Aug 2024 14:12:40 -0400 Subject: [PATCH 6/6] removes push triggers --- .github/workflows/core-assertion-monitor.yml | 1 - .github/workflows/orbit-assertion-monitor.yml | 1 - 2 files changed, 2 deletions(-) diff --git a/.github/workflows/core-assertion-monitor.yml b/.github/workflows/core-assertion-monitor.yml index 92e559d219..30390e5829 100644 --- a/.github/workflows/core-assertion-monitor.yml +++ b/.github/workflows/core-assertion-monitor.yml @@ -1,7 +1,6 @@ name: Monitor Core Assertion Events on: - push: workflow_dispatch: schedule: # Run every 6 hours diff --git a/.github/workflows/orbit-assertion-monitor.yml b/.github/workflows/orbit-assertion-monitor.yml index bd21ed0633..abde38447f 100644 --- a/.github/workflows/orbit-assertion-monitor.yml +++ b/.github/workflows/orbit-assertion-monitor.yml @@ -1,7 +1,6 @@ name: Monitor Orbit Assertion Events on: - push: workflow_dispatch: schedule: # Run every 6 hours