Installation guide [RU]

sudo apt update && sudo apt upgrade -y
sudo apt install curl -y

# Установка GO
wget -O go1.18.linux-amd64.tar.gz https://go.dev/dl/go1.18.linux-amd64.tar.gz
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.18.linux-amd64.tar.gz && rm go1.18.linux-amd64.tar.gz
cat <<'EOF' >> $HOME/.bash_profile
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
EOF
. $HOME/.bash_profile
cp /usr/local/go/bin/go /usr/bin
go version

# install jq
sudo apt-get update && apt-get install -y jq

# Установка iris
# посмотреть актуальную версию можно тут 
# https://www.irisnet.org/docs/get-started/mainnet.html#run-a-full-node
# и тут https://github.com/irisnet/irishub
# как обновиться смотреть тут 
# https://github.com/irisnet/mainnet/tree/master/upgrade

apt install git -y
git clone https://github.com/irisnet/irishub
cd irishub
git checkout v1.3.0
git pull origin v1.3.0
sudo apt-get install gcc g++ make
make install
. $HOME/.bash_profile

# Это не нужно скорее всего
cp $HOME/go/bin/iris /usr/local/bin
cp $HOME/go/bin/iris /usr/local/sbin
# Check the version number
# Возможно не iris а irishub !!!!!!!!!!!!!!!!!!!!!
iris version --long
iris version

# Вводим переменные Iris_moniker Iris_wallet chainName

Iris_moniker=<Your _Node_name>
echo $Iris_moniker
echo 'export Iris_moniker='\"${Iris_moniker}\" >> $HOME/.bash_profile

Iris_wallet=<Your _Wallet_name>
echo $Iris_wallet
echo 'export Iris_wallet='\"${Iris_wallet}\" >> $HOME/.bash_profile

chainName=irishub-1
echo $chainName
echo 'export chainName='\"${chainName}\" >> $HOME/.bash_profile
. $HOME/.bash_profile

# initialize node configurations
# Возможно не iris а irishub !!!!!!!!!!!!!!!!!!!!!
iris init --chain-id=$chainName $Iris_moniker

# download mainnet public config.toml and genesis.json
curl -o ~/.iris/config/config.toml https://raw.githubusercontent.com/irisnet/mainnet/master/config/config.toml
curl -o ~/.iris/config/genesis.json https://raw.githubusercontent.com/irisnet/mainnet/master/config/genesis.json

# Так как заменили Config.toml то надо вписать свой моникер!
sed -i.bak -e "s/^moniker *=.*/moniker = \"$Iris_moniker\"/" $HOME/.iris/config/config.toml

# start the node (you can also use "nohup" or "systemd" to run in the background)
iris unsafe-reset-all

# Возможно не irishub а iris !!!!!!!!!!!!!!!!!!!!!

sudo tee <<EOF >/dev/null /etc/systemd/system/irisd.service
[Unit]
Description=iris Cosmos daemon
After=network-online.target

[Service]
User=$USER
ExecStart=/root/go/bin/iris start --log_level=info
Restart=on-failure
RestartSec=3
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF

# Закомментируем строчку log_level = "info"
sed -i.bak 's/^log_level/# log_level/' $HOME/.iris/config/config.toml

# Вставляем пиры и сиды.  Взять их можно от сюда: 
# https://github.com/irisnet/mainnet/blob/master/config/community-peers.md
SEEDS="6a6de770deaa4b8c061dffd82e9c7f4d40c2165d@seed-1.mainnet.irisnet.org:26656,a17d7923293203c64ba75723db4d5f28e642f469@seed-2.mainnet.irisnet.org:26656"
PEERS="fcc1d9bc43163b20ce5163cf41a302b33f25375f@34.82.96.8:26656,fdc0406afdd3acc63f74f5439e09104f663a7c1f@44.241.177.178:26656,090bcbe5302e6104821a96c4899912870db04cb9@52.11.128.123:26656,83b3f989f3ce089afdf733f8aa06e792d7e00c08@3.34.6.30:26656,87f18756b93d835c59fe5ce2a8da51858837eb5b@54.180.15.28:26656,90e48220190b16cad95145b6213d512d703e5617@138.197.158.189:26656,7fad2da10c41b0c1e3c2ce6e708f7fa817b5e19d@135.181.56.26:46656,ebfb43ca1b592b5f8a1faf3e2aa1a34e8e1099cc@iris01.dokia.cloud:26656,895d5a5009d042108783a6aeb0991c5186a46617@144.76.96.47:26656,40821d0ade83d582b29d748f37ecf7bef0a823d0@66.42.116.195:26656,f4af63df2f5c63428be776e56ffc2899fa47afdf@47.101.160.78:26656,08e2f9453541b104df84efa68ab2f0d242eb829b@176.9.47.69:26656,db3dacf404840e067b2f59e304cb2b6662ec0cea@173.212.212.252:26656,87525da8c830da2c3a861638a77f601278efd353@185.181.103.142:26656,4ac6200974d3fd80a8e49d145a2c254ed37a9b9a@159.69.106.156:26656,4e02a4b4f4350ea2b770cd03dc41fedcadb13176@159.69.55.206:26656,63f5646b5f9ce927241383a091b60f797796588f@143.110.240.198:26656,84cc32adca3986b35953886ad075431d318a98b5@52.214.130.28:46656,5387e8f13cee43b47526d2d6a9d8ee65b14e4b8f@161.97.187.139:26656"
sed -i.bak -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.iris/config/config.toml

# Минимум minimum-gas-prices
sed -i "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.0001uiris\"/;" $HOME/.iris/config/app.toml

# Поставить синхрон от state-sync
# https://www.irisnet.org/docs/get-started/state-sync.html#procedure
# Check the block height of the current snapshot, and select the latest height.
# тут написано как это сделать https://ping.pub/iris-network/statesync
curl http://34.82.96.8:26658/

# Modify the config.toml.
nano $HOME/.iris/config/config.toml

# В файле нужно поменять так:
[statesync]
enable = true # whether enable stat_sync; set true
rpc_servers = "34.82.96.8:26657,34.77.68.145:26657" # RPC server address which the node connects to
trust_height = # Set to the block height of the latest snapshot
trust_hash = "" #Set to the hash corresponding to the latest snapshot block height (trust height), 
# which can be checked via https://irishub.iobscan.io/#/block/<trust_height>.
trust_period = "168h0m0s"
discovery_time = "15s"
temp_dir = ""

# Запустить
sudo systemctl enable irisd
sudo systemctl daemon-reload
sudo systemctl restart irisd
echo 'Node status:'$(sudo service irisd status | grep active)

# Логи
journalctl -u irisd -f
# Check your node status:
curl localhost:26657/status
curl localhost:26657/status | jq '.result.sync_info'

# Создать кошелек
iris keys add $Iris_wallet

# Закинуть на него токены
# Запустить валидатора
iris tx staking create-validator \
    --pubkey=$(iris tendermint show-validator) \
    --moniker=$Iris_moniker \
    --amount=<amount-to-be-delegated, e.g. 10000iris> \
    --min-self-delegation=1 \
    --commission-max-change-rate=0.1 \
    --commission-max-rate=0.1 \
    --commission-rate=0.1 \
    --gas=100000 \
    --fees=0.6iris \
    --chain-id=irishub-1 \
    --from=<key-name>

Полезные команды

Запустить. Перезапустить

Логи

Статус ноды

Только параметры синхронизации

Узнать node_id

Last updated