Setup Airchains
Welcome to the new version of Junction, a cutting-edge blockchain platform designed for secure and efficient data management.
Recommended Hardware: 4 Core, 8Gb ram, 200Gb SSD NVMe Minumum Hardware: 2 Core, 4Gb ram, 40Gb SSD NVMe Ubuntu 22.04, x86 or arm
Faucet: Discord
Website: https://www.airchains.io/
Discord: https://discord.gg/airchains
X: https://twitter.com/airchains_io
Install Dependencies:
Copy
sudo apt update && sudo apt upgarade -y
sudo apt-get install git curl build-essential make jq gcc snapd chrony lz4 tmux unzip bc -y
Install GO: (amd64 - x86)
Copy
rm -rf $HOME/go
sudo rm -rf /usr/local/go
cd $HOME
curl https://dl.google.com/go/go1.21.8.linux-amd64.tar.gz | sudo tar -C/usr/local -zxvf -
cat <<'EOF' >>$HOME/.profile
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export GO111MODULE=on
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
EOF
source $HOME/.profile
go version
Install GO: (arm64)
Copy
rm -rf $HOME/go
sudo rm -rf /usr/local/go
cd $HOME
curl https://dl.google.com/go/go1.21.8.linux-arm64.tar.gz | sudo tar -C/usr/local -zxvf -
cat <<'EOF' >>$HOME/.profile
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export GO111MODULE=on
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
EOF
source $HOME/.profile
go version
Install Airchains: amd64
Copy
cd $HOME
wget https://github.com/airchains-network/junction/releases/download/v0.1.0/junctiond
chmod +x junctiond
sudo mv junctiond /usr/local/bin/
cd $HOME
junctiond version
Install Airchains: arm64 (Node39 build from project source)
Copy
cd $HOME
wget https://node39.top/testnet/airchains/junctiond-linux-arm64
mv junctiond-linux-arm64 junctiond
chmod +x junctiond
sudo mv junctiond /usr/local/bin/
Set chain and Name Airchains: Change <Change-Name>
Copy
junctiond init <Change-Name> --chain-id junction
Download Genesis & addressbook:
Copy
curl -Ls https://node39.top/testnet/airchains/genesis.json > $HOME/.junction/config/genesis.json
curl -Ls https://node39.top/testnet/airchains/addrbook.json > $HOME/.junction/config/addrbook.json
Peers:
Copy
peers="[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:56256,[email protected]:26656,[email protected]:26656,[email protected]:56256,[email protected]:26656,[email protected]:32656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26666,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:17656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:47656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656"
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.junction/config/config.toml
Create Service:
Copy
sudo tee /etc/systemd/system/junctiond.service > /dev/null <<EOF
[Unit]
Description=junctiond
After=network-online.target
[Service]
User=root
ExecStart=$(which junctiond) start
Restart=always
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable junctiond
Set min gas:
Copy
sed -i 's|minimum-gas-prices =.*|minimum-gas-prices = "0.001amf"|g' $HOME/.junction/config/app.toml
Download Snapshort:
Copy
sudo systemctl stop junctiond
cp $HOME/.junction/data/priv_validator_state.json $HOME/.junction/priv_validator_state.json.backup
curl https://node39.top/testnet/airchains/snapshort-airchains.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.junction
mv $HOME/.junction/priv_validator_state.json.backup $HOME/.junction/data/priv_validator_state.json
sudo systemctl restart junctiond && sudo journalctl -u junctiond -f --no-hostname -o cat
Wallet:
Copy
// Create wallet
junctiond keys add wallet
// Recover wallet
junctiond keys add wallet --recover
// Check Balance
junctiond q bank balances $(junctiond keys show wallet -a)
Check sync: (False -> done)
Copy
junctiond status 2>&1 | jq .sync_info
Create validator:
Copy
cd $HOME
// Check validator public key
junctiond comet show-validator
Ex: {"@type":"/cosmos.crypto.ed25519.PubKey","key":"sElDJvnNcALvCAirlerzK9tzsf5CXPmDPVz0Bvm9EjQ="}
// Create & edit file json
nano validator.json
{
"pubkey": {"@type":"/cosmos.crypto.ed25519.PubKey","key":"sElDJvnNcALvCAirlerzK9tzsf5CXPmDPVz0Bvm9EjQ="},
"amount": "1000000amf",
"moniker": "<change-name>",
"identity": "",
"website": "",
"security": "",
"details": "",
"commission-rate": "0.1",
"commission-max-rate": "0.2",
"commission-max-change-rate": "0.01",
"min-self-delegation": "1"
}
// Create validator
junctiond tx staking create-validator validator.json --from wallet --chain-id junction --fees 5000amf -y
Delegate Token to your own validator:
Copy
junctiond tx staking delegate $(junctiond keys show wallet --bech val -a) 1000000amf --from wallet --chain-id junction --fees 5000amf -y
Withdraw rewards and commission from your validator:
Copy
junctiond tx distribution withdraw-rewards $(junctiond keys show wallet --bech val -a) --commission --from wallet --chain-id junction --fees 5000amf -y
Unjail validator:
Copy
junctiond tx slashing unjail --from wallet --chain-id junction --fees 5000amf -y
Copy
// Reload Service
sudo systemctl daemon-reload
// Enable Service
sudo systemctl enable junctiond
// Disable Service
sudo systemctl disable junctiond
// Start Service
sudo systemctl start junctiond
// Stop Service
sudo systemctl stop junctiond
// Restart Service
sudo systemctl restart junctiond
// Check Service Status
sudo systemctl status junctiond
// Check Service Logs
sudo journalctl -u junctiond -f --no-hostname -o cat
Detele node:
Copy
sudo systemctl stop junctiond
sudo systemctl disable junctiond
sudo rm -rf /etc/systemd/system/junctiond.service
sudo rm $(which junctiond)
sudo rm -rf $HOME/.junction
sed -i "/AIRCHAIN_/d" $HOME/.bash_profile
Last updated