Network
Cosmos
Airchain
Installation

Airchain

ℹ️

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

Install Dependencies

# 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.21.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 JUNCTION_CHAIN_ID="junction"" >> $HOME/.bash_profile
echo "export JUNCTION_PORT="18"" >> $HOME/.bash_profile
source $HOME/.bash_profile
 
# download binary
cd $HOME
rm -rf $HOME/.junction
wget https://github.com/airchains-network/junction/releases/download/v0.1.0/junctiond
sudo chmod +x junctiond
sudo mv junctiond /usr/local/bin/
 
# config and init app
junctiond init $MONIKER --chain-id $JUNCTION_CHAIN_ID
sed -i -e "s|^node *=.*|node = \"tcp://localhost:${JUNCTION_PORT}657\"|" $HOME/.junction/config/client.toml
 
# download genesis and addrbook
wget -O $HOME/.junction/config/genesis.json https://snapshot.dashnode.org/airchain-testnet/genesis.json
wget -O $HOME/.junction/config/addrbook.json https://snapshot.dashnode.org/airchain-testnet/addrbook.json
 
# set seeds and peers
SEEDS="aeaf101d54d47f6c99b4755983b64e8504f6132d@airchain-testnet-peer.dashnode.org:28656"
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]:56256,[email protected]:26656,[email protected]:26656,[email protected]:26656"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.junction/config/config.toml
 
# set custom ports in app.toml
sed -i.bak -e "s|:1317|:${JUNCTION_PORT}317|g;
s|:8080|:${JUNCTION_PORT}080|g;
s|:9090|:${JUNCTION_PORT}090|g;
s|:9091|:${JUNCTION_PORT}091|g;
s|:8545|:${JUNCTION_PORT}545|g;
s|:8546|:${JUNCTION_PORT}546|g;
s|:6065|:${JUNCTION_PORT}065|g" $HOME/.junction/config/app.toml
 
# set custom ports in config.toml file
sed -i.bak -e "s|:26658|:${JUNCTION_PORT}658|g;
s|:26657|:${JUNCTION_PORT}657|g;
s|:6060|:${JUNCTION_PORT}060|g;
s|:26656|:${JUNCTION_PORT}656|g;
s|^external_address = \"\"|external_address = \"$(wget -qO- eth0.me):${JUNCTION_PORT}656\"|g;
s|:26660|:${JUNCTION_PORT}660|g" $HOME/.junction/config/config.toml
 
# config pruning
sed -i -e "s/^pruning *=.*/pruning = \"custom\"/" $HOME/.junction/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"100\"/" $HOME/.junction/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"50\"/" $HOME/.junction/config/app.toml
 
# set minimum gas price, enable prometheus and disable indexing
sed -i 's|minimum-gas-prices =.*|minimum-gas-prices = "0.00025amf"|g' $HOME/.junction/config/app.toml
sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.junction/config/config.toml
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.junction/config/config.toml
 
# create service file
sudo tee /etc/systemd/system/junctiond.service > /dev/null <<EOF
[Unit]
Description=Warden node
After=network-online.target
 
[Service]
User=$USER
WorkingDirectory=$HOME/.junction
ExecStart=$(which junctiond) start
Restart=on-failure
RestartSec=5
LimitNOFILE=65535
 
[Install]
WantedBy=multi-user.target
EOF
 
# reset and download snapshot
junctiond tendermint unsafe-reset-all --home $HOME/.junction
 
# enable and start service
sudo systemctl daemon-reload
sudo systemctl enable junctiond
sudo systemctl restart junctiond && sudo journalctl -u junctiond -f