Install Initia Validator
# install dependencies, if needed
sudo apt update && \
sudo apt install curl git jq build-essential gcc unzip wget lz4 -y
#install go
cd $HOME && \
ver="1.22.0" && \
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" && \
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> ~/.bash_profile && \
source ~/.bash_profile && \
go version
git clone https://github.com/initia-labs/initia.git
cd initia
git checkout v0.2.12
make install
#jika install make error bisa gunakan perintah ini :
sudo apt install build-essential
# set vars (change "XXXX" to your validator username)
echo 'export MONIKER="XXXX"' >> ~/.bash_profile
echo 'export CHAIN_ID="initiation-1"' >> ~/.bash_profile
echo 'export WALLET_NAME="wallet"' >> ~/.bash_profile
echo 'export RPC_PORT="26657"' >> ~/.bash_profile
source $HOME/.bash_profile
cd $HOME
initiad init $MONIKER --chain-id $CHAIN_ID
initiad config set client chain-id $CHAIN_ID
initiad config set client node tcp://localhost:$RPC_PORT
initiad config set client keyring-backend os # You can set it to "test" so you will not be asked for a password
# download genesis and addrbook
wget -O $HOME/.initia/config/genesis.json https://initia.s3.ap-southeast-1.amazonaws.com/initiation-1/genesis.json
# setup PEERS and SEEDS
PEERS="[email protected]:30656,[email protected]:26656,[email protected]:53456,[email protected]:26313,[email protected]:25756,[email protected]:26656,[email protected]:26656,[email protected]:53456,[email protected]:26656,[email protected]:26656,[email protected]:19656,[email protected]:26656,[email protected]:53456,[email protected]:26656,[email protected]:53456,[email protected]:26656,[email protected]:36656,[email protected]:53456,[email protected]:53456,[email protected]:26656,[email protected]:26656" && \
SEEDS="[email protected]:26656,c28827cb96c14c905b127b92065a3fb4cd77d7f6@testnet-seeds.whispernode.com:25756" && \
sed -i \
-e "s/^seeds *=.*/seeds = \"$SEEDS\"/" \
-e "s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" \
"$HOME/.initia/config/config.toml"
# config pruning (to save storage)
sed -i \
-e "s/^pruning *=.*/pruning = \"custom\"/" \
-e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"100\"/" \
-e "s/^pruning-interval *=.*/pruning-interval = \"10\"/" \
"$HOME/.initia/config/app.toml"
# set minimum gas price
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.15uinit,0.01uusdc\"/" $HOME/.initia/config/app.toml
# create service file
sudo tee /etc/systemd/system/initiad.service > /dev/null <<EOF
[Unit]
Description=Initia Node
After=network.target
[Service]
User=$USER
Type=simple
ExecStart=$(which initiad) start --home $HOME/.initia
Restart=on-failure
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
# enable and start service
sudo systemctl daemon-reload && \
sudo systemctl enable initiad && \
sudo systemctl restart initiad && \
sudo journalctl -u initiad -f -o cat
Create Wallet
# to create a new wallet, use the following command. don’t forget to save the mnemonic
initiad keys add $WALLET_NAME
# to restore exexuting wallet, use the following command
initiad keys add $WALLET_NAME --recover
# save wallet and validator addres
# check sync status, once your node is fully synced, the output from above will print "false"
initiad status 2>&1 | jq
# before creating a validator, you need to fund your wallet and check balance
initiad q bank balances $(initiad keys show wallet -a)
Create Validator (make sure your node synced before creating validator)
initiad tx mstaking create-validator \
--amount 1000000uinit \
--pubkey $(initiad tendermint show-validator) \
--moniker=$MONIKER \
--chain-id=$CHAIN_ID \
--identity "" \
--details "Independent & experienced validator with high performance and availability services." \
--website "" \
--commission-rate 0.05 \
--commission-max-rate 0.20 \
--commission-max-change-rate 0.05 \
--from=$WALLET_NAME \
--gas-adjustment 1.4 \
--gas auto \
--gas-prices 0.15uinit \
-y
Last updated