"STRIDE" Guide  | State Sync or Data Snapshot

Explorer https://explorer.theamsolutions.info/stride-1-main

RPC  https://stride-rpc.theamsolutions.info  | API https://stride-api.theamsolutions.info

   Official docs HERE

 
STEP BY STEP INSTRUCTIONS
 
 

Install GO & Dependencies  HERE

Install binaries & Run node

git clone https://github.com/Stride-Labs/stride
cd stride && git checkout v2.0.3
make install

strided init <NODE_NAME> --chain-id stride-1

wget -qO $HOME/.stride/config/genesis.json https://github.com/Stride-Labs/testnet/raw/main/mainnet/genesis.json

#check genesis hash
sha256sum $HOME/.stride/config/genesis.json
#should be:  e31b8d1a9090f128b6f7db024836213d1af2b424bfb757e38f3b5c39be738aa4


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

sudo systemctl enable strided
sudo systemctl daemon-reload
 

STATE SYNC 

 

sudo systemctl stop strided; \
strided tendermint unsafe-reset-all --home $HOME/.stride --keep-addr-book

#If U don`t have address book
wget -q -O $HOME/.stride/config/addrbook.json http://94.250.203.6:90/stride-addrbook.json

SNAP_RPC="https://stride-rpc.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/.stride/config/config.toml

peers="e2593afabd2cc322fb0a1d4cdee56e7fca5e483e@157.90.179.182:26456" \
&& sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.stride/config/config.toml

sudo systemctl restart strided
#LOGS 
journalctl -u strided -f -o cat 

#switch off state sync after sync
sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1false|" $HOME/.stride/config/config.toml

DATA SNAP

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

snap=$(curl -s http://94.250.203.6:90 | egrep -o ">stride-snap*.*tar" | tr -d ">")
sudo systemctl stop strided
mv $HOME/.stride/data/priv_validator_state.json $HOME
rm -rf  $HOME/.stride/data
wget -P $HOME http://94.250.203.6:90/${snap}
tar xf $HOME/${snap} -C $HOME/.stride
rm $HOME/${snap}
mv $HOME/priv_validator_state.json $HOME/.stride/data
wget -q -O $HOME/.stride/config/addrbook.json http://94.250.203.6:90/stride-addrbook.json
sudo systemctl restart strided
journalctl -u strided -f -o cat
 

CREATE VALIDATOR

strided tx staking create-validator \
 --amount=10000000ustrd \
 --pubkey=$(strided tendermint show-validator) \
 --moniker="<MONIKER>" \
 --chain-id="stride-1" \
 --from=<KEY-NAME> \
 --commission-rate=0.1 \
 --commission-max-rate=1 \
 --commission-max-change-rate=0.1 \
 --min-self-delegation=1


USEFUL COMMANDS


#check node status
curl localhost:26657/status
#or
strided status | jq

#check all available wallets
strided keys list

#balance of your wallet
strided query bank balances <wallet-key>

#find valoper address
strided keys show <wallet-key> --bech val -a

#check validator staking state
strided query staking validator <valoper-address> --chain-id stride-1

#command for delegating
strided tx staking delegate <valoper-address> 77777ustrd --chain-id stride-1 --from <wallet-name> --gas=auto

#Withdraw all-rewards with commisions
strided tx distribution withdraw-rewards <valoper-address> --from <wallet-name> stride-1 --commission --yes

#unjail command
strided tx slashing unjail --from <wallet_name> --chain-id stride-1

#vote | options : yes/no/no_with_veto/abstain
strided tx gov vote 1 yes --from <wallet_name> --chain-id stride-1

 

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.