From ad3b80db84e87f56b46bced5658025351d80cd81 Mon Sep 17 00:00:00 2001 From: 88plug <19512127+88plug@users.noreply.github.com> Date: Mon, 16 Oct 2023 10:19:40 -0700 Subject: [PATCH] Fixes autostake node --- charts/akash-node/Chart.yaml | 2 +- charts/akash-node/scripts/init.sh | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/charts/akash-node/Chart.yaml b/charts/akash-node/Chart.yaml index 2b39d610..eea1e472 100644 --- a/charts/akash-node/Chart.yaml +++ b/charts/akash-node/Chart.yaml @@ -17,7 +17,7 @@ type: application # Versions are expected to follow Semantic Versioning (https://semver.org/) # Major version bit highlights the mainnet release (e.g. mainnet4 = 4.x.x, mainnet5 = 5.x.x, ...) -version: 6.0.1 +version: 6.0.2 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/akash-node/scripts/init.sh b/charts/akash-node/scripts/init.sh index 13c51575..cdc8d970 100644 --- a/charts/akash-node/scripts/init.sh +++ b/charts/akash-node/scripts/init.sh @@ -37,16 +37,20 @@ else case "$SNAPSHOT_PROVIDER" in "polkachu") - SNAPSHOT_URL=$(curl -s https://polkachu.com/tendermint_snapshots/akash | grep tar.lz4 | head -n1 | grep -io 'akashnet-2.*.tar.lz4" | tr -d ">" | tail -1) - wget -O - http://snapshots.autostake.net/akashnet-2/$SNAP_NAME | lz4 -d | tar -xf - -C "$AKASH_HOME" - ;; + SNAP_URL="http://snapshots.autostake.com/akashnet-2" + SNAP_NAME=$(curl -s $SNAP_URL/ | egrep -o ">akashnet-2.*.tar.lz4" | tr -d ">" | tail -1) + echo "Using latest Autostake blockchain snapshot, $SNAP_URL/$SNAP_NAME" + aria2c --out=snapshot_autostake.tar.lz4 --summary-interval 15 --check-certificate=false --max-tries=99 --retry-wait=5 --always-resume=true --max-file-not-found=99 --conditional-get=true -s 4 -x 4 -k 1M -j 1 "$SNAP_URL/$SNAP_NAME" + lz4 -c -d snapshot_autostake.tar.lz4 | tar -x -C "$AKASH_HOME" + rm -f snapshot_autostake.tar.lz4 + ;; *) SNAPSHOT_URL=$(curl -s https://cosmos-snapshots.s3.filebase.com/akash/pruned/snapshot.json | jq -r .latest) @@ -65,4 +69,4 @@ else cd "$AKASH_HOME/data" || exit fi -if [[ $AKASH_DEBUG == "true" ]]; then sleep 5000; fi +if [[ $AKASH_DEBUG == "true" ]]; then sleep 5000; fi \ No newline at end of file