add erigon, simple stupid alarming

This commit is contained in:
cventastic
2022-01-12 19:00:12 +01:00
parent 0a090cff09
commit 9141f62935
3 changed files with 34 additions and 6 deletions

View File

@@ -165,7 +165,6 @@ services:
- "traefik.http.routers.harmony-mainnet.tls.certresolver=myresolver"
- "traefik.http.routers.harmony-mainnet.rule=Host(`$DOMAIN`) && PathPrefix(`/harmony`)"
- "traefik.http.routers.harmony-mainnet.middlewares=harmony-mainnet-stripprefix, ipwhitelist"
erigon-trace:
image: thorax/erigon
@@ -180,7 +179,7 @@ services:
rpcdaemon:
image: thorax/erigon:latest
command: rpcdaemon --datadir=/home/erigon/.local/share/erigon --private.api.addr=erigon-trace:9090 --txpool.api.addr=erigon-trace:9090 --http.addr=0.0.0.0 --http.vhosts=* --http.corsdomain=* --http.api=eth,debug,net,trace --ws
command: rpcdaemon --datadir=/home/erigon/.local/share/erigon --private.api.addr=erigon-trace:9090 --txpool.api.addr=erigon-trace:9090 --http.addr=0.0.0.0 --http.vhosts=* --http.corsdomain=* --http.api=eth,erigon,web3,net,debug,trace,txpool --ws
pid: service:erigon-trace # Use erigon's PID namespace. It's required to open Erigon's DB from another process (RPCDaemon local-mode)
volumes:
- erigon-trace:/home/erigon/.local/share/erigon

View File

@@ -6,6 +6,13 @@ chain_arr[goerli]="0026"
chain_arr[rinkeby]="0025"
chain_arr[ropsten]="0023"
chain_arr[mainnet]="0021"
chain_arr[harmony]="040"
chain_arr[xdai]="0027"
# ARCHIVAL TRACE
chain_arr[erigon]="0028"
chain_arr[erigon]="0021"
# ARCHIVE
chain_arr[erigon]="0022"
for i in ${!chain_arr[@]}; do
echo curl ${i} ${chain_arr[${i}]}
@@ -15,7 +22,3 @@ done
POKT="0001"
curl -X POST --data '{"relay_network_id":"'$POKT'","payload":{"data":"{}","method":"POST","path":"v1/query/height","headers":{}}}' http://localhost:8081/v1/client/sim
echo \n
HARMONY="0040"
curl -X POST --data '{"relay_network_id":"'$HARMONY'","payload":{"data":"{\"jsonrpc\": \"2.0\", \"method\": \"hmy_latestHeader\", \"params\": [], \"id\": 1}","method":"POST","path":"v1/query/height","headers":{}}}' http://localhost:8081/v1/client/sim
echo \n

26
util/sync_alert_nooby.sh Normal file
View File

@@ -0,0 +1,26 @@
#!/bin/bash
TELEGRAM_AUTH_TOKEN=5077327159:AAELNjCtFZTrLz7h5PW9Td1RTl8beNFgMbo
TELEGRAM_CHAT_ID=-697908946
curl_w() {
curl \
retry-connrefused \
-sf "$@"
}
send_message() {
curl_w -X POST "https://api.telegram.org/bot${TELEGRAM_AUTH_TOKEN}/sendMessage" \
-H "Content-Type: application/json" \
-d "{\"chat_id\": \"${TELEGRAM_CHAT_ID}\", \"text\": \"${*}\", \"disable_notification\": false}"
}
chain_list="goerli ropsten rinkeby geth erigon harmony"
for i in $chain_list; do
output=$(curl -s -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}' https://bsc-1.stakesquid-db.ml/$i)
if [ $output != '{"jsonrpc":"2.0","id":1,"result":false}' ]; then
send_message "$i not in sync"
fi
done