✔️Initia
Install go
cd $HOME
VER="1.22.2"
wget "https://golang.org/dl/go$VER.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$VER.linux-amd64.tar.gz"
rm "go$VER.linux-amd64.tar.gz"
[ ! -f ~/.bash_profile ] && touch /.bash_profile
echo "export PATH=$PATH:/usr/local/go/bin:/go/bin" >> ~/.bash_profile
source $HOME/.bash_profile [ ! -d ~/go/bin ] && mkdir -p ~/go/bin
set vars
echo "export WALLET="wallet"" >> $HOME/.bash_profile
echo "export MONIKER="test"" >> $HOME/.bash_profile
echo "export INITIA_CHAIN_ID="initiation-1"" >> $HOME/.bash_profile
echo "export INITIA_PORT="51"" >> $HOME/.bash_profile
source $HOME/.bash_profile
download binary
cd $HOME
rm -rf initia
git clone https://github.com/initia-labs/initia.git
cd initia
git checkout v0.2.23-stage-2
make install
config and init app
initiad init $MONIKER
initiad config set client chain-id initiation-1
initiad config set client node tcp://localhost:${INITIA_PORT}657
sed -i -e "s|^node =.|node = "tcp://localhost:${INITIA_PORT}657"|" $HOME/.initia/config/client.toml
download genesis and addrbook
wget -O $HOME/.initia/config/genesis.json https://testnet-files.itrocket.net/initia/genesis.json
wget -O $HOME/.initia/config/addrbook.json https://testnet-files.itrocket.net/initia/addrbook.json
set seeds and peers
SEEDS="cd69bcb00a6ecc1ba2b4a3465de4d4dd3e0a3db1@initia-testnet-seed.itrocket.net:51656"
PEERS="67b58592de11a6885d71d3ea436dc284b816caa3@initia-testnet-peer.itrocket.net:51656,25c298e8b74756c6f9e9f01fe8be14f14a307922@65.108.121.227:13756,9166f6ee9a0f452cf5b6602a896e36bbd51d27b5@65.109.88.162:17956,a8123d44f558c511d76fe87c7e610d9a55238d1f@65.108.232.156:25756,0f5e3f72b1dc6d657d65f4f6b74f0f32b69758fd@213.239.218.219:50156,834cc22928a29cb4f3c11d2249583809b828aa76@37.27.68.113:12656,b54d2c93d29451f3066e264060374f6931253506@65.109.92.18:16656,c56ab2c4a718d781491218b02ca79bab5fe2f4d6@65.108.69.56:17956,635d183fd9788846c2606b6ebf9fef3ea83cd06c@37.27.130.137:17956,e52e57b83941ee5ebb0303cc83976a71f366ac7b@144.24.207.76:26656,62775997caa3d814c5ad91492cb9d411aea91c58@51.38.53.103:26856"
sed -i -e "s/^seeds =./seeds = "$SEEDS"/; s/^persistent_peers =./persistent_peers = "$PEERS"/" $HOME/.initia/config/config.toml
set custom ports in app.toml
sed -i.bak -e "s%:1317%:${INITIA_PORT}317%g;
s%:8080%:${INITIA_PORT}080%g;
s%:9090%:${INITIA_PORT}090%g;
s%:9091%:${INITIA_PORT}091%g;
s%:8545%:${INITIA_PORT}545%g;
s%:8546%:${INITIA_PORT}546%g;
s%:6065%:${INITIA_PORT}065%g" $HOME/.initia/config/app.toml
set custom ports in config.toml file
sed -i.bak -e "s%:26658%:${INITIA_PORT}658%g;
s%:26657%:${INITIA_PORT}657%g;
s%:6060%:${INITIA_PORT}060%g;
s%:26656%:${INITIA_PORT}656%g;
s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):${INITIA_PORT}656\"%;
s%:26660%:${INITIA_PORT}660%g" $HOME/.initia/config/config.toml
config pruning
sed -i -e "s/^pruning *=.*/pruning = \"custom\"/" $HOME/.initia/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"100\"/" $HOME/.initia/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"50\"/" $HOME/.initia/config/app.toml
set minimum gas price, enable prometheus and disable indexing
sed -i 's|minimum-gas-prices =.*|minimum-gas-prices = "0.15uinit,0.01uusdc"|g' $HOME/.initia/config/app.toml
sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.initia/config/config.toml
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.initia/config/config.toml
create service file
sudo tee /etc/systemd/system/initiad.service > /dev/null <<EOF
[Unit]
Description=Initia node
After=network-online.target
[Service]
User=$USER
WorkingDirectory=$HOME/.initia
ExecStart=$(which initiad) start --home $HOME/.initia
Restart=on-failure
RestartSec=5
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
reset and download snapshot
initiad tendermint unsafe-reset-all --home $HOME/.initia
if curl -s --head curl https://server-4.itrocket.net/testnet/initia/null | head -n 1 | grep "200" > /dev/null; then
curl https://server-4.itrocket.net/testnet/initia/null | lz4 -dc - | tar -xf - -C $HOME/.initia
else
echo "no snapshot founded"
fi
enable and start service
sudo systemctl daemon-reload
sudo systemctl enable initiad
sudo systemctl restart initiad && sudo journalctl -u initiad -f
Last updated