Installation

Prerequiretes

Hardware
Minimun Spesification

CPU

2 Cores

RAM

4 GB

Disk

100GB SSD

Installation

Download binary file

wget https://github.com/airchains-network/junction/releases/download/v0.3.2/junctiond-linux-amd64
mv junctiond-linux-amd64 junctiond
chmod +x junctiond
mv junctiond /usr/local/bin/
junctiond version

Initialize the node

junctiond init <your-name> --chain-id varanasi-1

Download Genesis

FILEID=1uTQa7eOW9bjZGnjrnjPQiGPnoGMvd87r
FILENAME=$HOME/.junctiond/config/genesis.json
CONFIRM=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate \
'https://docs.google.com/uc?export=download&id='$FILEID -O- | \
sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1/p')
wget --load-cookies /tmp/cookies.txt \
"https://docs.google.com/uc?export=download&confirm=${CONFIRM}&id=${FILEID}" \
-O ${FILENAME}
rm -f /tmp/cookies.txt

Download Addrbook

FILEID=106zUj53SLj4snWMzPydarUePsGs13CBA
FILENAME=$HOME/.junctiond/config/addrbook.json
CONFIRM=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate \
'https://docs.google.com/uc?export=download&id='$FILEID -O- | \
sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1/p')
wget --load-cookies /tmp/cookies.txt \
"https://docs.google.com/uc?export=download&confirm=${CONFIRM}&id=${FILEID}" \
-O ${FILENAME}
rm -f /tmp/cookies.txt

Configure Seeds and Peers

SEEDS="[email protected]:26656"
PEERS="$(curl -sS https://testnet-rpc-airchain.provewithryd.xyz/net_info | jq -r '.result.peers[] | "\(.node_info.id)@\(.remote_ip):\(.node_info.listen_addr)"' | awk -F ':' '{print $1":"$(NF)}' | sed -z 's|\n|,|g;s|.$||')"
sed -i -e "s|^seeds *=.*|seeds = '"$SEEDS"'|; s|^persistent_peers *=.*|persistent_peers = '"$PEERS"'|" $HOME/.junctiond/config/config.toml

Customize Pruning

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

Set Minimum Gas Price, and Disable the Indexer

sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0.001uamf\"|" $HOME/.junctiond/config/app.toml
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.junctiond/config/config.toml

Create Systemd Services

tee /etc/systemd/system/junctiond.service > /dev/null <<EOF
[Unit]
Description=airchains testnet node
After=network-online.target

[Service]
User=root
ExecStart=/usr/local/bin/junctiond start
Restart=always
RestartSec=3
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF

Enable and Start Services

systemctl daemon-reexec
systemctl daemon-reload
systemctl enable junctiond.service
systemctl start junctiond.service

Last updated