Testnet
Crossfi
Installation Guide
CLI Command
Public Endpoint
Statesync
Snapshot
Explorers
Node Maps
Installation Guide
Installation Guide
CLI Command
Public Endpoint
Statesync
Snapshot
Explorers
Node Maps
How To Install Full Node Crossfi Testnet
Setting up vars
Your Nodename (validator) that will shows in explorer
NODENAME=<Your_Nodename_Moniker>
Save variables to system
echo "export NODENAME=$NODENAME" >> $HOME/.bash_profile
if [ ! $WALLET ]; then
echo "export WALLET=wallet" >> $HOME/.bash_profile
fi
echo "export CROSSFI_CHAIN_ID=crossfi-evm-testnet-1" >> $HOME/.bash_profile
source $HOME/.bash_profile
Update packages
sudo apt update && sudo apt upgrade -y
Install dependencies
sudo apt install curl build-essential git wget jq make gcc tmux net-tools ccze -y
Install go
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
Download and build 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/bin/crossfid
mv $HOME/bin/crossfid $HOME/go/bin
rm -rf crossfi-node_0.3.0-prebuild3_linux_amd64.tar.gz $HOME/bin
Init app
crossfid init $NODENAME --chain-id $CROSSFI_CHAIN_ID
rm -rf testnet ~/.mineplex-chain
git clone https://github.com/crossfichain/testnet.git
mv $HOME/testnet/ $HOME/.mineplex-chain/
Download configuration
wget https://snap1.konsortech.xyz/crossfi/genesis.json -O $HOME/.mineplex-chain/config/genesis.json
wget https://snap1.konsortech.xyz/crossfi/addrbook.json -O $HOME/.mineplex-chain/config/addrbook.json
Set the minimum gas price
sed -i 's|minimum-gas-prices =.*|minimum-gas-prices = "10000000000000mpx"|g' $HOME/.mineplex-chain/config/app.toml
Disable indexing
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.mineplex-chain/config/config.toml
Config pruning
pruning="custom" && \
pruning_keep_recent="100" && \
pruning_keep_every="0" && \
pruning_interval="10" && \
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" ~/.mineplex-chain/config/app.toml && \
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" ~/.mineplex-chain/config/app.toml && \
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" ~/.mineplex-chain/config/app.toml && \
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" ~/.mineplex-chain/config/app.toml
Create service
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
Register and start service
sudo systemctl daemon-reload
sudo systemctl enable crossfid
sudo systemctl restart crossfid && sudo journalctl -u crossfid -f -o cat
Guidance for Validator
Create wallet
To create new wallet you can use command below. Don’t forget to save the mnemonic
crossfid keys add $WALLET
To recover your wallet using seed phrase
crossfid keys add $WALLET --recover
Show your wallet list
crossfid keys list
Save wallet info
Add wallet and validator address into variables
CROSSFI_WALLET_ADDRESS=$(crossfid keys show $WALLET -a)
CROSSFI_VALOPER_ADDRESS=$(crossfid keys show $WALLET --bech val -a)
echo 'export CROSSFI_WALLET_ADDRESS='${CROSSFI_WALLET_ADDRESS} >> $HOME/.bash_profile
echo 'export CROSSFI_VALOPER_ADDRESS='${CROSSFI_VALOPER_ADDRESS} >> $HOME/.bash_profile
source $HOME/.bash_profile
Fund your wallet
N/A
Create validator
check your wallet balance:
crossfid query bank balances $CROSSFI_WALLET_ADDRESS
To create your validator run command below
crossfid tx staking create-validator \
--amount 1000000mpx \
--from $WALLET \
--commission-max-change-rate "0.1" \
--commission-max-rate "0.2" \
--commission-rate "0.1" \
--min-self-delegation "1" \
--pubkey $(crossfid tendermint show-validator) \
--moniker $NODENAME \
--chain-id $CROSSFI_CHAIN_ID
--gas auto \
--gas-adjustment 1.5 \
--gas-prices 10000000000000mpx
Check your validator key
[[ $(crossfid q staking validator $CROSSFI_VALOPER_ADDRESS -oj | jq -r .consensus_pubkey.key) = $(crossfid status | jq -r .ValidatorInfo.PubKey.value) ]] && echo -e "\n\e[1m\e[32mTrue\e[0m\n" || echo -e "\n\e[1m\e[31mFalse\e[0m\n"
Get list of validators
crossfid q staking validators -oj --limit=3000 | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " \t " + .description.moniker' | sort -gr | nl
Usefull commands
Service management
Check logs
journalctl -fu crossfid -o cat
Start service
sudo systemctl start crossfid
Stop service
sudo systemctl stop crossfid
Restart service
sudo systemctl restart crossfid
Node info
Synchronization info
crossfid status 2>&1 | jq .SyncInfo
Validator info
crossfid status 2>&1 | jq .ValidatorInfo
Node info
crossfid status 2>&1 | jq .NodeInfo
Show node id
crossfid tendermint show-node-id
Wallet operations
List of wallets
crossfid keys list
Recover wallet
crossfid keys add $WALLET --recover
Delete wallet
crossfid keys delete $WALLET
Get wallet balance
crossfid query bank balances $CROSSFI_WALLET_ADDRESS
Transfer funds
crossfid tx bank send $CROSSFI_WALLET_ADDRESS <TO_CROSSFI_WALLET_ADDRESS> 1000000mpx --gas auto --gas-adjustment 1.5 --gas-prices 10000000000000mpx
Voting
crossfid tx gov vote 1 yes --from $WALLET --chain-id=$CROSSFI_CHAIN_ID --gas auto --gas-adjustment 1.5 --gas-prices 10000000000000mpx
Staking, Delegation and Rewards
Delegate stake
crossfid tx staking delegate $CROSSFI_VALOPER_ADDRESS 1000000mpx --from=$WALLET --chain-id=$CROSSFI_CHAIN_ID --gas auto --gas-adjustment 1.5 --gas-prices 10000000000000mpx
Redelegate stake from validator to another validator
crossfid tx staking redelegate <srcValidatorAddress> <destValidatorAddress> 1000000mpx --from=$WALLET --chain-id=$CROSSFI_CHAIN_ID --gas auto --gas-adjustment 1.5 --gas-prices 10000000000000mpx
Withdraw all rewards
crossfid tx distribution withdraw-all-rewards --from=$WALLET --chain-id=$CROSSFI_CHAIN_ID --gas auto --gas-adjustment 1.5 --gas-prices 10000000000000mpx
Withdraw rewards with commision
crossfid tx distribution withdraw-rewards $CROSSFI_VALOPER_ADDRESS --from=$WALLET --commission --chain-id=$CROSSFI_CHAIN_ID --gas auto --gas-adjustment 1.5 --gas-prices 10000000000000mpx
Validator management
Edit validator
crossfid tx staking edit-validator \
--moniker=$NODENAME \
--identity=<your_keybase_id> \
--website="<your_website>" \
--details="<your_validator_description>" \
--chain-id=$CROSSFI_CHAIN_ID \
--from=$WALLET
--gas auto \
--gas-adjustment 1.5 \
--gas-prices 10000000000000mpx
Unjail validator
crossfid tx slashing unjail \
--broadcast-mode=block \
--from=$WALLET \
--chain-id=$CROSSFI_CHAIN_ID \
--gas auto \
--gas-adjustment 1.5 \
--gas-prices 10000000000000mpx
Custom Explorers
https://testnet-explorer.konsortech.xyz/crossfi
Public Endpoint
RPC
https://testnet-crossfi-rpc.konsortech.xyz
EVM RPC
https://testnet-crossfi-evm.konsortech.xyz
API
https://testnet-crossfi-api.konsortech.xyz
gRPC
testnet-crossfi.konsortech.xyz:11090
Peers and Seeds
Peers
4b6c13b8820fd6c1bcf5e36c3097a1b64e4e3b8c@testnet-crossfi.konsortech.xyz:11656
Seeds
8fca0ab5f35e529e096a6dd8dec6d57aa9746ef8@testnet-seed.konsortech.xyz:14165
Genesis & Address Book
Address Book
https://snap1.konsortech.xyz/crossfi/addrbook.json
Genesis
https://snap1.konsortech.xyz/crossfi/genesis.json
State Sync
sudo systemctl stop crossfid
cp $HOME/.mineplex-chain/data/priv_validator_state.json $HOME/.mineplex-chain/priv_validator_state.json.backup
crossfid tendermint unsafe-reset-all --home $HOME/.mineplex-chain --keep-addr-book
SNAP_RPC="https://testnet-crossfi-rpc.konsortech.xyz:443"
LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height); \
BLOCK_HEIGHT=$((LATEST_HEIGHT - 2000)); \
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash)
echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH
sed -i -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ; \
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ; \
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ; \
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"|" $HOME/.mineplex-chain/config/config.toml
mv $HOME/.mineplex-chain/priv_validator_state.json.backup $HOME/.mineplex-chain/data/priv_validator_state.json
sudo systemctl restart crossfid
sudo journalctl -u crossfid -f --no-hostname -o cat
Snapshot
sudo systemctl stop crossfid
cp $HOME/.mineplex-chain/data/priv_validator_state.json $HOME/.mineplex-chain/priv_validator_state.json.backup
rm -rf $HOME/.mineplex-chain/data
SNAP_NAME=$(curl -s https://snap1.konsortech.xyz/crossfi/ | egrep -o ">crossfi-snapshot.*\.tar.lz4" | tr -d ">")
curl https://snap1.konsortech.xyz/crossfi/${SNAP_NAME} | lz4 -dc - | tar -xf - -C $HOME/.mineplex-chain
mv $HOME/.mineplex-chain/priv_validator_state.json.backup $HOME/.mineplex-chain/data/priv_validator_state.json
sudo systemctl restart crossfid && journalctl -u crossfid -f --no-hostname -o cat