Installation
🖥️System Requirements
- OS: Linux - CPU: 4 Core(s) - Memory: 16GB - Storage: 1TB
Setup
# install go, if needed
cd $HOME
VER="1.21.3"
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="18"" >> $HOME/.bash_profile
echo "export INITIA_PATH=".initia"" >> $HOME/.bash_profile
echo "export INITIA_TAG="v0.2.14"" >> $HOME/.bash_profile
source $HOME/.bash_profile
# download binary
git clone https://github.com/initia-labs/initia.git
cd initia
git checkout $INITIA_TAG
make build
sudo cp $HOME/initia/build/initiad /usr/local/bin/
# config and init app
initiad init $MONIKER --chain-id=$INITIA_CHAIN_ID
sed -i -e "s|^node *=.*|node = \"tcp://localhost:${INITIA_PORT}657\"|" $HOME/$INITIA_PATH/config/client.toml
# download genesis and addrbook
wget -O $HOME/$INITIA_PATH/config/genesis.json https://snapshot.dashnode.org/initia-testnet/genesis.json
wget -O $HOME/$INITIA_PATH/config/addrbook.json https://snapshot.dashnode.org/initia-testnet/addrbook.json
# set seeds and peers
SEEDS="5f934bd7a9d60919ee67968d72405573b7b14ed0@t-seed-initia.dashnode.org:29656"
PEERS""
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/$INITIA_PATH/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_PATH/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_PATH/config/config.toml
# config pruning
sed -i -e "s/^pruning *=.*/pruning = \"custom\"/" $HOME/$INITIA_PATH/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"100\"/" $HOME/$INITIA_PATH/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"50\"/" $HOME/$INITIA_PATH/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_PATH/config/app.toml
sed -i -e "s/prometheus = false/prometheus = true/" $HOME/$INITIA_PATH/config/config.toml
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/$INITIA_PATH/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_PATH
ExecStart=$(which initiad) start
Restart=on-abort
RestartSec=5
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=initiad
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
# reset and download snapshot
initiad tendermint unsafe-reset-all --home $HOME/$INITIA_PATH
# enable and start service
sudo systemctl daemon-reload
sudo systemctl enable initiad
sudo systemctl restart initiad && sudo journalctl -u initiad -f
Create a wallet
initiad keys add $WALLET
To restore your keys you have created, do this
initiad keys add $WALLET --recover
Save wallet and validator address
WALLET_ADDRESS=$(initiad keys show $WALLET -a)VALOPER_ADDRESS=$(initiad keys show $WALLET --bech val -a)echo "export WALLET_ADDRESS="$WALLET_ADDRESS >> $HOME/.bash_profileecho "export VALOPER_ADDRESS="$VALOPER_ADDRESS >> $HOME/.bash_profilesource $HOME/.bash_profile
Check sync status, once your node is fully synced, the output from above will print "false"
initiad status 2>&1 | jq
After creating a validator, make sure the fund has been funded sucessfully
initiad query bank balances $WALLET_ADDRESS
Last updated