Validator Node Installation
Hardware Requirements
Section titled “Hardware Requirements”Component | Testnet |
---|---|
Memory | 8 GB |
CPU | 4 cores |
Disk | 200 BB NVME SSD |
Bandwidth | 100 MBps for Download / Upload |
1. System updates, installation of required environments:
Section titled “1. System updates, installation of required environments:”sudo apt update && sudo apt upgrade -ysudo apt install curl git wget htop tmux build-essential jq make lz4 aria2c gcc unzip -y
2. Install Go and Rust:
Section titled “2. Install Go and Rust:”cd $HOMEVER="1.21.6"wget "https://golang.org/dl/go$VER.linux-amd64.tar.gz"sudo rm -rf /usr/local/gosudo tar -C /usr/local -xzf "go$VER.linux-amd64.tar.gz"rm "go$VER.linux-amd64.tar.gz"[ ! -f ~/.bash_profile ] && touch ~/.bash_profileecho "export PATH=$PATH:/usr/local/go/bin:~/go/bin" >> ~/.bash_profilesource $HOME/.bash_profile[ ! -d ~/go/bin ] && mkdir -p ~/go/bingo version
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shrustc --version # Verify installation
3. Set Vars:
Section titled “3. Set Vars:”echo "export WALLET="wallet"" >> $HOME/.bash_profileecho "export MONIKER="test"" >> $HOME/.bash_profileecho "export AIRCHAIN_CHAIN_ID="varanasi-1"" >> $HOME/.bash_profileecho "export AIRCHAIN_PORT="19"" >> $HOME/.bash_profilesource $HOME/.bash_profile
4. Download Binary:
Section titled “4. Download Binary:”cd $HOMEwget -O junctiond https://github.com/airchains-network/junction/releases/download/v0.3.1/junctiond-linux-amd64chmod +x junctiondmv junctiond $HOME/go/bin/source $HOME/.bash_profilejunctiond version
5. Config and init app:
Section titled “5. Config and init app:”junctiond init $MONIKER --chain-id $AIRCHAIN_CHAIN_IDsed -i -e "s|^node *=.*|node = \"tcp://localhost:${AIRCHAIN_PORT}657\"|" $HOME/.junctiond/config/client.toml
6. Download genesis:
Section titled “6. Download genesis:”wget -O $HOME/.junctiond/config/genesis.json https://airchain.j-node.net/genesis.json
7. Set Seed and Peers:
Section titled “7. Set Seed and Peers:”SEEDS=""PEERS="[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26756,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:28656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:56256,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656"sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.junctiond/config/config.toml
8. Set custom ports in app.toml:
Section titled “8. Set custom ports in app.toml:”sed -i.bak -e "s%:1317%:${AIRCHAIN_PORT}317%g;s%:8080%:${AIRCHAIN_PORT}080%g;s%:9090%:${AIRCHAIN_PORT}090%g;s%:9091%:${AIRCHAIN_PORT}091%g;s%:8545%:${AIRCHAIN_PORT}545%g;s%:8546%:${AIRCHAIN_PORT}546%g;s%:6065%:${AIRCHAIN_PORT}065%g" $HOME/.junctiond/config/app.toml
9. Set custom ports in config.toml file:
Section titled “9. Set custom ports in config.toml file:”sed -i.bak -e "s%:26658%:${AIRCHAIN_PORT}658%g;s%:26657%:${AIRCHAIN_PORT}657%g;s%:6060%:${AIRCHAIN_PORT}060%g;s%:26656%:${AIRCHAIN_PORT}656%g;s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):${AIRCHAIN_PORT}656\"%;s%:26660%:${AIRCHAIN_PORT}660%g" $HOME/.junctiond/config/config.toml
10. Config Pruning:
Section titled “10. Config Pruning:”sed -i -e "s/^pruning *=.*/pruning = \"custom\"/" $HOME/.junctiond/config/app.tomlsed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"100\"/" $HOME/.junctiond/config/app.tomlsed -i -e "s/^pruning-interval *=.*/pruning-interval = \"50\"/" $HOME/.junctiond/config/app.toml
### 11. Set minium gas price, enable prometheus and disable indexing:Terminal windowsed -i 's|minimum-gas-prices =.*|minimum-gas-prices = "0.001amf"|g' $HOME/.junctiond/config/app.tomlsed -i -e "s/prometheus = false/prometheus = true/" $HOME/.junctiond/config/config.tomlsed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.junctiond/config/config.toml
12. Create Service file
Section titled “12. Create Service file”sudo tee /etc/systemd/system/junctiond.service > /dev/null <<EOF[Unit]Description=Airchains nodeAfter=network-online.target[Service]User=$USERWorkingDirectory=$HOME/.junctiondExecStart=$(which junctiond) start --home $HOME/.junctiondRestart=on-failureRestartSec=5LimitNOFILE=65535[Install]WantedBy=multi-user.targetEOF
13. Reset and Download snapshot:
Section titled “13. Reset and Download snapshot:”14. Enable and Start service:
Section titled “14. Enable and Start service:”sudo systemctl daemon-reloadsudo systemctl enable junctiondsudo systemctl restart junctiond && sudo journalctl -u junctiond -f
15. Create Wallet:
Section titled “15. Create Wallet:”junctiond keys add $WALLET
16. Check Balance:
Section titled “16. Check Balance:”junctiond query bank balances $WALLET_ADDRESS
17. Check sync status:
Section titled “17. Check sync status:”junctiond status 2>&1 | jq
18. Create Validator:
Section titled “18. Create Validator:”cd $HOME# Create validator.json fileecho "{\"pubkey\":{\"@type\":\"/cosmos.crypto.ed25519.PubKey\",\"key\":\"$(junctiond comet show-validator | grep -Po '\"key\":\s*\"\K[^"]*')\"}, \"amount\": \"1000000amf\", \"moniker\": \"test\", \"identity\": \"\", \"website\": \"\", \"security\": \"\", \"details\": \"I love blockchain ❤️\", \"commission-rate\": \"0.1\", \"commission-max-rate\": \"0.2\", \"commission-max-change-rate\": \"0.01\", \"min-self-delegation\": \"1\"}" > validator.json# Create a validator using the JSON configurationjunctiond tx staking create-validator validator.json \ --from $WALLET \ --chain-id varanasi-1 \ --fees 200amf \