logo
ANDROMEDA

Installation

Recommended Hardware: 6 Cores, 8GB RAM, 400GB of storage (NVME)

Node Name
Wallet
Port
Add
# set environment variables
echo "export WALLET="wallet"" >> $HOME/.bash_profile
echo "export MONIKER="moniker"" >> $HOME/.bash_profile
echo "export CHAIN_ID="mineplex-mainnet-1"" >> $HOME/.bash_profile
echo "export PROJECT="crossfi"" >> $HOME/.bash_profile
echo "export NETWORK="mainnet"" >> $HOME/.bash_profile
echo "export DIRECTORY="$HOME/.mineplex-chain"" >> $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/Andromeda-node/utils/main/auto_go_install.sh") -v 1.21.6
source ~/.bash_profile

# download binary
cd $HOME
wget https://github.com/crossfichain/crossfi-node/releases/download/v0.1.1/mineplex-2-node._v0.1.1_linux_amd64.tar.gz && tar -xf mineplex-2-node._v0.1.1_linux_amd64.tar.gz
tar -xvf mineplex-2-node._v0.1.1_linux_amd64.tar.gz
chmod +x $HOME/mineplex-chaind
mv $HOME/mineplex-chaind $HOME/go/bin/crossfid
rm mineplex-2-node._v0.1.1_linux_amd64.tar.gz

# config and init app
crossfid config keyring-backend os
crossfid config chain-id mineplex-mainnet-1
rm -rf testnet ~/.mineplex-chain
git clone https://github.com/crossfichain/mainnet.git
mv $HOME/mainnet/ $HOME/.mineplex-chain/
sed -i '99,114 s/^\( *enable =\).*/\1 "false"/' $HOME/.mineplex-chain/config/config.toml

# download genesis and addrbook
wget -O $HOME/.mineplex-chain/config/genesis.json https://files.andromedanode.co/crossfi/genesis.json
wget -O $HOME/.mineplex-chain/config/addrbook.json https://files.andromedanode.co/crossfi/addrbook.json

# set seeds and peers
SEEDS=""
PEERS=""
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.mineplex-chain/config/config.toml


# config pruning
sed -i -e "s/^pruning *=.*/pruning = \"custom\"/" $HOME/.mineplex-chain/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"100\"/" $HOME/.mineplex-chain/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"50\"/" $HOME/.mineplex-chain/config/app.toml

# set minimum gas price, enable prometheus and disable indexing
sed -i 's|minimum-gas-prices =.*|minimum-gas-prices = "10000000000000mpx"|g' $HOME/.mineplex-chain/config/app.toml
sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.mineplex-chain/config/config.toml
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.mineplex-chain/config/config.toml

# create and enable service file
sudo tee /etc/systemd/system/crossfid.service > /dev/null <<EOF
[Unit]
Description=Crossfi node
After=network-online.target
[Service]
User=$USER
WorkingDirectory=$HOME/.mineplex-chain
ExecStart=$(which crossfid) start --home $HOME/.mineplex-chain
Restart=on-failure
RestartSec=5
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable crossfid

# download latest chain data snapshot
if curl -s --head https://files.andromedanode.co/crossfi/snap_crossfi.tar.lz4 | head -n 1 | grep "200" > /dev/null; then
    curl https://files.andromedanode.co/crossfi/snap_crossfi.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.mineplex-chain
else
    bash <(curl -s https://raw.githubusercontent.com/Andromeda-node/utils/main/snapshot_finder.sh)
fi

# start service
sudo systemctl restart crossfid && sudo journalctl -u crossfid -f --no-hostname -o cat

Create validator

Moniker
Identity
Details
Amount, mpx
Commission rate
Commission max rate
Commission max change rate
Website
crossfid tx staking create-validator \
--amount 1000000mpx \
--pubkey $(crossfid tendermint show-validator) \
--chain-id mineplex-mainnet-1 \
--moniker "moniker" \
--identity "" \
--details "A heartfelt shoutout to Andromeda for their amazing support! Your contributions shine brightly, guiding us forward. We are deeply grateful. And to the world of blockchain, our love knows no bounds. ❤️ Thank you, Andromeda, for being such a vital part of our journey." \
--website "https://andromedanode.co/" \
--from $WALLET \
--commission-rate 0.1 \
--commission-max-rate 0.2 \
--commission-max-change-rate 0.01 \
--min-self-delegation 1 \
--gas auto --gas-adjustment 1.5 --gas-prices 10000000000000mpx \
-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

cd $HOME
sudo systemctl stop crossfid 
sudo systemctl disable crossfid 
sudo rm /etc/systemd/system/crossfid.service 
sudo systemctl daemon-reload 
sudo rm -rf $HOME/.mineplex-chain
sudo rm -rf $(which crossfid)