Initiate the Node

Start initiate the node

iond init $NICKNAME --chain-id SanfordNetworkV2

Delete the old genesis file and download the new one with one command

rm $HOME/.ion/config/genesis* && wget -O $HOME/.ion/config/genesis.json "https://raw.githubusercontent.com/IDEP-network/SanfordV2/master/genesis.json"

Update the external address

external_address=$(curl -s ifconfig.me):26656
sed -i.bak -e "s/^external_address = \"\"/external_address = \"$external_address\"/" $HOME/.ion/config/config.toml

Update peers in the config file:

sed -i.bak -e "s/^seeds *=.*/seeds = \
\"4f32b91384999069bdfdbc82b7725866f1c37cbb@142.93.121.105:26656\"/" \
$HOME/.ion/config/config.toml

Update Pruning.

pruning="custom"
pruning_keep_recent="100"
pruning_keep_every="5000"
pruning_interval="10"

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

Create a service file to run the node:

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

Enable the 'idepd' service

sudo systemctl daemon-reload  
sudo systemctl enable idepd  
sudo systemctl restart idepd

Check the logs

sudo journalctl -u idepd -f

Another method the start the node.

Use the tmux

CommandsDescription

sudo apt install tmux

Install Tmux in linux

tmux new -s run

To open a new Tmux Window

tmux a -t run

To reattach the Tmux Window

ctrl + b and press d

To detach the tmux window

type "exit"

To exit the window

ctrl + c

To the end the process

Oppen the tmux window and start

iond start

Wait for the Blocks will sync uptodate.

Get the height of the blocks of your node.

sudo apt install jq
iond status 2>&1 | jq ."SyncInfo"."latest_block_height"

Get the sync status of the node.

iond status 2>&1 | jq ."SyncInfo"."catching_up"

If the result returns "true" => the blocks is not synced update

If the result returns "false" => then blocks are synced and you can proceed further.

Last updated