Community Tools & Services
Blacknodes contribution to
Blacknodes contribution to
Snapshot is updated every 6hours.
Latest Snapshot available is at height
sudo systemctl stop initiad.service
cp $HOME/.initia/data/priv_validator_state.json $HOME/.initia/priv_validator_state.json.backup
initiad tendermint unsafe-reset-all --home $HOME/.initia --keep-addr-book
sudo apt-get install wget liblz4-tool aria2 -y
aria2c -x5 -s4 https://files3.blacknodes.net/initiatestnet/initiation-1_.tar.lz4
lz4 -c -d initiation-1_.tar.lz4 | tar -x -C $HOME/.initia/data
mv $HOME/.initia/priv_validator_state.json.backup $HOME/.initia/data/priv_validator_state.json
sudo systemctl restart initiad && sudo journalctl -u initiad -f -o cat
No Need To Backup and Move the priv_validator_state.json if you are not a validator yet
The Addrbook is updated everyday. If you are not getting peers you can Stop your node, download and replace your addrbook.json with the steps below, and restart your node.
wget -O addrbook.json https://files2.blacknodes.net/initiatestnet/addrbook.json --inet4-only
mv addrbook.json $HOME/.initia/config/
This is copy of our genesis file
wget -O genesis.json https://files2.blacknodes.net/initiatestnet/genesis.json --inet4-only
mv genesis.json $HOME/.initia/config/
https://initia-testnet-api.blacknodes.net
https://initia-testnet-rpc.blacknodes.net
initia-testnet-grpc.blacknodes.net:31090
Install Monitoring Tools(Prometheus and Grafana using this script)
wget https://raw.githubusercontent.com/blacknodes/Scripts/main/install-monitoring-tools.sh
sudo chmod +x install-monitoring-tools.sh
./install-monitoring-tools.sh
Add Job "Initia-Node" in prometheus file
sed -i '/scrape_configs:/a \
- job_name: "Initia-Node"\
static_configs:\
- targets: ["localhost:26660"]' /opt/prometheus/prometheus.yml
Set prometheus to true in config.toml file And Restart the node and prometheus
sed -i '/prometheus =/s/false/true/' /root/.initiad/config/config.toml
sudo systemctl restart initiad.service
sudo systemctl restart prometheus.service
Make Sure to enable port 3000
sudo ufw allow 3000
Go To http://yourip:3000
Add New DataSource Prometheus
Set Alert
Use this metric for alert(You can also use other metrics too, we recommend this one if you are a validator)
increase(cometbft_consensus_validator_last_signed_height[5m])
Set Threshold (is below 15) and change type from range to instant
Add Notification Channel (Here we will use telegram )
Use https://t.me/BotFather to create your notification bot and https://t.me/userinfobot to check your Telegram ID.
Add new Contact point, paste your bot api token and telegram id there
Now you'll receive an alert in your telegram bot whenever your node will stop or get out of the active set!
Use this StateSync method to synchronize your node within 10minutes
SNAP_RPC=https://initia-testnet-rpc.blacknodes.net:443 && \
LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height); \
BLOCK_HEIGHT=$((LATEST_HEIGHT - 2000)); \
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash) && \
echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH
peers="d9cef48445358d3d230c95aef3754c0e1005d7c1@initia-testnet.blacknodes.net:31656"
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" ~/.initiad/config/config.toml
sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ; \
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ; \
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ; \
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"| ; \
s|^(seeds[[:space:]]+=[[:space:]]+).*$|\1\"\"|" ~/.initia/config/config.toml
sudo systemctl restart initiad && sudo journalctl -u initiad -f -o cat
N/A
Use our Live Peers list to quick connect your node with the network
Loading peers...
peers=$(curl -s https://services.blacknodes.net/Initia-Testnet/data/peers.txt)
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" ~/.initia/config/config.toml
Use our BlackNodes Peer to quick connect your node with the network
d9cef48445358d3d230c95aef3754c0e1005d7c1@initia-testnet.blacknodes.net:31656
sudo apt update && sudo apt install curl git jq build-essential gcc unzip wget lz4 -y
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" >> $HOME/.bash_profile && source $HOME/.bash_profile && go version
git clone https://github.com/initia-labs/initia.git
cd initia
git checkout v0.2.15
make install
initiad version
echo 'export MONIKER="TEST_NODE"' >> ~/.bash_profile
echo 'export CHAIN_ID="initiation-1"' >> ~/.bash_profile
echo 'export WALLET="wallet"' >> ~/.bash_profile
source $HOME/.bash_profile
cd $HOME
initiad init $MONIKER --chain-id $CHAIN_ID
wget -O genesis.json https://files2.blacknodes.net/initiatestnet/genesis.json --inet4-only
mv genesis.json $HOME/.initia/config/
wget -O addrbook.json https://files2.blacknodes.net/initiatestnet/addrbook.json --inet4-only
mv addrbook.json $HOME/.initia/config/
peers=$(curl -s https://services.blacknodes.net/Initia-Testnet/data/peers.txt)
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" ~/.initia/config/config.toml
Snapshot is updated every 6 hours.
Latest Snapshot available is at height
sudo apt-get install wget liblz4-tool aria2 -y
aria2c -x5 -s4 https://files3.blacknodes.net/initiatestnet/initiation-1_.tar.lz4
lz4 -c -d initiation-1_.tar.lz4 | tar -x -C $HOME/.initia/data
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
sudo systemctl daemon-reload
sudo systemctl enable initiad.service
sudo systemctl restart initiad.service
sudo journalctl -u initiad.service -f -o cat
initiad keys add $WALLET
initiad tx mstaking create-validator \
--amount=1000000uinit \
--pubkey=$(initiad tendermint show-validator) \
--moniker=$MONIKER \
--chain-id=$CHAIN_ID \
--commission-rate=0.05 \
--commission-max-rate=0.10 \
--commission-max-change-rate=0.01 \
--from=$WALLET \
--identity="" \
--website="" \
--details="BlackNodes Tutorial" \
--gas=2000000 --fees=300000uinit \
--node https://initia-testnet-rpc.blacknodes.net:443 \
-y
Note:- This Script includes snapshot and its updated Every 6 hours with latest snapshot
wget https://files2.blacknodes.net/initiatestnet/initia_node.sh
chmod +x initia_node.sh
./initia_node.sh
If you get an Error you can restart the script anytime, it will continue from where you left by running `./initia_node.sh`
wget https://files2.blacknodes.net/initiatestnet/initia_validator.sh
chmod +x initia_validator.sh
./initia_validator.sh
If you get an Error you can restart the script anytime by `./initia_validator.sh`.
NOTE:- If you already had registered a validator and want to migrate to new server then you need to import priv_validator_key.json in the $HOME/.initia/config/ directory
To make sure you dont run this step by an accident we didnt add `./delete_initia_node.sh` below.
wget https://files2.blacknodes.net/initiatestnet/delete_initia_node.sh
chmod +x delete_initia_node.sh
If for any reason you want to start completely from start you can run this script, it will delete everything related to Initia