"Terp Network" Testnet - Node Setup / State-Sync / Data snap

RPC : https://rpc.terp-test.theamsolutions.info:443   API https://api.terp-test.theamsolutions.info:443

EXPLORER https://explorer.theamsolutions.info
 

STEP BY STEP INSTRUCTIONS

 Install GO & Dependencies  HERE

cd $HOME
git clone https://github.com/terpnetwork/terp-core.git
cd terp-core
git checkout barberry 
make install
terpd version

terpd config chain-id athena-4
terpd init <name> --chain-id athena-4

wget -qO $HOME/.terp/config/genesis.json https://raw.githubusercontent.com/terpnetwork/test-net/master/athena-4/genesis.json

sudo tee /etc/systemd/system/terpd.service << EOF
[Unit]
Description=Terp-Testnet
After=network-online.target
#
[Service]
User=$USER
ExecStart=$(which terpd) start
RestartSec=10
LimitNOFILE=65535
#
[Install]
WantedBy=multi-user.target
EOF

sudo systemctl enable terpd.service
sudo systemctl daemon-reload
 


STATE SYNC SERVICE
 

Please make sure You have latest, officially launched version of Terp binaries


sudo systemctl stop terpd.service
terpd tendermint unsafe-reset-all --home $HOME/.terp

SNAP_RPC="https://rpc.terp-test.theamsolutions.info:443"; \
LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height) \
&& BLOCK_HEIGHT=$((LATEST_HEIGHT - 1000)) \
&& TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash); \
echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH

sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ; \
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ; \
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ; \
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"|" $HOME/.terp/config/config.toml; \
wget -qO $HOME/.terp/config/addrbook.json  http://94.250.203.6:90/terp-addrbook.json

sudo systemctl restart terpd.service && sudo journalctl -u terpd.service -f -o cat

Use command below to switch off your State Sync mode, after node fully synced to avoid problems in future node restarts!

sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1false|" $HOME/.terp/config/config.toml

A fully synced node supposed to be ready in 10-15 min. depending on computer/bandwidth power.
Enjoy. 

 

SHRUNK DATA SNAPSHOT


#check snapshot height  : curl -s http://94.250.203.6:90 | egrep -o ">terp-snap*.*tar" | tr -d ">"

snap=$(curl -s http://94.250.203.6:90 | egrep -o ">terp-snap*.*tar" | tr -d ">")
sudo systemctl stop terpd
mv ~/.terp/data/priv_validator_state.json ~/
rm -rf  $HOME/.terp/data
terpd tendermint unsafe-reset-all --home $HOME/.terp
wget -P $HOME http://94.250.203.6:90/${snap}
tar xf $HOME/${snap} -C $HOME/.terp
rm $HOME/${snap}
mv ~/priv_validator_state.json ~/.terp/data/
wget -qO $HOME/.terp/config/addrbook.json  http://94.250.203.6:90/terp-addrbook.json
sudo systemctl restart terpd
journalctl -u terpd -f -o cat

 

 

GOOD LUCK!

 

AM Solutions © Copyright. All rights reserved.

We need your consent to load the translations

We use a third-party service to translate the website content that may collect data about your activity. Please review the details and accept the service to view the translations.