Airchains
Introduction
Airchains is a Modular zk Rollup SDK that ensures better scalability in comparison to conventional Rollup solutions.
Recommended Hardware
4 Cores, 8GB RAM, 300GB of storage (NVME)
Services & Sync
https://airchains-testnet-rpc.eigennode.de
https://airchains-testnet-api.eigennode.de
https://airchains-testnet-grpc.eigennode.de
Snapshot
Update every 4 á 5 hours
sudo systemctl stop junctiond
cp $HOME/.junction/data/priv_validator_state.json $HOME/.junction/priv_validator_state.json.backup
rm -rf $HOME/.junction/data $HOME/.junction/wasmPath
curl https://files.eigennode.de/airchains/snap_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
State Sync
sudo systemctl stop junctiond
cp $HOME/.junction/data/priv_validator_state.json $HOME/.junction/priv_validator_state.json.backup
junctiond tendermint unsafe-reset-all --home $HOME/.junction
peers=""
SNAP_RPC="airchains-testnet-rpc.eigennode.de"
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 systemctl restart junctiond && sudo journalctl -u junctiond -f
Installation
Environment variables & dependencies
# set environment variables
echo "export WALLET="wallet"" >> $HOME/.bash_profile
echo "export MONIKER="moniker"" >> $HOME/.bash_profile
echo "export CHAIN_ID="indigo-1"" >> $HOME/.bash_profile
echo "export PROJECT="airchains"" >> $HOME/.bash_profile
echo "export NETWORK="testnet"" >> $HOME/.bash_profile
echo "export DIRECTORY="$HOME/.airchains"" >> $HOME/.bash_profile
source $HOME/.bash_profile
# install dependencies
sudo apt -q update
sudo apt -qy install curl git jq lz4 build-essential fail2ban ufw
sudo apt -qy upgrade
# install go
cd $HOME
bash <(curl -s "https://raw.githubusercontent.com/EigenNode/utils/main/go_installer.sh") -v 1.21.3
source ~/.bash_profile
Install node
# download binary
cd $HOME
wget https://storage.googleapis.com/airchains-zone/core/0.13.0/junctiond-0.13.0-linux-amd64.tar.gz
tar -xzvf $HOME/junctiond-0.13.0-linux-amd64.tar.gz
mv junctiond $HOME/go/bin
# config and init app
junctiond config keyring-backend os
junctiond config chain-id indigo-1
junctiond init "test" --chain-id indigo-1
# download genesis and addrbook
wget -O $HOME/.junction/config/genesis.json https://files.eigennode.de/airchains/genesis.json
wget -O $HOME/.junction/config/addrbook.json https://files.eigennode.de/airchains/addrbook.json
# set seeds and peers
SEEDS=""
PEERS=""
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.junction/config/config.toml
# config pruning
sed -i -e "s/^pruning *=.*/pruning = \"custom\"/" $HOME/.junction/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"100\"/" $HOME/.junction/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"50\"/" $HOME/.junction/config/app.toml
# set minimum gas price, enable prometheus and disable indexing
sed -i 's|minimum-gas-prices =.*|minimum-gas-prices = "0.025uairchains"|g' $HOME/.junction/config/app.toml
sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.junction/config/config.toml
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.junction/config/config.toml
# create and enable service file
sudo tee /etc/systemd/system/junctiond.service > /dev/null <<EOF
[Unit]
Description=airchains node
After=network-online.target
[Service]
User=$USER
WorkingDirectory=$HOME/.junction
ExecStart=$(which junctiond) start --home $HOME/.junction
Restart=on-failure
RestartSec=5
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable junctiond
# download latest chain data snapshot
if curl -s --head https://files.eigennode.de/airchains/snap_airchains.tar.lz4 | head -n 1 | grep "200" > /dev/null; then
curl https://files.eigennode.de/airchains/snap_airchains.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.junction
else
bash <(curl -s https://raw.githubusercontent.com/EigenNode/utils/main/find_snap.sh)
fi
# start service
sudo systemctl restart junctiond && sudo journalctl -u junctiond -f --no-hostname -o cat
Create wallet
Check Sync status, once your node is fully synced, the output will say False
junctiond status 2>&1 | jq .SyncInfo
Create wallet
junctiond keys add $WALLET
Restore existing wallet
junctiond keys add $WALLET --recover
Check balance
junctiond q bank balances $(junctiond keys show $WALLET -a)
Create validator
junctiond tx staking create-validator \
--amount 1000000uairchains \
--pubkey $(junctiond tendermint show-validator) \
--chain-id indigo-1 \
--moniker "$MONIKER" \
--identity "" \
--details "❤️ Thank you, EigenNode" \
--website "https://eigennode.de/" \
--from $WALLET \
--commission-rate 0.1 \
--commission-max-rate 0.2 \
--commission-max-change-rate 0.01 \
--min-self-delegation 1 \
--gas auto --fees 0.025uairchains \
-y
Security
Firewall security Set the default to allow outgoing connections, deny all incoming, allow ssh and node p2p port
sudo apt install -y ufw
sudo ufw default allow outgoing
sudo ufw default deny incoming
sudo ufw allow ssh/tcp
sudo ufw allow 26656/tcp
sudo ufw enable
Delete node
DANGER
Please, note before proceeding with the next step! All data will be lost! Make sure you have backed up your keys!
cd $HOME
sudo systemctl stop junctiond
sudo systemctl disable junctiond
sudo rm /etc/systemd/system/junctiond.service
sudo systemctl daemon-reload
sudo rm -rf $HOME/.junction
sudo rm -rf $(which junctiond)
Cheat Sheet
Service operations
Check logs
sudo journalctl -u junctiond -f
Start service
sudo systemctl start junctiond
Stop service
sudo systemctl stop junctiond
Restart service
sudo systemctl restart junctiond
Sync info
junctiond status 2>&1 | jq .SyncInfo
Check service status
sudo systemctl status junctiond
Reload services
sudo systemctl daemon-reload
Enable Service
sudo systemctl enable junctiond
Disable Service
sudo systemctl disable junctiond
Node info
junctiond status 2>&1 | jq .NodeInfo
Your node peer
echo $(junctiond tendermint show-node-id)'@'$(wget -qO- eth0.me)':'$(cat $HOME/.junction/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')
Key management
Add New Wallet
junctiond keys add $WALLET
Restore executing wallet
junctiond keys add $WALLET --recover
List All Wallets
junctiond keys list
Delete wallet
junctiond keys delete $WALLET
Check Balance
junctiond q bank balances $(junctiond keys show $WALLET -a)
Export Key (save to wallet.backup)
junctiond keys export $WALLET
View EVM Prived Key
junctiond keys unsafe-export-eth-key $WALLET
Import Key (restore from wallet.backup)
junctiond keys import $WALLET wallet.backup
Edit existing validator
junctiond tx staking edit-validator \
--chain-id indigo-1 \
--new-moniker "$MONIKER" \
--identity "" \
--details "❤️ Thank you, EigenNode" \
--website "https://www.eigennode.de/" \
--from $WALLET \
--commission-rate 0.1 \
--gas auto --fees 0.025uairchains \
-y