💠Airchains
The Modular zk-Rollup framework
Public Endpoints
Explorer
Installation guide
Make sure you have the latest Go build and system components installed
Download the source files:
wget https://github.com/ignite/cli/releases/download/v0.27.1/ignite_0.27.1_linux_amd64.tar.gzModify file permissions:
chmod +x ignite_0.27.1_linux_amd64.tar.gzExtract the TAR file:
tar -xvf ignite_0.27.1_linux_amd64.tar.gzMove the binary:
sudo mv ignite /usr/local/binVerify installation:
ignite versionSet up environment variables:
export PATH=$PATH:/usr/local/go/binRunning a Full Node
Download binary
wget https://github.com/airchains-network/junction/releases/download/v0.1.0/junctiondMake the binary executable
chmod +x junctiondMove the binary to a system-wide directory
sudo mv junctiond /usr/local/binInitialize the Node with the Moniker
junctiond init <moniker>Update Genesis Configuration
wget https://github.com/airchains-network/junction/releases/download/v0.1.0/genesis.jsonReplace the Existing Genesis File
cp genesis.json ~/.junction/config/genesis.jsonUpdate Configuration:
Run the open configuration command
nano ~/.junction/config/config.toml Replace peer
peers="1f0eada58b83f32ac7ba0ff704e15732ae2a25c4@2a01:43456,[email protected]:63656,[email protected]:38656,[email protected]:13756,[email protected]:43456,fe51d4777e7ad2b4d93c3a096761a31966c65c64@2a0a:26656,[email protected]:43456,[email protected]:26656,[email protected]:43456,[email protected]:43456,[email protected]:26656,[email protected]:26656”Seeds
seeds="[email protected]:26656"Set Mini Gas
sed -i 's|^minimum-gas-prices *=.*|minimum-gas-prices = "0.00025amf"|g' $HOME/.junction//config/app.tomlcreate service
sudo tee /etc/systemd/system/junctiond.service > /dev/null << EOF
[Unit]
Description=airchains node service
After=network-online.target
[Service]
User=$USER
ExecStart=/usr/local/bin/junctiond start
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable junctiondState Sync
sudo systemctl stop junctiond
SNAP_RPC="https://airchains-testnet-rpc.validator247.com:443"
cp $HOME/.junction/data/priv_validator_state.json $HOME/.junction/priv_validator_state.json.backup
junctiond tendermint unsafe-reset-all --home ~/.warden/ --keep-addr-book
LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height); \
BLOCK_HEIGHT=$((LATEST_HEIGHT - 2000)); \
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash)
echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH
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\"|" ~/.junction/config/config.toml
more ~/.junction/config/config.toml | grep 'rpc_servers'
more ~/.junction/config/config.toml | grep 'trust_height'
more ~/.junction/config/config.toml | grep 'trust_hash'
sudo mv $HOME/.junction/priv_validator_state.json.backup $HOME/.junction/data/priv_validator_state.json
sudo systemctl restart junctiond && journalctl -u junctiond -f -o catLaunch Node
sudo systemctl restart junctiond && journalctl -u junctiond -f -o cat Check sync status
junctiond status 2>&1 | jq .sync_infoCommand services
- Reload
sudo systemctl daemon-reload
- Start
sudo systemctl start junctiond
- Stop
sudo systemctl stop junctiond
- Restart
sudo systemctl restart junctiond
- Check Status
sudo systemctl status junctiond
- Check Logs
sudo journalctl -u junctiond -f -o cat Wallet
Creat Wallet
junctiond keys add walletRecover existing key
junctiond keys add wallet --recoverList All Keys
junctiond keys listQuery Wallet Balance
junctiond q bank balances $(junctiond keys show wallet -a)To obtain the pubkey:
junctiond comet show-validatorCreat file Validator.json ( nano validator.json )
{
"pubkey": <validator-pub-key>,
"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"
}Finally, create the validator:
junctiond tx staking create-validator path/to/validator.json --from wallet --chain-id junction --fees 500amfSet max peer
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.junction/config/config.toml
sed -i -e "s/^max_num_inbound_peers *=.*/max_num_inbound_peers = 300/" $HOME/.junction/config/config.toml
sed -i -e "s/^max_num_outbound_peers *=.*/max_num_outbound_peers = 300/" $HOME/.junction/config/config.tomlPruning
sed -i \
-e 's|^pruning *=.*|pruning = "custom"|' \
-e 's|^pruning-keep-recent *=.*|pruning-keep-recent = "100"|' \
-e 's|^pruning-keep-every *=.*|pruning-keep-every = "0"|' \
-e 's|^pruning-interval *=.*|pruning-interval = "10"|' \
$HOME/.junction/config/app.toml
# Upgrade v0.2.0 at height 2383922
cd $HOME
wget -O junctiond https://github.com/airchains-network/junction/releases/download/v0.2.0/junctiond-linux-amd64
chmod +x junctiond
sudo mv $HOME/junctiond $(which junctiond)
sudo systemctl restart junctiond && sudo journalctl -u junctiond -f -o catDone !
# Detailed Guide to Setting Up a New Node on a VPS with an Existing Node
Create a New Directory for the New Node
mkdir -p $HOME/.new_node# Install ignite CLI
Download and install Ignite CLI.
wget https://github.com/ignite/cli/releases/download/v0.27.1/ignite_0.27.1_linux_amd64.tar.gz
chmod +x ignite_0.27.1_linux_amd64.tar.gz
tar -xvf ignite_0.27.1_linux_amd64.tar.gz
sudo mv ignite /usr/local/bin
ignite version
# Download the junctiond Binary
junctiond Binarywget https://github.com/airchains-network/junction/releases/download/v0.1.0/junctiond
chmod +x junctiond
sudo mv junctiond /usr/local/bin
# Initialize the New Node
junctiond init <new_moniker> --home $HOME/.new_node# Update the Genesis File
wget https://github.com/airchains-network/junction/releases/download/v0.1.0/genesis.json
cp genesis.json $HOME/.new_node/config/genesis.json# Update the config.toml File
config.toml FileModify config.toml to update persistent_peers and minimum-gas-prices
nano $HOME/.new_node/config/config.toml
Change the persistent_peers section to connect to peer nodes:
persistent_peers = "1f0eada58b83f32ac7ba0ff704e15732ae2a25c4@2a01:43456,[email protected]:63656,[email protected]:38656,[email protected]:13756,[email protected]:43456,fe51d4777e7ad2b4d93c3a096761a31966c65c64@2a0a:26656,[email protected]:43456,[email protected]:26656,[email protected]:43456,[email protected]:43456,[email protected]:26656,[email protected]:26656"Update the minimum gas price:
sed -i 's|^minimum-gas-prices *=.*|minimum-gas-prices = "0.00025amf"|g' $HOME/.new_node/config/app.toml
# Update config.toml with New Ports
config.toml with New PortsModify config.toml to set new ports for the new node.
[p2p]
laddr = "tcp://0.0.0.0:26658" # Change P2P listen port
[rpc]
laddr = "tcp://0.0.0.0:26659" # Change RPC listen port
# 8. Configure the systemd Service
systemd ServiceCreate a new systemd service file to manage the new node.
sudo tee /etc/systemd/system/junctiond-new.service > /dev/null << EOF
[Unit]
Description=airchains node service for new node
After=network-online.target
[Service]
User=$USER
ExecStart=/usr/local/bin/junctiond start --home $HOME/.new_node
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable junctiond-new
# 9 Start the New Node
Start the service for the new node and check the logs.
sudo systemctl start junctiond-new
sudo journalctl -u junctiond-new -f -o cat# 10 Check the New Ports
sudo netstat -tuln# 11 Check the Status of the New Node
Check the status and information of the new node.
junctiond status --home $HOME/.new_node# Summary
Create a new directory for the new node.
Install Ignite CLI and
junctiondbinary.Initialize the new node with a new moniker.
Update the
genesis.jsonfile and configureconfig.tomlwith appropriate settings.Create and configure a
systemdservice for the new node.Start the new node and verify its status and ports.
# Delete New_node
# Dừng dịch vụ của node mới
sudo systemctl stop junctiond-new
# Xóa thư mục dữ liệu và cấu hình của node mới
rm -rf $HOME/.new_node
# Xóa file cấu hình dịch vụ systemd
sudo rm /etc/systemd/system/junctiond-new.service
# Tải lại các cấu hình systemd
sudo systemctl daemon-reload
# Xóa binary junctiond nếu không cần
sudo rm /usr/local/bin/junctiond
# Tắt và xóa dịch vụ khỏi danh sách systemd
sudo systemctl disable junctiond-new
sudo systemctl stop junctiond-new
# Kiểm tra các port để xác nhận rằng các cổng đã được giải phóng
sudo netstat -tuln
Snapshot (Option)
Setup aria2c
apt install aria2Download snapshot
aria2c -x16 -s16 https://snapshots.moonbridge.team/testnet/airchains/snapshot_latest.tar.lz4Extract File tar.lz4
lz4 -dc snapshot_latest.tar.lz4 | tar -x -C $HOME/.junctionVIỆT NAM
# Cài Đặt Các Công Cụ Cần Thiết
sudo apt update && sudo apt install lz4 aria2 -y
# Dừng Dịch Vụ và Xóa Dữ Liệu Cũ
sudo systemctl stop junctiond
cp $HOME/.junction/data/priv_validator_state.json $HOME/.junction/priv_validator_state.json.backup
rm -rf $HOME/.junction/data
# Tải Snapshot Mới Nhất
aria2c -x5 -s4 https://snapshots.moonbridge.team/testnet/airchains/snapshot_latest.tar.lz4
# Giải Nén Tệp Snapshot
lz4 -dc snapshot_latest.tar.lz4 | tar -x -C $HOME/.junction
# Khôi Phục Tệp `priv_validator_state.json`
mv $HOME/.junction/priv_validator_state.json.backup $HOME/.junction/data/priv_validator_state.json
# Xóa Tệp Snapshot Sau Khi Giải Nén
rm -f snapshot_latest.tar.lz4
# Khởi Động Lại Dịch Vụ và Kiểm Tra Nhật Ký
sudo systemctl start junctiond && sudo journalctl -u junctiond -f --no-hostname -o cat
Last updated