> For the complete documentation index, see [llms.txt](https://service.block-pro.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://service.block-pro.net/testnet/cross-finance/installation.md).

# Installation

## Preparing the server

```
sudo apt update && sudo apt upgrade -y
sudo apt install curl tar wget clang pkg-config libssl-dev jq build-essential bsdmainutils git make ncdu gcc git jq chrony liblz4-tool -y
```

## GO 1.21.3

```
ver="1.21.3" &&
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" >> $HOME/.bash_profile &&
source $HOME/.bash_profile &&
go version
```

## Build

```
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 -xf 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
git clone https://github.com/crossfichain/testnet.git
rm -rf crossfi-node_0.3.0-prebuild3_linux_amd64.tar.gz $HOME/bin
```

```
crossfid version --long
```

* version: 0.3.0-prebuild3
* commit: 2a79e36277b951e733f905ec0f955335aa2fb493

```
crossfid config chain-id crossfi-evm-testnet-1
crossfid config keyring-backend os
```

## Create/recover wallet

```
crossfid keys add <walletname>
crossfid keys add <walletname> --recover
```

## Download Genesis and addrbook

```bash
wget -O $HOME/.mineplex-chain/config/genesis.json https://testnet-files.itrocket.net/crossfi/genesis.json
wget -O $HOME/.mineplex-chain/config/addrbook.json https://testnet-files.itrocket.net/crossfi/addrbook.json
```

## Setup the minimum gas price and Peers

```bash
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
SEEDS="dd83e3c7c4e783f8a46dbb010ec8853135d29df0@crossfi-testnet-seed.itrocket.net:36656"
PEERS="66bdf53ec0c2ceeefd9a4c29d7f7926e136f114a@crossfi-testnet-peer.itrocket.net:36656,2e6308d166b358b0b57f5dec6e0b8b57430ed898@65.109.30.35:36656,bbbd8200d83c407d51cfc70bef4c616db1abbaed@65.108.234.158:23656,fe74efeb172b700f462a0d81657288208706565d@37.27.13.51:26656,4dbf9662be216b57b33a7c78c98f63593d16a3cd@65.108.127.160:46656,ab54cbc3676d3b0fad55a50ae0dcef5c42afbeb9@37.60.235.247:26056,b1f6dd2a0fb2f8b08d2d912cd8d66caf910f2c99@135.181.212.139:36656,094a3bc56e83d8a86012207315827a7cdc45d9b2@135.181.176.109:28316,cdc4fd76b359cbfa1eb76febd6c04a0da92158f1@95.217.209.27:26656,087e70916b110025e25626c41a1173166be9f2db@65.21.32.216:60856,02a2e680f0c4a6215e3b172d810624b390ef5efe@65.108.202.217:26656,1da91b392ad7a380fd176e9b3cefd58fd719f7eb@37.27.11.198:26656,8dd34015b54dbd049e8fb45133728dafea4f3419@65.109.232.162:26656,6d14ef26f5455a9d8248f19891fa4be29fd848c6@95.217.35.179:26056,8046edae085a61a0597556b02892d290eb2cf204@91.109.21.158:26656,083726954b2b2190d91bcac3819aefe3fa8cb193@91.218.244.83:21656,0b93f9fd8b8c86f878c6822a441d5628263722ac@162.19.138.14:12656,a23681c39c099fd0d12b8ced173ed716909a6220@51.89.21.232:26656,8b66ffd88c967f7903145aed74f792721785a04b@185.250.37.122:11656,d557bade3a35145fa059e30bdaff1402ed5ccb79@104.131.75.100:26656,3169e738b0e6eb10b6abf927320d0ad1969d3274@38.242.134.254:26656,55352556de7f26d85ff8b83bb4d6552a2dac8964@37.60.238.186:36656,95a04e2fc27ff7e66bbb8591da7323e0e395d28c@80.64.208.223:26656,bc8b05df95c67f23a6f4a012516866e9fdd0ffd6@173.249.35.20:26656,78c7fa5920ac261c03994dd23edf84112055e096@49.13.161.186:26656,7ec8e5dad5ed81b6fd275284386eb651b6e8bc8c@65.109.97.248:26656,27e1c6c211f0ec0e7ca6907f30c201e7b128d694@138.201.31.235:26656,706048f670d2b6db66ea1302e550a911861e3708@94.72.96.223:26056,e1d255b282cd074f41176287fa2d7a126db2dd2f@144.76.62.122:26656,b363ae7542eea55264bcf67906bf0e7118015d11@142.132.152.46:11656,5a7977896986c3dd90bdf5c0b843326866bba789@78.46.99.50:26656,41399c74b2d159e3cb63ee282550b76f1d3c056f@5.9.209.148:26656,b7787910d1ad7eaebaad853aa7d5d3a23bdb0dd7@46.4.108.72:26656,5301b7903d8bf74a183ff3316bb8645f18950da3@37.120.173.44:11456,73746965df645665935ea6c3dcca5dfad7eabca8@109.199.116.240:26656,fcebd9733d536607456acb1df1ab8eb6a6f49d89@109.199.120.89:26656,a662be5f460cff9bf36030461b5a7e6a06085836@109.199.121.188:26656,d582a555166c6b8f10692557a38b7eab52490e01@167.86.106.86:26656,eb42758cab3b6cf4883dac15c605ff23fcfe2925@37.60.251.62:26656,4b6c13b8820fd6c1bcf5e36c3097a1b64e4e3b8c@152.53.18.245:11656,de91bd51dbef5afbe25fca453b0ae70af604e47c@65.108.1.190:26656,5a406ff355437109be6214e544ecf76e0bf2d93c@161.97.111.6:26656,539bece2cf906a0a3d4fb89f4ca6d7e4ce468954@89.39.13.137:26656,d5ffb8080e338e07e4871707a9e719fcfd4af8b4@165.227.64.199:26656,05a60482feaa3b7246dd0fd9fa1785131fac7175@176.9.53.27:26656,f4ed8ef2392f3d2a432b82bbad2106403314ebda@89.39.13.142:26656,c8333d73f10b6cc83a5a10dfa51a374366ebd56d@5.75.131.173:26656,660e9306994e8e6690c0f076be45a4439c78fe0d@198.244.215.141:30656,89752fa7945a06e972d7d860222a5eeaeab5c357@128.140.70.97:26656,352d61156f5cefd81bd2f65206db43b8226b7be3@57.128.63.22:26656,cee875910e8ce0e500f651079ac160b92162aa66@213.199.35.216:26656,49329ba22c738e0a8ba172e84e187f0f8409e419@95.216.22.44:16656,2aafb5304c712f7aa37db9be2869cc84c790d13f@37.27.7.169:26656,a985b30974a127852f11da5646f76550e6e79f88@45.88.223.97:26656,562849bd291b1f972646beefd2fb854d556bb85d@194.163.172.118:11656,551b0407fc19de1ad69d26738bc59b5eeb678454@88.99.254.62:20656,8fb2e2c59658f4e269aa6685449b1326021dd1a0@167.86.122.72:26656,2916e699b7c588d8826bea1a190c6c82dfe7d5eb@5.188.36.196:26656,2ce3b5d3ce236afe1fe1f4024c888ea59febac4a@65.108.206.118:60556,43a274822ff179a87fa454151ce25a675946f967@103.97.111.75:26656,dfdf777685f8b4ef529c371aa1ed9160a810ddf4@213.199.37.254:26656,b35ba40c2946403d81a247a79296bc83faa1f473@213.199.34.40:26656,d614b9e5021ad530a00085246673c84ad34edaca@84.247.144.31:26656,57757c6e0cfae31ab548e2e31bf27f964fe701e4@128.199.224.200:26656,6b27eb87e7216ea6638abac9a2544ac727490f31@65.108.73.245:32656,546568415dc71e95bc6a6238000aea0a9f51652a@213.199.38.233:26656,7e4bd2a380eca22f0b01bb1fdbc37454dedfed75@109.199.108.187:26656,c42d7c18326e3d6b5390093ead3c27c954fcd439@162.55.2.58:26656,4715214d543eb362c11ebd4a14c08d18278ee3af@194.150.220.191:26656,741e4f6997feafbcca4d86eb3bc76900992e79ad@51.81.242.223:26656,b49353a48e2d6db100987f6888b48ac4344568a0@95.217.192.88:26056,b88d969ba0e158da1b4066f5c17af9da68c52c7a@65.109.53.24:44656,5b705811fb0bfb27ea9429b9cff8041df1b3fa71@138.201.201.106:26656,30ce073aff34fec4e3d9dfee8e2a8147f70b788d@84.54.23.111:26656,bc6ee7b89f7193d5b18a859b18f48d3da0b3d09c@109.199.117.167:26656,f298f2b049a5eb07cba0f0e67c3153018e083a2f@149.102.154.95:22656,abd63e0eeb7d86514dbb6731acaf465492308682@65.109.113.233:26056,4fdb9a8014091c97f50524fcdf63740dbe6acb80@[2a03:cfc0:8000:13::b910:277f]:13256,fd425bb6d95b2abdcc74e5b44f3ae6c16a38d0ac@168.119.96.10:26656,ac0d8c08bcb9c726c9809847f28123ba8cc821cb@95.216.228.221:26656,713ded5e29b491868792d0c74106b848d2b5ead8@213.199.36.34:26656"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.mineplex-chain/config/config.toml
```

## Pruning

```bash
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
```

## Create a service file

```bash
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
```

## Start

```bash
sudo systemctl daemon-reload
sudo systemctl enable crossfid
sudo systemctl restart crossfid && sudo journalctl -u crossfid -f
```

## Create validator

```
crossfid tx staking create-validator
--amount 1000000mpx
--from <walletName>
--commission-rate 0.1
--commission-max-rate 0.2
--commission-max-change-rate 0.01
--min-self-delegation 1
--pubkey $(crossfid tendermint show-validator)
--moniker "YOUR_MONIKER_NAME"
--identity "YOUR_KEYBASE_ID"
--details "YOUR_DETAILS"
--chain-id crossfi-evm-testnet-1
--gas auto --gas-adjustment 1.5 --gas-prices 10000000000000mpx
-y
```

## Delete node

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://service.block-pro.net/testnet/cross-finance/installation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
