# Side Protocol

RPC: <https://side-test.rpc.cryptomolot.com/>

## Resources

<table><thead><tr><th></th><th data-type="content-ref"></th></tr></thead><tbody><tr><td>Github</td><td><a href="https://github.com/sideprotocol">https://github.com/sideprotocol</a></td></tr><tr><td>Docs</td><td><a href="https://docs.side.one/">https://docs.side.one/</a></td></tr><tr><td>Discord</td><td><a href="https://discord.gg/sideprotocol">https://discord.gg/sideprotocol</a></td></tr><tr><td>x.com</td><td><a href="https://x.com/SideProtocol">https://x.com/SideProtocol</a></td></tr><tr><td>Website</td><td><a href="https://side.one">https://side.one</a></td></tr></tbody></table>

## Hardware requirements

<table data-view="cards"><thead><tr><th>CPU</th><th>RAM</th><th>Storage</th><th>Network</th><th>OS</th></tr></thead><tbody><tr><td>4-Cores</td><td>8 GB</td><td>200 GB NVME</td><td>100mbps network bandwidth</td><td>Linux (Ubuntu 22.04 x64)</td></tr></tbody></table>

## Installation 💾

## Update repositories

```bash
apt update && apt upgrade -y
```

## Install dependencies

```bash
sudo apt install curl git wget htop tmux build-essential jq make lz4 gcc unzip -y
```

Install GO 1.22.2

```bash
sudo rm -rf /usr/local/go && \
curl -L https://go.dev/dl/go1.22.2.linux-amd64.tar.gz | sudo tar -xzf - -C /usr/local && \
echo 'export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin' >> $HOME/.bash_profile && \
source .bash_profile && \
go version
```

Set variables

> change the \<wallet>, \<moniker>.\
> And SIDE\_PORT # **if you needed**

```bash
echo "export WALLET="<WALLET>"" >> $HOME/.bash_profile
echo "export MONIKER="<MONIKER>"" >> $HOME/.bash_profile
echo "export SIDE_CHAIN_ID="S2-testnet-2"" >> $HOME/.bash_profile
echo "export SIDE_PORT="26"" >> $HOME/.bash_profile
source $HOME/.bash_profile
```

Get binaries

```bash
cd $HOME
rm -rf side
git clone https://github.com/sideprotocol/side.git
cd side
git checkout v0.8.1
make install
```

## Initialize

> change the \<moniker>

```bash
sided config node tcp://localhost:${SIDE_PORT}657
sided config keyring-backend os
sided config chain-id S2-testnet-2
sided init "<MONIKER>" --chain-id S2-testnet-2
```

## Download genesis and addrbook

```bash
wget -O $HOME/.side/config/genesis.json https://testnet-files.itrocket.net/side/genesis.json
```

```bash
wget -O $HOME/.side/config/addrbook.json https://testnet-files.itrocket.net/side/addrbook.json
```

## Add seeds/bpeers/peers in config.toml

```bash
SEEDS="9c14080752bdfa33f4624f83cd155e2d3976e303@side-testnet-seed.itrocket.net:45656"
PEERS="bbbf623474e377664673bde3256fc35a36ba0df1@side-testnet-peer.itrocket.net:45656,eb0c5c68d051d622a425d97e5a01c7762ea51e96@152.53.35.91:26656,07c88954da965a1ce376a3aa1543fc4142a54156@149.102.146.181:17656,129fd32f3600f968e760fadebd6a71f29cb20ce2@23.88.70.109:26356,010e9ba253ce06ab589198ff5717c0fd54f3070e@142.132.152.46:32656,9ac70136fbec0002351d3d31b9472ba25510031a@37.60.240.206:55656,582dedd866dd77f25ac0575118cf32df1ee50f98@202.182.119.24:26656,42119e8e8a05869db9cd6704f1ec49286d772d0d@94.130.204.227:46656,7dc4dc0ba7194870e72837039fbdc3c4920523be@178.63.189.157:26656,d2aefb779d0c5ed4802970e9a9c53756cf443162@144.76.176.154:26356,027ef6300590b1ca3a2b92a274247e24537bd9c9@65.109.65.248:49656"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.side/config/config.toml
```

## Set minimum gas-price

```bash
sed -i 's|minimum-gas-prices =.*|minimum-gas-prices = "0.005uside"|g' $HOME/.side/config/app.toml
```

## Set custom ports (if needed)

```bash
# set custom ports in app.toml
sed -i.bak -e "s%:1317%:${SIDE_PORT}317%g;
s%:8080%:${SIDE_PORT}080%g;
s%:9090%:${SIDE_PORT}090%g;
s%:9091%:${SIDE_PORT}091%g;
s%:8545%:${SIDE_PORT}545%g;
s%:8546%:${SIDE_PORT}546%g;
s%:6065%:${SIDE_PORT}065%g" $HOME/.side/config/app.toml

# set custom ports in config.toml file
sed -i.bak -e "s%:26658%:${SIDE_PORT}658%g;
s%:26657%:${SIDE_PORT}657%g;
s%:6060%:${SIDE_PORT}060%g;
s%:26656%:${SIDE_PORT}656%g;
s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):${SIDE_PORT}656\"%;
s%:26660%:${SIDE_PORT}660%g" $HOME/.side/config/config.toml
```

## (Optional) Pruning

```bash
sed -i -e "s/^pruning *=.*/pruning = \"custom\"/" $HOME/.side/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"100\"/" $HOME/.side/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"50\"/" $HOME/.side/config/app.toml
```

## (Optional) Disable indexer and enable prometheus

> default indexer="kv"\
> default prometheus = false

<pre class="language-bash"><code class="lang-bash">sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.side/config/config.toml
<strong>sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.side/config/config.toml
</strong></code></pre>

## Create a service file

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

[Service]
User=$USER
WorkingDirectory=$HOME/.side
ExecStart=$(which sided) start --home $HOME/.side
Restart=on-failure
RestartSec=5
LimitNOFILE=65535

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

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

## Run from snapshot

```bash
...coming...
```

## Wait fo full sync (output "false")

```bash
sided status 2>&1 | jq
```

## Create or recover wallet

> !!! BACKUP YOUR SEED PHRASE !!!

```bash
sided keys add $WALLET

OR

sided keys add $WALLET --recover
```

### Get tokens from faucet 🆓

> get tokens from discord faucet channel or <https://testnet.side.one/faucet>

## Set var for wallet and valoper addresses

```bash
WALLET_ADDRESS=$(sided keys show $WALLET -a)
VALOPER_ADDRESS=$(sided keys show $WALLET --bech val -a)
echo "export WALLET_ADDRESS="$WALLET_ADDRESS >> $HOME/.bash_profile
echo "export VALOPER_ADDRESS="$VALOPER_ADDRESS >> $HOME/.bash_profile
source $HOME/.bash_profile
```

## Create Validator

```bash
sided tx staking create-validator \
--amount 1000000uside \
--from $WALLET \
--commission-rate 0.1 \
--commission-max-rate 0.2 \
--commission-max-change-rate 0.01 \
--min-self-delegation 1 \
--pubkey $(sided tendermint show-validator) \
--moniker "<MONIKER>" \
--identity "" \
--website "" \
--details "" \
--chain-id S2-testnet-2 \
--gas auto --fees 1000uside \
-y
```

> !!! BACKUP YOUR priv\_validator\_key.json !!!

## Useful commands ⚙️

node info

```bash
sided status 2>&1 | jq
```

logs

```bash
sudo journalctl -u sided -f
```

start service

```bash
sudo systemctl start sided
```

stop service

```bash
sudo systemctl stop sided
```

restart service

```bash
sudo systemctl restart sided
```

enable service

```bash
sudo systemctl enable sided
```

disable service

```bash
sudo systemctl disable sided
```

Check wallets list

```bash
sided keys list
```

Delete wallet

```bash
sided keys delete $WALLET
```

Check Balance

```bash
sided q bank balances $WALLET_ADDRESS
```

Withdraw all rewards

```bash
sided tx distribution withdraw-all-rewards --from $WALLET --chain-id S2-testnet-2 --gas auto --fees 1000uside
```

Withdraw rewards and commission from your validator

```bash
sided tx distribution withdraw-rewards $VALOPER_ADDRESS --from $WALLET --commission --chain-id S2-testnet-2 --gas auto --fees 1000uside -y
```

Delegate to Yourself

```bash
sided tx staking delegate $(sided keys show $WALLET --bech val -a) 1000000uside --from $WALLET --chain-id S2-testnet-2 --gas auto --fees 1000uside -y
```

Delegate

```bash
sided tx staking delegate <TO_VALOPER_ADDRESS> 1000000uside --from $WALLET --chain-id S2-testnet-2 --gas auto --fees 1000uside -y
```

Redelegate Stake to Another Validator

```bash
sided tx staking redelegate $VALOPER_ADDRESS <TO_VALOPER_ADDRESS> 1000000uside --from $WALLET --chain-id S2-testnet-2 --gas auto --fees 1000uside -y
```

Unbond

```bash
sided tx staking unbond $(sided keys show $WALLET --bech val -a) 1000000uside --from $WALLET --chain-id S2-testnet-2 --gas auto --fees 1000uside -y
```

Transfer Funds

```bash
sided tx bank send $WALLET_ADDRESS <TO_WALLET_ADDRESS> 1000000uside --gas auto --fees 1000uside -y
```

Validator Details

```bash
sided q staking validator $(sided keys show $WALLET --bech val -a)
```

Jailing info

```bash
sided q slashing signing-info $(sided tendermint show-validator)
```

Slashing parameters

```bash
sided q slashing params
```

Unjail validator

```bash
sided tx slashing unjail --from $WALLET --chain-id S2-testnet-2 --gas auto --fees 1000uside -y
```

## Delete node 🗑️

```bash
sudo systemctl stop sided
sudo systemctl disable sided
sudo rm -rf /etc/systemd/system/sided.service
sudo rm $(which sided)
sudo rm -rf $HOME/.side
sed -i "/SIDE_/d" $HOME/.bash_profile
```


---

# 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://cryptomolot.gitbook.io/cryptomolot-docs/testnets/side-protocol.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.
