Skip to main content

Airchains Airchains

The new version of Junction, a cutting-edge blockchain platform designed for secure and efficient data management.
Important: It is Airchains, NOT Airchain.

1. Information​

Website: https://www.airchains.io

Twitter: https://twitter.com/airchains_io

Discord: https://discord.gg/airchains

Faucet on Discord

2. Service​


3. Hardware requirement​

CPU: 4 Cores, RAM: 8GB, Storage: 40GB NVMe SSD

3.2. Minumum hardware​

CPU: 2 Cores, RAM: 4GB, Storage: 40GB SSD
Ubuntu 22.04 x86

4. Guide to install​

4.1. Install Go​

rm -rf $HOME/go
sudo rm -rf /usr/local/go
cd $HOME
curl https://dl.google.com/go/go1.23.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

4.2. Insstall Airchains​

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

4.3. Set chain-id and chain-name​

Change your <Change-Name>

junctiond config chain-id junction
junctiond init <Change-Name> --chain-id junction

4.4. Download Genesis & Addressbook​

curl -Ls https://snap.anonid.top/config/airchains/genesis.json > $HOME/.junction/config/genesis.json 
curl -Ls https://snap.anonid.top/config/airchains/addrbook.json > $HOME/.junction/config/addrbook.json

4.5. Create Service and enable startup​

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

4.6. Download snapshort (Updated every day)​

junctiond tendermint unsafe-reset-all --home ~/.junction/ --keep-addr-book

wget -O- https://snap.anonid.top/snaps%2Fairchains.snap.tar.lz4 | tar -Ilz4 -xf - -C $HOME/.junction

5. Create or import wallet​

5.1. Add wallet key​

You have 2 option:

5.1.1. Add new wallet key​

junctiond keys add wallet

With "wallet" is your wallet name. To easy follow this guide, keep it if you don't want to change.

Important: Save this seed, if you lost it, you can't recovery your wallet

5.1.2. Recover existing wallet key​

junctiond keys add wallet --recover

5.2. List all keys​

junctiond keys list

5.3. Query wallet balance​

junctiond q bank balances $(junctiond keys show wallet -a)

With "wallet" is your wallet name create or recovery at 5.1. Add New Wallet Key or #5.2. Recover existing key.

6. Check sync status​

If it show "false", it mean no need to wait node sync data or node is synced

If it show "true", please wait it some minute (because near to recreate snapshoot - about 6 hour). After status is synced (false) you can go to next step. Please be patient, sync time will depend on your server configuration and network speed.

junctiond status 2>&1 | jq .sync_info

7. Create Validator​

7.1. Obtain your validator public key​

Running this command to show your validator public key

junctiond comet show-validator

The output will be same to this but with a different key:

{"@type":"/cosmos.crypto.ed25519.PubKey","key":"_**uyeP+tevNbAm+NYH5pdLfhYnGZyh3hBHD8nGpC2sI14=**_"}

7.2. Prepair validator information​

Create a file named validator.json in $HOME by command**:**

nano $HOME/validator.json

Change your info, include pubkey, moniker, indentity, website, security, details and Save them

  • Moniker*: Your validator name (node name) - Required
  • Identiry: Your keybase.io ID (64-bit)
  • Website: Your website (if you have)
  • Security: Normaly is your email
  • Details: Your slogan to show in validator page
{
"pubkey": {"@type":"/cosmos.crypto.ed25519.PubKey","key":"uyeP+tevNbAm+NYH5pdLfhYnGZyh3hBHD8nGpC2sI14="},
"amount": "1000000amf",
"moniker": "<validator-name>",
"identity": "optional identity signature (ex. UPort or Keybase)",
"website": "validator's (optional) website",
"security": "validator's (optional) security contact email",
"details": "validator's (optional) details",
"commission-rate": "0.1",
"commission-max-rate": "0.2",
"commission-max-change-rate": "0.01",
"min-self-delegation": "1"
}

7.3. Create validator​

Submit the transaction to create the validator:

junctiond tx staking create-validator validator.json --from wallet --chain-id junction --fees 5000amf -y

When command complete, you should copy TXHash and check transactions at https://explorer.anonid.top/airchains/tx (copy hash to find or paste it after click to search icon and press Enter) to verify this transactions is success or failed and then check your validator name in staking page of explorer at https://explorer.anonid.top/airchains/staking. Remember check in Inactive tab, because at now, only 100 top validator can be show in Active tab.

7.4. Faucet​

Join Airchains Discord server at https://discord.gg/airchains

Make verify and then go to this channel and paste your wallet address at 5.2. List all keys to get your faucet https://discord.com/channels/1116269224449548359/1238910689188511835

7.5. Delegate token to your own validator​

junctiond tx staking delegate $(junctiond keys show wallet --bech val -a)  1000000amf 
--from wallet --chain-id junction --fees 5000amf -y

With "wallet" is your wallet name create or recovery at 5.1. Add New Wallet Key or #5.2. Recover existing key.

8. Withdraw rewards and commission from your validator​

junctiond tx distribution withdraw-rewards $(junctiond keys show wallet --bech val -a) --from wallet --chain-id junction --fees 5000amf -y

9. Unjail validator​

junctiond tx slashing unjail --from wallet --chain-id junction --fees 5000amf -y

10. Services Management​

10.1. Reload service​

sudo systemctl daemon-reload

10.2. Enable service​

sudo systemctl enable junctiond

10.3. Disable service​

sudo systemctl disable junctiond

10.4. Start service​

sudo service junctiond start

10.5. Stop service​

sudo service junctiond stop 

10.6. Restart service​

sudo service junctiond restart 

10.7. Check service status​

sudo systemctl junctiond status 

10.8. Check service logs​

sudo journalctl -u junctiond -f --no-hostname -o cat

11. Backup Validator - Important​

cat $HOME/.junction/config/priv_validator_key.json

Copy and store your node information in safe location.

12. Remove node​

Make sure you want to remove node, keep seed pharse at Add wallet key and validator information at Backup validator. Once deleted, it cannot be restored

sudo service junctiond stop 
sudo systemctl disable junctiond
rm -rf /etc/systemd/system/junctiond.service
sudo systemctl daemon-reload
sudo rm -f $(which junctiond)
sudo rm -rf $HOME/.junction

13. Snapshot​

sudo service junctiond stop
mv $HOME/.junction/data/priv_validator_state.json $HOME/.junction/priv_validator_state.json.backup
rm -rf $HOME/.junction/data $HOME/.junction/wasmPath

wget -O- https://snap.anonid.top/snaps%2Fairchains.snap.tar.lz4 | tar -Ilz4 -xf - -C $HOME/.junction

mv $HOME/.junction/priv_validator_state.json.backup $HOME/.junction/data/priv_validator_state.json

sudo service junctiond restart && sudo journalctl -u junctiond -f --no-hostname -o cat

14. State Sync​

sudo service junctiond stop 

cp $HOME/.junction/data/priv_validator_state.json $HOME/.junction/priv_validator_state.json.backup
junctiond tendermint unsafe-reset-all --home $HOME/.junction

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"

SNAP_RPC="https://junction-testnet-rpc.nodesync.top:443"

sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $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 && sleep 2

sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ;
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ;
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ;
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"| ;
s|^(seeds[[:space:]]+=[[:space:]]+).*$|\1\"\"|" $HOME/.junction/config/config.toml

mv $HOME/.junction/priv_validator_state.json.backup $HOME/.junction/data/priv_validator_state.json

sudo service junctiond restart && sudo journalctl -u junctiond -f --no-hostname -o cat