System requirement
Settup Variable
Nodename
Replace <your_nodename_moniker>
with your own nodename wahatever you want
MYNODENAME="<Your_Nodename_Moniker>"
echo "export NODENAME=$MYNODENAME" >> $HOME/.bash_profile
Save Environment Variables
echo "export WALLET=wallet" >> $HOME/.bash_profile
echo "export CROSSFI_CHAIN_ID=crossfi-evm-testnet-1" >> $HOME/.bash_profile
source $HOME/.bash_profile
Update and isntall dependencies
Update System Packages
sudo apt update && sudo apt upgrade -y
Install required packages
sudo apt install curl build-essential git wget jq make gcc tmux net-tools ccze -y
Install GO
install Go, if you already install Go you can skip to the next steps
if ! [ -x "$(command -v go)" ]; then
ver="1.20.2"
cd $HOME
wget "https://golang.org/dl/go$ver.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$ver.linux-amd64.tar.gz"
rm "go$ver.linux-amd64.tar.gz"
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> ~/.bash_profile
source ~/.bash_profile
fi
Node Settup
Download and prepare the binaries
cd $HOME
wget https://github.com/crossfichain/crossfi-node/releases/download/v0.3.0-prebuild3/crossfi-node_0.3.0-prebuild3_linux_amd64.tar.gz
tar -xvf crossfi-node_0.3.0-prebuild3_linux_amd64.tar.gz
chmod +x $HOME/go/bin/crossfid
mv $HOME/go/bin/crossfid $HOME/go/bin
rm -rf crossfi-node_0.3.0-prebuild3_linux_amd64.tar.gz
Initialize the Node with Chain ID
crossfid init $MYNODENAME --chain-id $CROSSFI_CHAIN_ID
rm -rf $HOME/.mineplex-chain
git clone https://github.com/crossfichain/testnet.git
mv $HOME/testnet/ $HOME/.mineplex-chain/
Fetch configuration files
wget --no-check-certificate http://crossfi-toolkit.nodevism.com/genesis.json -O $HOME/.mineplex-chain/config/genesis.json
wget --no-check-certificate http://crossfi-toolkit.nodevism.com/addrbook.json -O $HOME/.mineplex-chain/config/addrbook.json
Configuration The Node
Set Minimum Gas Prices and Disable Indexing
sed -i 's|minimum-gas-prices =.*|minimum-gas-prices = "10000000000000mpx"|g' $HOME/.mineplex-chain/config/app.toml
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.mineplex-chain/config/config.toml
Optimistion storage
pruning="custom"
pruning_keep_recent="100"
pruning_keep_every="0"
pruning_interval="10"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.mineplex-chain/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.mineplex-chain/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.mineplex-chain/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.mineplex-chain/config/app.toml
Create Service System
Set Up and Start Node Service
sudo tee /etc/systemd/system/crossfid.service > /dev/null <<EOF
[Unit]
Description=Crossfi Node
After=network-online.target
[Service]
User=$USER
ExecStart=$(which crossfid) start
Restart=on-failure
RestartSec=3
LimitNOFILE=4096
WorkingDirectory=$HOME/.mineplex-chain
[Install]
WantedBy=multi-user.target
EOF
Enable and start the service
sudo systemctl daemon-reload
sudo systemctl enable crossfid
sudo systemctl start crossfid
Check Node Status
sudo systemctl status crossfid
Check logs
sudo systemctl status crossfid
Last updated