⚙️ Installation

🛠️ Hardware Requirements

Node TypeCPURAMStorage

Full (Recommended)

4-8v CPU

16 GB

100GB Disk Storage

Additional requirements

Chain IDVersion tagBinary NameBinary Home

self-1

v1.0.1

selfchaind

$HOME/.selfchain

⚡ Automatic installation

bash <(curl -s https://raw.githubusercontent.com/UnityNodes/scripts/main/selfchain/install-selfchain.sh)

📝 Manual installation

1️⃣ Installation packeges and dependencies

# Install dependencies for building from source
sudo apt update
sudo apt install -y lz4 jq make git gcc build-essential curl chrony unzip gzip snapd tmux bc

# Install Go
sudo rm -rf /usr/local/go
curl -L https://go.dev/dl/go1.21.6.linux-amd64.tar.gz | sudo tar -xzf - -C /usr/local
echo 'export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin' >> $HOME/.bash_profile
source .bash_profile

2️⃣ Install node

Replace "NODE_MONIKER" with your name moniker

# Install selfchain through binary
cd $HOME
curl -L https://snapshots-mainnet.unitynodes.com/selfchain-mainnet/selfchaind.tar.gz | tar -xvzf - -C $HOME
sudo mv selfchaind /usr/local/bin/

# Set node CLI configuration
selfchaind config chain-id self-1
selfchaind config keyring-backend file
selfchaind config node tcp://localhost:12857
source $HOME/.bash_profile

# Initialize the node
selfchaind init "NODE_MONIKER" --chain-id self-1

# Download genesis and addrbook files
curl -Ls https://snapshots-mainnet.unitynodes.com/selfchain-mainnet/genesis.json > $HOME/.selfchain/config/genesis.json
curl -Ls https://snapshots-mainnet.unitynodes.com/selfchain-mainnet/addrbook.json > $HOME/.selfchain/config/addrbook.json

# Set peers
sed -i 's/persistent_peers = ""/persistent_peers = "c87c1b17045b27fd14b13d7dbb3469a2248cb1f7@95.217.204.58:24356,7f75c0e8a7f5f60b587f4acd805f871445367b4b@65.21.140.123:11656,eeb793482d2957e760b65c37978ad5ba3528bbd9@65.108.66.174:41656,a5a35060ef89a1d2550f5d161e2584b9128a219f@37.27.133.23:26656,861152eda2fbab6555e8188088ea4dea9472a174@38.242.157.6:26656,e5b970c7b4e9b0281fc2fc58166c9e9af476c9a3@46.4.23.120:58656,6a3a0db2763d8222d00af55cbbe35824a39c8292@176.9.183.45:34656,637077d431f618181597706810a65c826524fd74@5.9.151.56:24356,7a9038d1efd34c7f3baea17d8822262a981568b1@217.182.136.79:30156,790544e857cfe673cab570668131aa7ae2be7e5d@178.63.100.102:26656,2f547f93392d7351c74a0d8cae1d44f172cf32e5@64.227.156.23:26656,6ae10267d8581414b37553655be22297b2f92087@174.138.25.159:26656,9d7dbaa0cb7f28ab8926c738860c18bd6d00aaaf@168.119.75.89:26656,c1499d43cf198e2bc5490b9e2018ef22cd657d89@65.108.81.240:26656,473303f1a0dff43121cff9b7a12b5b39a42bc46c@37.27.31.253:26656,5394c55f1bad5cf011d0f43901cc9ad2a1a727e7@95.217.128.197:26656,1b9693077773f2f986191b44169e447e0bb56dcc@185.225.191.108:36656,e3edeec5261ec00ba4a87cdd419f601ee5e5e063@109.199.118.239:11356,6ca2f5faaac9eb9515d12e4437dda9f5b92fe75a@185.185.80.16:27656,a950d48fce4a648aacf7327198e6ea3e545f3112@168.119.166.138:26656,5fec0f158870a9e82e8a48fed83a78d567fb639a@167.235.12.38:22156,5bfe7ec3ce0fbbf6d724dc85edef31c23b0a5e5e@94.130.138.48:41656,5ad15186a602778fbeeccf86c836a68cc225b21b@2001:bc8:3de9:100::9:26656,8401cbf633c496e464a2d016b333f61ff34e9ee9@167.71.233.135:26656,55d3e1761d6752eeb72b8b86decbca0d56f6a885@159.89.173.150:26656,e9f2bfbf5cddb0a792148dff3f0b3520d3c63a0f@65.109.92.241:3056,9512a59cf93b987aff830148421a514cacb8a1b8@170.64.141.15:26656,1e8aba6c7d2e33545353d073006ea9815c641158@46.4.64.123:26656,e9376f40ac2b672e9f2f66ad212f59801d53afe8@178.162.165.193:26656,a96b7c56cb64c16917a629c9ae0f3b3c0aea584c@35.246.252.172:26656,4c8b8296e767cf3d67355dba98781ee0348e87ea@144.76.30.94:30056,bbfa092023e4fbe6b90abe19449bce3cc1c83594@113.176.163.161:26656,024aa95bbdcef24d8d55c04f9c4de2fec2bc3bf6@34.89.163.192:26656,7efdc46e50e03e1f1208c8f276047b7fea345cc8@34.141.7.8:26656,0a67ac1518c816e1927554dfc17c47f4ee457bcb@168.119.75.88:36656,b844793daeffaedfcdbd5b08688cd10e1859d678@37.120.245.116:26656,3ccb8f8db7094eb546fff7e38c3f946910ab2fed@34.159.240.168:26656,c597aa118302d417e039e5a81d722422e73c85e1@135.125.67.227:26656,2c37e034e045259cbc868a564d3fb66995dd4509@35.246.227.211:26656,e097dc629cbe874b139841dedb06775cc75435ee@65.108.237.188:20656,923758c6f7adaec3c9a668dc74ba28fda7066b1c@65.109.120.211:24656,f282af2ba286abb9d4aab611a8f39176c26d6928@213.239.207.175:61656,0b3c9a6aed9560076e1b47ac386ff9add64ceaa9@173.234.17.129:26656,f958f4e2d1384514ed8c62b1bc753d0b8a8d0430@167.235.102.45:24656"/' config.toml

# Set minimum gas price
sed -i 's|^minimum-gas-prices *=.*|minimum-gas-prices = "0.005uself"|g' $HOME/.selfchain/config/app.toml

# Set pruning
sed -i \
  -e 's|^pruning *=.*|pruning = "custom"|' \
  -e 's|^pruning-keep-recent *=.*|pruning-keep-recent = "100"|' \
  -e 's|^pruning-keep-every *=.*|pruning-keep-every = "0"|' \
  -e 's|^pruning-interval *=.*|pruning-interval = "10"|' \
  $HOME/.selfchain/config/app.toml

# Download latest chain data snapshot
curl https://snapshots-mainnet.unitynodes.com/selfchain-mainnet/selfchain-mainnet-latest.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.selfchain


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

sudo systemctl daemon-reload
sudo systemctl enable selfchaind

# Start the service and check the logs
sudo systemctl start selfchaind.service
sudo journalctl -u selfchaind.service -f -o cat

📝 Create Validator

1️⃣ Create wallet

selfchaind keys add wallet

Save all information after entering the command, without this you will not be able to restore data to the wallet. SAVE SEED PHRASE (12 words).

2️⃣ View your wallet balance

selfchaind keys q bank balances "address"

if the balance is displayed - continue further

3️⃣ View the sync status of your node

selfchaind status | jq | grep "catching_up"

If "true" - not synchronized // "false" - synchronized

4️⃣ Create validator

selfchaind tx staking create-validator \
  --amount "1000000uself" \
  --pubkey $(selfchaind tendermint show-validator) \
  --moniker "NODE_MONIKER" \ #Validator name, displayed in explorers. 
  --identity "" \ #Use your KeyBase ID. If you don't have one, leave it empty.
  --details "" \ #Any details about your validator.
  --website "" \ #Your website/github etc 
  --chain-id self-1 \
  --commission-rate "0.05" \
  --commission-max-rate "0.2" \
  --commission-max-change-rate "0.01" \
  --min-self-delegation "1" \
  --broadcast-mode sync \
  --gas="87578" \
  --gas-adjustment="1.2" \
  --gas-prices="0.5uslf" \
  --from=wallet \
  -y

After entering the command, you will receive hash transactions, check the status in the explorer

5️⃣ Save priv_validator_key.json


cat $HOME/.selfchain/config/priv_validator_key.json
SAVE YOUR PRIVATE KEY AFTER ENTERING THE COMMAND

Last updated