Sifchain mainnet (EN)
⠀Sifchain is DEX for digital assets, unlocking liquidity in various chains to free people from egregious fees and inefficient trades.
Content
Server requirements
⠀Minimal (VPS/VDS/DS):
4 CPU, 16 GB RAM, 500 GB SSD, Ubuntu 20.04
⠀Recommended (VPS/VDS/DS):
8 CPU, 32 GB RAM, 1 TB SSD, Ubuntu 20.04
⠀Our experience (VPS/VDS/DS):
4 CPU, 8 GB RAM, 400 GB SSD, Ubuntu 20.04
Launching
sudo apt update && sudo apt upgrade -y
sudo apt install tar wget jq unzip build-essential git make -y
⠀Download and install a node binary (execute as one command)
cd; \ sifchain_version="v0.9.14"; \ wget -q "https://github.com/Sifchain/sifnode/releases/download/${sifchain_version}/sifnoded-${sifchain_version}-linux-amd64.zip"; \ unzip "sifnoded-${sifchain_version}-linux-amd64.zip" -d /usr/bin; \ rm -rf "sifnoded-${sifchain_version}-linux-amd64.zip"
. <(wget -qO- https://raw.githubusercontent.com/SecorD0/utils/main/installers/golang.sh)
go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@latest; \ mv `which cosmovisor` /usr/bin
⠀Put the node binary to Cosmovisor
mkdir -p $HOME/.sifnoded/cosmovisor/genesis/bin $HOME/.sifnoded/cosmovisor/upgrades; \ cp /usr/bin/sifnoded $HOME/.sifnoded/cosmovisor/genesis/bin
⠀Come up with a name for a node, run a command and enter the name, thereby adding it to the system as a variable
. <(wget -qO- https://raw.githubusercontent.com/SecorD0/utils/main/miscellaneous/insert_variable.sh) -n sifchain_moniker
⠀Add the chain ID to the system as a variable
. <(wget -qO- https://raw.githubusercontent.com/SecorD0/utils/main/miscellaneous/insert_variable.sh) -n sifchain_chain_id -v "sifchain-1"
sifnoded init "$sifchain_moniker" --chain-id "$sifchain_chain_id"
⠀Make a backup copy of the settings folder, saving it in a safe place (the command displays the path)
echo $HOME/.sifnoded/config/
wget -q https://raw.githubusercontent.com/Sifchain/networks/master/betanet/sifchain-1/genesis.json.gz; \ gunzip -c genesis.json.gz > $HOME/.sifnoded/config/genesis.json
bootstrap_node="http://62.171.177.11:26657/"; \ bootstrap_node2="http://62.171.177.11:26657/"; \ latest_height=`wget -qO- "${bootstrap_node}/block" | jq -r ".result.block.header.height"`; \ block_height=$((latest_height - 2000)); \ trust_hash=`wget -qO- "${bootstrap_node}/block?height=${block_height}" | jq -r ".result.block_id.hash"`; \ sed -i -e "s%^moniker *=.*%moniker = \"$sifchain_moniker\"%; "\ "s%^external_address *=.*%external_address = \"`wget -qO- eth0.me`:26656\"%; "\ "s%^persistent_peers *=.*%persistent_peers = \"f49b974b5115557b1b276680d35b5d1f2e72fcff@62.171.177.10:26656\"%; "\ "s%^enable *=.*%enable = true%; "\ "s%^rpc_servers *=.*%rpc_servers = \"${bootstrap_node},${bootstrap_node2}\"%; "\ "s%^trust_height *=.*%trust_height = $block_height%; "\ "s%^trust_hash *=.*%trust_hash = \"$trust_hash\"%" $HOME/.sifnoded/config/config.toml
sudo tee <<EOF >/dev/null /etc/systemd/system/sifchaind.service [Unit] Description=Sifchain node After=network.target [Service] User=$USER Environment="DAEMON_NAME=sifnoded" Environment="DAEMON_HOME=$HOME/.sifnoded" Environment="DAEMON_RESTART_AFTER_UPGRADE=true" Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=true" Environment="UNSAFE_SKIP_BACKUP=true" ExecStart=`which cosmovisor` start --x-crisis-skip-assert-invariants Restart=on-failure RestartSec=3 LimitNOFILE=65535 [Install] WantedBy=multi-user.target EOF
sudo systemctl daemon-reload sudo systemctl enable sifchaind sudo systemctl restart sifchaind
⠀Add a command to view a log of the node in the system as a variable
. <(wget -qO- https://raw.githubusercontent.com/SecorD0/utils/main/miscellaneous/insert_variable.sh) -n sifchain_log -v "sudo journalctl -fn 100 -u sifchaind" -a
sifchain_log
⠀After a while the downloading and unpacking of the snapshot will start
⠀After full synchronization update persistent_peers
and restart the node
sed -i -e "s%persistent_peers *=.*%persistent_peers = \"0d4981bdaf4d5d73bad00af3b1fa9d699e4d3bc0@44.235.108.41:26656,bcc2d07a14a8a0b3aa202e9ac106dec0bef91fda@13.55.247.60:26656,663dec65b754aceef5fcccb864048305208e7eb2@34.248.110.88:26656,0120f0a48e7e81cc98829ef4f5b39480f11ecd5a@52.76.185.17:26656,6535497f0152293d773108774a705b86c2249a9c@44.238.121.65:26656,fdf5cffc2b20a20fab954d3b6785e9c382762d14@34.255.133.248:26656,8c240f71f9e060277ce18dc09d82d3bbb05d1972@13.211.43.177:26656,9fbcb6bd5a7f20a716564157c4f6296d2faf5f64@18.138.208.95:26656\"%;" $HOME/.sifnoded/config/config.toml; \ sudo systemctl restart sifchaind
Information about a node
⠀Add a command to view information about the node in the system as a variable
. <(wget -qO- https://raw.githubusercontent.com/SecorD0/utils/main/miscellaneous/insert_variable.sh) -n sifchain_node_info -v ". <(wget -qO- https://raw.githubusercontent.com/SecorD0/Sifchain/main/node_info.sh) 2> /dev/null" -a
⠀Execute the following command to view information about the node
sifchain_node_info
Wallet
⠀Come up with a name for a wallet, run a command and enter the name, thereby adding it to the system as a variable
. <(wget -qO- https://raw.githubusercontent.com/SecorD0/utils/main/miscellaneous/insert_variable.sh) -n sifchain_wallet_name
Already have
sifnoded keys add "$sifchain_wallet_name" --recover --keyring-backend file
⠀It is necessary to enter the mnemonic phrase of the wallet and twice the password for encrypt
Not yet
sifnoded keys add "$sifchain_wallet_name"
⠀It is necessary to set a password, remember it and
Validator
⠀Wait for full node synchronization
sifchain_node_info
⠀Transfer at least 2 ROWAN (1 for the self delegation, 1 to pay commissions) from an exchange to the wallet
⠀You can specify your own --amount
value to change self delegation, where 1 human ROWAN = 1*10^18 node ROWAN
, for example:
1 ROWAN = 1000000000000000000rowan 225 ROWAN = 225000000000000000000rowan 10000.1 ROWAN = 10000100000000000000000rowan
sifnoded tx staking create-validator \ --amount 1000000000000000000rowan \ --moniker "$sifchain_moniker" \ --pubkey `sifnoded tendermint show-validator` \ --commission-max-change-rate 0.1 \ --commission-max-rate 0.1 \ --commission-rate 0.09 \ --min-self-delegation 1 \ --from "$sifchain_wallet_name" \ --chain-id "$sifchain_chain_id" \ --fees 100000000000000000rowan \ --node `cat $HOME/.sifnoded/config/config.toml | grep -oPm1 "(?<=^laddr = \")([^%]+)(?=\")"`
Useful commands
⠀Available variables (remove echo
while using)
echo $sifchain_moniker echo $sifchain_wallet_address echo $sifchain_chain_id
⠀Show the last 100 entries in the node's log
sifchain_log sudo journalctl -fn 100 -u sifchaind
⠀View information about the node
sifchain_node_info . <(wget -qO- https://raw.githubusercontent.com/SecorD0/Sifchain/main/node_info.sh)
sifnoded tx staking delegate "VAL_ADDR" "NUMBERrowan" \ --chain-id "$sifchain_chain_id" \ --from "$sifchain_wallet_name" \ --fees 100000000000000000rowan \ --node `cat "$HOME/.sifnoded/config/config.toml" | grep -oPm1 "(?<=^laddr = \")([^%]+)(?=\")"`
⠀Withdraw rewards from delegation
sifnoded tx distribution withdraw-all-rewards \ --chain-id "$sifchain_chain_id" \ --from "$sifchain_wallet_name" \ --fees 100000000000000000rowan \ --node `cat $HOME/.sifnoded/config/config.toml | grep -oPm1 "(?<=^laddr = \")([^%]+)(?=\")"` \ -y
⠀Withdraw validator commissions
sifnoded tx distribution withdraw-rewards "VAL_ADDR" \ --chain-id "$sifchain_chain_id" \ --from "$sifchain_wallet_name" \ --fees 100000000000000000rowan \ --commission \ --node `cat $HOME/.sifnoded/config/config.toml | grep -oPm1 "(?<=^laddr = \")([^%]+)(?=\")"` \ -y
sifnoded tx bank send "$sifchain_wallet_name" "ADDRESS" NUMBERrowan \ --chain-id "$sifchain_chain_id" \ --from "$sifchain_wallet_name" \ --fees 100000000000000000rowan \ --node `cat $HOME/.sifnoded/config/config.toml | grep -oPm1 "(?<=^laddr = \")([^%]+)(?=\")"`
sudo systemctl restart sifchaind
Useful links
Official WebSite | Official Telegram group
Medium | Official documentaion
Acknowledgments
Let’s Node! Team — studying the project, writing the article