Installation

Dependencies Installation

# Install dependencies for building from source
sudo apt update
sudo apt install -y curl git jq lz4 build-essential

# Install Go
sudo rm -rf /usr/local/go
curl -L https://go.dev/dl/go1.21.6.linux-amd64.tar.gz | sudo tar -xzf - -C /usr/local
echo 'export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin' >> $HOME/.bash_profile
source .bash_profile

Node Installation

# Download binary
cd $HOME && mkdir -p go/bin/
wget https://github.com/airchains-network/junction/releases/download/v0.1.0/junctiond
chmod +x junctiond
mv junctiond $HOME/go/bin/


# Set node CLI configuration
junctiond config set client chain-id junction
junctiond config set client keyring-backend test
junctiond config set client node tcp://localhost:26657

# Initialize the node
junctiond init "Your Moniker" --chain-id junction

# Download genesis and addrbook files
curl -L https://sync.rawakinode.tech/airchain/genesis.json > $HOME/.junction/config/genesis.json
curl -L https://sync.rawakinode.tech/airchain/addrbook.json > $HOME/.junction/config/addrbook.json

# Set seeds
sed -i -e 's|^seeds *=.*|seeds = "de2e7251667dee5de5eed98e54a58749fadd23d8@34.22.237.85:26656,48887cbb310bb854d7f9da8d5687cbfca02b9968@35.200.245.190:26656,2d1ea4833843cc1433e3c44e69e297f357d2d8bd@5.78.118.106:26656"|' $HOME/.junction/config/config.toml

# Set minimum gas price
sed -i -e 's|^minimum-gas-prices *=.*|minimum-gas-prices = "0.001amf"|' $HOME/.junction/config/app.toml

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

# Download latest chain data snapshot
curl "https://sync.rawakinode.tech/airchain/airchain-testnet_latest.tar.lz4" | lz4 -dc - | tar -xf - -C "$HOME/.junction"

# Create a service
sudo tee /etc/systemd/system/junctiond.service > /dev/null << EOF
[Unit]
Description=Airchains node service
After=network-online.target
[Service]
User=$USER
ExecStart=$(which junctiond) start
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable junctiond.service

# Start the service and check the logs
sudo systemctl start junctiond.service
sudo journalctl -u junctiond.service -f --no-hostname -o cat

Last updated