Skip to content

Commit

Permalink
Fixes autostake node
Browse files Browse the repository at this point in the history
  • Loading branch information
88plug authored Oct 16, 2023
1 parent 97c9be7 commit ad3b80d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion charts/akash-node/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 9 additions & 5 deletions charts/akash-node/scripts/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 '<a href=['"'"'"][^"'"'"']*['"'"'"]' | sed -e 's/^<a href=["'"'"']//i' -e 's/["'"'"']$//i')
SNAPSHOT_URL=$(curl -s https://polkachu.com/tendermint_snapshots/akash | grep tar.lz4 | head -n1 | grep -io '<a href=['"'"'"][^"'"'"']*['"'"'"]' | sed -e 's/^<a href=["'"'"']//i' -e 's/["'"'"']$//i')
echo "Using latest Polkachu blockchain snapshot, $SNAPSHOT_URL"
aria2c --out=snapshot.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 "$SNAPSHOT_URL"
lz4 -c -d snapshot.tar.lz4 | tar -x -C "$AKASH_HOME"
rm -f snapshot.tar.lz4
;;
"autostake")
SNAP_NAME=$(curl -s http://snapshots.autostake.net/akashnet-2/ | egrep -o ">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)
Expand All @@ -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

0 comments on commit ad3b80d

Please sign in to comment.