Skip to content

Install

Website

Twitter

Discord

GitHub

Explorer


Chain ID: varanasi-1 Latest Version: v0.3.2 Custom Port: 137
Section titled “Chain ID: Latest Version: Custom Port: ”
Specify the name of your “MONIKER” (validator) which will be visible in the explorer
Section titled “Specify the name of your “MONIKER” (validator) which will be visible in the explorer”
MONIKER="YOUR_MONIKER_NAME"
sudo apt update && sudo apt upgrade -y
sudo apt install curl build-essential git jq lz4 ncdu btop -y
cd $HOME
version="1.23.6"
wget "https://golang.org/dl/go$version.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$version.linux-amd64.tar.gz"
rm "go$version.linux-amd64.tar.gz"
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile
source $HOME/.bash_profile
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@latest
cd $HOME
wget https://github.com/airchains-network/junction/releases/download/v0.3.2/junctiond-linux-amd64
chmod +x junctiond-linux-amd64
mv junctiond-linux-amd64 $HOME/go/bin/junctiond
junctiond version --long | grep -e commit -e version
# Set node configuration
junctiond config set client chain-id varanasi-1
junctiond config set client keyring-backend os
junctiond config set client node tcp://localhost:13757
# Initialize node
junctiond init $MONIKER --chain-id varanasi-1 --default-denom uamf
# Download genesis and addrbook
curl -Ls https://snapshots.moonbridge.org/testnet/airchains/genesis.json > $HOME/.junctiond/config/genesis.json
curl -Ls https://snapshots.moonbridge.org/testnet/airchains/addrbook.json > $HOME/.junctiond/config/addrbook.json
# Set seeds and peers
SEEDS=""
PEERS=""
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.junctiond/config/config.toml
# Setting minimum gas price
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0.0025uamf\"|" $HOME/.junctiond/config/app.toml
# Setting 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 = "10"|' $HOME/.junctiond/config/app.toml
# Disable indexer
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.junctiond/config/config.toml
# Enable Prometheus
sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.junctiond/config/config.toml
# Setting custom ports
sed -i -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:13758\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://0.0.0.0:13757\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:13760\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:13756\"%; s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):13756\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":13766\"%" $HOME/.junctiond/config/config.toml
sed -i -e "s%:1317%:13717%g; s%:8080%:13780%g; s%:9090%:13790%g; s%:9091%:13791%g; s%:8545%:13745%g; s%:8546%:13746%g; s%:6065%:13765%g" $HOME/.junctiond/config/app.toml
mkdir -p $HOME/.junctiond/cosmovisor/genesis/bin
mkdir -p $HOME/.junctiond/cosmovisor/upgrades
cp $HOME/go/bin/junctiond $HOME/.junctiond/cosmovisor/genesis/bin/
sudo tee /etc/systemd/system/junctiond.service > /dev/null << EOF
[Unit]
Description=Airchains Node
After=network-online.target
[Service]
User=$USER
ExecStart=$(which cosmovisor) run start
Restart=always
RestartSec=5
LimitNOFILE=65535
Environment="DAEMON_NAME=junctiond"
Environment="DAEMON_HOME=$HOME/.junctiond"
Environment="UNSAFE_SKIP_BACKUP=true"
Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=false"
Environment="DAEMON_RESTART_AFTER_UPGRADE=true"
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable junctiond
curl -o - -L https://snapshots.moonbridge.org/testnet/airchains/snapshot_latest.tar.lz4 | lz4 -dc - | tar -x -C $HOME/.junctiond
[[ -f $HOME/.junctiond/data/upgrade-info.json ]] && cp $HOME/.junctiond/data/upgrade-info.json $HOME/.junctiond/cosmovisor/genesis/upgrade-info.json
sudo systemctl start junctiond && sudo journalctl -u junctiond -f --no-hostname -o cat
junctiond keys add wallet
junctiond q bank balances $(junctiond keys show wallet -a)

Get pubkey

junctiond comet show-validator
cd $HOME/.junctiond/config
nano validator.json
{
"pubkey": {"@type":"/cosmos.crypto.ed25519.PubKey","key":"lR1d7YBVK5jYijOfWVKRFoWCsS4dg3kagT7LB9GnG8I="},
"amount": "1000000uamf",
"moniker": "YOUR_MONIKER_NAME",
"identity": "YOUR_KEYBASE_ID",
"details": "YOUR_DETAILS",
"website": "YOUR_WEBSITE_URL",
"security": "YOUR_EMAIL_ADDRESS",
"commission-rate": "0.10",
"commission-max-rate": "0.20",
"commission-max-change-rate": "0.01",
"min-self-delegation": "1"
}
junctiond tx staking create-validator $HOME/.junctiond/config/validator.json \
--from wallet \
--chain-id varanasi-1 \
--fees 500uamf \
-y
sudo systemctl stop junctiond
sudo systemctl disable junctiond
sudo rm -rf /etc/systemd/system/junctiond.service
sudo systemctl daemon-reload
sudo rm -f $(which junctiond)
sudo rm -rf $HOME/.junctiond