From 8005c3a497ec6a2ebe96e6ff02f394c68093eba0 Mon Sep 17 00:00:00 2001 From: Son of Odin <2700975-son-of-odin@users.noreply.gitlab.com> Date: Thu, 2 Nov 2023 22:18:14 -0400 Subject: [PATCH 1/2] update docker image --- scripts/validator.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/validator.sh b/scripts/validator.sh index ddb79313..bc1975f3 100755 --- a/scripts/validator.sh +++ b/scripts/validator.sh @@ -1,4 +1,3 @@ - #!/bin/bash set -o pipefail From 9e30b0995727c6cc831c6b833c4f1f2d284019ef Mon Sep 17 00:00:00 2001 From: Son of Odin <2700975-son-of-odin@users.noreply.gitlab.com> Date: Thu, 2 Nov 2023 22:55:11 -0400 Subject: [PATCH 2/2] update docker image --- scripts/validator.sh | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/scripts/validator.sh b/scripts/validator.sh index bc1975f3..22e35826 100755 --- a/scripts/validator.sh +++ b/scripts/validator.sh @@ -4,13 +4,11 @@ set -o pipefail set -ex CHAIN_ID="arkeo" -PORT_RPC=${PORT_RPC:=26657} -PORT_P2P=${PORT_P2P:=26656} RPC="${RPC:=seed.arkeo.network:26657}" SEED="${SEED:=seed.arkeo.network:26656}" -PEER="${PEER:=none}" # the hostname of a seed node set as tendermint persistent peer -PEER_ID=$(curl -s http://$RPC/status | jq -r '.result.node_info.id') +PEER_ID=$(curl -sL http://$RPC/status | jq -r '.result.node_info.id') +# delete empty file (ie an empty genesis.json file if exists) find ~/.arkeo/config -size 0 -print -delete if [ ! -f ~/.arkeo/config/genesis.json ]; then @@ -20,22 +18,22 @@ if [ ! -f ~/.arkeo/config/genesis.json ]; then rm -rf ~/.arkeo/config/genesis.json - if [ "$PEER" = "none" ]; then + if [ "$RPC" = "none" ]; then echo "Missing PEER" exit 1 fi # wait for peer - until curl -s "$PEER" 1>/dev/null 2>&1; do - echo "Waiting for peer: $PEER" + until curl -s "$RPC" 1>/dev/null 2>&1; do + echo "Waiting for peer: $RPC" sleep 3 done # fetch genesis file from seed node - curl -sL "$PEER/genesis" | jq '.result.genesis' > ~/.arkeo/config/genesis.json + curl -sL "$RPC/genesis" | jq '.result.genesis' > ~/.arkeo/config/genesis.json # fetch node id - SEED_ID=$(curl -s "$PEER/status" | jq -r .result.node_info.id) + SEED_ID=$(curl -sL "$RPC/status" | jq -r .result.node_info.id) SEEDS="$SEED_ID@$SEED" sed -i 's/enable = false/enable = true/g' ~/.arkeo/config/app.toml