Mainnet

Sge

Installation Guide
Tendermint CLI
State Sync
Public Endpoint
Snapshot
Custom Explorers
Decentralization Maps
Installation Guide
Installation Guide
Tendermint CLI
State Sync
Public Endpoint
Snapshot
Custom Explorers
Decentralization Maps

How To Install Full Node SGE Mainnet

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 SGE_CHAIN_ID=sgenet-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 -y

Install go

if ! [ -x "$(command -v go)" ]; then
  ver="1.19.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
git clone https://github.com/sge-network/sge
cd sge
git checkout v1.1.1
make install

Config app

sged config chain-id $SGE_CHAIN_ID

Init app

sged init $NODENAME --chain-id $SGE_CHAIN_ID

Download configuration

cd $HOME
curl -Ls https://ss.sge.nodestake.top/genesis.json > $HOME/.sge/config/genesis.json 

Disable indexing

indexer="null"
sed -i -e "s/^indexer *=.*/indexer = \"$indexer\"/" $HOME/.sge/config/config.toml

Config pruning

pruning="custom"
pruning_keep_recent="100"
pruning_keep_every="0"
pruning_interval="19"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.sge/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.sge/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.sge/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.sge/config/app.toml

Set minimum gas price

sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0usge\"|" $HOME/.sge/config/app.toml

Create service

sudo tee /etc/systemd/system/sged.service > /dev/null <<EOF
[Unit]
Description=sged Daemon
After=network-online.target
[Service]
User=$USER
ExecStart=$(which sged) start
Restart=always
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF

Register and start service

sudo systemctl daemon-reload
sudo systemctl enable sged
sudo systemctl restart sged && sudo journalctl -u sged -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

sged keys add $WALLET

To recover your wallet using seed phrase

sged keys add $WALLET --recover

Show your wallet list

sged keys list

Save wallet info

Add wallet and validator address into variables

SGE_WALLET_ADDRESS=$(sged keys show $WALLET -a)
SGE_VALOPER_ADDRESS=$(sged keys show $WALLET --bech val -a)
echo 'export SGE_WALLET_ADDRESS='${SGE_WALLET_ADDRESS} >> $HOME/.bash_profile
echo 'export SGE_VALOPER_ADDRESS='${SGE_VALOPER_ADDRESS} >> $HOME/.bash_profile
source $HOME/.bash_profile

Create validator

check your wallet balance:

sged query bank balances $SGE_WALLET_ADDRESS

To create your validator run command below

sged tx staking create-validator \
  --amount 1000000usge \
  --from $WALLET \
  --commission-max-change-rate "0.01" \
  --commission-max-rate "0.2" \
  --commission-rate "0.05" \
  --min-self-delegation "1" \
  --pubkey  $(sged tendermint show-validator) \
  --moniker $NODENAME \
  --chain-id $SGE_CHAIN_ID

Check your validator key

[[ $(sged q staking validator $SGE_VALOPER_ADDRESS -oj | jq -r .consensus_pubkey.key) = $(sged 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

sged 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 sged -o cat

Start service

sudo systemctl start sged

Stop service

sudo systemctl stop sged

Restart service

sudo systemctl restart sged

Node info

Synchronization info

sged status 2>&1 | jq .SyncInfo

Validator info

sged status 2>&1 | jq .ValidatorInfo

Node info

sged status 2>&1 | jq .NodeInfo

Show node id

sged tendermint show-node-id

Wallet operations

List of wallets

sged keys list

Recover wallet

sged keys add $WALLET --recover

Delete wallet

sged keys delete $WALLET

Get wallet balance

sged query bank balances $SGE_WALLET_ADDRESS

Transfer funds

sged tx bank send $SGE_WALLET_ADDRESS <TO_SGE_WALLET_ADDRESS> 1000000usge

Voting

sged tx gov vote 1 yes --from $WALLET --chain-id=$SGE_CHAIN_ID

Staking, Delegation and Rewards

Delegate stake

sged tx staking delegate $SGE_VALOPER_ADDRESS 1000000usge --from=$WALLET --chain-id=$SGE_CHAIN_ID --gas=auto

Redelegate stake from validator to another validator

sged tx staking redelegate <srcValidatorAddress> <destValidatorAddress> 1000000usge --from=$WALLET --chain-id=$SGE_CHAIN_ID --gas=auto

Withdraw all rewards

sged tx distribution withdraw-all-rewards --from=$WALLET --chain-id=$SGE_CHAIN_ID --gas=auto

Withdraw rewards with commision

sged tx distribution withdraw-rewards $SGE_VALOPER_ADDRESS --from=$WALLET --commission --chain-id=$SGE_CHAIN_ID

Validator management

Edit validator

sged tx staking edit-validator \
  --moniker=$NODENAME \
  --identity=<your_keybase_id> \
  --website="<your_website>" \
  --details="<your_validator_description>" \
  --chain-id=$SGE_CHAIN_ID \
  --from=$WALLET

Unjail validator

sged tx slashing unjail \
  --broadcast-mode=block \
  --from=$WALLET \
  --chain-id=$SGE_CHAIN_ID \
  --gas=auto

Public Endpoint

RPC

https://mainnet-sge-rpc.konsortech.xyz

API

https://mainnet-sge-api.konsortech.xyz

Peers

26238cbb6bf285816bd06ca946b190e7248c389c@mainnet-sge.konsortech.xyz:22656

Custom Explorer

https://explorer.konsortech.xyz/sge

Statesync

sudo systemctl stop sged

cp $HOME/.sge/data/priv_validator_state.json $HOME/.sge/priv_validator_state.json.backup
sged tendermint unsafe-reset-all --home $HOME/.sge --keep-addr-book

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

mv $HOME/.sge/priv_validator_state.json.backup $HOME/.sge/data/priv_validator_state.json

sudo systemctl restart sged
sudo journalctl -u sged -f --no-hostname -o cat

Snapshot

sudo systemctl stop sged
cp $HOME/.sge/data/priv_validator_state.json $HOME/.sge/priv_validator_state.json.backup
rm -rf $HOME/.sge/data

SNAP_NAME=$(curl -s https://snapshot3.konsortech.xyz/sge/ | egrep -o ">sge-snapshot.*\.tar.lz4" | tr -d ">")
curl https://snapshot3.konsortech.xyz/sge/${SNAP_NAME} | lz4 -dc - | tar -xf - -C $HOME/.sge
mv $HOME/.sge/priv_validator_state.json.backup $HOME/.sge/data/priv_validator_state.json

sudo systemctl restart sged && journalctl -u sged -f --no-hostname -o cat
Embed Iframe

Sge Decentralization Maps