Crossfi Finance
CrossFi Chain is a layer 1 blockchain with a modular architecture. It consists of two integral parts, Cosmos and EVM. Each part is responsible for its specific functionality, with their work completely synchronized as a single organism.
https://rpc-crossfi-t.sychonix.com
https://api-crossfi-t.sychonix.com
2e7afff7ddf3a3cd70c67e9e850e95401794ecd9@rpc-crossfi-t.sychonix.com:36656
PEERS="$(curl -sS https://rpc-crossfi-t.sychonix.com/net_info | jq -r '.result.peers[] | "\(.node_info.id)@\(.remote_ip):\(.node_info.listen_addr)"' | awk -F ':' '{print $1":"$(NF)}' | sed -z 's|\n|,|g;s|.$||')"
sed -i -e "s|^persistent_peers *=.*|persistent_peers = \"$PEERS\"|" $HOME/.crossfid/config/config.toml
curl -Ls https://snapshot-2.sychonix.com/mainnet/crossfi/genesis.json > $HOME/.crossfid/config/genesis.json
curl -Ls https://snapshot-2.sychonix.com/mainnet/crossfi/addrbook.json > $HOME/.crossfid/config/addrbook.json
Installation
- Install dependencies
sudo apt update && sudo apt upgrade -y
sudo apt install curl iptables build-essential git wget jq make gcc nano tmux htop nvme-cli pkg-config libssl-dev libleveldb-dev tar clang bsdmainutils ncdu unzip libleveldb-dev aria2 -y
- Install go
ver="1.21.1"
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
go version
- Install binary
cd $HOME && mkdir -p $HOME/go/bin
curl -L https://github.com/crossfichain/crossfi-node/releases/download/v0.3.0-prebuild3/crossfi-node_0.3.0-prebuild3_linux_amd64.tar.gz > crossfi-node_0.3.0-prebuild3_linux_amd64.tar.gz
tar -xvzf 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 readme.md $HOME/bin
- Initialize the node
crossfid init "your_node_name" --chain-id crossfi-evm-testnet-1
crossfid config chain-id crossfi-evm-testnet-1
- Genesis
curl -Ls https://ss-t.crossfi.nodestake.org/genesis.json > $HOME/.mineplex-chain/config/genesis.json
- Addrbook
curl -Ls https://ss-t.crossfi.nodestake.org/addrbook.json > $HOME/.mineplex-chain/config/addrbook.json
- Seed & Gas
sed -i -e 's|^seeds *=.*|seeds = "89752fa7945a06e972d7d860222a5eeaeab5c357@128.140.70.97:26656,dd83e3c7c4e783f8a46dbb010ec8853135d29df0@crossfi-testnet-seed.itrocket.net:36656"|' $HOME/.mineplex-chain/config/config.toml
sed -i -e 's|^minimum-gas-prices *=.*|minimum-gas-prices = "5000000000mpx"|' $HOME/.mineplex-chain/config/app.toml
- Prunning
sed -i \
-e 's|^pruning *=.*|pruning = "custom"|' \
-e 's|^pruning-keep-recent *=.*|pruning-keep-recent = "100"|' \
-e 's|^pruning-interval *=.*|pruning-interval = "17"|' \
$HOME/.mineplex-chain/config/app.toml
- Service
sudo tee /etc/systemd/system/crossfid.service > /dev/null << EOF
[Unit]
Description=CrossFi node service
After=network-online.target
[Service]
User=$USER
ExecStart=$(which crossfid) start
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
- Start
sudo systemctl daemon-reload
sudo systemctl enable crossfid.service
sudo systemctl restart crossfid.service && sudo journalctl -u crossfid.service -f --no-hostname -o cat
Upgrade
No chain upgrades scheduled yet.
Peers
49aa9cb060eb5de5c47ac832bcd7a192d196445c@2a01:26056
Snapshot
Height: Loading... | Last updated: Loading... | Size: Loading...
- Install dependencies, if needed
sudo apt update && sudo apt install aria2
- Stop Service
sudo systemctl stop crossfid
- Back up priv_validator_state.json
cp $HOME/.crossfid/data/priv_validator_state.json $HOME/.crossfid/priv_validator_state.json.backup
- Reset the data
crossfid tendermint unsafe-reset-all --home $HOME/.crossfid --keep-addr-book
- Download Snapshot
aria2c -x 16 -s 16 -o crossfi-snapshot.tar.lz4 https://snapshot-2.sychonix.com/testnet/crossfi/crossfi-snapshot.tar.lz4
lz4 -dc crossfi-snapshot.tar.lz4 | tar -xf - -C $HOME/.crossfid
rm -v crossfi-snapshot.tar.lz4
- Restore Backup and Restart Service
mv $HOME/.crossfid/priv_validator_state.json.backup $HOME/.crossfid/data/priv_validator_state.json
sudo systemctl restart crossfid && sudo journalctl -u crossfid -f -o cat
Addrbook
curl -L https://snapshot.sychonix.com/testnet/crossfi/addrbook.json > $HOME/.crossfid/config/addrbook.json
Genesis
curl -L https://snapshot.sychonix.com/testnet/crossfi/genesis.json > $HOME/.crossfid/config/genesis.json
API
https://api-crossfi-t.sychonix.com
RPC
https://rpc-crossfi-t.sychonix.com
CLI Cheatsheet
Wallet Management
crossfid keys add
crossfid keys add --recover
crossfid keys list
crossfid keys delete
crossfid keys export
crossfid keys import .backup
crossfid q bank balances $(crossfid keys show -a)
Validator Management
crossfid tx staking create-validator \ --amount=0000000mpx \ --moniker="" \ --pubkey=$(crossfid tendermint show-validator) \ --identity="" \ --details="" \ --website="" \ --security-contact= \ --chain-id=crossfi-evm-testnet-1 \ --commission-rate= \ --commission-max-rate=0.20 \ --commission-max-change-rate=0.01 \ --min-self-delegation=1 \ --from= \ --gas=auto \ --gas-prices="0mpx"
crossfid tx staking edit-validator \ --new-moniker="" \ --identity="" \ --details="" \ --website="" \ --chain-id=crossfi-evm-testnet-1 \ --commission-rate=0.07 \ --from= \ --gas=auto \ --gas-prices="0mpx"
crossfid tx slashing unjail --from --chain-id crossfi-evm-testnet-1 --gas-prices 0.00025mpx --gas-adjustment 1.5 --gas auto -y
crossfid query slashing signing-info $(crossfid tendermint show-validator)
crossfid q staking validator $(crossfid keys show --bech val -a)
crossfid q bank denom-metadata -oj | jq
crossfid status 2>&1 | jq -r '.SyncInfo.catching_up // .sync_info.catching_up'
crossfid status 2>&1 | jq -r '.SyncInfo.latest_block_height // .sync_info.latest_block_height'
Token Management
crossfid tx distribution withdraw-all-rewards --from --chain-id crossfi-evm-testnet-1 --gas=auto --gas-prices="0mpx"
crossfid tx distribution withdraw-rewards $(crossfid keys show --bech val -a) --commission --from --chain-id crossfi-evm-testnet-1 --gas=auto --gas-prices="0mpx"
crossfid tx staking delegate $(crossfid keys show --bech val -a) 00000000mpx --from --chain-id crossfi-evm-testnet-1 --gas=auto --gas-prices="0mpx"
crossfid tx staking redelegate $(crossfid keys show --bech val -a) 00000000mpx --from --chain-id crossfi-evm-testnet-1 --gas=auto --gas-prices="0mpx"
crossfid tx staking delegate 00000000mpx --from --chain-id crossfi-evm-testnet-1 --gas=auto --gas-prices="0mpx"
crossfid tx staking unbond $(crossfid keys show --bech val -a) 00000000mpx --from --chain-id crossfi-evm-testnet-1 --gas=auto --gas-prices="0mpx"
crossfid tx bank send 000000000mpx --from --chain-id crossfi-evm-testnet-1 --gas=auto --gas-prices="0mpx"
Service Management
sudo systemctl daemon-reload
sudo systemctl enable crossfid
sudo systemctl disable crossfid
sudo systemctl start crossfid
sudo systemctl stop crossfid
sudo systemctl restart crossfid
sudo systemctl status crossfid
sudo journalctl -u crossfid -f --no-hostname -o cat
CUSTOM_PORT= sed -i.bak -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:${CUSTOM_PORT}658\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://127.0.0.1:${CUSTOM_PORT}657\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:${CUSTOM_PORT}060\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:${CUSTOM_PORT}656\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":${CUSTOM_PORT}660\"%" $HOME/.mineplex-chain/config/config.toml sed -i.bak -e "s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:${CUSTOM_PORT}317\"%; s%^address = \":8080\"%address = \":${CUSTOM_PORT}080\"%; s%^address = \"0.0.0.0:9090\"%address = \"0.0.0.0:${CUSTOM_PORT}090\"%; s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:${CUSTOM_PORT}091\"%" $HOME/.mineplex-chain/config/app.toml
sudo systemctl stop crossfid && sudo systemctl disable crossfid && sudo rm /etc/systemd/system/crossfid.service && sudo systemctl daemon-reload && rm -rf $HOME/.mineplex-chain && rm -rf crossfi-evm-testnet-1 && sudo rm -rf $(which crossfid)