Node9X Service
  • πŸ„MAINNET
    • 🟒Kopi Protocol
      • πŸ’ΎService & Snapshot
      • βš™οΈInstallation
      • ⛓️Upgrade (V11)
      • πŸͺ’Cosmovisor
      • πŸ›°οΈCommand
  • πŸš€Testnet
    • 🧬Explorer
    • 🟒Native
      • βš™οΈInstallation
    • 🟒XRPL EVM
      • πŸ’ΎService & Snapshot
      • βš™οΈInstallation
      • πŸ•ΉοΈCommand
    • 🟒Pipe Network
      • Installation
      • Upgrade
    • 🟒Pell
      • πŸ’ΎService & Snapshot
      • βš™οΈInstallation
      • ⛓️Upgrade (v1.1.1)
      • πŸ•ΉοΈCommand
    • 🟒Structs
      • πŸ’ΎService & Snapshot
      • βš™οΈInstallation
      • πŸ•ΉοΈCommand
    • 🟒Prysm
      • πŸ›°οΈService & Snapshot
      • βš™οΈInstallation
      • πŸ’ΎCommand
    • 🟒Zenrock
      • πŸ’ΎService & Snapshot
      • βš™οΈInstallation
      • ⛓️Upgrade ( v6.3.3)
      • πŸ•ΉοΈCosmovisor
      • πŸ›°οΈCommand
      • βš™οΈSidecar (βœ”οΈOracle)
        • πŸ”—Upgrade
    • 🟒Story Protocol
      • πŸ’ΎService & Snapshot
      • βš™οΈInstallation (Odyssey)
      • ⛓️Upgrade (v0.13.1)
        • πŸͺ’Upgrade (v0.13.0)
      • ⛓️Cosmovisor
      • πŸ›°οΈCommand
    • 🟒0G Chain
      • Service & Snapshot
      • Installation
        • Cosmovisor
      • Commands
      • β˜‘οΈ0G Storage Node
        • Upgrade (v0.7.3)
      • β˜‘οΈ0G Storage KV
      • β˜‘οΈ0G DA Node
        • Update
      • β˜‘οΈ0G DA Client
    • 🟒Airchains
      • πŸ’ΎService & Snapshot
      • βš™οΈInstallation
        • πŸͺ’Cosmovisor
        • πŸ”ΊEVM ZK Rollup
      • πŸ•ΉοΈCommands
      • ⛓️Upgrade
    • 🟒Allora
      • πŸ”ΊWorkers
        • Create tool and worker wallet
        • Install Worker 1
        • Install Worker 2
        • Troubleshooting
        • Script for checking worker
      • Another method
      • Service
      • Installation By Dock (Recommend)
      • Installation
      • Snapshot & State sync
      • Useful commands
    • 🟒Hedge Block
      • Service
      • Installation
      • Commands
    • 🟒Dill Chain
      • Usage Commands
    • 🟒Fiamma Chain
      • πŸ₯¦Services & Snapshot
      • βš™οΈInstallation
      • πŸ›°οΈUsage Command
    • 🟒Elixir Testnet
      • βš™οΈInstallation
    • 🟒Chainbase
      • ⛓️Installation
    • πŸ”˜AXONE Protocol
      • πŸ’ΎService & Snapshot
      • βš™οΈInstallation
    • πŸ”˜Symphony
      • πŸ”ŒInstallation
      • πŸ₯¦Fresh Peer
    • πŸ”˜Empeiria
      • Installation
      • Usage Command
Powered by GitBook
On this page
  • Create wallet
  • Create validator
  • Monitoring
  • Security
  • Delete node

Was this helpful?

  1. Testnet
  2. Airchains

Installation

Recommended Hardware: 4 Cores, 8GB RAM, 200GB of storage (NVME)

# install dependencies, if needed
sudo apt update && sudo apt upgrade -y
sudo apt install curl git wget htop tmux build-essential jq make lz4 gcc unzip -y
# install go, if needed
cd $HOME
VER="1.22.3"
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"
[ ! -f ~/.bash_profile ] && touch ~/.bash_profile
echo "export PATH=$PATH:/usr/local/go/bin:~/go/bin" >> ~/.bash_profile
source $HOME/.bash_profile
[ ! -d ~/go/bin ] && mkdir -p ~/go/bin

# set vars
echo "export WALLET="wallet"" >> $HOME/.bash_profile
echo "export MONIKER="test"" >> $HOME/.bash_profile
echo "export AIRCHAIN_CHAIN_ID="varanasi-1"" >> $HOME/.bash_profile
echo "export AIRCHAIN_PORT="19"" >> $HOME/.bash_profile
source $HOME/.bash_profile

# download binary
cd $HOME
wget -O junctiond https://github.com/airchains-network/junction/releases/download/v0.3.1/junctiond-linux-amd64
chmod +x junctiond
mv junctiond $HOME/go/bin/

# config and init app
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source $HOME/.cargo/env
junctiond init $MONIKER --chain-id $AIRCHAIN_CHAIN_ID 
sed -i -e "s|^node *=.*|node = \"tcp://localhost:${AIRCHAIN_PORT}657\"|" $HOME/.junctiond/config/client.toml

# download genesis and addrbook
wget -O $HOME/.junctiond/config/genesis.json https://server-7.itrocket.net/testnet/airchains_v/genesis.json
wget -O $HOME/.junctiond/config/addrbook.json  https://server-7.itrocket.net/testnet/airchains_v/addrbook.json

# set seeds and peers
SEEDS="97cadd453fa35cee05f72611fdb15a49112575cb@airchains_v-testnet-seed.itrocket.net:19656"
PEERS="79f26210777e84efb600bf776c32615a72675d9f@airchains_v-testnet-peer.itrocket.net:19656,[email protected]:19656,562e107ee9ea7155b1b277a823f563e4f070d572@[2a03:cfc0:8000:13::b910:27be]:13756,[email protected]:33656,[email protected]:11656,[email protected]:26656,[email protected]:26756,[email protected]:60656,[email protected]:26656,[email protected]:63656,[email protected]:19656"
sed -i -e "/^\[p2p\]/,/^\[/{s/^[[:space:]]*seeds *=.*/seeds = \"$SEEDS\"/}" \
       -e "/^\[p2p\]/,/^\[/{s/^[[:space:]]*persistent_peers *=.*/persistent_peers = \"$PEERS\"/}" $HOME/.junctiond/config/config.toml



# 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

# 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

# config pruning
sed -i -e "s/^pruning *=.*/pruning = \"custom\"/" $HOME/.junctiond/config/app.toml 
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"100\"/" $HOME/.junctiond/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"19\"/" $HOME/.junctiond/config/app.toml

# set minimum gas price, enable prometheus and disable indexing
sed -i 's|minimum-gas-prices =.*|minimum-gas-prices = "0.001amf"|g' $HOME/.junctiond/config/app.toml
sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.junctiond/config/config.toml
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.junctiond/config/config.toml

# create service file
sudo tee /etc/systemd/system/junctiond.service > /dev/null <<EOF
[Unit]
Description=Airchains node
After=network-online.target
[Service]
User=$USER
WorkingDirectory=$HOME/.junctiond
ExecStart=$(which junctiond) start --home $HOME/.junctiond
Restart=on-failure
RestartSec=5
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF

# reset and download snapshot
junctiond tendermint unsafe-reset-all --home $HOME/.junctiond
if curl -s --head curl https://snapshot.node9x.com/airchains_testnet.tar.lz4 | head -n 1 | grep "200" > /dev/null; then
  curl https://snapshot.node9x.com/airchains_testnet.tar.lz44 | lz4 -dc - | tar -xf - -C $HOME/.junctiond
    else
  echo no have snap
fi

# enable and start service
sudo systemctl daemon-reload
sudo systemctl enable junctiond
sudo systemctl restart junctiond && sudo journalctl -u junctiond -f

Create wallet

# to create a new wallet, use the following command. don’t forget toΒ save the mnemonic
junctiond keys add $WALLET

# to restore exexuting wallet, use the following command
junctiond keys add $WALLET --recover

# save wallet and validator address
WALLET_ADDRESS=$(junctiond keys show $WALLET -a)
VALOPER_ADDRESS=$(junctiond keys show $WALLET --bech val -a)
echo "export WALLET_ADDRESS="$WALLET_ADDRESS >> $HOME/.bash_profile
echo "export VALOPER_ADDRESS="$VALOPER_ADDRESS >> $HOME/.bash_profile
source $HOME/.bash_profile

# check sync status, once your node is fully synced, the output from above will print "false"
junctiond status 2>&1 | jq 

# before creating a validator, you need to fund your wallet and check balance
junctiond query bank balances $WALLET_ADDRESS 

Create validator

cd $HOME
# Create validator.json file
echo "{\"pubkey\":{\"@type\":\"/cosmos.crypto.ed25519.PubKey\",\"key\":\"$(junctiond comet show-validator | grep -Po '\"key\":\s*\"\K[^"]*')\"},
    \"amount\": \"1000000uamf\",
    \"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 configuration
junctiond tx staking create-validator validator.json \
    --from $WALLET \
    --chain-id varanasi-1 \
	--fees 200uamf \
	

Monitoring

Security

To protect you keys please don`t share your privkey, mnemonic and follow basic security rules

Set up ssh keys for authentication

Firewall security

Set the default to allow outgoing connections, deny all incoming, allow ssh and node p2p port

sudo ufw default allow outgoing 
sudo ufw default deny incoming 
sudo ufw allow ssh/tcp 
sudo ufw allow ${AIRCHAIN_PORT}656/tcp
sudo ufw enable

Delete node

sudo systemctl stop junctiond
sudo systemctl disable junctiond
sudo rm -rf /etc/systemd/system/junctiond.service
sudo rm $(which junctiond)
sudo rm -rf $HOME/.junctiond
sed -i "/AIRCHAIN_/d" $HOME/.bash_profile
PreviousService & SnapshotNextCosmovisor

Last updated 1 month ago

Was this helpful?

If you want to have set up a monitoring and alert system use

You can use this to configure ssh authentication and disable password authentication on your server

πŸš€
🟒
βš™οΈ
our cosmos nodes monitoring guide with tenderduty
guide