-
Notifications
You must be signed in to change notification settings - Fork 203
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into feat-dont-require-w…
…allet
- Loading branch information
Showing
31 changed files
with
668 additions
and
498 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Assertion Monitor | ||
|
||
on: | ||
push: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 */6 * * *" # Run every 6 hours | ||
|
||
jobs: | ||
run-monitoring: | ||
name: Assertion Monitor (${{ matrix.chain }}) | ||
strategy: | ||
matrix: | ||
chain: [core, orbit] | ||
uses: ./.github/workflows/monitoring.yml | ||
with: | ||
chain: ${{ matrix.chain }} | ||
monitor: assertion | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Batch Poster Monitor | ||
|
||
on: | ||
push: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 */6 * * *" # Run every 6 hours | ||
|
||
jobs: | ||
run-monitoring: | ||
name: Batch Poster Monitor (${{ matrix.chain }}) | ||
strategy: | ||
matrix: | ||
chain: [core, orbit] | ||
uses: ./.github/workflows/monitoring.yml | ||
with: | ||
chain: ${{ matrix.chain }} | ||
monitor: batch-poster | ||
secrets: inherit |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"core": { | ||
"generateCommand": "generateCoreChainsToMonitor", | ||
"configFile": "__auto-generated-core-chains.json", | ||
"slackTokens": { | ||
"assertion": "CORE_CHAIN_ASSERTION_MONITORING_SLACK_TOKEN", | ||
"batch-poster": "CORE_CHAIN_BATCH_POSTER_MONITORING_SLACK_TOKEN", | ||
"retryable": "CORE_CHAIN_RETRYABLE_MONITORING_SLACK_TOKEN" | ||
}, | ||
"slackChannels": { | ||
"assertion": "CORE_CHAIN_ASSERTION_MONITORING_SLACK_CHANNEL", | ||
"batch-poster": "CORE_CHAIN_BATCH_POSTER_MONITORING_SLACK_CHANNEL", | ||
"retryable": "CORE_CHAIN_RETRYABLE_MONITORING_SLACK_CHANNEL" | ||
} | ||
}, | ||
"orbit": { | ||
"generateCommand": "generateOrbitChainsToMonitor", | ||
"configFile": "__auto-generated-orbit-chains.json", | ||
"slackTokens": { | ||
"assertion": "ORBIT_CHAIN_ASSERTION_MONITORING_SLACK_TOKEN", | ||
"batch-poster": "ORBIT_CHAIN_BATCH_POSTER_MONITORING_SLACK_TOKEN", | ||
"retryable": "ORBIT_RETRYABLE_MONITORING_SLACK_TOKEN" | ||
}, | ||
"slackChannels": { | ||
"assertion": "ORBIT_CHAIN_ASSERTION_MONITORING_SLACK_CHANNEL", | ||
"batch-poster": "ORBIT_CHAIN_BATCH_POSTER_MONITORING_SLACK_CHANNEL", | ||
"retryable": "ORBIT_RETRYABLE_MONITORING_SLACK_CHANNEL" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: Reusable Monitoring Workflow | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
chain: | ||
required: true | ||
type: string | ||
monitor: | ||
required: true | ||
type: string | ||
|
||
env: | ||
NEXT_PUBLIC_INFURA_KEY: ${{ secrets.NEXT_PUBLIC_INFURA_KEY }} | ||
NOVA_MONITOR_RPC_URL: ${{ secrets.NOVA_MONITOR_RPC_URL }} | ||
ARB_ONE_MONITOR_RPC_URL: ${{ secrets.ARB_ONE_MONITOR_RPC_URL }} | ||
NODE_ENV: "CI" | ||
|
||
jobs: | ||
run-monitoring: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repositories | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: OffchainLabs/arbitrum-token-bridge | ||
|
||
- name: Install node_modules | ||
uses: OffchainLabs/actions/node-modules/install@main | ||
|
||
- name: Checkout Arbitrum Monitoring repository | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: OffchainLabs/arbitrum-monitoring | ||
path: arbitrum-monitoring | ||
|
||
- name: Setup Node and install dependencies | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: latest | ||
- run: cd ./arbitrum-monitoring && yarn install | ||
|
||
- name: Load configuration | ||
id: config | ||
run: | | ||
CONFIG=$(cat .github/workflows/monitor-config.json | jq -r '.${{ inputs.chain }}') | ||
echo "generate_command=$(echo $CONFIG | jq -r '.generateCommand')" >> $GITHUB_OUTPUT | ||
echo "config_file=$(echo $CONFIG | jq -r '.configFile')" >> $GITHUB_OUTPUT | ||
echo "slack_token=$(echo $CONFIG | jq -r '.slackTokens.${{ inputs.monitor }}')" >> $GITHUB_OUTPUT | ||
echo "slack_channel=$(echo $CONFIG | jq -r '.slackChannels.${{ inputs.monitor }}')" >> $GITHUB_OUTPUT | ||
- name: Generate chains JSON | ||
run: yarn workspace arb-token-bridge-ui ${{ steps.config.outputs.generate_command }} | ||
env: | ||
BATCH_POSTER_MONITORING: ${{ inputs.monitor == 'batch-poster' }} | ||
|
||
- name: Copy chains JSON to Arbitrum Monitoring | ||
run: cp ./packages/arb-token-bridge-ui/public/${{ steps.config.outputs.config_file }} ./arbitrum-monitoring/packages/${{ inputs.monitor }}-monitor/config.json | ||
|
||
- name: Run monitoring command | ||
run: cd ./arbitrum-monitoring && yarn ${{ inputs.monitor }}-monitor --enableAlerting | ||
env: | ||
RETRYABLE_MONITORING_SLACK_TOKEN: ${{ secrets[steps.config.outputs.slack_token] }} | ||
RETRYABLE_MONITORING_SLACK_CHANNEL: ${{ secrets[steps.config.outputs.slack_channel] }} | ||
BATCH_POSTER_MONITORING_SLACK_TOKEN: ${{ secrets[steps.config.outputs.slack_token] }} | ||
BATCH_POSTER_MONITORING_SLACK_CHANNEL: ${{ secrets[steps.config.outputs.slack_channel] }} | ||
ASSERTION_MONITORING_SLACK_TOKEN: ${{ secrets[steps.config.outputs.slack_token] }} | ||
ASSERTION_MONITORING_SLACK_CHANNEL: ${{ secrets[steps.config.outputs.slack_channel] }} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Retryable Monitor | ||
|
||
on: | ||
push: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "3 8 * * *" # Run once a day at 08:03am GMT | ||
|
||
jobs: | ||
run-retryable-monitoring: | ||
name: Retryables Monitor (${{ matrix.chain }}) | ||
strategy: | ||
matrix: | ||
chain: [core, orbit] | ||
uses: ./.github/workflows/monitoring.yml | ||
with: | ||
chain: ${{ matrix.chain }} | ||
monitor: retryable | ||
secrets: inherit |
Oops, something went wrong.