Running a Node The steps to successfully run a node on the Andromeda chain.
Install Prerequisites
You can also check this guide that was created by one of our validators.
Copy sudo apt-get update && sudo apt upgrade -y
sudo apt-get install make build-essential git jq chrony -y
Increasing the default open files limit
This is to make sure that the nodes won't crash once the network grows larger and larger.
Copy sudo su -c "echo 'fs.file-max = 65536' >> /etc/sysctl.conf"
sudo sysctl -p
Installing Go 1.20.x
You can find GoLang 1.20.x from here .
Updating Environment Variables
Copy cat << 'EOF' >> $HOME /.profile
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export GO111MODULE=on
export GOBIN=$HOME/go/bin
export PATH=$PATH:/usr/local/go/bin:$GOBIN
EOF
source $HOME /.profile
Next we need to clone the source repo:
Copy git clone https://github.com/andromedaprotocol/andromedad.git
cd andromedad
make install
Initialize the Config Files
Copy andromedad init < MONIKE R > --chain-id andromeda-1
andromedad config chain-id andromeda-1
Now, your node environment should be ready to go! In order to sync up to the network, a few more parameters must be changed to proper specifics for the network:
Copy cd ~/.andromeda/config/
Create new keys, or import existing wallet with BEP32 mnenomic phrase:
Copy andromedad keys add < KEY_NAM E > --keyring-backend os
To recover existing wallet:
Copy andromedad keys add < KEY_NAM E > --keyring-backend os --recover
`gentx` Command
To generate your validators transaction (gentx) use the following command:
Copy andromedad genesis gentx <WALLET> 100000000000uandr --chain-id andromeda-1
Then submit a pull request to the mainnet
repo where you found the genesis.json
Create environment Variable:
Copy MY_VALIDATOR_ADDRESS = $( andromedad keys show < KEY_NAM E > -a --keyring-backend os )
Setting up persistent peers in config.toml
Add Persistent Peers to config.toml:
Now connect to some peers nodes by setting persistent_peers.
Example
You can ask for seeds in the discord validator channel.
Copy persistent_peers = "e4c2267b90c7cfbb45090ab7647dc01df97f58f9@andromeda-m.peer.stavr.tech:4376,258f523c96efde50d5fe0a9faeea8a3e83be22ca@seed.andromeda-1.andromeda.aviaone.com:1028"
Copy Genesis File:
Copy git clone https://github.com/andromedaprotocol/mainnet
cd mainnet
cp genesis.json $HOME/.andromeda/config/
Starting the Network
Your node should now be catching up to the current state of the network!
Create Validator Command
Send yourself some tokens from the Andromeda Faucet before proceeding.
Copy andromedad tx staking create-validator \
--amount=1000000 uandr \
--pubkey=$( andromedad tendermint show-validator) \
--moniker= < MONIKER > \
--chain-id=andromeda-1 \
--commission-rate= "0.05" \
--commission-max-rate= "0.20" \
--commission-max-change-rate= "0.01" \
--min-self-delegation= "1" \
--gas= "700000" \
--from= < KEY_NAME >
Replace <MONIKER> and <KEY_NAME> above.
Setup andromedad systemd service (copy and paste all to create the file service)
Enable and activate the andromedad service.
Copy sudo nano /etc/systemd/system/andromedad.service && sudo touch /etc/systemd/system/andromedad.service
Insert content into andromedad.service:
Copy [Unit]
Description = Andromeda Node
After = network-online.target
[Service]
User = root
ExecStart = /root/go/bin/andromedad start
Restart = always
RestartSec = 3
LimitNOFILE = 4096
[Install]
WantedBy = multi-user.target
Move file to systemd folder:
Copy sudo mv /etc/systemd/system/andromedad.service /lib/systemd/system/
sudo systemctl enable andromedad.service && sudo systemctl start andromedad.service
Check info about node:
Copy curl -s localhost:26657/status | jq .result.sync_info.catching_up
#true output is syncing - false is synced
curl -s localhost:26657/status | jq .result.sync_info.latest_block_height
#this output is your last block synced
curl -s "http://:26657/status?" | jq .result.sync_info.latest_block_height
#this output the public node last block synced