Skip to content

Commit

Permalink
feat(node): add default akash snapshot provider and remove duplicate …
Browse files Browse the repository at this point in the history
…port definition (#293)

two commits in one PR, please see Commits tab

fixes akash-network/support#287
  • Loading branch information
andy108369 authored Sep 26, 2024
1 parent 9a5fdbb commit 10b74c5
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 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: 11.1.0
version: 11.1.1

# 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
10 changes: 9 additions & 1 deletion charts/akash-node/scripts/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ else
apt -y --no-install-recommends install aria2 lz4 liblz4-tool wget > /dev/null 2>&1
case "$SNAPSHOT_PROVIDER" in

"akash")
SNAPSHOT_URL="https://snapshots.akash.network/akashnet-2/akashnet-2_latest.tar.lz4"
echo "Using default akash 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 8 -x 8 -k 1M -j 1 "$SNAPSHOT_URL"
lz4 -c -d snapshot.tar.lz4 | tar -x -C "$AKASH_HOME"
rm -rf snapshot.tar.lz4
;;

"polkachu")
SNAPSHOTS_DIR_URL="https://snapshots.polkachu.com/snapshots/"
USER_AGENT="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36"
Expand All @@ -61,7 +69,7 @@ else

"c29r3")
SNAP_NAME=$(curl -s https://snapshots.c29r3.xyz/akash/ | egrep -o ">$AKASH_CHAIN_ID.*tar" | tr -d ">")
echo "Using default c29r3.xyz blockchain snapshot, https://snapshots.c29r3.xyz/akash/${SNAP_NAME}"
echo "Using c29r3.xyz blockchain snapshot, https://snapshots.c29r3.xyz/akash/${SNAP_NAME}"
aria2c --out=snapshot.tar --summary-interval 15 --check-certificate=false --max-tries=99 --retry-wait=5 --always-resume=true --max-file-not-found=99 --conditional-get=true -s 8 -x 8 -k 1M -j 1 "https://snapshots.c29r3.xyz/akash/${SNAP_NAME}"
tar -xf snapshot.tar -C "$AKASH_HOME/data"
rm -rf snapshot.tar
Expand Down
9 changes: 0 additions & 9 deletions charts/akash-node/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,6 @@ spec:
{{- end }}
- name: AKASH_API_ENABLE
value: "{{ .Values.akash_node.api_enable }}"
ports:
- containerPort: 1317
name: akashd-api
- containerPort: 9090
name: akashd-grpc
- containerPort: 26656
name: akashd-p2p
- containerPort: 26657
name: akashd-rpc
volumeMounts:
- name: config
mountPath: /config
Expand Down
4 changes: 2 additions & 2 deletions charts/akash-node/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ debug: "false"
# Defaults to mainnet
akash_node:
enabled: true
# snapshot_provider can be : "polkachu" (1Gi), "c29r3" (2Gi), or "autostake" (3Gi)
# snapshot_provider can be : "akash" (3Gi), "polkachu" (1Gi), "c29r3" (2Gi), or "autostake" (3Gi)
# Nov/02 2023: disabled polkachu since it is now behind Cloudflare's "Verify you are human" CAPTCHA
# Nov/14 2023: autostake snapshot is unavailable, fixed polkachu and set as default, fix "c29r3" snapshot provider
# Aprl/14 2024: peers updated and autostake working again

snapshot_provider: "polkachu"
snapshot_provider: "akash"
api_enable: false
moniker: mynode
chainid: akashnet-2
Expand Down

0 comments on commit 10b74c5

Please sign in to comment.