Testnet
Swisstronik
Installation Guide
CLI Command
Statesync
Snapshot
Public Endpoint
Explorers
Node Maps
Installation Guide
Installation Guide
CLI Command
Statesync
Snapshot
Public Endpoint
Explorers
Node Maps
How To Install Full Node Swisstronik Testnet
Official Docs
https://swisstronik.gitbook.io/swisstronik-docs/node-setup/setup-sgx
Setting up vars
Your Nodename (validator) that will shows in explorer
NODENAME=<Your_Nodename_Moniker>
Save variables to system
echo "export NODENAME=$NODENAME" >> $HOME/.bash_profile
if [ ! $WALLET ]; then
echo "export WALLET=wallet" >> $HOME/.bash_profile
fi
echo "export SWISSTRONIK_CHAIN_ID=swisstronik_1291-1" >> $HOME/.bash_profile
source $HOME/.bash_profile
Update packages
sudo apt update && sudo apt upgrade -y
Install dependencies
sudo apt install curl build-essential git wget jq make gcc tmux net-tools ccze unzip lz4 -y
Install go
if ! [ -x "$(command -v go)" ]; then
ver="1.21.4"
cd $HOME
wget "https://golang.org/dl/go$ver.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$ver.linux-amd64.tar.gz"
rm "go$ver.linux-amd64.tar.gz"
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> ~/.bash_profile
source ~/.bash_profile
fi
Download and build binaries
cd $HOME
wget https://github.com/SigmaGmbH/swisstronik-chain/releases/download/testnet-v1.0.2/swisstronik_1.0.2_amd64.deb.zip
unzip swisstronik_1.0.2_amd64.deb.zip
sudo dpkg -i swisstronik_1.0.2_amd64.deb
swisstronikd version
Init app
swisstronikd init $NODENAME --chain-id $SWISSTRONIK_CHAIN_ID
Download configuration
wget -O $HOME/.swisstronik/config/genesis.json "https://snap.konsortech.xyz/swisstronik/genesis.json"
wget -O $HOME/.swisstronik/config/addrbook.json "https://snap.konsortech.xyz/swisstronik/addrbook.json"
Set the minimum gas price and Peers, Filter peers/ MaxPeers
SEEDS="54b1092174218aad93a22f7ac2eaa74bb2326bbc@testnet-seed.konsortech.xyz:29165"
PEERS="7c42a55317deda257fee06bc48574fa3444967db@testnet-swisstronik.konsortech.xyz:27656"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.swisstronik/config/config.toml
sed -i.bak -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"7aswtr\"/;" ~/.swisstronik/config/app.toml
external_address=$(wget -qO- eth0.me)
sed -i.bak -e "s/^external_address *=.*/external_address = \"$external_address:26656\"/" $HOME/.swisstronik/config/config.toml
sed -i.bak -e "s/^seeds =.*/seeds = \"$seeds\"/" $HOME/.swisstronik/config/config.toml
Disable indexing
indexer="null"
sed -i -e "s/^indexer *=.*/indexer = \"$indexer\"/" $HOME/.swisstronik/config/config.toml
Config pruning
pruning="custom" && \
pruning_keep_recent="100" && \
pruning_keep_every="0" && \
pruning_interval="10" && \
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" ~/.swisstronik/config/app.toml && \
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" ~/.swisstronik/config/app.toml && \
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" ~/.swisstronik/config/app.toml && \
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" ~/.swisstronik/config/app.toml
Create service
sudo tee /etc/systemd/system/swisstronikd.service > /dev/null <<EOF
[Unit]
Description=Swisstronik
After=network-online.target
[Service]
User=$USER
ExecStart=$(which swisstronikd) start
Restart=on-failure
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
Register and start service
sudo systemctl daemon-reload
sudo systemctl enable swisstronikd
sudo systemctl restart swisstronikd && sudo journalctl -u swisstronikd -f -o cat
Guidence for create validator
Create wallet
To create new wallet you can use command below. Don’t forget to save the mnemonic
swisstronikd keys add $WALLET
To recover your wallet using seed phrase
swisstronikd keys add $WALLET --recover
Show your wallet list
swisstronikd keys list
Save wallet info
Add wallet and validator address into variables
SWISSTRONIK_WALLET_ADDRESS=$(swisstronikd keys show $WALLET -a)
SWISSTRONIK_VALOPER_ADDRESS=$(swisstronikd keys show $WALLET --bech val -a)
echo 'export SWISSTRONIK_WALLET_ADDRESS='${SWISSTRONIK_WALLET_ADDRESS} >> $HOME/.bash_profile
echo 'export SWISSTRONIK_VALOPER_ADDRESS='${SWISSTRONIK_VALOPER_ADDRESS} >> $HOME/.bash_profile
source $HOME/.bash_profile
Fund your wallet
https://faucet.testnet.swisstronik.com/
Create validator
check your wallet balance:
swisstronikd query bank balances $SWISSTRONIK_WALLET_ADDRESS
To create your validator run command below
swisstronikd tx staking create-validator \
--amount 1000000aswtr \
--from $WALLET \
--commission-max-change-rate "0.1" \
--commission-max-rate "0.2" \
--commission-rate "0.1" \
--min-self-delegation "1" \
--pubkey $(swisstronikd tendermint show-validator) \
--moniker $NODENAME \
--chain-id $SWISSTRONIK_CHAIN_ID \
--gas-prices 7aswtr
Check your validator key
[[ $(swisstronikd q staking validator $SWISSTRONIK_VALOPER_ADDRESS -oj | jq -r .consensus_pubkey.key) = $(swisstronikd status | jq -r .ValidatorInfo.PubKey.value) ]] && echo -e "\n\e[1m\e[32mTrue\e[0m\n" || echo -e "\n\e[1m\e[31mFalse\e[0m\n"
Get list of validators
swisstronikd q staking validators -oj --limit=3000 | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " \t " + .description.moniker' | sort -gr | nl
Usefull commands
Service management
Check logs
journalctl -fu swisstronikd -o cat
Start service
sudo systemctl start swisstronikd
Stop service
sudo systemctl stop swisstronikd
Restart service
sudo systemctl restart swisstronikd
Node info
Synchronization info
swisstronikd status 2>&1 | jq .SyncInfo
Validator info
swisstronikd status 2>&1 | jq .ValidatorInfo
Node info
swisstronikd status 2>&1 | jq .NodeInfo
Show node id
swisstronikd tendermint show-node-id
Wallet operations
List of wallets
swisstronikd keys list
Recover wallet
swisstronikd keys add $WALLET --recover
Delete wallet
swisstronikd keys delete $WALLET
Get wallet balance
swisstronikd query bank balances $SWISSTRONIK_WALLET_ADDRESS
Transfer funds
swisstronikd tx bank send $SWISSTRONIK_WALLET_ADDRESS <TO_SWISSTRONIK_WALLET_ADDRESS> 1000000aswtr
Voting
swisstronikd tx gov vote 1 yes --from $WALLET --chain-id=$SWISSTRONIK_CHAIN_ID
Staking, Delegation and Rewards
Delegate stake
swisstronikd tx staking delegate $SWISSTRONIK_VALOPER_ADDRESS 1000000aswtr --from=$WALLET --chain-id=$SWISSTRONIK_CHAIN_ID --gas=auto
Redelegate stake from validator to another validator
swisstronikd tx staking redelegate <srcValidatorAddress> <destValidatorAddress> 1000000aswtr --from=$WALLET --chain-id=$SWISSTRONIK_CHAIN_ID --gas=auto
Withdraw all rewards
swisstronikd tx distribution withdraw-all-rewards --from=$WALLET --chain-id=$SWISSTRONIK_CHAIN_ID --gas=auto
Withdraw rewards with commision
swisstronikd tx distribution withdraw-rewards $SWISSTRONIK_VALOPER_ADDRESS --from=$WALLET --commission --chain-id=$SWISSTRONIK_CHAIN_ID
Validator management
Edit validator
swisstronikd tx staking edit-validator \
--moniker=$NODENAME \
--identity=<your_keybase_id> \
--website="<your_website>" \
--details="<your_validator_description>" \
--chain-id=$SWISSTRONIK_CHAIN_ID \
--from=$WALLET
Unjail validator
swisstronikd tx slashing unjail \
--broadcast-mode=block \
--from=$WALLET \
--chain-id=$SWISSTRONIK_CHAIN_ID \
--gas=auto
Official Explorers
https://explorer-cosmos.testnet.swisstronik.com/swisstronik
Custom Explorers
https://testnet-explorer.konsortech.xyz/swisstronik
Public Endpoint
RPC
https://testnet-swisstronik-rpc.konsortech.xyz
JSON EVM RPC
Network Name : Swisstronik Testnet
RPC URL : https://testnet-swisstronik-evm.konsortech.xyz
Chain ID : 1291
Curreny Symbol : SWTR
API
https://testnet-swisstronik-api.konsortech.xyz
gRPC
testnet-swisstronik.konsortech.xyz:27090
Peers and Seeds
Peers
7c42a55317deda257fee06bc48574fa3444967db@testnet-swisstronik.konsortech.xyz:27656
Seeds
54b1092174218aad93a22f7ac2eaa74bb2326bbc@testnet-seed.konsortech.xyz:29165
Genesis & Address Book
Address Book
https://snap.konsortech.xyz/swisstronik/addrbook.json
Genesis
https://snap.konsortech.xyz/swisstronik/genesis.json
State Sync
sudo systemctl stop swisstronikd
cp $HOME/.swisstronik/data/priv_validator_state.json $HOME/.swisstronik/priv_validator_state.json.backup
swisstronikd tendermint unsafe-reset-all --home $HOME/.swisstronik --keep-addr-book
SNAP_RPC="https://testnet-swisstronik-rpc.konsortech.xyz: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 -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/.swisstronik/config/config.toml
mv $HOME/.swisstronik/priv_validator_state.json.backup $HOME/.swisstronik/data/priv_validator_state.json
sudo systemctl restart swisstronikd
sudo journalctl -u swisstronikd -f --no-hostname -o cat
Snapshot
sudo systemctl stop swisstronikd
cp $HOME/.swisstronik/data/priv_validator_state.json $HOME/.swisstronik/priv_validator_state.json.backup
rm -rf $HOME/.swisstronik/data
SNAP_NAME=$(curl -s https://snap.konsortech.xyz/swisstronik/ | egrep -o ">swisstronik-snapshot.*\.tar.lz4" | tr -d ">")
curl https://snap.konsortech.xyz/swisstronik/${SNAP_NAME} | lz4 -dc - | tar -xf - -C $HOME/.swisstronik
mv $HOME/.swisstronik/priv_validator_state.json.backup $HOME/.swisstronik/data/priv_validator_state.json
sudo systemctl restart swisstronikd && journalctl -u swisstronikd -f --no-hostname -o cat