Andromeda
ADO LibraryBuild AppsDevelop ADOsCLIWeb Application Docs
Andromeda Archives
Andromeda Archives
  • Platform and Framework
    • Introduction to AndromedaOS
    • ADO Classes
    • Andromeda Messaging Protocol
      • Kernel
      • ADO Database
      • Economics Engine
      • Virtual File System
    • ADO Base
      • AndromedaMsg V1.0.0
      • AndromedaQuery V1.0.0
    • Common Types
    • Deployed Contracts
  • Andromeda Digital Objects
    • Introduction to ADOs
    • Auction V1.0.0
    • App V1.0.1
    • Crowdfund V1.0.0
    • CW20 V1.0.0
    • CW20 Staking V1.0.0
    • CW721 V1.0.0
    • CW20 Exchange V1.0.0
    • Lockdrop V1.0.0
    • Marketplace V1.0.0
    • Merkle-Airdrop V1.0.0
    • Rate Limiting Withdrawals V1.0.0
    • Splitter V1.0.0
    • Timelock V1.0.0
  • Andromeda Apps
    • Introduction to Apps
    • Crowdfunding App
    • Auctioning App
    • Cw20 Staking App
    • Marketplace App
  • Developing an ADO
    • Getting Started
      • Instantiation
      • Execution
      • Queries
      • Testing
    • ADO Example
    • ADO Submissions
  • Andromeda CLI
    • Introduction
    • Help and Shortcuts
    • ADO
    • Bank
    • Chain
    • Env
    • Gql
    • Tx
    • OS
    • Wallet
    • Wasm
    • Clearing CLI Data
    • Clear and Exit
  • Chain
    • Running a Node
    • Staking and Rewards
  • Andromeda Dashboard
    • Tokenomics Dashboard
    • Dashboard API
  • Additional Resources
    • GitHub
    • Website
    • White Paper
Powered by GitBook

Additional Resources

  • Github
  • Website

Community

  • Discord
  • Telegram

Socials

  • Twitter
  • Medium
  • Youtube
On this page
  • Install Prerequisites
  • Increasing the default open files limit
  • Installing Go 1.20.x
  • Updating Environment Variables
  • Initialize the Config Files
  • `gentx` Command
  • Create environment Variable:
  • Setting up persistent peers in config.toml
  • Starting the Network
  • Create Validator Command

Was this helpful?

  1. Chain

Running a Node

The steps to successfully run a node on the Andromeda chain.

PreviousClear and ExitNextStaking and Rewards

Last updated 11 months ago

Was this helpful?

Install Prerequisites

You can also check that was created by one of our validators.

sudo apt-get update && sudo apt upgrade -y
sudo apt-get install make build-essential git jq chrony -y
sudo apt install gcc

Increasing the default open files limit

This is to make sure that the nodes won't crash once the network grows larger and larger.

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 .

Updating Environment Variables

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:

git clone https://github.com/andromedaprotocol/andromedad.git
cd andromedad
make install

Initialize the Config Files

andromedad init <MONIKER> --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:

cd ~/.andromeda/config/

Create new keys, or import existing wallet with BEP32 mnenomic phrase:

andromedad keys add <KEY_NAME> --keyring-backend os

To recover existing wallet:

andromedad keys add <KEY_NAME> --keyring-backend os --recover

`gentx` Command

To generate your validators transaction (gentx) use the following command:

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:

MY_VALIDATOR_ADDRESS=$(andromedad keys show <KEY_NAME> -a --keyring-backend os)

Setting up persistent peers in config.toml

Add Persistent Peers to config.toml:

vim config.toml

Now connect to some peers nodes by setting persistent_peers.

Example

You can ask for seeds in the discord validator channel.

persistent_peers = "e4c2267b90c7cfbb45090ab7647dc01df97f58f9@andromeda-m.peer.stavr.tech:4376,258f523c96efde50d5fe0a9faeea8a3e83be22ca@seed.andromeda-1.andromeda.aviaone.com:1028"

Copy Genesis File:

git clone https://github.com/andromedaprotocol/mainnet
cd mainnet
cp genesis.json $HOME/.andromeda/config/

Starting the Network

andromedad start

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.

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.

sudo nano /etc/systemd/system/andromedad.service && sudo touch /etc/systemd/system/andromedad.service 

Insert content into andromedad.service:

[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:

sudo mv /etc/systemd/system/andromedad.service /lib/systemd/system/
sudo systemctl enable andromedad.service && sudo systemctl start andromedad.service

Check info about node:

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
this guide
here