Six Sigma

SERVICE
CLI

Safe Block

Staking Service

SGE NODE INSTALL

Install pre-requisites

sudo apt update
sudo apt install git build-essential ufw curl jq lz4 --yes

Install Go

wget https://go.dev/dl/go1.19.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.19.linux-amd64.tar.gz
rm go1.19.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
cat <> ~/.profile
export GOPATH=$HOME/go
export GO111MODULE=on
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
EOF
source ~/.profile
go version

You will receive this response:
go version go1.19 linux/amd64

Install sged
git clone https://github.com/sge-network/sge
cd sge
git checkout v1.3.1
make install
sged version


You will receive this response:
v1.3.1
Init sged
# CHANGE $NODE_NAME with your “node name”
sged config chain-id sgenet-1
sged init "$NODE_NAME" --chain-id sgenet-1
Set Gas and Index

sed -i 's|^minimum-gas-prices *=.*|minimum-gas-prices = "0.0026usge"|g' $HOME/.sge/config/app.toml
sed -i 's|^indexer *=.*|indexer = "null"|g' $HOME/.sge/config/config.toml

Download Genesis, Addrbook and Snapshot
rm $HOME/.sge/config/genesis.json
wget https://snapshot.safeblock.space/sge/genesis.json -P $HOME/.sge/config
wget https://snapshot.safeblock.space/sge/addrbook.json -P $HOME/.sge/config
wget https://snapshot.safeblock.space/sge/sge-snapshot_01-03-2024.tar.lz4
lz4 -c -d sge-snapshot_01-03-2024.tar.lz4 | tar -x -C $HOME/.sge
rm sge-snapshot_01-03-2024.tar.lz4
Create SGE Service

# CHANGE $USER with your “username”
sudo tee /etc/systemd/system/sged.service > /dev/null << EOF

[Unit]
Description=SGE Node
After=network-online.target

[Service]
User=$USER
ExecStart=/home/$USER/go/bin/sged start
Restart=always
RestartSec=3
LimitNOFILE=4096

[Install]
WantedBy=multi-user.target
EOF

Start SGE Service

Enable sged in background:
sudo systemctl enable sged

Start SGE in background:
sudo systemctl start sged

Check SGE Service

sudo journalctl -fu sged -o cat
# Ctrl+C to exit

sudo journalctl -fu sged -o cat | grep index
# Ctrl+C to exit

curl -s http://0.0.0.0:26657/status | jq -r .result.sync_info.catching_up

If response is “true”, you not are synched, wait….
When response is “false”, your node are synched to SGE Network