Installation
Install Dependencies
sudo apt update && sudo apt upgrade -y && sudo apt install curl git wget htop tmux build-essential jq make lz4 gcc unzip -y
Go Version
cd $HOME
sudo rm -rf /usr/local/go
VER="1.15"
curl -Ls https://go.dev/dl/go$VER.linux-amd64.tar.gz | sudo tar -xzf - -C /usr/local
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile
source $HOME/.bash_profile
mkdir -p ~/go/bin
go version
Install Binary
cd $HOME
mkdir -p ~/go/bin
wget https://github.com/defi-ventures/BlockX-chain/raw/refs/heads/main/mainnet/releases/blockxd-linux-amd64 -O blockxd
chmod +x blockxd
mv blockxd ~/go/bin/
Initialize Node
blockxd init "Your_Validator_Name" --chain-id blockx-mainnet --home $HOME/.blockxd
Configure Pruning
pruning="custom"
pruning_keep_recent="100"
pruning_keep_every="0"
pruning_interval="19"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.blockxd/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.blockxd/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.blockxd/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.blockxd/config/app.toml
Set Minimum Gas Price
sed -i 's|minimum-gas-prices =.*|minimum-gas-prices = "25000000000abcx"|g' $HOME/.blockxd/config/app.toml
Configure Indexer
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.blockxd/config/config.toml
Create Service
sudo tee /etc/systemd/system/blockxd.service > /dev/null <<EOF
[Unit]
Description=BlockX node
After=network-online.target
[Service]
User=$USER
WorkingDirectory=$HOME/.blockxd
ExecStart=$(which blockxd) start --home $HOME/.blockxd
Restart=on-failure
RestartSec=5
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
mkdir -p $HOME/.blockxd/cosmovisor/genesis/bin
mv $HOME/go/bin/blockxd $HOME/.blockxd/cosmovisor/genesis/bin/
sudo ln -s $HOME/.blockxd/cosmovisor/genesis $HOME/.blockxd/cosmovisor/current -f
sudo ln -s $HOME/.blockxd/cosmovisor/current/bin/blockxd /usr/local/bin/blockxd -f
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@v1.7.0
sudo tee /etc/systemd/system/blockxd.service > /dev/null <<EOF
[Unit]
Description=BlockX node service
After=network-online.target
[Service]
User=$USER
ExecStart=$(which cosmovisor) run start --home $HOME/.blockxd
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
Environment="DAEMON_HOME=$HOME/.blockxd"
Environment="DAEMON_NAME=blockxd"
Environment="UNSAFE_SKIP_BACKUP=true"
[Install]
WantedBy=multi-user.target
EOF
Enable and Start Service
sudo systemctl daemon-reload
sudo systemctl enable blockxd
sudo systemctl restart blockxd && sudo journalctl -u blockxd -f
Create Wallet
# Create new wallet
blockxd keys add wallet --home $HOME/.blockxd
# Restore existing wallet
blockxd keys add wallet --recover --home $HOME/.blockxd
# Check sync status (false = fully synced)
blockxd status --home $HOME/.blockxd 2>&1 | jq .sync_info
Create Validator
Create validator.json
tee $HOME/validator.json > /dev/null <<EOF
{
"pubkey": $(blockxd tendermint show-validator),
"amount": "1000000000000000000000abcx",
"moniker": "CodeBlockLabs",
"identity": "E1ADDC27DCE641C2",
"website": "https://codeblocklabs.com",
"details": "Join Our Community on Telegram @CodeBlockLabs",
"commission-rate": "0.05",
"commission-max-rate": "0.2",
"commission-max-change-rate": "0.1",
"min-self-delegation": "1"
}
EOF
Create Validator
blockxd tx staking create-validator $HOME/validator.json --from wallet --chain-id blockx-mainnet --home $HOME/.blockxd --gas auto --gas-adjustment 1.5 --gas-prices 25000000000abcx -y
Delete Node
sudo systemctl stop blockxd
sudo systemctl disable blockxd
sudo rm -rf /etc/systemd/system/blockxd.service
sudo rm $(which blockxd)
sudo rm -rf $HOME/.blockxd
Service Operations
Check logs
sudo journalctl -u blockxd -f
Sync info
blockxd status --home $HOME/.blockxd 2>&1 | jq .sync_info
Node info
blockxd status --home $HOME/.blockxd 2>&1 | jq .node_info
Your node peer
# CometBFT
echo $(blockxd comet show-node-id --home $HOME/.blockxd)'@'$(wget -qO- eth0.me)':'$(cat $HOME/.blockxd/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')
# Tendermint (legacy)
# echo $(blockxd tendermint show-node-id --home $HOME/.blockxd)'@'$(wget -qO- eth0.me)':'$(cat $HOME/.blockxd/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')
Key Management
Add New Wallet
blockxd keys add wallet --home $HOME/.blockxd
Restore existing wallet
blockxd keys add wallet --recover --home $HOME/.blockxd
List All Wallets
blockxd keys list --home $HOME/.blockxd
Delete wallet
blockxd keys delete wallet --home $HOME/.blockxd
Check Balance
blockxd q bank balances $(blockxd keys show wallet -a --home $HOME/.blockxd) --home $HOME/.blockxd
Export Key (save to wallet.backup)
blockxd keys export wallet --home $HOME/.blockxd
Export Key to EVM
blockxd keys export wallet --unarmored-hex --unsafe --home $HOME/.blockxd
Import Key (restore from wallet.backup)
blockxd keys import wallet wallet.backup --home $HOME/.blockxd
Tokens
Withdraw all rewards
blockxd tx distribution withdraw-all-rewards --from wallet --chain-id blockx-mainnet --home $HOME/.blockxd --gas auto --gas-adjustment 1.5 --gas-prices 25000000000abcx -y
Withdraw rewards and commission from your validator
blockxd tx distribution withdraw-rewards $(blockxd keys show wallet --bech val -a --home $HOME/.blockxd) --from wallet --commission --chain-id blockx-mainnet --home $HOME/.blockxd --gas auto --gas-adjustment 1.5 --gas-prices 25000000000abcx -y
Delegate to Yourself
blockxd tx staking delegate $(blockxd keys show wallet --bech val -a --home $HOME/.blockxd) 1000000000000000000000abcx --from wallet --chain-id blockx-mainnet --home $HOME/.blockxd --gas auto --gas-adjustment 1.5 --gas-prices 25000000000abcx -y
Delegate to Other Validator
blockxd tx staking delegate <TO_VALOPER_ADDRESS> 1000000000000000000000abcx --from wallet --chain-id blockx-mainnet --home $HOME/.blockxd --gas auto --gas-adjustment 1.5 --gas-prices 25000000000abcx -y
Redelegate Stake to Another Validator
blockxd tx staking redelegate $(blockxd keys show wallet --bech val -a --home $HOME/.blockxd) <TO_VALOPER_ADDRESS> 1000000000000000000000abcx --from wallet --chain-id blockx-mainnet --home $HOME/.blockxd --gas auto --gas-adjustment 1.5 --gas-prices 25000000000abcx -y
Unbond
blockxd tx staking unbond $(blockxd keys show wallet --bech val -a --home $HOME/.blockxd) 1000000000000000000000abcx --from wallet --chain-id blockx-mainnet --home $HOME/.blockxd --gas auto --gas-adjustment 1.5 --gas-prices 25000000000abcx -y
Transfer Funds
blockxd tx bank send $(blockxd keys show wallet -a --home $HOME/.blockxd) <TO_WALLET_ADDRESS> 1000000000000000000000abcx --chain-id blockx-mainnet --home $HOME/.blockxd --gas auto --gas-adjustment 1.5 --gas-prices 25000000000abcx -y
Validator Operations
Edit Existing Validator
blockxd tx staking edit-validator \
--commission-rate 0.1 \
--new-moniker "$MONIKER" \
--identity "" \
--details "I am validator" \
--from wallet \
--chain-id blockx-mainnet \
--home $HOME/.blockxd \
--gas auto --gas-adjustment 1.5 --gas-prices 25000000000abcx \
-y
Validator info
blockxd status --home $HOME/.blockxd 2>&1 | jq .validator_info
Validator Details
blockxd q staking validator $(blockxd keys show wallet --bech val -a --home $HOME/.blockxd) --home $HOME/.blockxd
Jailing info
# CometBFT
blockxd q slashing signing-info $(blockxd comet show-validator --home $HOME/.blockxd) --home $HOME/.blockxd# Tendermint (legacy)
# blockxd q slashing signing-info $(blockxd tendermint show-validator --home $HOME/.blockxd) --home $HOME/.blockxd
Slashing parameters
blockxd q slashing params --home $HOME/.blockxd
Unjail validator
blockxd tx slashing unjail --from wallet --chain-id blockx-mainnet --home $HOME/.blockxd --gas auto --gas-adjustment 1.5 --gas-prices 25000000000abcx -y
Active Validators List
blockxd q staking validators -oj --limit=2000 --home $HOME/.blockxd | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " " + .description.moniker' | sort -gr | nl
Check Validator key
# CometBFT
[[ $(blockxd q staking validator $(blockxd keys show wallet --bech val -a --home $HOME/.blockxd) -oj --home $HOME/.blockxd | jq -r .consensus_pubkey.key) = $(blockxd status --home $HOME/.blockxd 2>&1 | jq -r .ValidatorInfo.PubKey.value) ]] && echo -e "Your key status is ok" || echo -e "Your key status is error"
# Tendermint (legacy)
# [[ $(blockxd q staking validator $(blockxd keys show wallet --bech val -a --home $HOME/.blockxd) -oj --home $HOME/.blockxd | jq -r .consensus_pubkey.key) = $(blockxd status --home $HOME/.blockxd 2>&1 | jq -r .ValidatorInfo.PubKey.value) ]] && echo -e "Your key status is ok" || echo -e "Your key status is error"
Signing info
# CometBFT
blockxd q slashing signing-info $(blockxd comet show-validator --home $HOME/.blockxd) --home $HOME/.blockxd# Tendermint (legacy)
# blockxd q slashing signing-info $(blockxd tendermint show-validator --home $HOME/.blockxd) --home $HOME/.blockxd
Governance
Create New Text Proposal
blockxd tx gov submit-proposal \
--title "" \
--description "" \
--deposit 1000000000000000000000abcx \
--type Text \
--from wallet \
--home $HOME/.blockxd \
--gas auto --gas-adjustment 1.5 --gas-prices 25000000000abcx \
-y
Proposals List
blockxd query gov proposals --home $HOME/.blockxd
View proposal
blockxd query gov proposal 1 --home $HOME/.blockxd
Vote
blockxd tx gov vote 1 yes --from wallet --chain-id blockx-mainnet --home $HOME/.blockxd --gas auto --gas-adjustment 1.5 --gas-prices 25000000000abcx -y
CodeBlockLabs