initia-node-incentive
v1.1.4
Published
``` sudo apt update && sudo apt upgrade -y ```
Downloads
10
Readme
Update Packages
sudo apt update && sudo apt upgrade -y
Install Dependecies
sudo apt install curl tar wget clang pkg-config libssl-dev jq build-essential bsdmainutils git make ncdu gcc git jq chrony liblz4-tool -y
Install Golang
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
Build Binaries
cd $HOME
rm -rf initia
git clone https://github.com/initia-labs/initia.git
cd initia
git checkout v0.2.14
make install
Init app
initiad init (yourname) --chain-id initiation-1
yourname ( change to your name )
Download Genesis
curl -Ls https://initia.s3.ap-southeast-1.amazonaws.com/initiation-1/genesis.json > $HOME/.initia/config/genesis.json
Settings Gas Fee
# setting minimum-gas-prices = "0.15uinit,0.01uusdc"
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0.15uinit,0.01uusdc\"|" $HOME/.initia/config/app.toml
Settings Peers
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\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.initia/config/config.toml
Create Service
tee /etc/systemd/system/initiad.service > /dev/null << EOF
[Unit]
Description=Initiad Node
After=network-online.target
[Service]
User=$USER
ExecStart=$(which initiad) start
Restart=on-failure
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
Register Service
sudo systemctl daemon-reload && \
sudo systemctl enable initiad && \
sudo systemctl start initiad && sudo journalctl -fu initiad -o cat
Lanjut download SNAPSHOT, Ikuti step dibawah ini
Stop the service and reset the data
sudo systemctl stop initiad.service
cp $HOME/.initia/data/priv_validator_state.json $HOME/.initia/priv_validator_state.json.backup
rm -rf $HOME/.initia/data
Download latest snapshot
curl -L https://snapshots.kzvn.xyz/initia/initiation-1_latest.tar.lz4 | tar -Ilz4 -xf - -C $HOME/.initia
mv $HOME/.initia/priv_validator_state.json.backup $HOME/.initia/data/priv_validator_state.json
Restart the service and check the log
sudo systemctl start initiad.service && sudo journalctl -u initiad.service -f --no-hostname -o cat
Sambil menunggu SYNCED, Kalian buat / restore wallet initia dulu
We Will Give You 2 Option [ Create Wallet or Import Private Key ]
to create a new wallet, use the following command. don’t forget to save the mnemonic
initiad keys add $WALLET
to restore exexuting wallet, use the following command
initiad keys add $WALLET --recover
to get current list your address
initiad keys list
Setelah SYNCED, Jalankan validator (pastikan sudah mempunyai faucet)
Running Validators
initiad tx mstaking create-validator \
--amount 1000000uinit \
--from $WALLET \
--commission-rate 0.1 \
--commission-max-rate 0.2 \
--commission-max-change-rate 0.01 \
--pubkey $(initiad tendermint show-validator) \
--moniker "NAMA KALIAN" \
--identity "PGP KEYBASE" \
--website "LINK FB / TWITTER / IG" \
--details "BEBAS" \
--chain-id initiation-1 \
--gas auto --fees 80000uinit \
-y
CATATAN
Check Version
initiad version
Check Wallet
initiad keys list
Check Balance
initiad q bank balances $(initiad keys show $WALLET -a)
Reset blockchain data
sudo systemctl stop initia
cp $HOME/.initia/data/priv_validator_state.json $HOME/.initia/priv_validator_state.json.backup
rm -rf $HOME/.initia/data
Backup state data
mv $HOME/.initia/priv_validator_state.json.backup $HOME/.initia/data/priv_validator_state.json
Restart node
sudo systemctl restart initiad.service
Check blocks
initiad status 2>&1 | jq .sync_info
OR
initiad status | jq
local_height=$(initiad status | jq -r .sync_info.latest_block_height); network_height=$(curl -s https://rpc-initia-testnet.trusted-point.com/status | jq -r .result.sync_info.latest_block_height); blocks_left=$((network_height - local_height)); echo "Your node height: $local_height"; echo "Network height: $network_height"; echo "Blocks left: $blocks_left"
Check logs
sudo journalctl -fu initiad -o cat
Check Validator name / Moniker
initiad q mstaking validator $(initiad keys show $WALLET --bech val -a) --output json | jq .description.moniker
Check Wallet Validator
initiad keys show $WALLET --bech val -a
Edit Your Validator
initiad tx mstaking edit-validator \
--new-moniker "YOUR_MONIKER_NAME" \
--identity "YOUR_KEYBASE_ID" \
--details "YOUR_DETAILS" \
--website "YOUR_WEBSITE_URL" \
--chain-id initiation-1 \
--commission-rate 0.05 \
--from wallet \
--gas-adjustment 1.4 \
--gas auto \
--gas-prices 0.15uinit \
-y
Delete Node
cd $HOME
sudo systemctl stop initiad.service
sudo systemctl disable initiad.service
sudo rm /etc/systemd/system/initia.service
sudo systemctl daemon-reload
rm -f $(which initiad)
rm -rf $HOME/.initia
rm -rf $HOME/initia
Source for snapshot: https://docs.kzvn.xyz/cosmos/initia/snapshot