Skip to content

Commit

Permalink
rebranding ton to ion
Browse files Browse the repository at this point in the history
  • Loading branch information
ice-hermes authored and ice-charon committed Sep 26, 2024
1 parent 348f7c1 commit 8eeb363
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion assembly/nix/build-linux-arm64-nix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ nix-build linux-arm64-tonlib.nix
cp ./result/lib/libtonlibjson.so.0.5 artifacts/libtonlibjson.so
cp ./result/lib/libemulator.so artifacts/
cp ./result/lib/fift/* artifacts/lib/
cp -r ./result/share/ton/smartcont artifacts/
cp -r ./result/share/ion/smartcont artifacts/
24 changes: 12 additions & 12 deletions docker/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ fi
# global config
if [ ! -z "$GLOBAL_CONFIG_URL" ]; then
echo -e "\e[1;32m[+]\e[0m Downloading provided global config."
wget -q $GCONFURL -O /var/ion-work/db/ion-global.config
wget -q $GLOBAL_CONFIG_URL -O /var/ion-work/db/ion-global.config
else
echo -e "\e[1;33m[=]\e[0m No global config provided, downloading mainnet default."
#wget -q https://api.tontech.io/ton/wallet-mainnet.autoconf.json -O /var/ion-work/db/ion-global.config
Expand All @@ -35,18 +35,18 @@ else
exit 1
fi

if [ ! -f "/var/ton-work/db/config.json" ]; then
if [ ! -f "/var/ion-work/db/config.json" ]; then
echo -e "\e[1;32m[+]\e[0m Initializing validator-engine:"
echo validator-engine -C /var/ton-work/db/ton-global.config --db /var/ton-work/db --ip "$PUBLIC_IP:$VALIDATOR_PORT"
validator-engine -C /var/ton-work/db/ton-global.config --db /var/ton-work/db --ip "$PUBLIC_IP:$VALIDATOR_PORT"
echo validator-engine -C /var/ion-work/db/ion-global.config --db /var/ion-work/db --ip "$PUBLIC_IP:$VALIDATOR_PORT"
validator-engine -C /var/ion-work/db/ion-global.config --db /var/ion-work/db --ip "$PUBLIC_IP:$VALIDATOR_PORT"
test $? -eq 0 || { echo "Cannot initialize validator-engine"; exit 2; }
fi

if [ ! -z "$DUMP_URL" ]; then
echo -e "\e[1;32m[+]\e[0m Using provided dump $DUMP_URL"
if [ ! -f "dump_downloaded" ]; then
echo -e "\e[1;32m[+]\e[0m Downloading dump..."
curl --retry 10 --retry-delay 30 -Ls $DUMP_URL | pv | plzip -d -n8 | tar -xC /var/ton-work/db
curl --retry 10 --retry-delay 30 -Ls $DUMP_URL | pv | plzip -d -n8 | tar -xC /var/ion-work/db
touch dump_downloaded
else
echo -e "\e[1;32m[+]\e[0m Dump has been already used."
Expand Down Expand Up @@ -106,9 +106,9 @@ else
echo -e "\e[1;32m[+]\e[0m Generated client private certificate $CLIENT_ID1 $CLIENT_ID2"
echo -e "\e[1;32m[+]\e[0m Generated client public certificate"
# Adding client permissions
sed -e "s/CONSOLE-PORT/\"$(printf "%q" $CONSOLE_PORT)\"/g" -e "s~SERVER-ID~\"$(printf "%q" $SERVER_ID2)\"~g" -e "s~CLIENT-ID~\"$(printf "%q" $CLIENT_ID2)\"~g" /var/ton-work/scripts/control.template > control.new
sed -e "s~\"control\"\ \:\ \[~$(printf "%q" $(cat control.new))~g" /var/ton-work/db/config.json > config.json.new
mv config.json.new /var/ton-work/db/config.json
sed -e "s/CONSOLE-PORT/\"$(printf "%q" $CONSOLE_PORT)\"/g" -e "s~SERVER-ID~\"$(printf "%q" $SERVER_ID2)\"~g" -e "s~CLIENT-ID~\"$(printf "%q" $CLIENT_ID2)\"~g" /var/ion-work/scripts/control.template > control.new
sed -e "s~\"control\"\ \:\ \[~$(printf "%q" $(cat control.new))~g" /var/ion-work/db/config.json > config.json.new
mv config.json.new /var/ion-work/db/config.json
fi

# Liteserver
Expand All @@ -131,11 +131,11 @@ else
fi

LITESERVERS=$(printf "%q" "\"liteservers\":[{\"id\":\"$LITESERVER_ID2\",\"port\":\"$LITE_PORT\"}")
sed -e "s~\"liteservers\"\ \:\ \[~$LITESERVERS~g" /var/ton-work/db/config.json > config.json.liteservers
mv config.json.liteservers /var/ton-work/db/config.json
sed -e "s~\"liteservers\"\ \:\ \[~$LITESERVERS~g" /var/ion-work/db/config.json > config.json.liteservers
mv config.json.liteservers /var/ion-work/db/config.json
fi
fi

echo -e "\e[1;32m[+]\e[0m Running validator-engine"

exec validator-engine -c /var/ion-work/db/config.json -C /var/ion-work/db/ion-global.config --db /var/ion-work/db
echo validator-engine -c /var/ion-work/db/config.json -C /var/ion-work/db/ion-global.config --db /var/ion-work/db --state-ttl $STATE_TTL --archive-ttl $ARCHIVE_TTL --threads $THREADS --verbosity $VERBOSITY $CUSTOM_ARG
exec validator-engine -c /var/ion-work/db/config.json -C /var/ion-work/db/ion-global.config --db /var/ion-work/db --state-ttl $STATE_TTL --archive-ttl $ARCHIVE_TTL --threads $THREADS --verbosity $VERBOSITY $CUSTOM_ARG

0 comments on commit 8eeb363

Please sign in to comment.