# Installation

**Chain ID**: blockx\_100-1 | **Latest Version Tag**: - | **Wasm**: -

## Installation

## Install dependencies

**Update system and install build tools**

```
sudo apt -q update
sudo apt -qy install curl git jq lz4 build-essential tmux libgmp3-dev flex bison
sudo apt -qy upgrade
```

**Install Go**

```
rm -rf $HOME/go
sudo rm -rf /usr/local/go
cd $HOME
curl https://dl.google.com/go/go1.19.5.linux-amd64.tar.gz | sudo tar -C/usr/local -zxvf -
cat <<'EOF' >>$HOME/.profile
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export GO111MODULE=on
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
EOF
source $HOME/.profile
go version
```

**Set Variable**

```
echo "export WALLET="YOUR WALLET"" >> $HOME/.bash_profile
echo "export MONIKER="YOUR NODE NAME"" >> $HOME/.bash_profile
echo "export BLOCKX_CHAIN_ID="blockx_100-1"" >> $HOME/.bash_profile
echo "export BLOCKX_PORT="22"" >> $HOME/.bash_profile
source $HOME/.bash_profile
```

**Download and build binaries**

```
git clone https://github.com/BlockXLabs/BlockX-Genesis-Mainnet1.git
cd BlockX-Genesis-Mainnet1
git checkout 
make install
```

Set custom ports

```
CUSTOM_PORT=22
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/.blockxd/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\"%; s%^address = \"127.0.0.1:8545\"%address = \"0.0.0.0:${CUSTOM_PORT}545\"%; s%^ws-address = \"127.0.0.1:8546\"%ws-address = \"0.0.0.0:${CUSTOM_PORT}546\"%" $HOME/.blockxd/config/app.toml
```

#### Set seeds & peers

```
PEERS="baa8b43f6208e330cb37156ecf3b2523766f8012@116.202.218.189:20656,85d0069266e78896f9d9e17915cdfd271ba91dfd@146.190.153.165:26656,e15f4d31281036c69fa17269d9b26ff8733511c6@147.182.238.235:26656,dc240d568509fa275cb870b93de4db1869d7187a@5.78.103.187:26656,8ebf5e70dad7268a66a9198dbe9006f9140415b6@217.182.211.81:26656,bc152258668e673a3b63f964fa75afdd478078c7@185.246.85.48:39656,72639ce4ce7e0260d7ae129e6acc07dcb54d6af1@167.235.102.45:20656,bbe679ddc774dc91b962985c7339a2e7934b8451@207.180.250.5:26656,203082daff197dca66797d955d103740875d84d8@2a01:4f9:3051:19c2::2:4f9,49d33c76a5b47e86f04695752f8be45e7b148bf1@65.109.115.56:38656,d2c3dbb7bcf808253f8d8b42fed4a90f7e4e0004@2a01:4f9:3081:4e45::3:4f9,9b84b33d44a880a520006ae9f75ef030b259cbaf@137.184.38.212:26656,e1a613fcc3c141c2235ce68edea4e765a3eb3c92@51.161.86.217:24127,c178426ed905a7074b44fca4867f2d324923b9e2@143.198.142.220:14356,479dfa1948f49b08810cd16bf6c2d3256ae85423@137.184.7.64:26656,66fccb6e7953e644ae61f974464a3716318a3275@54.211.219.127:26656,adcd9c90cc9fba509fb283e365ecd31bd5c37ff5@49.13.166.213:26656,3b8c6110d563abd71519aad5c7b27e5f844f120e@142.44.213.82:1340,c811a29fd53d393798b099fe69b056074043ba7d@65.109.52.56:32338,8cd5f922e33c7b6b4d930592c8c0663bc59c435e@103.97.111.34:26656,ce231e664fc8457893d3f94fb4e4631582ddddcd@194.163.183.175:26656,136396a99ee03cb823b4e08103411aeb12ee0131@34.135.218.59:26656,1a3ab3e87fbf63d06eacf8031671fe60f117eba6@65.109.154.181:36656,1d8945e8c77ea3a8d448c7fe77adef4088458af4@37.27.58.244:23656,42276c994042cca25c6847774cd013abffd1358d@161.35.234.101:26656,417186439f227bf16b4ced80c0486dd85c6c9d95@65.108.76.33:17656,521e01316a7afc5e9ba7322abb1a4ad10a7487b0@167.71.208.139:26656,34d08633547fc406095ff6d730fdfe65d34b96d0@158.69.125.73:11356,97b3e48102de1f6535b9b1d870ec91b64967576f@95.217.207.236:22156,4980cd150a8d9baae6f274f4138d3fb8a2b52bf3@51.159.56.248:21868,e8d1427b1939f3549a875ccf848a90a08d81de25@164.92.102.139:14356,f55751c79576d7ed66ebb77fce02c9f925cd4010@135.181.227.157:14356,0da0557fba17c436deb849cb394580ea79272c62@64.23.170.83:14356,1cd9aa655dc6e2d4e6eb266354950f86a203d41c@176.9.45.69:22156,5fcc83946e0a8586a2092230cc796a9296847155@144.91.64.71:14356,0c176c5828a43ad06127a64cd6fe1e54ebc795f2@51.91.215.27:26656,33b5d53a86ef170bc61718517bfd9b3668c1fe37@65.108.87.60:26656,5cdc5f599b1ca26a7978a0ff08b3e5dfc63380a9@65.21.88.86:36656,0c15ddc0602839dd3aa72217c71b16e278f45d13@148.251.23.39:26656,f3f2a5a562c64442847968fa5c8a3e5876d9fa4d@192.99.160.197:16656,051c15cab838df780c49605bbebcf33eadfaee99@167.235.39.5:60656,9e23d825a06cf0a5564f6251de82da52ea665d91@165.154.252.210:26656,5750c68c6a9b4ad5c89f19d423441ce95b61835c@176.57.184.146:45656,8c3622f9a77710185c057ed51c579784a0785e5a@167.235.12.38:29156,f42e54e739a25cafb88ebe6593e13ee57f613007@136.243.104.103:12256,9bb9207e52b2d46b0bc69ae3ecd863efd3380ca6@65.108.232.168:39656,f2114d9a9937c46771e79cc3054b43e5c62dd0c6@65.21.184.104:26656,aea10542932c383942e4bd3e5d2118e2a67cc0a7@65.21.90.140:4f9,75562a1126b60c92fa0b80727603e538d8a3b940@104.43.108.67:26656,7c7cac0778676664626768619cbb1c9b9d65cb5a@95.217.105.34:4f9,103a7420b3dba4ebae71ad73932d803bf02790e8@46.250.226.146:14356,68e0c04e32741ccf10e7fdf02bb72156c4596ced@37.27.48.156:22156,e56cc72b6f947c78c29611f567bf359e6ab450d9@65.109.153.140:16607,5611e502ae2aff6f8c7758f465ae5db82d12420b@95.216.43.190:26656,28790040b3412ead0ea43a9bd64c1e470d175da6@46.4.64.123:26656,4c9eb47a391ef4434bbb7eaf7fa921d156344698@65.21.198.100:12256,540af05d0763ef457b84c69b7beb363b9c53f1e5@178.162.165.193:26656,dfc2886dd41cc063ac0e962df490e94bc4aa6e43@65.108.206.74:19656,4580170247ae7918c3c5a087632278f8004dee96@158.220.117.55:26661,ed5384bd984a04f19aeb7e17699c061bffd16c41@88.99.59.227:11632,5cb265623b9297748be84b7030d5f9f5a3ce2296@194.163.167.138:48656,a5630759361803d0fa5e3c24658075a016374554@94.130.220.233:19656,056a8ddf9c8e8b9577e582a4fe7d82f2e931fdf7@84.46.245.222:27656,0a71ab602acf7b13a7c843a8d08b1460babe8f7d@93.123.118.50:26656,91c24aac8da5df96435b2af2984a6a5b5b00b54e@46.38.232.86:6969,df949a46ae6529ae1e09b034b49716468d5cc7e9@185.221.152.32:12856"
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.blockxd/config/config.toml
sed -i -e "s|^seeds *=.*|seeds = \"\"|" $HOME/.blockxd/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\"/" $HOME/.blockxd/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.blockxd/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.blockxd/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.blockxd/config/app.toml
```

#### Create a service

```
sudo tee /etc/systemd/system/blockxd.service > /dev/null << EOF
[Unit]
Description=blockxd
After=network-online.target

[Service]
User=$USER
ExecStart=$(which blockxd) start --home $HOME/.blockxd
Restart=on-failure
RestartSec=3
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF
```

#### Start service and check the logs

```
sudo systemctl daemon-reload
sudo systemctl enable blockxd
sudo systemctl restart blockxd
sudo journalctl -fu blockxd -o cat
```


---

# Agent Instructions: 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:

```
GET https://docs.logosnodos.online/mainnet-node/blockx/installation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
