Run a full node for Axelar chain
Axelar is a cross chain protocol that supports cross chain transfers and messages,
Hardware Requirements: Recommended 6-8 cores, 16-32 GB RAM, 1 TB+ drive.
Increase Swap Space (skip if you have 32GB)
Follow the steps from here:
Update and install Dependencies
sudo apt update && sudo apt upgrade -y
sudo apt install git build-essential ufw curl jq snapd make jq tar clang pkg-config libssl-dev gcc chrony -y
Install Go:
wget -q -O - https://git.io/vQhTU | bash -s -- --version 1.20.5
This script is made by osmosis-labs and installs PATH
variables to .bashrc
and sets up in a way compatible with the rest of the build. Go binary installs to $HOME/.go
and $HOME/go/bin
Run source $HOME/.bashrc
to take effect, confirm installed with go version
which should return the version installed
#to remove installation
wget -q -O - https://git.io/vQhTU | bash -s -- --remove
This method will clone Axelar’s core repository and build the binary from source, find Axelar repository and version releases here: (use version tagged latest)
Clone and build from Axelar Repository
git clone https://github.com/axelarnetwork/axelar-core
cd axelar-core
git fetch
git checkout v0.33.3
make build
Move Binary
sudo mv ./bin/axelard /usr/local/bin/
Confirm installed:
axelard version
which axelard
You should now have a directory `.axelar`
See Here for more info: https://docs.axelar.dev/node/config-cli
There is no client.toml
file, create this manually or add the following commands to CLI commands
--node tcp://localhost:26657 --gas auto --gas-adjustment 1.5 --chain-id mainnet
This is not needed for a Full node for RPC provision, however should you wish to manage AXL wallet through your own node
Create New Keystore, add --recover
to use existing seed
axelard keys add <WALLET-NAME> --keyring-backend test
axelard keys show <WALLET-NAME> -a --keyring-backend test
Test Connection to CLI
If you created a client.toml
this can test you are able to call your own node through tcp://localhost:26657
, this will not work until the node is fully synced.
axelard query bank balances <WALLET ADDRESS>
Initialize Node:
NODE_MONIKER=< enter any node name here >
axelard init $NODE_MONIKER --chain-id mainnet
Get Genesis
cd
rm .axelar/config/genesis.json
wget -O $HOME/.axelar/config/genesis.json "https://raw.githubusercontent.com/axelarnetwork/axelarate-community/main/resources/mainnet/genesis.json"
NOTE: TO SELF
compare the two files, delete as needed!
Get Seeds
cd
wget -O $HOME/.axelar/config/seeds.toml "https://raw.githubusercontent.com/axelarnetwork/axelarate-community/main/resources/mainnet/seeds.toml"
NOTE: the genesis and seeds are from an Axelar repository which is older, other sources for these files can be used that may be more recent.
Open API interfaces
PENDING
This install method is using snapshot data, this means downloading the blockchain history directly from a trusted source, many community members host this data, some examples: bwarelabs.com, quicksync.io, staketab.com
Download LZ4
sudo apt-get update -y
sudo apt-get install wget liblz4-tool aria2 -y
To Use Quicksync, pruning settings are default, nothing needs to change in the config.toml
or app.toml
Remove data folder, backup validator state
cd
mkdir -p axelar-backups
mv .axelar/data/priv_validator_state.json axelar-backups/priv_validator_state.backup
rm -rf .axelar/data/
Get the latest URL
SNAPSHOT_URL=`curl -L https://quicksync.io/axelar.json|jq -r '.[] |select(.file=="axelar-dojo-1-pruned")|.url'`
Extract Snapshot data into data folder
cd ~/.axelar/
wget -O - $SNAPSHOT_URL | lz4 -d | tar -xvf -
cd
mv axelar-backups/priv_validator_state.backup .axelar/data/priv_validator_state.json
this may vary depending on provider, but this is an example for pruning settings that must be changed to use snapshot, check with the provider for details, the following example is using bware
Change Prunning settings
In app.toml
pruning = "custom"
pruning-keep-recent = "100"
pruning-keep-every = "0"
pruning-interval = "10"
[state-sync]
snapshot-interval = 0
In config.toml
...
[tx_index]
indexer = "null"
Get snapshot URL
SNAPSHOT_URL=<enter url to download link here>
Remove data folder, backup validator state
mkdir -p axelar-backups
mv .axelar/data/priv_validator_state.json axelar-backups/priv_validator_state.backup
rm -rf .axelar/data/
Decompress archive
curl -L $SNAPSHOT_URL | tar -Ilz4 -xf - -C $HOME/.axelar
mv axelar-backups/priv_validator_state.backup .axelar/data/priv_validator_state.json
Create System service to run node as a background service
sudo tee /etc/systemd/system/axelard.service > /dev/null <<EOF
[Unit]
Description=AXL node
After=network.target
[Service]
Type=simple
User=$USER
ExecStart=$(which axelard) start
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
Enable and start service
sudo systemctl daemon-reload
sudo systemctl enable axelard
sudo systemctl start axelard
Check Status and logs
sudo systemctl status axelard
journalctl -u axelard -f
Check node Sync status
curl localhost:26657/status | jq '.result.sync_info'
Example queries at the bottom here:
Cosmovisor: is a process management tool to handle cosmos based chain upgrades seamlessly, it looks for chain upgrades and downloads & installs at the correct block height.
Create directories for Cosmovisor
cd
mkdir -p ~/.axelar/cosmovisor/genesis/bin
mkdir -p ~/.axelar/cosmovisor/upgrades
create directory for corresponding binary version (change v0.33.3 accordingly)
mkdir -p ~/.axelar/cosmovisor/upgrades/v0.33.3/bin
Install Cosmovisor binary
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@latest
this should install cosmovisor binary to $GOPATH/bin/cosmovisor
Copy binaries to Cosmovisor
Note on versions: if using snapshot (this guide) you are downloading the latest binary, with chain data manually downloaded and placed in the correct location, cosmovisor will look from the block height the node is currently on and the corresponding binary in the upgrades folder. The binary also needs to be placed in ~/.axelar/cosmovisor/genesis/bin
for first start up or an error will occur.
cp /usr/local/bin/axelard ~/.axelar/cosmovisor/genesis/bin
cp /usr/local/bin/axelard ~/.axelar/cosmovisor/upgrades/v0.33.3/bin/
Create system service.
System service to run node as background service through cosmovisor
sudo tee /etc/systemd/system/cosmovisor.service > /dev/null <<EOF
[Unit]
Description=Axelar Daemon (cosmovisor)
After=network-online.target
[Service]
User=$USER
ExecStart=$HOME/go/bin/cosmovisor run start
Restart=always
RestartSec=10
LimitNOFILE=65535
Environment="DAEMON_NAME=axelard"
Environment="DAEMON_HOME=$HOME/.axelar"
Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=true"
Environment="DAEMON_RESTART_AFTER_UPGRADE=true"
Environment="DAEMON_LOG_BUFFER_SIZE=512"
[Install]
WantedBy=multi-user.target
EOF
Enable and start service.
sudo systemctl daemon-reload
sudo systemctl enable cosmovisor
sudo systemctl start cosmovisor