Airchains is a powerful and flexible framework that allows you to create customized rollups with many features. The framework supports EVM, SVM and CosmWasm based development, which opens wide horizons for developers.
Minimum system requirements
-
Node type: Testnet
-
Processor: 4 cores
-
RAM: 8 GB
-
Storage: 150 GB
Node installation
Automatic installation
To simplify the process, use the automatic installation script:
wget -O airchaint https://raw.githubusercontent.com/111STAVR111/props/main/Airchains/airchaint && chmod +x airchaint && ./airchaint
Manual Installation
Server preparation
First you need to update the packages and install the required dependencies:
sudo apt update && sudo apt upgrade -y
sudo apt install curl tar wget clang pkg-config libssl-dev jq build-essential bsdmainutils git make ncdu gcc git jq chrony liblz4-tool -y
Installing Go 1.21.6
Go will need to be installed for the framework to work:
ver="1.21.6"
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"
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile
source $HOME/.bash_profile
go version
Build and Setup
The next step is to build and install the required package:
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/
junctiond version --long | grep -e commit -e version
Now you can initialize the node:
junctiond init STAVR_guide --chain-id=junction
Creating or restoring a wallet:
junctiond keys add <walletname>
OR
junctiond keys add <walletname> --recover
Network setup
After initialization, you need to download the genesis file:
wget -O $HOME/.junction/config/genesis.json "https://raw.githubusercontent.com/111STAVR111/props/main/Airchains/genesis.json"
sha256sum $HOME/.junction/config/genesis.json
Then set the minimum gas price and configure the connections:
sed -i 's/minimum-gas-prices =.*$/minimum-gas-prices = "0.001amf"/' $HOME/.junction/config/app.toml
external_address=$(wget -qO- eth0.me)
sed -i.bak -e "s/^external_address *=.*/external_address = "$external_address:26656"/" $HOME/.junction/config/config.toml
Setting up peers:
peers="48887cbb310bb854d7f9da8d5687cbfca02b9968@35.200.245.190:26656,2d1ea4833843cc1433e3c44e69e297f357d2d8bd@5.78.118.106:26656,de2e7251667dee5de5eed98e54a58749fadd23d8@34.22.237.85:26656,1918bd71bc764c71456d10483f754884223959a5@35.240.206.208:26656,ddd9aade8e12d72cc874263c8b854e579903d21c@178.18.240.65:26656,eb62523dfa0f9bd66a9b0c281382702c185ce1ee@38.242.145.138:26656,0305205b9c2c76557381ed71ac23244558a51099@162.55.65.162:26656,086d19f4d7542666c8b0cac703f78d4a8d4ec528@135.148.232.105:26656,3e5f3247d41d2c3ceeef0987f836e9b29068a3e9@168.119.31.198:56256,8b72b2f2e027f8a736e36b2350f6897a5e9bfeaa@131.153.232.69:26656,6a2f6a5cd2050f72704d6a9c8917a5bf0ed63b53@93.115.25.41:26656,e09fa8cc6b06b99d07560b6c33443023e6a3b9c6@65.21.131.187:26656"
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = "$peers"/" $HOME/.junction/config/config.toml
Creating and managing a service
Create a service file:
sudo tee /etc/systemd/system/junctiond.service > /dev/null <<EOF
[Unit]
Description=junction
After=network-online.target
[Service]
User=$USER
ExecStart=$(which junctiond) start
Restart=on-failure
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
Apply and Run:
sudo systemctl daemon-reload
sudo systemctl enable junctiond
sudo systemctl restart junctiond && sudo journalctl -fu junctiond -o cat
SnapShot and StateSync
Snapshot can be used to synchronize nodes, which is updated every 5 hours:
cd $HOME
sudo systemctl stop junctiond
curl -o - -L https://airchains-t.snapshot.stavr.tech/airchain-snap.tar.lz4 | lz4 -c -d - | tar -x -C $HOME/.junction --strip-components 2
sudo systemctl restart junctiond && journalctl -fu junctiond -o cat
Network state can be synchronized using StateSync:
SNAP_RPC=https://airchains.rpc.t.stavr.tech:443
SEEDS="bb26fc8cef05cee75d4cae3f25e17d74c7913967@airchains-t.seed.stavr.tech:4476"
cp $HOME/.junction/data/priv_validator_state.json $HOME/.junction/priv_validator_state.json.backup
sed -i -e "/seeds =/ s/= .*/= "$SEEDS"/" $HOME/.junction/config/config.toml
LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height);
BLOCK_HEIGHT=$((LATEST_HEIGHT - 1000));
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash)
echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH
Useful commands and node management
Node state information:
junctiond status 2>&1 | jq .NodeInfo
View logs:
sudo journalctl -fu junctiond -o cat
Service management:
sudo systemctl restart junctiond
Managing keys and validator
Create a new key or restore:
junctiond keys add Wallet_Name
OR
junctiond keys add Wallet_Name --recover
Creating a validator:
junctiond tx staking create-validator $HOME/.junction/validator.json --from WalletName --fees 200amf --chain-id junction -y
The platform supports many useful tools and services to help you manage your node efficiently and keep it running safely.