🖥️System Requirements
- OS: Linux - CPU: 8 Core(s) - Memory: 32GB - Storage: 500GB-2TB
Crossfi Testnet Full Node Installation Guide
Set Up Environment Variables
Define Node Name
Replace <Your_Nodename_Moniker>
with your desired node name.
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 Install 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
Check and Install Go if Not Present
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 Setup
Download and Prepare 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.coinsspor.com/genesis.json -O $HOME/.mineplex-chain/config/genesis.json
wget --no-check-certificate http://crossfi-toolkit.coinsspor.com/addrbook.json -O $HOME/.mineplex-chain/config/addrbook.json
Configure 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
Optimize Node 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 System Service for Node
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 Node Service
sudo systemctl daemon-reload
sudo systemctl enable crossfid
sudo systemctl start crossfid
Check Node Status
To ensure your node is running correctly, check its status:
sudo systemctl status crossfid
Or, to follow the node's live output:
sudo journalctl -u crossfid -f -o cat
Remember to replace <Your_Nodename_Moniker>
with the actual name you want for your node before running the setup commands.
Last updated