Skip to content

Commit 485abd4

Browse files
authored
feat: update scroll-monitor to devnet & refactor (#201)
* remove old monitor stacks * feat: add scroll-monitor chart to devnet * refactor: wait for contracts script * update chain monitor
1 parent 3521479 commit 485abd4

File tree

20 files changed

+93
-258
lines changed

20 files changed

+93
-258
lines changed

charts/chain-monitor/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
apiVersion: v2
33
description: chain-monitor helm charts
44
name: chain-monitor
5-
version: 0.0.10
5+
version: 0.0.11
66
appVersion: v0.1.0
77
kubeVersion: ">=1.22.0-0"
88
maintainers:

charts/chain-monitor/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# chain-monitor
22

3-
![Version: 0.0.10](https://img.shields.io/badge/Version-0.0.10-informational?style=flat-square) ![AppVersion: v0.1.0](https://img.shields.io/badge/AppVersion-v0.1.0-informational?style=flat-square)
3+
![Version: 0.0.11](https://img.shields.io/badge/Version-0.0.11-informational?style=flat-square) ![AppVersion: v0.1.0](https://img.shields.io/badge/AppVersion-v0.1.0-informational?style=flat-square)
44

55
chain-monitor helm charts
66

@@ -67,7 +67,7 @@ Kubernetes: `>=1.22.0-0`
6767
| initContainers.4-wait-for-l2-sequencer.image | string | `"atkrad/wait4x:latest"` | |
6868
| initContainers.5-wait-for-contract.command[0] | string | `"/bin/sh"` | |
6969
| initContainers.5-wait-for-contract.command[1] | string | `"-c"` | |
70-
| initContainers.5-wait-for-contract.command[2] | string | `"/wait-for-contract.sh $L1_RPC_ENDPOINT $L1_SCROLL_CHAIN_PROXY_ADDR"` | |
70+
| initContainers.5-wait-for-contract.command[2] | string | `"/wait-for-contract.sh $SCROLL_L1_RPC $L1_SCROLL_CHAIN_PROXY_ADDR"` | |
7171
| initContainers.5-wait-for-contract.envFrom[0].configMapRef.name | string | `"chain-monitor-env"` | |
7272
| initContainers.5-wait-for-contract.image | string | `"scrolltech/scroll-alpine:v0.0.1"` | |
7373
| initContainers.5-wait-for-contract.volumeMounts[0].mountPath | string | `"/wait-for-contract.sh"` | |

charts/chain-monitor/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ initContainers:
125125
command:
126126
- /bin/sh
127127
- -c
128-
- /wait-for-contract.sh $L1_RPC_ENDPOINT $L1_SCROLL_CHAIN_PROXY_ADDR
128+
- /wait-for-contract.sh $SCROLL_L1_RPC $L1_SCROLL_CHAIN_PROXY_ADDR
129129
envFrom:
130130
- configMapRef:
131131
name: chain-monitor-env

charts/chain-monitor/values/production.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ configMaps:
4444
data:
4545
SCROLL_L1_RPC: ""
4646
SCROLL_L2_RPC: ""
47+
L1_SCROLL_CHAIN_PROXY_ADDR: ""
4748

4849
externalSecrets:
4950
chain-monitor-secret-env:

charts/rollup-node/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
apiVersion: v2
33
description: rollup-node helm charts
44
name: rollup-node
5-
version: 0.0.12
5+
version: 0.0.13
66
appVersion: v0.1.0
77
kubeVersion: ">=1.22.0-0"
88
maintainers:

charts/rollup-node/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# rollup-node
22

3-
![Version: 0.0.12](https://img.shields.io/badge/Version-0.0.12-informational?style=flat-square) ![AppVersion: v0.1.0](https://img.shields.io/badge/AppVersion-v0.1.0-informational?style=flat-square)
3+
![Version: 0.0.13](https://img.shields.io/badge/Version-0.0.13-informational?style=flat-square) ![AppVersion: v0.1.0](https://img.shields.io/badge/AppVersion-v0.1.0-informational?style=flat-square)
44

55
rollup-node helm charts
66

charts/rollup-node/templates/wait-for-contracts-script.yaml

Lines changed: 0 additions & 31 deletions
This file was deleted.

charts/scroll-common/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
apiVersion: v2
33
description: scroll helm charts to deploy common scripts and configuration
44
name: scroll-common
5-
version: 0.0.4
5+
version: 0.0.5
66
appVersion: v0.1.0
77
kubeVersion: ">=1.22.0-0"
88
maintainers:

charts/scroll-common/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# scroll-common
22

3-
![Version: 0.0.4](https://img.shields.io/badge/Version-0.0.4-informational?style=flat-square) ![AppVersion: v0.1.0](https://img.shields.io/badge/AppVersion-v0.1.0-informational?style=flat-square)
3+
![Version: 0.0.5](https://img.shields.io/badge/Version-0.0.5-informational?style=flat-square) ![AppVersion: v0.1.0](https://img.shields.io/badge/AppVersion-v0.1.0-informational?style=flat-square)
44

55
scroll helm charts to deploy common scripts and configuration
66

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: wait-for-contracts-script
5+
data:
6+
wait-for-contract.sh: |
7+
#!/bin/sh
8+
9+
# Get L1 endpoint and Scroll chain proxy address
10+
L1_ENDPOINT=$1
11+
L1_SCROLL_CHAIN_PROXY_ADDR=$2
12+
13+
# Function to check the Geth node
14+
check_contract() {
15+
RESPONSE=$(curl $L1_ENDPOINT -X POST -H "Content-Type: application/json" --data "{\"method\":\"eth_getStorageAt\",\"params\":[\"$L1_SCROLL_CHAIN_PROXY_ADDR\", \"0x0\", \"latest\"],\"id\":1,\"jsonrpc\":\"2.0\"}")
16+
INIT_STATUS=$(echo "$RESPONSE" | sed -E 's/^.*"result":"([^"]+)".*$/\1/')
17+
18+
echo "init status is $INIT_STATUS"
19+
if [ "$INIT_STATUS" = 0x0000000000000000000000000000000000000000000000000000000000000001 ]; then
20+
echo "Contracts is ready!"
21+
exit 0
22+
else
23+
echo "Contracts is not ready, init status: $INIT_STATUS. Retrying in 5 seconds..."
24+
sleep 5
25+
fi
26+
}
27+
28+
# Loop until the contract initialized
29+
while true; do
30+
check_contract
31+
done

0 commit comments

Comments
 (0)