πŸ’ Airchains - varanasi-1

The Modular zk-Rollup framework

Public Endpoints

https://airchains-testnet-rpc.validator247.com/

https://airchains-testnet-api.validator247.com/

Explorer

https://explorer.validator247.com/airchains-testnet/staking

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


# download binary
cd $HOME
wget -O junctiond https://github.com/airchains-network/junction/releases/download/v0.3.2/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 <node_name> --chain-id varanasi-1 

# download genesis and addrbook
wget -O addrbook.json https://raw.githubusercontent.com/Validator247/Airchains-varanasi-1/main/addrbook.json
wget -O genesis.json https://raw.githubusercontent.com/Validator247/Airchains-varanasi-1/main/genesis.json

# set seeds and peers
SEEDS="[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"

PEERS="[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




# 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.001uamf"|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

sudo systemctl daemon-reload
sudo systemctl enable junctiond

sudo systemctl restart junctiond && sudo journalctl -u junctiond -f -o cat

Create wallet

# to create a new wallet
junctiond keys add <key_name>

# to restore exexuting wallet
junctiond keys add <key_name> --recover


# check sync status
junctiond status 2>&1 | jq 

# 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 mama\",
    \"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 <name_key> \
    --chain-id varanasi-1 \
	--fees 200uamf \
	
	

Upgrade Version

cd $HOME
wget -O junctiond https://github.com/airchains-network/junction/releases/download/v0.3.2/junctiond-linux-amd64
chmod +x junctiond
sudo mv $HOME/junctiond $(which junctiond)

sudo systemctl restart junctiond 
udo journalctl -u junctiond -f -o cat 

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

Last updated