# Home

About Indonode

Indonode is an independent validator propelled by an unwavering passion for blockchain, accompanied by a steadfast commitment to professionalism throughout my journey. Since 2021, Indonode has been dedicated to serving the community, offering a range of services and public goods. Notably, Indonode stands out by providing a 100% Slashing Downtime Refund to all its delegators.

***

#### Supported Chains on Mainnet : 10

#### Asset Staked : $4,231,224 | As per 18 November 2023 (GMT+7)


# Planq

<figure><img src="https://explorer.indonode.net/logos/planq.png" alt="" width="188"><figcaption></figcaption></figure>

Planq is the very first cryptocurrency project to keep mobile platform usability at heart, taking a step away from dependency on desktop services. The Planq blockchain is powered by the $PLQ token and The ecosystem is expanding every day.

The first application that Planq launched is Castrum, A mobile wallet that can receive and send crypto to other users, has a fully encrypted chat, and all features the Planq blockchain offers.

***

## [STAKE WITH INDONODE](https://explorer.indonode.net/planq/staking/plqvaloper123a9zth3jyeurj5zdthxk9zkhufsc5jw2lwjn2)

***

### Links

[Website](https://planq.network/) | [Twitter](https://twitter.com/PlanqFoundation) | [Discord](https://discord.gg/planq-network)

***

<table data-full-width="false"><thead><tr><th>Version</th><th>Chain-id</th><th>Wasm</th><th data-hidden>WASM</th><th data-hidden>Chain-id</th></tr></thead><tbody><tr><td>1.0.8</td><td>planq_7070-2</td><td>DISABLED</td><td>DISABLED</td><td>planq_7070-2</td></tr></tbody></table>

<details>

<summary>More Summary</summary>

* Binary Name : planqd
* Binary Home : $HOME/.planqd
* Denom : aplanq
* Exponent : 18

</details>

***


# Node Installation

<figure><img src="https://explorer.indonode.net/logos/planq.png" alt="" width="188"><figcaption></figcaption></figure>

***

| Version | Chain-id      | Wasm     |
| ------- | ------------- | -------- |
| 1.0.8   | planq\_7070-2 | DISABLED |

### Setup Server

```shell
# Update Packages
sudo apt update && apt upgrade -y
sudo apt install curl git jq lz4 build-essential unzip fail2ban ufw -y

# Set Firewall
sudo apt install -y ufw
sudo ufw default allow outgoing
sudo ufw default deny incoming
sudo ufw allow ssh
sudo ufw allow 9100

# Enable Firewall
sudo ufw enable

# Install Go
ver="1.20.5"
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

# Install Cosmovisor (OPTIONAL If you are using Cosmovisor)
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@v1.5.0
```

### Node Installation

There is 2 ways to install node , using Cosmovisor or Run the binary directly, you can choose whats you prefer

{% tabs %}
{% tab title="Cosmovisor (Recommended)" %}
{% code fullWidth="true" %}

```
```

{% endcode %}

```sh
# Download and install binary
cd $HOME
rm -rf planq/
git clone https://github.com/planq-network/planq.git
cd planq/
git checkout v1.0.8
make build


# Setup Cosmovisor Symlinks
mkdir -p $HOME/.planqd/cosmovisor/genesis/bin
mv build/planqd $HOME/.planqd/cosmovisor/genesis/bin/
rm -rf build

sudo ln -s $HOME/.planqd/cosmovisor/genesis $HOME/.planqd/cosmovisor/current
sudo ln -s $HOME/.planqd/cosmovisor/current/bin/planqd /usr/local/bin/planqd


# Set Configuration for your node
planqd config chain-id planq_7070-2
planqd config keyring-backend file


# Init your node
# You can change "MyNode" to anything you like
planqd init MyNode --chain-id planq_7070-2


# Add Genesis File and Addrbook
curl -Ls https://snapshots.indonode.net/planq/genesis.json > $HOME/.planqd/config/genesis.json
curl -Ls https://snapshots.indonode.net/planq/addrbook.json > $HOME/.planqd/config/addrbook.json


#Configure Seeds and Peers
SEEDS=`curl -sL https://raw.githubusercontent.com/planq-network/networks/main/mainnet/seeds.txt | awk '{print $1}' | paste -s -d, -`
PEERS=`curl -sL https://raw.githubusercontent.com/planq-network/networks/main/mainnet/peers.txt | sort -R | head -n 10 | awk '{print $1}' | paste -s -d, -`

sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.planqd/config/config.toml


# Set Pruning, Enable Prometheus, Gas Price, and Indexer
PRUNING="custom"
PRUNING_KEEP_RECENT="100"
PRUNING_INTERVAL="19"

sed -i -e "s/^pruning *=.*/pruning = \"$PRUNING\"/" $HOME/.planqd/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \
\"$PRUNING_KEEP_RECENT\"/" $HOME/.planqd/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \
\"$PRUNING_INTERVAL\"/" $HOME/.planqd/config/app.toml
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.planqd/config/config.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.planqd/config/config.toml
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0aplanq\"/" $HOME/.planqd/config/app.toml

# Set Service file
sudo tee /etc/systemd/system/planqd.service > /dev/null &#x3C;&#x3C; EOF
[Unit]
Description=planqd node service
After=network-online.target

[Service]
User=$USER
ExecStart=$(which cosmovisor) run start
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
Environment="DAEMON_HOME=$HOME/.planqd"
Environment="DAEMON_NAME=planqd"
Environment="UNSAFE_SKIP_BACKUP=true"

[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable planqd

# Download Latest Snapshot
# Downlaod Latest Snapshot
curl -L https://snapshots.indonode.net/planq/planq-latest.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.planqd
[[ -f $HOME/.planqd/data/upgrade-info.json ]] && cp $HOME/.planqd/data/upgrade-info.json $HOME/.planqd/cosmovisor/genesis/upgrade-info.json

# Start the Node
sudo systemctl restart planqd
sudo journalctl -fu planqd -o cat
```

{% endtab %}

{% tab title="Non-Cosmovisor" %}

```sh
# Download and install binary
cd $HOME
rm -rf planq/
git clone https://github.com/planq-network/planq.git
cd planq/
git checkout v1.0.8
make install


# Set Configuration for your node
planqd config chain-id planq_7070-2
planqd config keyring-backend file


# Init your node
# You can change "MyNode" to anything you like
planqd init MyNode --chain-id planq_7070-2


# Add Genesis File and Addrbook
curl -Ls https://snapshots.indonode.net/planq/genesis.json > $HOME/.planqd/config/genesis.json
curl -Ls https://snapshots.indonode.net/planq/addrbook.json > $HOME/.planqd/config/addrbook.json


#Configure Seeds and Peers
SEEDS=`curl -sL https://raw.githubusercontent.com/planq-network/networks/main/mainnet/seeds.txt | awk '{print $1}' | paste -s -d, -`
PEERS=`curl -sL https://raw.githubusercontent.com/planq-network/networks/main/mainnet/peers.txt | sort -R | head -n 10 | awk '{print $1}' | paste -s -d, -`

sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.planqd/config/config.toml


# Set Pruning, Enable Prometheus, Gas Prices, and Indexer
PRUNING="custom"
PRUNING_KEEP_RECENT="100"
PRUNING_INTERVAL="19"

sed -i -e "s/^pruning *=.*/pruning = \"$PRUNING\"/" $HOME/.planqd/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \
\"$PRUNING_KEEP_RECENT\"/" $HOME/.planqd/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \
\"$PRUNING_INTERVAL\"/" $HOME/.planqd/config/app.toml
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.planqd/config/config.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.planqd/config/config.toml
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0aplanq\"/" $HOME/.planqd/config/app.toml


# Set Service file
sudo tee /etc/systemd/system/planqd.service > /dev/null <<EOF
[Unit]
Description=planqd node
After=network-online.target
[Service]
User=$USER
ExecStart=$(which planqd) start
Restart=always
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable planqd

# Downlaod Latest Snapshot
curl -L https://snapshots.indonode.net/planq/planq-latest.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.planqd
[[ -f $HOME/.planqd/data/upgrade-info.json ]] && cp $HOME/.planqd/data/upgrade-info.json $HOME/.planqd/cosmovisor/genesis/upgrade-info.json

# Start the Node
sudo systemctl restart planqd
sudo journalctl -fu planqd -o cat
```

{% endtab %}
{% endtabs %}


# Snapshot

<figure><img src="https://explorer.indonode.net/logos/planq.png" alt="" width="188"><figcaption></figcaption></figure>

***

| Latest Version | Chain-id      | Wasm     |
| -------------- | ------------- | -------- |
| 1.0.8          | planq\_7070-2 | DISABLED |

### Snapshot Guide

### Setup Server

```shell
# Install Necessary package
sudo apt update
sudo apt-get install snapd lz4 -y
```

Turn off state-sync

```shell
sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1false|" ~/.planqd/config/config.toml
```

```shell
# Stop the service and reset the data
sudo systemctl stop planqd
cp $HOME/.planqd/data/priv_validator_state.json $HOME/.planqd/priv_validator_state.json.backup
rm -rf $HOME/.planqd/data
```

```shell
# Download Latest Snapshot
curl -L https://snapshots.indonode.net/planq/planq-latest.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.planqd
mv $HOME/.planqd/priv_validator_state.json.backup $HOME/.planqd/data/priv_validator_state.json
```

```shell
# Restart Service
sudo systemctl restart planqd && sudo journalctl -fu planqd -o cat
```


# Upgrade

<figure><img src="https://explorer.indonode.net/logos/planq.png" alt="" width="188"><figcaption></figcaption></figure>

***

| Latest Version | Chain-id      | Wasm     |
| -------------- | ------------- | -------- |
| 1.0.8          | planq\_7070-2 | DISABLED |

### Upgrade Guide

{% tabs %}
{% tab title="Cosmovisor" %}

```sh
# Download and build binary
cd $HOME
rm -rf planq/
git clone https://github.com/planq-network/planq.git
cd planq/
git fetch --all
git checkout v1.0.7
make build


# Prepare binaries for Cosmovisor
mv build/planqd $(which planqd)


# Restart your node
sudo systemctl restart planqd && journalctl -fu planqd -o cat
```

{% endtab %}

{% tab title="Binary" %}

```sh
# Stop binary
sudo systemctl stop planqd

# Download and install binary
cd $HOME
rm -rf planq/
git clone https://github.com/planq-network/planq.git
cd planq/
git fetch --all
git checkout v1.0.7
make install


# Restart your node
sudo systemctl restart planqd && journalctl -fu planqd -o cat
```

{% endtab %}
{% endtabs %}


# CLI Cheatsheet

<figure><img src="https://explorer.indonode.net/logos/planq.png" alt="" width="188"><figcaption></figcaption></figure>

### Key Management

Add new key

```
planqd keys add wallet
```

Recover existing key

```
planqd keys add wallet --recover
```

List All key

```
planqd keys list
```

Delete key

```
planqd keys delete wallet
```

Export Key (save to wallet.backup)

```
planqd keys export wallet
```

Import key

```
planqd keys import wallet wallet.backup
```

Query Wallet Balance

```
planqd q bank balances $(planqd keys show wallet -a)
```

### Validator Management

Create Validator

```sh
planqd tx staking create-validator \
  --amount "1000000000000000000aplanq" \
  --pubkey $(planqd tendermint show-validator) \
  --moniker "MONIKER" \
  --identity "KEYBASE_ID" \
  --details "YOUR DETAILS" \
  --website "YOUR WEBSITE" \
  --chain-id planq_7070-2 \
  --commission-rate "0.05" \
  --commission-max-rate "0.20" \
  --commission-max-change-rate "0.01" \
  --min-self-delegation "1" \
  --gas-prices="30000000000aplanq" \
  --gas="1000000" \
  --gas-adjustment="1.5" \
  --from wallet \
  -y
```

Edit Validator

```sh
planqd tx staking edit-validator \
--new-moniker="MONIKER" \
--identity="YOUR_KEYBASE_ID" \
--details="YOUR_DETAILS" \
--website="YOUR_WEBSITE_URL" \
--chain-id planq_7070-2 \
--commission-rate=0.05 \
--from=wallet \
--gas-adjustment="1.5" \
--gas="1000000" \
--gas-prices="30000000000aplanq" \
-y
```

Unjail Validator

```sh
planqd tx slashing unjail --from wallet --chain-id planq_7070-2 --gas-prices 30000000000aplanq --gas-adjustment 1.5 --gas 1000000 -y 
```

Signing Info

```sh
planqd query slashing signing-info $(planqd tendermint show-validator) 
```

List all active validators

```sh
planqd 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 
```

List all inactive validators

```sh
planqd q staking validators -oj --limit=3000 | jq '.validators[] | select(.status=="BOND_STATUS_UNBONDED") or .status=="BOND_STATUS_UNBONDING")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " \t " + .description.moniker' | sort -gr | nl 
```

View validators details

```
planqd q staking validator $(planqd keys show wallet --bech val -a) 
```

### Token Management

Withdraw rewards from all validators

```sh
planqd tx distribution withdraw-all-rewards --from wallet --chain-id planq_7070-2 --gas-prices 30000000000aplanq --gas-adjustment 1.5 --gas 1000000 -y 
```

Withdraw comission and rewards from your validator

```sh
planqd tx distribution withdraw-rewards $(planqd keys show wallet --bech val -a) --commission --from wallet --chain-id planq_7070-2 --gas-prices 30000000000aplanq --gas-adjustment 1.5 --gas 1000000 -y 
```

Delegate to your validator

```sh
planqd tx staking delegate $(planqd keys show wallet --bech val -a) 1000000000000000000aplanq --from wallet --chain-id planq_7070-2 --gas-prices 30000000000aplanq --gas-adjustment 1.5 --gas 1000000 -y 
```

Delegate to other

```sh
planqd tx staking delegate TO_VALOPER_ADDRESS 1000000000000000000aplanq --from wallet --chain-id planq_7070-2 --gas-prices 30000000000aplanq --gas-adjustment 1.5 --gas 1000000 -y 
```

Redelegate your stake to other validators

```sh
planqd tx staking redelegate $(planqd keys show wallet --bech val -a) TO_VALOPER_ADDRESS 1000000000000000000aplanq --from wallet --chain-id planq_7070-2 --gas-prices 30000000000aplanq --gas-adjustment 1.5 --gas 1000000 -y 
```

Unbond stake

```sh
planqd tx staking unbond $(planqd keys show wallet --bech val -a) 1000000000000000000aplanq --from wallet --chain-id planq_7070-2 --gas-prices 30000000000aplanq --gas-adjustment 1.5 --gas 1000000 -y 
```

Send tokens

```sh
planqd tx bank send wallet TO_WALLET_ADDRESS 1000000000000000000aplanq --from wallet --chain-id planq_7070-2 --gas-prices 30000000000aplanq --gas-adjustment 1.5 --gas 1000000 -y 
```

### Governance

List all proposals

<pre class="language-sh"><code class="lang-sh"><strong>planqd query gov proposals
</strong></code></pre>

Vote **YES / NO / ABSTAIN / NO\_WITH\_VETO**

```sh
planqd tx gov vote 1 yes --from wallet --chain-id planq_7070-2 --gas-prices 30000000000aplanq --gas-adjustment 1.5 --gas 1000000 -y 
```

Create new text proposal

```sh
planqd tx gov submit-proposal \
--title="Title" \
--description="Description" \
--deposit=100000000000000000000aplanq \
--type="Text" \
--from=wallet \
--gas-prices 30000000000aplanq \ 
--gas-adjustment 1.5 \
--gas 1000000 \
-y 
```

### Utility

Set Indexer **NULL / KV**

```sh
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.planqd/config/config.toml
```

Set Custom Port

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

Get Validator info

```sh
planqd status 2>&1 | jq .ValidatorInfo
```

Get denom info

```sh
planqd q bank denom-metadata -oj | jq
```

Get sync status

```sh
planqd status 2>&1 | jq .SyncInfo.catching_up
```

Get latest height

```sh
planqd status 2>&1 | jq .SyncInfo.latest_block_height
```

Reset Node

```sh
planqd tendermint unsafe-reset-all --home $HOME/.planqd --keep-addr-book
```

Delete Node

```sh
sudo systemctl stop planqd && sudo systemctl disable planqd && sudo rm /etc/systemd/system/planqd.service && sudo systemctl daemon-reload && rm -rf $HOME/.planqd && sudo rm -rf $(which planqd) 
```

### Services Management

```sh
# Reload Service
sudo systemctl daemon-reload

# Enable Service
sudo systemctl enable planqd

# Disable Service
sudo systemctl disable planqd

# Start Service
sudo systemctl start planqd

# Stop Service
sudo systemctl stop planqd

# Restart Service
sudo systemctl restart planqd

# Check Service Status
sudo systemctl status planqd

# Check Service Logs
sudo journalctl -u planqd -f --no-hostname -o cat
```


# Chain4Energy

<figure><img src="https://explorer.indonode.net/logos/c4e.png" alt="" width="188"><figcaption></figcaption></figure>

Chain4Energy (C4E) is a sovereign global decentralized blockchain built on Cosmos SDK. The Decentralized Energy Marketplace which enables institutions and individuals to seamlessly participate in the renewable energy market accessing and offering a wide range of renewable energy solutions and services. Chain4Energy brings the energy industry to Web 3 by responding to the requirements and needs of all participants and enabling the effective creation and distribution of value. Blockchain removes delays, gets the right information to the right place, and eliminates the possibility of fraud and manipulation. It also enables P2P energy trading (without intermediaries), and thus effectively, between energy market participants.

***

## [STAKE WITH INDONODE](https://explorer.indonode.net/c4e/staking/c4evaloper1wwr4ctky20qqjfc8t6a698alljf8tc7v02nnhp)

***

### Links

[Website](https://c4e.io) | [Twitter](https://twitter.com/Chain4Energy) | [Discord](https://discord.com/invite/chain4energy)

***

<table data-full-width="false"><thead><tr><th>Version</th><th>Chain-id</th><th>Wasm</th><th data-hidden>WASM</th><th data-hidden>Chain-id</th></tr></thead><tbody><tr><td>1.2.1</td><td>perun-1</td><td>DISABLED</td><td>DISABLED</td><td>planq_7070-2</td></tr></tbody></table>

<details>

<summary>More Summary</summary>

* Binary Name : c4ed
* Binary Home : $HOME/.c4e-chain
* Denom : uc4e
* Exponent : 6

</details>

Addrbook

```sh
curl -Ls https://snapshots.indonode.net/c4e/addrbook.json > $HOME/.c4e-chain/config/addrbook.json
```

***


# Node Installation

<figure><img src="https://explorer.indonode.net/logos/c4e.png" alt="" width="188"><figcaption></figcaption></figure>

***

| Version | Chain-id | Wasm     |
| ------- | -------- | -------- |
| 1.2.1   | perun-1  | DISABLED |

### Setup Server

```shell
# Update Packages
sudo apt update && apt upgrade -y
sudo apt install curl git jq lz4 build-essential unzip fail2ban ufw -y

# Set Firewall
sudo apt install -y ufw
sudo ufw default allow outgoing
sudo ufw default deny incoming
sudo ufw allow ssh
sudo ufw allow 9100

# Enable Firewall
sudo ufw enable

# Install Go
ver="1.20"
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

# Install Cosmovisor (OPTIONAL If you are using Cosmovisor)
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@v1.5.0
```

### Node Installation

There is 2 ways to install node , using Cosmovisor or Run the binary directly, you can choose whats you prefer

{% tabs %}
{% tab title="Cosmovisor (Recommended)" %}
{% code fullWidth="true" %}

```sh
# Download and install binary
cd $HOME
rm -rf c4e-chain/
git clone https://github.com/chain4energy/c4e-chain.git
cd c4e-chain/
git checkout v1.2.1
make build


# Setup Cosmovisor Symlinks
mkdir -p $HOME/.c4e-chain/cosmovisor/genesis/bin
mv build/c4ed $HOME/.c4e-chain/cosmovisor/genesis/bin/
rm -rf build

sudo ln -s $HOME/.c4e-chain/cosmovisor/genesis $HOME/.c4e-chain/cosmovisor/current
sudo ln -s $HOME/.c4e-chain/cosmovisor/current/bin/c4ed /usr/local/bin/c4ed


# Set Configuration for your node
c4ed config chain-id perun-1
c4ed config keyring-backend file


# Init your node
# You can change "MyNode" to anything you like
c4ed init MyNode --chain-id perun-1


# Add Genesis File and Addrbook
wget https://raw.githubusercontent.com/chain4energy/c4e-chains/main/perun-1/genesis.json -O $HOME/.c4e-chain/config/genesis.json


#Configure Seeds and Peers
SEEDS=""
PEERS="7c7c5158c5b67797f85a4e376db8b79da0dadbac@212.109.147.99:26656,6e07322479eb7e31c1b33513544e03245b6de561@185.252.235.83:26656,d81f51b4a1aae66792fb1717589fa28975f328b0@164.68.125.243:26656,bb9cbee9c391f5b0744d5da0ea1abc17ed0ca1b2@159.69.56.25:26656,d1c10bb6a139ddb29af596fc888bd57c143124b7@93.189.30.124:26656,0dd318e3945ff5c1821e844b68e26e8eac67c063@95.216.42.88:35656,8e002ff6811e18bc6686beb4e3f15038ef6a35d3@65.109.163.248:36656,66cccfd5af1180c5858baf331cf790d1bc4f70a6@65.109.92.240:17096,c68883e64bc211dbdd3cc2be72cc9fa09f7ddde4@65.109.133.87:26656,d09b54188bda615c13cdd92a18bef11bed8d4735@79.137.68.96:26656"

sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.c4e-chain/config/config.toml


# Set Pruning, Enable Prometheus, Gas Price, and Indexer
PRUNING="custom"
PRUNING_KEEP_RECENT="100"
PRUNING_INTERVAL="19"

sed -i -e "s/^pruning *=.*/pruning = \"$PRUNING\"/" $HOME/.c4e-chain/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \
\"$PRUNING_KEEP_RECENT\"/" $HOME/.c4e-chain/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \
\"$PRUNING_INTERVAL\"/" $HOME/.c4e-chain/config/app.toml
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.c4e-chain/config/config.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.c4e-chain/config/config.toml
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.0025uc4e\"/" $HOME/.c4e-chain/config/app.toml

# Set Service file
sudo tee /etc/systemd/system/c4ed.service > /dev/null << EOF
[Unit]
Description=c4ed node service
After=network-online.target

[Service]
User=$USER
ExecStart=$(which cosmovisor) run start
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
Environment="DAEMON_HOME=$HOME/.c4e-chain"
Environment="DAEMON_NAME=c4ed"
Environment="UNSAFE_SKIP_BACKUP=true"

[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable c4ed


# Start the Node
sudo systemctl restart c4ed
sudo journalctl -fu c4ed -o cat
```

{% endcode %}
{% endtab %}

{% tab title="Non-Cosmovisor" %}

```sh
# Download and install binary
cd $HOME
rm -rf c4e-chain/
git clone https://github.com/chain4energy/c4e-chain.git
cd c4e-chain/
git checkout v1.2.1
make install


# Set Configuration for your node
c4ed config chain-id perun-1
c4ed config keyring-backend file


# Init your node
# You can change "MyNode" to anything you like
c4ed init MyNode --chain-in perun-1


# Add Genesis File and Addrbook
wget https://raw.githubusercontent.com/chain4energy/c4e-chains/main/perun-1/genesis.json -O $HOME/.c4e-chain/config/genesis.json


#Configure Seeds and Peers
SEEDS=""
PEERS="7c7c5158c5b67797f85a4e376db8b79da0dadbac@212.109.147.99:26656,6e07322479eb7e31c1b33513544e03245b6de561@185.252.235.83:26656,d81f51b4a1aae66792fb1717589fa28975f328b0@164.68.125.243:26656,bb9cbee9c391f5b0744d5da0ea1abc17ed0ca1b2@159.69.56.25:26656,d1c10bb6a139ddb29af596fc888bd57c143124b7@93.189.30.124:26656,0dd318e3945ff5c1821e844b68e26e8eac67c063@95.216.42.88:35656,8e002ff6811e18bc6686beb4e3f15038ef6a35d3@65.109.163.248:36656,66cccfd5af1180c5858baf331cf790d1bc4f70a6@65.109.92.240:17096,c68883e64bc211dbdd3cc2be72cc9fa09f7ddde4@65.109.133.87:26656,d09b54188bda615c13cdd92a18bef11bed8d4735@79.137.68.96:26656"

sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.c4e-chain/config/config.toml


# Set Pruning, Enable Prometheus, Gas Prices, and Indexer
PRUNING="custom"
PRUNING_KEEP_RECENT="100"
PRUNING_INTERVAL="19"

sed -i -e "s/^pruning *=.*/pruning = \"$PRUNING\"/" $HOME/.c4e-chain/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \
\"$PRUNING_KEEP_RECENT\"/" $HOME/.c4e-chain/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \
\"$PRUNING_INTERVAL\"/" $HOME/.c4e-chain/config/app.toml
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.c4e-chain/config/config.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.c4e-chain/config/config.toml
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.0025uc4e\"/" $HOME/.c4e-chain/config/app.toml


# Set Service file
sudo tee /etc/systemd/system/c4ed.service > /dev/null <<EOF
[Unit]
Description=c4ed node
After=network-online.target
[Service]
User=$USER
ExecStart=$(which c4ed) start
Restart=always
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable c4ed


# Start the Node
sudo systemctl restart c4ed
sudo journalctl -fu c4ed -o cat
```

{% endtab %}
{% endtabs %}


# Upgrade

<figure><img src="https://explorer.indonode.net/logos/c4e.png" alt="" width="188"><figcaption></figcaption></figure>

***

| Latest Version | Chain-id | Wasm     |
| -------------- | -------- | -------- |
| 1.2.1          | perun-1  | DISABLED |

### Upgrade Guide

{% tabs %}
{% tab title="Cosmovisor" %}

```sh
Upgrade not available
```

{% endtab %}

{% tab title="Binary" %}

```sh
Upgrade not available
```

{% endtab %}
{% endtabs %}


# CLI Cheatsheet

<figure><img src="https://explorer.indonode.net/logos/c4e.png" alt="" width="188"><figcaption></figcaption></figure>

### Key Management

Add new key

```
c4ed keys add wallet
```

Recover existing key

```
c4ed keys add wallet --recover
```

List All key

```
c4ed keys list
```

Delete key

```
c4ed keys delete wallet
```

Export Key (save to wallet.backup)

```
c4ed keys export wallet
```

Import key

```
c4ed keys import wallet wallet.backup
```

Query Wallet Balance

```
c4ed q bank balances $(c4ed keys show wallet -a)
```

### Validator Management

Create Validator

```sh
c4ed tx staking create-validator \
  --amount "1000000uc4e" \
  --pubkey $(c4ed tendermint show-validator) \
  --moniker "MONIKER" \
  --identity "KEYBASE_ID" \
  --details "YOUR DETAILS" \
  --website "YOUR WEBSITE" \
  --chain-id perun-1 \
  --commission-rate "0.05" \
  --commission-max-rate "0.20" \
  --commission-max-change-rate "0.01" \
  --min-self-delegation "1" \
  --gas-prices="0.0025uc4e" \
  --gas="auto" \
  --gas-adjustment="1.5" \
  --from wallet \
  -y
```

Edit Validator

```sh
c4ed tx staking edit-validator \
--new-moniker="MONIKER" \
--identity="YOUR_KEYBASE_ID" \
--details="YOUR_DETAILS" \
--website="YOUR_WEBSITE_URL" \
--chain-id perun-1 \
--commission-rate=0.05 \
--gas-prices="0.0025uc4e" \
--gas="auto" \
--gas-adjustment="1.5" \
--from wallet \
-y
```

Unjail Validator

```sh
c4ed tx slashing unjail --from wallet --chain-id perun-1 --gas-prices=0.0025uc4e --gas-adjustment 1.5 --gas auto -y 
```

Signing Info

```sh
c4ed query slashing signing-info $(c4ed tendermint show-validator) 
```

List all active validators

```sh
c4ed 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 
```

List all inactive validators

```sh
c4ed q staking validators -oj --limit=3000 | jq '.validators[] | select(.status=="BOND_STATUS_UNBONDED") or .status=="BOND_STATUS_UNBONDING")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " \t " + .description.moniker' | sort -gr | nl 
```

View validators details

```
c4ed q staking validator $(c4ed keys show wallet --bech val -a) 
```

### Token Management

Withdraw rewards from all validators

```sh
c4ed tx distribution withdraw-all-rewards --from wallet --chain-id perun-1 --gas-prices=0.0025uc4e --gas-adjustment 1.5 --gas auto -y 
```

Withdraw comission and rewards from your validator

```sh
c4ed tx distribution withdraw-rewards $(c4ed keys show wallet --bech val -a) --commission --from wallet --chain-id perun-1 --gas-prices=0.0025uc4e --gas-adjustment 1.5 --gas auto -y 
```

Delegate to your validator

```sh
c4ed tx staking delegate $(c4ed keys show wallet --bech val -a) 1000000uc4e --from wallet --chain-id perun-1 --gas-prices=0.0025uc4e --gas-adjustment 1.5 --gas auto -y 
```

Delegate to other

```sh
c4ed tx staking delegate TO_VALOPER_ADDRESS 1000000uc4e --from wallet --chain-id perun-1 --gas-prices=0.0025uc4e --gas-adjustment 1.5 --gas auto -y 
```

Redelegate your stake to other validators

```sh
c4ed tx staking redelegate $(c4ed keys show wallet --bech val -a) TO_VALOPER_ADDRESS 1000000uc4e --from wallet --chain-id perun-1 --gas-prices=0.0025uc4e --gas-adjustment 1.5 --gas auto -y 
```

Unbond stake

```sh
c4ed tx staking unbond $(c4ed keys show wallet --bech val -a) 1000000uc4e --from wallet --chain-id perun-1 --gas-prices=0.0025uc4e --gas-adjustment 1.5 --gas auto -y 
```

Send tokens

```sh
c4ed tx bank send wallet TO_WALLET_ADDRESS 1000000uc4e --from wallet --chain-id perun-1 --gas-prices=0.0025uc4e --gas-adjustment 1.5 --gas auto -y 
```

### Governance

List all proposals

<pre class="language-sh"><code class="lang-sh"><strong>c4ed query gov proposals
</strong></code></pre>

Vote **YES / NO / ABSTAIN / NO\_WITH\_VETO**

```sh
c4ed tx gov vote 1 yes --from wallet --chain-id perun-1 --gas-prices=0.0025uc4e --gas-adjustment 1.5 --gas auto -y 
```

Create new text proposal

```sh
c4ed tx gov submit-proposal \
--title="Title" \
--description="Description" \
--deposit=100000000uc4e \
--type="Text" \
--from=wallet \
--gas-prices 0.0025uc4e\ 
--gas-adjustment 1.5 \
--gas auto \
-y 
```

### Utility

Set Indexer **NULL / KV**

```sh
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.c4e-chain/config/config.toml
```

Set Custom Port

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

Get Validator info

```sh
c4ed status 2>&1 | jq .ValidatorInfo
```

Get denom info

```sh
c4ed q bank denom-metadata -oj | jq
```

Get sync status

```sh
c4ed status 2>&1 | jq .SyncInfo.catching_up
```

Get latest height

```sh
c4ed status 2>&1 | jq .SyncInfo.latest_block_height
```

Reset Node

```sh
c4ed tendermint unsafe-reset-all --home $HOME/.c4e-chain --keep-addr-book
```

Delete Node

```sh
sudo systemctl stop c4ed && sudo systemctl disable c4ed && sudo rm /etc/systemd/system/c4ed.service && sudo systemctl daemon-reload && rm -rf $HOME/.c4e-chain && sudo rm -rf $(which c4ed) 
```

### Services Management

```sh
# Reload Service
sudo systemctl daemon-reload

# Enable Service
sudo systemctl enable c4ed

# Disable Service
sudo systemctl disable c4ed

# Start Service
sudo systemctl start c4ed

# Stop Service
sudo systemctl stop c4ed

# Restart Service
sudo systemctl restart c4ed

# Check Service Status
sudo systemctl status c4ed

# Check Service Logs
sudo journalctl -u c4ed -f --no-hostname -o cat
```


# Bitcanna

<figure><img src="https://pbs.twimg.com/profile_images/1455116847024586757/T9o06sNM_400x400.png" alt="" width="188"><figcaption></figcaption></figure>

BitCanna aims to solve a problem that has plagued the cannabis industry from its inception. Companies like Visa and MasterCard deny cannabis companies access to their services due to the legal status of marijuana. Since the legality of the herb is regulated differently in European countries, the industry leaders operate in gray areas. BitCanna wants to solve this problem by providing a decentralized blockchain network that is specifically designed for the cannabis industry and provides much-needed services to both consumers and businesses.

***

## [STAKE WITH INDONODE](https://explorer.indonode.net/bitcanna/staking/bcnavaloper1603vvkelz5e54lqleya8kzcf7lydx98v5tcusp)

***

### Links

[Website](https://www.bitcanna.io/) | [Twitter](https://twitter.com/BitCannaGlobal) | [Discord](https://discord.gg/XDUSpFn6rN)

***

<table data-full-width="false"><thead><tr><th>Version</th><th>Chain-id</th><th>Wasm</th><th data-hidden>WASM</th></tr></thead><tbody><tr><td>v2.0.3</td><td>bitcanna-1</td><td>DISABLED</td><td>DISABLED</td></tr></tbody></table>

<details>

<summary>More Summary</summary>

* Binary Name : bcnad
* Binary Home : $HOME/.bcna
* Denom : ubcna
* Exponent : 6

</details>

Peer

```sh
d068226de69f0e14ff34e393a199137a44b0398d@rpc.bitcanna.indonode.net:11656
```

Endpoint

* rpc.bitcanna.indonode.net
* api.bitcanna.indonode.net
* grpc.bitcanna.indonode.net:11090

Addrbook

```sh
curl -Ls https://snapshots.indonode.net/bitcanna/addrbook.json > $HOME/.bcna/config/addrbook.json
```

***


# Node Installation

<figure><img src="https://pbs.twimg.com/profile_images/1455116847024586757/T9o06sNM_400x400.png" alt="" width="188"><figcaption></figcaption></figure>

***

| Version | Chain-id   | Wasm     |
| ------- | ---------- | -------- |
| v2.0.3  | bitcanna-1 | DISABLED |

### Setup Server

```shell
# Update Packages
sudo apt update && apt upgrade -y
sudo apt install curl git jq lz4 build-essential unzip fail2ban ufw -y

# Set Firewall
sudo apt install -y ufw
sudo ufw default allow outgoing
sudo ufw default deny incoming
sudo ufw allow ssh
sudo ufw allow 9100

# Enable Firewall
sudo ufw enable

# Install Go
ver="1.20.8"
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

# Install Cosmovisor (OPTIONAL If you are using Cosmovisor)
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@v1.5.0
```

### Node Installation (Auto)

This Installer has Cosmovisor or Straight Binary Installation, with Custom port, and Snapshot Included

```sh
curl -o install.sh https://snapshots.indonode.net/bitcanna/install.sh && chmod +x install.sh && ./install.sh
```

### Node Installation (Manual)

There is 2 ways to install node , using Cosmovisor or Run the binary directly, you can choose whats you prefer

{% tabs %}
{% tab title="Cosmovisor (Recommended)" %}
{% code fullWidth="true" %}

```sh
# Download and install binary
cd $HOME
rm -rf bcna
git clone https://github.com/BitCannaGlobal/bcna.git
cd bcna
git checkout v2.0.3
make build


# Setup Cosmovisor Symlinks
mkdir -p $HOME/.bcna/cosmovisor/genesis/bin
mv build/bcnad $HOME/.bcna/cosmovisor/genesis/bin/
rm -rf build

sudo ln -s $HOME/.bcna/cosmovisor/genesis $HOME/.bcna/cosmovisor/current
sudo ln -s $HOME/.bcna/cosmovisor/current/bin/bcnad /usr/local/bin/bcnad


# Set Configuration for your node
bcnad config chain-id bitcanna-1
bcnad config keyring-backend file


# Init your node
# You can change "MyNode" to anything you like
bcnad init MyNode --chain-id bitcanna-1


# Add Genesis File and Addrbook
curl -Ls https://snapshots.indonode.net/bitcanna/genesis.json > $HOME/.bcna/config/genesis.json
curl -Ls https://snapshots.indonode.net/bitcanna/addrbook.json > $HOME/.bcna/config/addrbook.json


#Configure Seeds and Peers
PEERS="$(curl -sS https://rpc.bitcanna.indonode.net/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/.bcna/config/config.toml

# Set Pruning, Enable Prometheus, Gas Price, and Indexer
PRUNING="custom"
PRUNING_KEEP_RECENT="100"
PRUNING_INTERVAL="19"

sed -i -e "s/^pruning *=.*/pruning = \"$PRUNING\"/" $HOME/.bcna/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \
\"$PRUNING_KEEP_RECENT\"/" $HOME/.bcna/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \
\"$PRUNING_INTERVAL\"/" $HOME/.bcna/config/app.toml
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.bcna/config/config.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.bcna/config/config.toml
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0ubcna\"/" $HOME/.bcna/config/app.toml

# Set Service file
sudo tee /etc/systemd/system/bcnad.service > /dev/null << EOF
[Unit]
Description=bcnad testnet node service
After=network-online.target

[Service]
User=$USER
ExecStart=$(which cosmovisor) run start
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
Environment="DAEMON_HOME=$HOME/.bcna"
Environment="DAEMON_NAME=bcnad"
Environment="UNSAFE_SKIP_BACKUP=true"

[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable bcnad

# Download Latest Snapshot
curl -L https://snapshots.indonode.net/bitcanna/bitcanna-latest.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.bcna
[[ -f $HOME/.bcna/data/upgrade-info.json ]] && cp $HOME/.bcna/data/upgrade-info.json $HOME/.bcna/cosmovisor/genesis/upgrade-info.json

# Start the Node
sudo systemctl restart bcnad
sudo journalctl -fu bcnad -o cat
```

{% endcode %}
{% endtab %}

{% tab title="Non-Cosmovisor" %}

```sh
# Download and install binary
cd $HOME
rm -rf bcna
git clone https://github.com/BitCannaGlobal/bcna.git
cd bcna
git checkout v2.0.3
make install


# Set Configuration for your node
bcnad config chain-id bitcanna-1
bcnad config keyring-backend file


# Init your node
# You can change "MyNode" to anything you like
bcnad init MyNode --chain-in bitcanna-1


# Add Genesis File and Addrbook
curl -Ls https://snapshots.indonode.net/bitcanna/genesis.json > $HOME/.bcna/config/genesis.json
curl -Ls https://snapshots.indonode.net/bitcanna/addrbook.json > $HOME/.bcna/config/addrbook.json

#Configure Seeds and Peers
PEERS="$(curl -sS https://rpc.bitcanna.indonode.net/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/.bcna/config/config.toml


# Set Pruning, Enable Prometheus, Gas Prices, and Indexer
PRUNING="custom"
PRUNING_KEEP_RECENT="100"
PRUNING_INTERVAL="19"

sed -i -e "s/^pruning *=.*/pruning = \"$PRUNING\"/" $HOME/.bcna/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \
\"$PRUNING_KEEP_RECENT\"/" $HOME/.bcna/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \
\"$PRUNING_INTERVAL\"/" $HOME/.bcna/config/app.toml
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.bcna/config/config.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.bcna/config/config.toml
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0ubcna\"/" $HOME/.bcna/config/app.toml

# Set Service file
sudo tee /etc/systemd/system/bcnad.service > /dev/null <<EOF
[Unit]
Description=bitcanna testnet node
After=network-online.target
[Service]
User=$USER
ExecStart=$(which bcnad) start
Restart=always
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable bcnad

# Download Latest Snapshot
curl -L https://snapshots.indonode.net/bitcanna/bitcanna-latest.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.bcna
[[ -f $HOME/.bcna/data/upgrade-info.json ]] && cp $HOME/.bcna/data/upgrade-info.json $HOME/.bcna/cosmovisor/genesis/upgrade-info.json

# Start the Node
sudo systemctl restart bcnad
sudo journalctl -fu bcnad -o cat
```

{% endtab %}
{% endtabs %}


# Snapshot

<figure><img src="https://pbs.twimg.com/profile_images/1455116847024586757/T9o06sNM_400x400.png" alt="" width="188"><figcaption></figcaption></figure>

***

| Latest Version | Chain-id   | Wasm     |
| -------------- | ---------- | -------- |
| v2.0.3         | bitcanna-1 | DISABLED |

### Snapshot Guide

### Setup Server

```shell
# Install Necessary package
sudo apt update
sudo apt-get install snapd lz4 -y
```

Turn off state-sync

```shell
sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1false|" ~/.bcna/config/config.toml
```

```shell
# Stop the service and reset the data
sudo systemctl stop bcnad
cp $HOME/.bcna/data/priv_validator_state.json $HOME/.bcna/priv_validator_state.json.backup
rm -rf $HOME/.bcna/data
```

```shell
# Download Latest Snapshot
curl -L https://snapshots.indonode.net/bitcanna/bitcanna-latest.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.bcna
mv $HOME/.bcna/priv_validator_state.json.backup $HOME/.bcna/data/priv_validator_state.json
```

```shell
# Restart Service
sudo systemctl restart bcnad && sudo journalctl -fu bcnad -o cat
```


# Statesync

<figure><img src="https://pbs.twimg.com/profile_images/1455116847024586757/T9o06sNM_400x400.png" alt="" width="188"><figcaption></figcaption></figure>

***

| Latest Version | Chain-id   | Wasm     |
| -------------- | ---------- | -------- |
| v2.0.3         | bitcanna-1 | DISABLED |

### Statesync

```shell
sudo systemctl stop bcnad
cp $HOME/.bcna/data/priv_validator_state.json $HOME/.bcna/priv_validator_state.json.backup
bcnad tendermint unsafe-reset-all --keep-addr-book --home $HOME/.bcna


STATE_SYNC_RPC=https://rpc.bitcanna.indonode.net:443
STATE_SYNC_PEER=d068226de69f0e14ff34e393a199137a44b0398d@rpc.bitcanna.indonode.net:11656
LATEST_HEIGHT=$(curl -s $STATE_SYNC_RPC/block | jq -r .result.block.header.height)
SYNC_BLOCK_HEIGHT=$(($LATEST_HEIGHT - 1000))
SYNC_BLOCK_HASH=$(curl -s "$STATE_SYNC_RPC/block?height=$SYNC_BLOCK_HEIGHT" | jq -r .result.block_id.hash)

sed -i \
  -e "s|^enable *=.*|enable = true|" \
  -e "s|^rpc_servers *=.*|rpc_servers = \"$STATE_SYNC_RPC,$STATE_SYNC_RPC\"|" \
  -e "s|^trust_height *=.*|trust_height = $SYNC_BLOCK_HEIGHT|" \
  -e "s|^trust_hash *=.*|trust_hash = \"$SYNC_BLOCK_HASH\"|" \
  -e "s|^persistent_peers *=.*|persistent_peers = \"$STATE_SYNC_PEER\"|" \
  $HOME/.bcna/config/config.toml

mv $HOME/.bcna/priv_validator_state.json.backup $HOME/.bcna/data/priv_validator_state.json


sudo systemctl start bcnad && sudo journalctl -u bcnad -f
```


# Upgrade

<figure><img src="https://pbs.twimg.com/profile_images/1455116847024586757/T9o06sNM_400x400.png" alt="" width="188"><figcaption></figcaption></figure>

***

| Latest Version | Chain-id   | Wasm     |
| -------------- | ---------- | -------- |
| v2.0.3         | bitcanna-1 | DISABLED |

### Upgrade Guide

{% tabs %}
{% tab title="Cosmovisor" %}

```sh
Upgrade not available
```

{% endtab %}

{% tab title="Binary" %}

```sh
Upgrade not available
```

{% endtab %}
{% endtabs %}


# CLI Cheatsheet

<figure><img src="https://pbs.twimg.com/profile_images/1455116847024586757/T9o06sNM_400x400.png" alt="" width="188"><figcaption></figcaption></figure>

### Key Management

Add new key

```
bcnad keys add wallet
```

Recover existing key

```
bcnad keys add wallet --recover
```

List All key

```
bcnad keys list
```

Delete key

```
bcnad keys delete wallet
```

Export Key (save to wallet.backup)

```
bcnad keys export wallet
```

Import key

```
bcnad keys import wallet wallet.backup
```

Query Wallet Balance

```
bcnad q bank balances $(bcnad keys show wallet -a)
```

### Validator Management

Create Validator

```sh
bcnad tx staking create-validator \
  --amount "1000000ubcna" \
  --pubkey $(bcnad tendermint show-validator) \
  --moniker "MONIKER" \
  --identity "KEYBASE_ID" \
  --details "YOUR DETAILS" \
  --website "YOUR WEBSITE" \
  --chain-id bitcanna-1 \
  --commission-rate "0.05" \
  --commission-max-rate "0.20" \
  --commission-max-change-rate "0.01" \
  --min-self-delegation "1" \
  --gas-prices "0ubcna" \
  --gas "auto" \
  --gas-adjustment "1.5" \
  --from wallet \
  -y

```

Edit Validator

```sh
bcnad tx staking edit-validator \
--new-moniker="MONIKER" \
--identity="YOUR_KEYBASE_ID" \
--details="YOUR_DETAILS" \
--website="YOUR_WEBSITE_URL" \
--chain-id bitcanna-1 \
--commission-rate=0.05 \
--gas-prices "0ubcna" \
--gas="auto" \
--gas-adjustment="1.5" \
--from wallet \
-y
```

Unjail Validator

```sh
bcnad tx slashing unjail --from wallet --chain-id bitcanna-1 --gas-prices "0ubcna" --gas-adjustment 1.5 --gas "auto" -y 
```

Signing Info

```sh
bcnad query slashing signing-info $(bcnad tendermint show-validator) 
```

List all active validators

```sh
bcnad 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 
```

List all inactive validators

```sh
bcnad q staking validators -oj --limit=3000 | jq '.validators[] | select(.status=="BOND_STATUS_UNBONDED") or .status=="BOND_STATUS_UNBONDING")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " \t " + .description.moniker' | sort -gr | nl 
```

View validators details

```
bcnad q staking validator $(bcnad keys show wallet --bech val -a) 
```

### Token Management

Withdraw rewards from all validators

```sh
bcnad tx distribution withdraw-all-rewards --from wallet --chain-id bitcanna-1 --gas-prices "0ubcna" --gas-adjustment 1.5 --gas "auto" -y 
```

Withdraw comission and rewards from your validator

```sh
bcnad tx distribution withdraw-rewards $(bcnad keys show wallet --bech val -a) --commission --from wallet --chain-id bitcanna-1 --gas-prices "0ubcna" --gas-adjustment 1.5 --gas "auto" -y 
```

Delegate to your validator

```sh
bcnad tx staking delegate $(bcnad keys show wallet --bech val -a) 1000000ubcna --from wallet --chain-id bitcanna-1 --gas-prices "0ubcna" --gas-adjustment 1.5 --gas "auto" -y 
```

Delegate to other

```sh
c4ed tx staking delegate TO_VALOPER_ADDRESS 1000000ubcna --from wallet --chain-id bitcanna-1 --gas-prices "0ubcna" --gas-adjustment 1.5 --gas "auto" -y 
```

Redelegate your stake to other validators

```sh
bcnad tx staking redelegate $(bcnad keys show wallet --bech val -a) TO_VALOPER_ADDRESS 1000000ubcna --from wallet --chain-id bitcanna-1 --gas-prices "0ubcna" --gas-adjustment 1.5 --gas "auto" -y 
```

Unbond stake

```sh
bcnad tx staking unbond $(bcnad keys show wallet --bech val -a) 1000000ubcna --from wallet --chain-id bitcanna-1 --gas-prices "0ubcna" --gas-adjustment 1.5 --gas "auto" -y 
```

Send tokens

```sh
bcnad tx bank send wallet TO_WALLET_ADDRESS 1000000ubcna --from wallet --chain-id bitcanna-1 --gas-prices "0ubcna" --gas-adjustment 1.5 --gas "auto" -y 
```

### Governance

List all proposals

<pre class="language-sh"><code class="lang-sh"><strong>bcnad query gov proposals
</strong></code></pre>

Vote **YES / NO / ABSTAIN / NO\_WITH\_VETO**

```sh
bcnad tx gov vote 1 yes --from wallet --chain-id bitcanna-1 --gas-prices "0ubcna" --gas-adjustment 1.5 --gas "auto" -y 
```

Create new text proposal

```sh
bcnad tx gov submit-proposal \
--title="Title" \
--description="Description" \
--deposit=100000000ubcna \
--type="Text" \
--from=wallet \
--gas-prices 0ubcna\ 
--gas-adjustment 1.5 \
--gas "auto" \
-y 
```

### Utility

Set Indexer **NULL / KV**

```sh
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.bcna/config/config.toml
```

Set Custom Port

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

Get Validator info

```sh
bcnad status 2>&1 | jq .ValidatorInfo
```

Get denom info

```sh
bcnad q bank denom-metadata -oj | jq
```

Get sync status

```sh
bcnad status 2>&1 | jq .SyncInfo.catching_up
```

Get latest height

```sh
bcnad status 2>&1 | jq .SyncInfo.latest_block_height
```

Reset Node

```sh
bcnad tendermint unsafe-reset-all --home $HOME/.bcna --keep-addr-book
```

Delete Node

```sh
sudo systemctl stop bcnad && sudo systemctl disable bcnad && sudo rm /etc/systemd/system/bcnad.service && sudo systemctl daemon-reload && rm -rf $HOME/.bcna && sudo rm -rf $(which bcnad) 
```

### Services Management

```sh
# Reload Service
sudo systemctl daemon-reload

# Enable Service
sudo systemctl enable bcnad

# Disable Service
sudo systemctl disable bcnad

# Start Service
sudo systemctl start bcnad

# Stop Service
sudo systemctl stop bcnad

# Restart Service
sudo systemctl restart bcnad

# Check Service Status
sudo systemctl status bcnad

# Check Service Logs
sudo journalctl -u bcnad -f --no-hostname -o cat
```


# Band

<figure><img src="https://pbs.twimg.com/profile_images/1404775608798699522/ohhSUimj_400x400.jpg" alt="" width="188"><figcaption></figcaption></figure>

Band Protocol is a cross-chain data oracle platform that aggregates and connects real-world data and APIs to smart contracts.

***

## [STAKE WITH INDONODE](https://explorer.indonode.net/band/staking/bandvaloper145a0pq4v3dqhfgpvwtkt425arxydhz3ql7cn95)

***

### Links

[Website](https://www.bandprotocol.com/) | [Twitter](https://twitter.com/BandProtocol) | [Discord](https://discord.com/invite/PKxbB7kmEV)

***

<table data-full-width="false"><thead><tr><th>Version</th><th>Chain-id</th><th>Wasm</th></tr></thead><tbody><tr><td>v2.5.3</td><td>laozi-mainnet</td><td>ENABLED</td></tr></tbody></table>

<details>

<summary>More Summary</summary>

* Binary Name : bandd
* Binary Home : $HOME/.band
* Denom : uband
* Exponent : 6

</details>

Peer

```sh
1002fde469a06d24dc7b1543e61c4afcaa993af3@rpc.band.indonode.net:20656
```

Endpoint

* rpc.band.indonode.net
* api.band.indonode.net
* grpc.band.indonode.net:20090

Addrbook

```sh
curl -Ls https://snapshots.indonode.net/band/addrbook.json > $HOME/.band/config/addrbook.json
```

***


# Node Installation

<figure><img src="https://pbs.twimg.com/profile_images/1404775608798699522/ohhSUimj_400x400.jpg" alt="" width="188"><figcaption></figcaption></figure>

***

| Version | Chain-id      | Wasm    |
| ------- | ------------- | ------- |
| v2.5.3  | laozi-mainnet | ENABLED |

### Setup Server

```shell
# Update Packages
sudo apt update && apt upgrade -y
sudo apt install curl git jq lz4 build-essential unzip fail2ban ufw -y

# Set Firewall
sudo apt install -y ufw
sudo ufw default allow outgoing
sudo ufw default deny incoming
sudo ufw allow ssh
sudo ufw allow 9100

# Enable Firewall
sudo ufw enable

# Install Go
ver="1.20.8"
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

# Install Cosmovisor (OPTIONAL If you are using Cosmovisor)
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@v1.5.0
```

### Node Installation

There is 2 ways to install node , using Cosmovisor or Run the binary directly, you can choose whats you prefer

{% tabs %}
{% tab title="Cosmovisor (Recommended)" %}
{% code fullWidth="true" %}

```sh
# Download and install binary
cd $HOME
rm -rf band
git clone https://github.com/bandprotocol/chain band
cd band
git checkout v2.5.3
make install


# Setup Cosmovisor Symlinks
mkdir -p $HOME/.band/cosmovisor/genesis/bin
mv $HOME/go/bin/bandd $HOME/.band/cosmovisor/genesis/bin/

sudo ln -s $HOME/.band/cosmovisor/genesis $HOME/.band/cosmovisor/current
sudo ln -s $HOME/.band/cosmovisor/current/bin/bandd /usr/local/bin/bandd


# Set Configuration for your node
bandd config chain-id laozi-mainnet
bandd config keyring-backend file


# Init your node
# You can change "MyNode" to anything you like
bandd init MyNode --chain-id laozi-mainnet


# Add Genesis File and Addrbook
curl -Ls https://snapshots.indonode.net/band/genesis.json > $HOME/.band/config/genesis.json
curl -Ls https://snapshots.indonode.net/band/addrbook.json > $HOME/.band/config/addrbook.json


#Configure Seeds and Peers
PEERS="$(curl -sS https://rpc.band.indonode.net/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/.band/config/config.toml

# Set Pruning, Enable Prometheus
PRUNING="custom"
PRUNING_KEEP_RECENT="100"
PRUNING_INTERVAL="19"

sed -i -e "s/^pruning *=.*/pruning = \"$PRUNING\"/" $HOME/.band/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \
\"$PRUNING_KEEP_RECENT\"/" $HOME/.band/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \
\"$PRUNING_INTERVAL\"/" $HOME/.band/config/app.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.band/config/config.toml

# Set Service file
sudo tee /etc/systemd/system/bandd.service > /dev/null << EOF
[Unit]
Description=bandd testnet node service
After=network-online.target

[Service]
User=$USER
ExecStart=$(which cosmovisor) run start
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
Environment="DAEMON_HOME=$HOME/.band"
Environment="DAEMON_NAME=bandd"
Environment="UNSAFE_SKIP_BACKUP=true"

[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable bandd

# Download Latest Snapshot
curl -L https://snapshots.indonode.net/band/band-snapshot.tar.lz4 | tar -Ilz4 -xf - -C $HOME/.band
[[ -f $HOME/.band/data/upgrade-info.json ]] && cp $HOME/.band/data/upgrade-info.json $HOME/.band/cosmovisor/genesis/upgrade-info.json

# Start the Node
sudo systemctl restart bandd
sudo journalctl -fu bandd -o cat
```

{% endcode %}
{% endtab %}

{% tab title="Non-Cosmovisor" %}

```sh
# Download and install binary
cd $HOME
rm -rf band
git clone https://github.com/bandprotocol/chain band
cd band
git checkout v2.5.3
make install


# Set Configuration for your node
bandd config chain-id laozi-mainnet
bandd config keyring-backend file


# Init your node
# You can change "MyNode" to anything you like
bandd init MyNode --chain-in laozi-mainnet


# Add Genesis File and Addrbook
curl -Ls https://snapshots.indonode.net/band/genesis.json > $HOME/.band/config/genesis.json
curl -Ls https://snapshots.indonode.net/band/addrbook.json > $HOME/.band/config/addrbook.json

#Configure Seeds and Peers
PEERS="$(curl -sS https://rpc.band.indonode.net/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/.band/config/config.toml


# Set Pruning, Enable Prometheus, Gas Prices, and Indexer
PRUNING="custom"
PRUNING_KEEP_RECENT="100"
PRUNING_INTERVAL="19"

sed -i -e "s/^pruning *=.*/pruning = \"$PRUNING\"/" $HOME/.band/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \
\"$PRUNING_KEEP_RECENT\"/" $HOME/.band/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \
\"$PRUNING_INTERVAL\"/" $HOME/.band/config/app.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.band/config/config.toml


# Set Service file
sudo tee /etc/systemd/system/bandd.service > /dev/null <<EOF
[Unit]
Description=band testnet node
After=network-online.target
[Service]
User=$USER
ExecStart=$(which bandd) start
Restart=always
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable bandd

# Download Latest Snapshot
curl -L https://snapshots.indonode.net/band/band-snapshot.tar.lz4 | tar -Ilz4 -xf - -C $HOME/.band
[[ -f $HOME/.band/data/upgrade-info.json ]] && cp $HOME/.band/data/upgrade-info.json $HOME/.band/cosmovisor/genesis/upgrade-info.json

# Start the Node
sudo systemctl restart bandd
sudo journalctl -fu bandd -o cat
```

{% endtab %}
{% endtabs %}


# Yoda Configuration

<figure><img src="https://pbs.twimg.com/profile_images/1404775608798699522/ohhSUimj_400x400.jpg" alt="" width="188"><figcaption></figcaption></figure>

***

| Version | Chain-id      | Wasm    |
| ------- | ------------- | ------- |
| v2.5.3  | laozi-mainnet | ENABLED |

## Set AWS Lambda Executor

### Create Lambda Function

Go to [AWS Lambda](https://ap-southeast-1.console.aws.amazon.com/lambda/home?region=ap-southeast-1#/functions), and click "Create Function"

<figure><img src="https://1191375740-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFjRVAAvDXpeV009Yknel%2Fuploads%2FCDW8TGaYbUoI7LI6Gf9y%2Fimage.png?alt=media&#x26;token=3553e230-2c53-49b3-9dbe-1a3a53d648d2" alt=""><figcaption></figcaption></figure>

Select :

* Select Author from Scratch.
* Create Function Name.
* Runtime Python 3.7.
* Create new user in the Permission Tab. Click Create Function

You will see this page

![Alt text](https://1883075364-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2ah2nLJBxYlBFMZS7zIL%2Fuploads%2Fgit-blob-d681465ee87f39cc5f72841d7baf0dd24042a1b6%2Fimage.png?alt=media)

Scroll down until you see Function Code Panel click Actions - Upload .ZIP file.

You can get the [.zip here](https://github.com/bandprotocol/data-source-runtime/releases/download/v2.0.0/lambda-yoda.zip)

![Alt text](https://1883075364-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2ah2nLJBxYlBFMZS7zIL%2Fuploads%2Fgit-blob-ede96b37859db5d6eb99db520eacb6478446a095%2Fimage-1.png?alt=media)

![Alt text](https://1883075364-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2ah2nLJBxYlBFMZS7zIL%2Fuploads%2Fgit-blob-8f37e4f99a61e353d1fb9ec22c5022249c6c16e9%2Fimage-2.png?alt=media)

Go to Configuration - Environment variabeles - Edit

Environment variables section and add 2 environment variables: MAX\_EXECUTABLE to 8192 (8 MB) and MAX\_DATA\_SIZE to 256.

![Alt text](https://1883075364-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2ah2nLJBxYlBFMZS7zIL%2Fuploads%2Fgit-blob-f6224a6ee3a3e6b52ecebdeb077e963c421f6a55%2Fimage-3.png?alt=media)

Go to Configuration - General Configuration - Edit Basic Settings and update the runtime configurations.

512MB RAM and 12 seconds timeout is Recommended.

![Alt text](https://1883075364-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2ah2nLJBxYlBFMZS7zIL%2Fuploads%2Fgit-blob-09e760e963b2dbed1bd87855fcf500ff8fb65ec8%2Fimage-4.png?alt=media)

### Create Trigger

Click Add Trigger - API Gateway

Then Follow like the image below

![Alt text](https://1883075364-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2ah2nLJBxYlBFMZS7zIL%2Fuploads%2Fgit-blob-36575eee2e24ac9b8375cedaf5bb52b9b1cd80b5%2Fimage-8.png?alt=media)

![Alt text](https://1883075364-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2ah2nLJBxYlBFMZS7zIL%2Fuploads%2Fgit-blob-9a850f758e248aff0897bb6d5cb18c8c45edf7b3%2Fimage-6.png?alt=media)

![Alt text](https://1883075364-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2ah2nLJBxYlBFMZS7zIL%2Fuploads%2Fgit-blob-e48f8d08ee49c6056658cb3ab6e7b0471472f6a9%2Fimage-9.png?alt=media)

Click "Add", And your Trigger for Lambda Executor is Ready.

## Yoda Executor Configuration

```sh
# clear old yoda config, Optional
rm -rf ~/.yoda
```

```sh
yoda config chain-id laozi-mainnet
yoda config node http://localhost:26657 #Your Node Port
yoda config broadcast-timeout "5m"
yoda config rpc-poll-interval "1s"
yoda config max-try 5
yoda config validator $(bandd keys show wallet -a --bech val)
```

Add 5 REPORTER wallet

```sh
yoda keys add REPORTER_1
yoda keys add REPORTER_2
yoda keys add REPORTER_3
yoda keys add REPORTER_4
yoda keys add REPORTER_5
```

You can recover existing wallet with this command , and so on

```sh
yoda keys add REPORTER_1 --recover
```

Fund your Reporter wallet

```sh
bandd tx multi-send 1uband $(yoda keys list -a) --gas=1000000 --gas-prices=0.0025uband --gas-adjustment=1.5 --from mywallet --chain-id laozi-mainnet -y
```

Set the Executor Variable

Replace \<EXECUTOR\_URL> to yours

```sh
export EXECUTOR_URL=<EXECUTOR_URL>
```

If you wondering where is the Executor URL

![Alt text](https://1883075364-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2ah2nLJBxYlBFMZS7zIL%2Fuploads%2Fgit-blob-708b179d41df74f2aed545420b57bfbbbf0c30da%2Fimage-10.png?alt=media)

Set Config Executor

```sh
yoda config executor "rest:${EXECUTOR_URL}?timeout=10s"
```

Start Yoda using systemctl

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

[Service]
User=$USER
ExecStart=$USER/go/bin/yoda run
Restart=always
RestartSec=3
LimitNOFILE=4096

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

Start Yoda

```sh
sudo systemctl daemon-reload
sudo systemctl enable yoda
sudo systemctl start yoda
```

Check the logs using journalctl

```sh
journalctl -fu yoda -o cat
```

Logs Should look like this

```sh
... systemd[...]: Started Yoda Daemon.
... yoda[...]: I[...] ⭐  Creating HTTP client with node URI: tcp://localhost:26657
... yoda[...]: I[...] 🚀  Starting WebSocket subscriber
... yoda[...]: I[...] 👂  Subscribing to events with query: tm.event = 'Tx'...
```

Wait for the Band Node to be synced , After Band node is synced you can add and activate your reporter Oracle with this simple command

Add Reporter wallet to Oracle

```sh
bandd tx oracle add-reporters $(yoda keys list -a) --gas=1000000 --gas-prices=0.0025uband --gas-adjustment=1.5 --from wallet --chain-id laozi-mainnet
```

Activate Oracle

```sh
bandd tx oracle activate --gas=1000000 --gas-prices=0.0025uband --gas-adjustment=1.5 --from wallet --chain-id laozi-mainnet
```

## Useful Commands

Multi Send Band to Reporter wallet

```sh
bandd tx multi-send 1uband $(yoda keys list -a) --gas=1000000 --gas-prices=0.0025uband --gas-adjustment=1.5 --from mywallet --chain-id laozi-mainnet -y
```

Add Reporter wallet to Oracle

```sh
bandd tx oracle add-reporters $(yoda keys list -a) --gas=1000000 --gas-prices=0.0025uband --gas-adjustment=1.5 --from wallet --chain-id laozi-mainnet
```

Activate Oracle

```sh
bandd tx oracle activate --gas=1000000 --gas-prices=0.0025uband --gas-adjustment=1.5 --from wallet --chain-id laozi-mainnet
```

Check Oracle Status

```sh
bandd query oracle validator $(bandd keys show -a wallet --bech val) --chain-id laozi-mainnet
```

Output :

![Alt text](https://1883075364-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2ah2nLJBxYlBFMZS7zIL%2Fuploads%2Fgit-blob-2e7a7175549efc30c99a8f6cdc2daae8ec732602%2Fimage-11.png?alt=media)


# Snapshot

<figure><img src="https://pbs.twimg.com/profile_images/1404775608798699522/ohhSUimj_400x400.jpg" alt="" width="188"><figcaption></figcaption></figure>

***

| Version | Chain-id      | Wasm    |
| ------- | ------------- | ------- |
| v2.5.3  | laozi-mainnet | ENABLED |

### Snapshot Guide

### Setup Server

```shell
# Install Necessary package
sudo apt update
sudo apt-get install snapd lz4 -y
```

Turn off state-sync

```shell
sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1false|" ~/.band/config/config.toml
```

```shell
# Stop the service and reset the data
sudo systemctl stop bandd
cp $HOME/.band/data/priv_validator_state.json $HOME/.band/priv_validator_state.json.backup
rm -rf $HOME/.band/data
```

```shell
# Download Latest Snapshot
curl -L https://snapshots.indonode.net/band/band-snapshot.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.band
mv $HOME/.band/priv_validator_state.json.backup $HOME/.band/data/priv_validator_state.json
```

```shell
# Restart Service
sudo systemctl restart bandd && sudo journalctl -fu bandd -o cat
```


# Upgrade

<figure><img src="https://pbs.twimg.com/profile_images/1404775608798699522/ohhSUimj_400x400.jpg" alt="" width="188"><figcaption></figcaption></figure>

***

| Version | Chain-id      | Wasm    |
| ------- | ------------- | ------- |
| v2.5.3  | laozi-mainnet | ENABLED |

### Upgrade Guide

{% tabs %}
{% tab title="Cosmovisor" %}

```sh
Upgrade not available
```

{% endtab %}

{% tab title="Binary" %}

```sh
Upgrade not available
```

{% endtab %}
{% endtabs %}


# CLI Cheatsheet

<figure><img src="https://pbs.twimg.com/profile_images/1404775608798699522/ohhSUimj_400x400.jpg" alt="" width="188"><figcaption></figcaption></figure>

### Key Management

Add new key

```
bandd keys add wallet
```

Recover existing key

```
bandd keys add wallet --recover
```

List All key

```
bandd keys list
```

Delete key

```
bandd keys delete wallet
```

Export Key (save to wallet.backup)

```
bandd keys export wallet
```

Import key

```
bandd keys import wallet wallet.backup
```

Query Wallet Balance

```
bandd q bank balances $(bandd keys show wallet -a)
```

### Validator Management

Create Validator

```sh
bandd tx staking create-validator \
  --amount "1000000uband" \
  --pubkey $(bandd tendermint show-validator) \
  --moniker "MONIKER" \
  --identity "KEYBASE_ID" \
  --details "YOUR DETAILS" \
  --website "YOUR WEBSITE" \
  --chain-id laozi-mainnet \
  --commission-rate "0.05" \
  --commission-max-rate "0.20" \
  --commission-max-change-rate "0.01" \
  --min-self-delegation "1" \
  -fees "500uband" \
  --gas "auto" \
  --gas-adjustment "1.5" \
  --from wallet \
  -y

```

Edit Validator

```sh
bandd tx staking edit-validator \
--new-moniker="MONIKER" \
--identity="YOUR_KEYBASE_ID" \
--details="YOUR_DETAILS" \
--website="YOUR_WEBSITE_URL" \
--chain-id laozi-mainnet \
--commission-rate=0.05 \
-fees "500uband" \
--gas="auto" \
--gas-adjustment="1.5" \
--from wallet \
-y
```

Unjail Validator

```sh
bandd tx slashing unjail --from wallet --chain-id laozi-mainnet -fees "500uband" \ --gas-adjustment 1.5 --gas "auto" -y 
```

Signing Info

```sh
bandd query slashing signing-info $(bandd tendermint show-validator) 
```

List all active validators

```sh
bandd 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 
```

List all inactive validators

```sh
bandd q staking validators -oj --limit=3000 | jq '.validators[] | select(.status=="BOND_STATUS_UNBONDED") or .status=="BOND_STATUS_UNBONDING")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " \t " + .description.moniker' | sort -gr | nl 
```

View validators details

```
bandd q staking validator $(bandd keys show wallet --bech val -a) 
```

### Token Management

Withdraw rewards from all validators

```sh
bandd tx distribution withdraw-all-rewards --from wallet --chain-id laozi-mainnet -fees "500uband" \ --gas-adjustment 1.5 --gas "auto" -y 
```

Withdraw comission and rewards from your validator

```sh
bandd tx distribution withdraw-rewards $(bandd keys show wallet --bech val -a) --commission --from wallet --chain-id laozi-mainnet -fees "500uband" \ --gas-adjustment 1.5 --gas "auto" -y 
```

Delegate to your validator

```sh
bandd tx staking delegate $(bandd keys show wallet --bech val -a) 1000000uband --from wallet --chain-id laozi-mainnet -fees "500uband" \ --gas-adjustment 1.5 --gas "auto" -y 
```

Delegate to other

```sh
c4ed tx staking delegate TO_VALOPER_ADDRESS 1000000uband --from wallet --chain-id laozi-mainnet -fees "500uband" \ --gas-adjustment 1.5 --gas "auto" -y 
```

Redelegate your stake to other validators

```sh
bandd tx staking redelegate $(bandd keys show wallet --bech val -a) TO_VALOPER_ADDRESS 1000000uband --from wallet --chain-id laozi-mainnet -fees "500uband" \ --gas-adjustment 1.5 --gas "auto" -y 
```

Unbond stake

```sh
bandd tx staking unbond $(bandd keys show wallet --bech val -a) 1000000uband --from wallet --chain-id laozi-mainnet -fees "500uband" \ --gas-adjustment 1.5 --gas "auto" -y 
```

Send tokens

```sh
bandd tx bank send wallet TO_WALLET_ADDRESS 1000000uband --from wallet --chain-id laozi-mainnet -fees "500uband" \ --gas-adjustment 1.5 --gas "auto" -y 
```

### Governance

List all proposals

<pre class="language-sh"><code class="lang-sh"><strong>bandd query gov proposals
</strong></code></pre>

Vote **YES / NO / ABSTAIN / NO\_WITH\_VETO**

```sh
bandd tx gov vote 1 yes --from wallet --chain-id laozi-mainnet -fees "500uband" \ --gas-adjustment 1.5 --gas "auto" -y 
```

Create new text proposal

```sh
bandd tx gov submit-proposal \
--title="Title" \
--description="Description" \
--deposit=100000000uband \
--type="Text" \
--from=wallet \
--gas-prices 0uband\ 
--gas-adjustment 1.5 \
--gas "auto" \
-y 
```

### Utility

Set Indexer **NULL / KV**

```sh
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.band/config/config.toml
```

Set Custom Port

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

Get Validator info

```sh
bandd status 2>&1 | jq .ValidatorInfo
```

Get denom info

```sh
bandd q bank denom-metadata -oj | jq
```

Get sync status

```sh
bandd status 2>&1 | jq .SyncInfo.catching_up
```

Get latest height

```sh
bandd status 2>&1 | jq .SyncInfo.latest_block_height
```

Reset Node

```sh
bandd tendermint unsafe-reset-all --home $HOME/.band --keep-addr-book
```

Delete Node

```sh
sudo systemctl stop bandd && sudo systemctl disable bandd && sudo rm /etc/systemd/system/bandd.service && sudo systemctl daemon-reload && rm -rf $HOME/.band && sudo rm -rf $(which bandd) 
```

### Services Management

```sh
# Reload Service
sudo systemctl daemon-reload

# Enable Service
sudo systemctl enable bandd

# Disable Service
sudo systemctl disable bandd

# Start Service
sudo systemctl start bandd

# Stop Service
sudo systemctl stop bandd

# Restart Service
sudo systemctl restart bandd

# Check Service Status
sudo systemctl status bandd

# Check Service Logs
sudo journalctl -u bandd -f --no-hostname -o cat
```


# Source

<figure><img src="https://pbs.twimg.com/profile_images/1721764048403116032/rIoQhC14_400x400.jpg" alt="" width="188"><figcaption></figcaption></figure>

A Public permission-less blockchain network for global payments and all things decentralized. Enterprises, developers and individuals can utilize $SOURCE's infrastructure to create user-friendly apps, smart contracts and tools for Web 3.0, Tokenization, NFTs, and more.

***

## [STAKE WITH INDONODE](https://ping.pub/source/staking/sourcevaloper12q8uzsmtc0vs4wryvjmk5hnyv559dqcwc48yj3)

***

### Links

[Website](https://www.sourceprotocol.io/) | [Twitter](https://twitter.com/SourceProtocol_) | [Discord](https://discord.gg/zj8xxUCeZQ)

***

<table data-full-width="false"><thead><tr><th>Version</th><th>Chain-id</th><th>Wasm</th><th data-hidden>WASM</th></tr></thead><tbody><tr><td>v3.0.0</td><td>source-1</td><td>ENABLED</td><td>ENABLED</td></tr></tbody></table>

<details>

<summary>More Summary</summary>

* Binary Name : sourced
* Binary Home : $HOME/.source
* Denom : usource
* Exponent : 6

</details>

Peer

```sh
7e153e83fbe2f5618fffbdfd803f70ee78ad797d@rpc.source.indonode.net:12656
```

Endpoint

* rpc.source.indonode.net
* api.source.indonode.net
* grpc.source.indonode.net:12090

Addrbook

```sh
curl -Ls https://snapshots.indonode.net/source/addrbook.json > $HOME/.source/config/addrbook.json
```

***


# Node Installation

<figure><img src="https://pbs.twimg.com/profile_images/1721764048403116032/rIoQhC14_400x400.jpg" alt="" width="188"><figcaption></figcaption></figure>

\*\*\*

| Latest Version | Chain-id | Wasm    |
| -------------- | -------- | ------- |
| v3.0.0         | source-1 | ENABLED |

### Setup Server

```shell
# Update Packages
sudo apt update && apt upgrade -y
sudo apt install curl git jq lz4 build-essential unzip fail2ban ufw -y

# Set Firewall
sudo apt install -y ufw
sudo ufw default allow outgoing
sudo ufw default deny incoming
sudo ufw allow ssh
sudo ufw allow 9100

# Enable Firewall
sudo ufw enable

# Install Go
ver="1.20.8"
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
```

### Node Installation (Manual)

```sh
# Download and install binary
cd $HOME
rm -rf source
git clone https://github.com/Source-Protocol-Cosmos/source.git
cd source
git checkout v3.0.0


# Set Configuration for your node
sourced config chain-id source-1
sourced config keyring-backend file


# Init your node
# You can change "MyNode" to anything you like
sourced init MyNode --chain-in source-1


# Add Genesis File and Addrbook
curl -Ls https://snapshots.indonode.net/source/genesis.json > $HOME/.source/config/genesis.json
curl -Ls https://snapshots.indonode.net/source/addrbook.json > $HOME/.source/config/addrbook.json

#Configure Seeds and Peers
PEERS="$(curl -sS https://rpc.source.indonode.net/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/.source/config/config.toml


# Set Pruning, Enable Prometheus, Gas Prices, and Indexer
PRUNING="custom"
PRUNING_KEEP_RECENT="100"
PRUNING_INTERVAL="19"

sed -i -e "s/^pruning *=.*/pruning = \"$PRUNING\"/" $HOME/.source/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \
\"$PRUNING_KEEP_RECENT\"/" $HOME/.source/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \
\"$PRUNING_INTERVAL\"/" $HOME/.source/config/app.toml
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.source/config/config.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.source/config/config.toml
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0usource\"/" $HOME/.source/config/app.toml

# Set Service file
sudo tee /etc/systemd/system/sourced.service > /dev/null <<EOF
[Unit]
Description=source node
After=network-online.target
[Service]
User=$USER
ExecStart=$(which sourced) start
Restart=always
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable sourced

# Download Latest Snapshot
curl -L https://snapshots.indonode.net/source/source-latest.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.source
[[ -f $HOME/.source/data/upgrade-info.json ]] && cp $HOME/.source/data/upgrade-info.json $HOME/.source/cosmovisor/genesis/upgrade-info.json

# Start the Node
sudo systemctl restart sourced
sudo journalctl -fu sourced -o cat
```


# Snapshot

<figure><img src="https://pbs.twimg.com/profile_images/1721764048403116032/rIoQhC14_400x400.jpg" alt="" width="188"><figcaption></figcaption></figure>

***

| Latest Version | Chain-id | Wasm    |
| -------------- | -------- | ------- |
| v3.0.0         | source-1 | ENABLED |

### Snapshot Guide

### Setup Server

```shell
# Install Necessary package
sudo apt update
sudo apt-get install snapd lz4 -y
```

Turn off state-sync

```shell
sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1false|" ~/.source/config/config.toml
```

```shell
# Stop the service and reset the data
sudo systemctl stop sourced
cp $HOME/.source/data/priv_validator_state.json $HOME/.source/priv_validator_state.json.backup
rm -rf $HOME/.source/data
```

```shell
# Download Latest Snapshot
curl -L https://snapshots.indonode.net/source/source-latest.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.source
mv $HOME/.source/priv_validator_state.json.backup $HOME/.source/data/priv_validator_state.json
```

```shell
# Restart Service
sudo systemctl restart sourced && sudo journalctl -fu sourced -o cat
```


# Statesync

## Statesync

<figure><img src="https://pbs.twimg.com/profile_images/1721764048403116032/rIoQhC14_400x400.jpg" alt="" width="188"><figcaption></figcaption></figure>

***

| Latest Version | Chain-id | Wasm    |
| -------------- | -------- | ------- |
| v3.0.0         | source-1 | ENABLED |

#### Statesync

```shell
sudo systemctl stop sourced
cp $HOME/.source/data/priv_validator_state.json $HOME/.source/priv_validator_state.json.backup
sourced tendermint unsafe-reset-all --keep-addr-book --home $HOME/.source


STATE_SYNC_RPC=https://rpc.source.indonode.net:443
STATE_SYNC_PEER=7e153e83fbe2f5618fffbdfd803f70ee78ad797d@rpc.source.indonode.net:12656
LATEST_HEIGHT=$(curl -s $STATE_SYNC_RPC/block | jq -r .result.block.header.height)
SYNC_BLOCK_HEIGHT=$(($LATEST_HEIGHT - 1000))
SYNC_BLOCK_HASH=$(curl -s "$STATE_SYNC_RPC/block?height=$SYNC_BLOCK_HEIGHT" | jq -r .result.block_id.hash)

sed -i \
  -e "s|^enable *=.*|enable = true|" \
  -e "s|^rpc_servers *=.*|rpc_servers = \"$STATE_SYNC_RPC,$STATE_SYNC_RPC\"|" \
  -e "s|^trust_height *=.*|trust_height = $SYNC_BLOCK_HEIGHT|" \
  -e "s|^trust_hash *=.*|trust_hash = \"$SYNC_BLOCK_HASH\"|" \
  -e "s|^persistent_peers *=.*|persistent_peers = \"$STATE_SYNC_PEER\"|" \
  $HOME/.source/config/config.toml

mv $HOME/.source/priv_validator_state.json.backup $HOME/.source/data/priv_validator_state.json
```

## Download WASM

```shell
curl -L https://snapshots.indonode.net/source/wasm.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.source
```

```shell
sudo systemctl start sourced && sudo journalctl -u sourced -f
```


# Upgrade

<figure><img src="https://pbs.twimg.com/profile_images/1721764048403116032/rIoQhC14_400x400.jpg" alt="" width="188"><figcaption></figcaption></figure>

***

| Latest Version | Chain-id | Wasm    |
| -------------- | -------- | ------- |
| v3.0.0         | source-1 | ENABLED |

### Upgrade Guide

```sh
Upgrade not available
```


# CLI Cheatsheet

<figure><img src="https://pbs.twimg.com/profile_images/1721764048403116032/rIoQhC14_400x400.jpg" alt="" width="188"><figcaption></figcaption></figure>

### Key Management

Add new key

```
sourced keys add wallet
```

Recover existing key

```
sourced keys add wallet --recover
```

List All key

```
sourced keys list
```

Delete key

```
sourced keys delete wallet
```

Export Key (save to wallet.backup)

```
sourced keys export wallet
```

Import key

```
sourced keys import wallet wallet.backup
```

Query Wallet Balance

```
sourced q bank balances $(sourced keys show wallet -a)
```

### Validator Management

Create Validator

```sh
sourced tx staking create-validator \
  --amount "1000000usource" \
  --pubkey $(sourced tendermint show-validator) \
  --moniker "MONIKER" \
  --identity "KEYBASE_ID" \
  --details "YOUR DETAILS" \
  --website "YOUR WEBSITE" \
  --chain-id source-1 \
  --commission-rate "0.05" \
  --commission-max-rate "0.20" \
  --commission-max-change-rate "0.01" \
  --min-self-delegation "1" \
  --gas-prices "0.025usource" \
  --gas "auto" \
  --gas-adjustment "1.5" \
  --from wallet \
  -y

```

Edit Validator

```sh
sourced tx staking edit-validator \
--new-moniker="MONIKER" \
--identity="YOUR_KEYBASE_ID" \
--details="YOUR_DETAILS" \
--website="YOUR_WEBSITE_URL" \
--chain-id source-1 \
--commission-rate=0.05 \
--gas-prices "0.025usource" \
--gas="auto" \
--gas-adjustment="1.5" \
--from wallet \
-y
```

Unjail Validator

```sh
sourced tx slashing unjail --from wallet --chain-id source-1 --gas-prices "0.025usource" --gas-adjustment 1.5 --gas "auto" -y 
```

Signing Info

```sh
sourced query slashing signing-info $(sourced tendermint show-validator) 
```

List all active validators

```sh
sourced 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 
```

List all inactive validators

```sh
sourced q staking validators -oj --limit=3000 | jq '.validators[] | select(.status=="BOND_STATUS_UNBONDED") or .status=="BOND_STATUS_UNBONDING")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " \t " + .description.moniker' | sort -gr | nl 
```

View validators details

```
sourced q staking validator $(sourced keys show wallet --bech val -a) 
```

### Token Management

Withdraw rewards from all validators

```sh
sourced tx distribution withdraw-all-rewards --from wallet --chain-id source-1 --gas-prices "0.025usource" --gas-adjustment 1.5 --gas "auto" -y 
```

Withdraw comission and rewards from your validator

```sh
sourced tx distribution withdraw-rewards $(sourced keys show wallet --bech val -a) --commission --from wallet --chain-id source-1 --gas-prices "0.025usource" --gas-adjustment 1.5 --gas "auto" -y 
```

Delegate to your validator

```sh
sourced tx staking delegate $(sourced keys show wallet --bech val -a) 1000000usource --from wallet --chain-id source-1 --gas-prices "0.025usource" --gas-adjustment 1.5 --gas "auto" -y 
```

Delegate to other

```sh
c4ed tx staking delegate TO_VALOPER_ADDRESS 1000000usource --from wallet --chain-id source-1 --gas-prices "0.025usource" --gas-adjustment 1.5 --gas "auto" -y 
```

Redelegate your stake to other validators

```sh
sourced tx staking redelegate $(sourced keys show wallet --bech val -a) TO_VALOPER_ADDRESS 1000000usource --from wallet --chain-id source-1 --gas-prices "0.025usource" --gas-adjustment 1.5 --gas "auto" -y 
```

Unbond stake

```sh
sourced tx staking unbond $(sourced keys show wallet --bech val -a) 1000000usource --from wallet --chain-id source-1 --gas-prices "0.025usource" --gas-adjustment 1.5 --gas "auto" -y 
```

Send tokens

```sh
sourced tx bank send wallet TO_WALLET_ADDRESS 1000000usource --from wallet --chain-id source-1 --gas-prices "0.025usource" --gas-adjustment 1.5 --gas "auto" -y 
```

### Governance

List all proposals

<pre class="language-sh"><code class="lang-sh"><strong>sourced query gov proposals
</strong></code></pre>

Vote **YES / NO / ABSTAIN / NO\_WITH\_VETO**

```sh
sourced tx gov vote 1 yes --from wallet --chain-id source-1 --gas-prices "0.025usource" --gas-adjustment 1.5 --gas "auto" -y 
```

Create new text proposal

```sh
sourced tx gov submit-proposal \
--title="Title" \
--description="Description" \
--deposit=100000000usource \
--type="Text" \
--from=wallet \
--gas-prices 0usource\ 
--gas-adjustment 1.5 \
--gas "auto" \
-y 
```

### Utility

Set Indexer **NULL / KV**

```sh
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.source/config/config.toml
```

Set Custom Port

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

Get Validator info

```sh
sourced status 2>&1 | jq .ValidatorInfo
```

Get denom info

```sh
sourced q bank denom-metadata -oj | jq
```

Get sync status

```sh
sourced status 2>&1 | jq .SyncInfo.catching_up
```

Get latest height

```sh
sourced status 2>&1 | jq .SyncInfo.latest_block_height
```

Reset Node

```sh
sourced tendermint unsafe-reset-all --home $HOME/.source --keep-addr-book
```

Delete Node

```sh
sudo systemctl stop sourced && sudo systemctl disable sourced && sudo rm /etc/systemd/system/sourced.service && sudo systemctl daemon-reload && rm -rf $HOME/.source && sudo rm -rf $(which sourced) 
```

### Services Management

```sh
# Reload Service
sudo systemctl daemon-reload

# Enable Service
sudo systemctl enable sourced

# Disable Service
sudo systemctl disable sourced

# Start Service
sudo systemctl start sourced

# Stop Service
sudo systemctl stop sourced

# Restart Service
sudo systemctl restart sourced

# Check Service Status
sudo systemctl status sourced

# Check Service Logs
sudo journalctl -u sourced -f --no-hostname -o cat
```


# SGE

<figure><img src="https://pbs.twimg.com/profile_images/1693591385469837313/6dYwFnXW_400x400.jpg" alt="" width="188"><figcaption></figcaption></figure>

A Cosmos SDK-based layer-1 blockchain utilizing its own native utility token (SGE token). The SGE Network leverages the modular components, blockchain interoperability and minimal gas fees of the Cosmos-based design to support applications at the intersection of blockchain, sports, gaming and entertainment that are pioneering novel ways of engaging users with a UX, value proposition and utility never before seen in the space.

***

## [STAKE WITH INDONODE](https://explorer.indonode.net/sge/staking/sgevaloper1rs78akqst8hn9pwdz9rw2m3a466tyqjt668sc7)

***

### Links

[Website](https://sgenetwork.io/) | [Twitter](https://twitter.com/sge_network) | [Discord](https://discord.gg/P6cccvJRpW)

***

<table data-full-width="false"><thead><tr><th>Version</th><th>Chain-id</th><th>Wasm</th><th data-hidden>WASM</th></tr></thead><tbody><tr><td>v1.1.0</td><td>sgenet-1</td><td>DISABLED</td><td>DISABLED</td></tr></tbody></table>

<details>

<summary>More Summary</summary>

* Binary Name : sged
* Binary Home : $HOME/.sge
* Denom : usge
* Exponent : 6

</details>

Peer

```sh
e411f9a5c2e00f791a1463dc3f557e3ffb267052@rpc.sge.indonode.net:13656
```

Endpoint

* rpc.sge.indonode.net
* api.sge.indonode.net
* grpc.sge.indonode.net:12090

Addrbook

```sh
curl -Ls https://snapshots.indonode.net/sge/addrbook.json > $HOME/.sge/config/addrbook.json
```

***


# Node Installation

<figure><img src="https://pbs.twimg.com/profile_images/1693591385469837313/6dYwFnXW_400x400.jpg" alt="" width="188"><figcaption></figcaption></figure>

\*\*\*

| Latest Version | Chain-id | Wasm     |
| -------------- | -------- | -------- |
| v1.1.0         | sgenet-1 | DISABLED |

### Setup Server

```shell
# Update Packages
sudo apt update && apt upgrade -y
sudo apt install curl git jq lz4 build-essential unzip fail2ban ufw -y

# Set Firewall
sudo apt install -y ufw
sudo ufw default allow outgoing
sudo ufw default deny incoming
sudo ufw allow ssh
sudo ufw allow 9100

# Enable Firewall
sudo ufw enable

# Install Go
ver="1.19.9"
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
```

### Node Installation (Manual)

```sh
# Download and install binary
cd $HOME
rm -rf sge
git clone https://github.com/sge-network/sge
cd sge
git checkout v1.1.0
make install

# Set Configuration for your node
sged config chain-id sgenet-1
sged config keyring-backend file


# Init your node
# You can change "MyNode" to anything you like
sged init MyNode --chain-in sgenet-1


# Add Genesis File and Addrbook
curl -Ls https://snapshots.indonode.net/sge/genesis.json > $HOME/.sge/config/genesis.json
curl -Ls https://snapshots.indonode.net/sge/addrbook.json > $HOME/.sge/config/addrbook.json

#Configure Seeds and Peers
PEERS="$(curl -sS https://rpc.sge.indonode.net/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/.sge/config/config.toml


# Set Pruning, Enable Prometheus, Gas Prices, and Indexer
PRUNING="custom"
PRUNING_KEEP_RECENT="100"
PRUNING_INTERVAL="19"

sed -i -e "s/^pruning *=.*/pruning = \"$PRUNING\"/" $HOME/.sge/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \
\"$PRUNING_KEEP_RECENT\"/" $HOME/.sge/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \
\"$PRUNING_INTERVAL\"/" $HOME/.sge/config/app.toml
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.sge/config/config.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.sge/config/config.toml
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.025usge\"/" $HOME/.sge/config/app.toml

# Set Service file
sudo tee /etc/systemd/system/sged.service > /dev/null <<EOF
[Unit]
Description=sge node
After=network-online.target
[Service]
User=$USER
ExecStart=$(which sged) start
Restart=always
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable sged

# Download Latest Snapshot
curl -L https://snapshots.indonode.net/sge/sge-latest.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.sge
[[ -f $HOME/.sge/data/upgrade-info.json ]] && cp $HOME/.sge/data/upgrade-info.json $HOME/.sge/cosmovisor/genesis/upgrade-info.json

# Start the Node
sudo systemctl restart sged
sudo journalctl -fu sged -o cat
```


# Snapshot

<figure><img src="https://pbs.twimg.com/profile_images/1693591385469837313/6dYwFnXW_400x400.jpg" alt="" width="188"><figcaption></figcaption></figure>

***

| Latest Version | Chain-id | Wasm     |
| -------------- | -------- | -------- |
| v1.1.0         | sgenet-1 | DISABLED |

### Snapshot Guide

### Setup Server

```shell
# Install Necessary package
sudo apt update
sudo apt-get install snapd lz4 -y
```

Turn off state-sync

```shell
sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1false|" ~/.sge/config/config.toml
```

```shell
# Stop the service and reset the data
sudo systemctl stop sged
cp $HOME/.sge/data/priv_validator_state.json $HOME/.sge/priv_validator_state.json.backup
rm -rf $HOME/.sge/data
```

```shell
# Download Latest Snapshot
curl -L https://snapshots.indonode.net/sge/sge-latest.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.sge
mv $HOME/.sge/priv_validator_state.json.backup $HOME/.sge/data/priv_validator_state.json
```

```shell
# Restart Service
sudo systemctl restart sged && sudo journalctl -fu sged -o cat
```


# Statesync

<figure><img src="https://pbs.twimg.com/profile_images/1693591385469837313/6dYwFnXW_400x400.jpg" alt="" width="188"><figcaption></figcaption></figure>

***

| Latest Version | Chain-id | Wasm     |
| -------------- | -------- | -------- |
| v1.1.0         | sgenet-1 | DISABLED |

### Statesync

```shell
sudo systemctl stop sged
cp $HOME/.sge/data/priv_validator_state.json $HOME/.sge/priv_validator_state.json.backup
sged tendermint unsafe-reset-all --keep-addr-book --home $HOME/.sge


STATE_SYNC_RPC=https://rpc.sge.indonode.net:443
STATE_SYNC_PEER=e411f9a5c2e00f791a1463dc3f557e3ffb267052@rpc.sge.indonode.net:13656
LATEST_HEIGHT=$(curl -s $STATE_SYNC_RPC/block | jq -r .result.block.header.height)
SYNC_BLOCK_HEIGHT=$(($LATEST_HEIGHT - 1000))
SYNC_BLOCK_HASH=$(curl -s "$STATE_SYNC_RPC/block?height=$SYNC_BLOCK_HEIGHT" | jq -r .result.block_id.hash)

sed -i \
  -e "s|^enable *=.*|enable = true|" \
  -e "s|^rpc_servers *=.*|rpc_servers = \"$STATE_SYNC_RPC,$STATE_SYNC_RPC\"|" \
  -e "s|^trust_height *=.*|trust_height = $SYNC_BLOCK_HEIGHT|" \
  -e "s|^trust_hash *=.*|trust_hash = \"$SYNC_BLOCK_HASH\"|" \
  -e "s|^persistent_peers *=.*|persistent_peers = \"$STATE_SYNC_PEER\"|" \
  $HOME/.sge/config/config.toml

mv $HOME/.sge/priv_validator_state.json.backup $HOME/.sge/data/priv_validator_state.json
```

```shell
# Restart Service
sudo systemctl start sged && sudo journalctl -u sged -f
```


# Upgrade

<figure><img src="https://pbs.twimg.com/profile_images/1693591385469837313/6dYwFnXW_400x400.jpg" alt="" width="188"><figcaption></figcaption></figure>

***

| Latest Version | Chain-id | Wasm     |
| -------------- | -------- | -------- |
| v1.1.0         | sgenet-1 | DISABLED |

### Upgrade Guide

ONLY UPGRADE WHEN BLOCKS REACHED `1097000`

```sh
cd $HOME
cd sge/
git fetch --all
git checkout v1.1.1
make install
```

Restart Services

```sh
sudo systemctl restart sged && journalctl -fu sged
```

Check version should shown `v1.1.1`

```sh
sged version
```


# CLI Cheatsheet

<figure><img src="https://pbs.twimg.com/profile_images/1693591385469837313/6dYwFnXW_400x400.jpg" alt="" width="188"><figcaption></figcaption></figure>

### Key Management

Add new key

```
sged keys add wallet
```

Recover existing key

```
sged keys add wallet --recover
```

List All key

```
sged keys list
```

Delete key

```
sged keys delete wallet
```

Export Key (save to wallet.backup)

```
sged keys export wallet
```

Import key

```
sged keys import wallet wallet.backup
```

Query Wallet Balance

```
sged q bank balances $(sged keys show wallet -a)
```

### Validator Management

Create Validator

```sh
sged tx staking create-validator \
  --amount "1000000usge" \
  --pubkey $(sged tendermint show-validator) \
  --moniker "MONIKER" \
  --identity "KEYBASE_ID" \
  --details "YOUR DETAILS" \
  --website "YOUR WEBSITE" \
  --chain-id sgenet-1 \
  --commission-rate "0.05" \
  --commission-max-rate "0.20" \
  --commission-max-change-rate "0.01" \
  --min-self-delegation "1" \
  --gas-prices "0.025usge" \
  --gas "auto" \
  --gas-adjustment "1.5" \
  --from wallet \
  -y

```

Edit Validator

```sh
sged tx staking edit-validator \
--new-moniker="MONIKER" \
--identity="YOUR_KEYBASE_ID" \
--details="YOUR_DETAILS" \
--website="YOUR_WEBSITE_URL" \
--chain-id sgenet-1 \
--commission-rate=0.05 \
--gas-prices "0.025usge" \
--gas="auto" \
--gas-adjustment="1.5" \
--from wallet \
-y
```

Unjail Validator

```sh
sged tx slashing unjail --from wallet --chain-id sgenet-1 --gas-prices "0.025usge" --gas-adjustment 1.5 --gas "auto" -y 
```

Signing Info

```sh
sged query slashing signing-info $(sged tendermint show-validator) 
```

List all active validators

```sh
sged 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 
```

List all inactive validators

```sh
sged q staking validators -oj --limit=3000 | jq '.validators[] | select(.status=="BOND_STATUS_UNBONDED") or .status=="BOND_STATUS_UNBONDING")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " \t " + .description.moniker' | sort -gr | nl 
```

View validators details

```
sged q staking validator $(sged keys show wallet --bech val -a) 
```

### Token Management

Withdraw rewards from all validators

```sh
sged tx distribution withdraw-all-rewards --from wallet --chain-id sgenet-1 --gas-prices "0.025usge" --gas-adjustment 1.5 --gas "auto" -y 
```

Withdraw comission and rewards from your validator

```sh
sged tx distribution withdraw-rewards $(sged keys show wallet --bech val -a) --commission --from wallet --chain-id sgenet-1 --gas-prices "0.025usge" --gas-adjustment 1.5 --gas "auto" -y 
```

Delegate to your validator

```sh
sged tx staking delegate $(sged keys show wallet --bech val -a) 1000000usge --from wallet --chain-id sgenet-1 --gas-prices "0.025usge" --gas-adjustment 1.5 --gas "auto" -y 
```

Delegate to other

```sh
c4ed tx staking delegate TO_VALOPER_ADDRESS 1000000usge --from wallet --chain-id sgenet-1 --gas-prices "0.025usge" --gas-adjustment 1.5 --gas "auto" -y 
```

Redelegate your stake to other validators

```sh
sged tx staking redelegate $(sged keys show wallet --bech val -a) TO_VALOPER_ADDRESS 1000000usge --from wallet --chain-id sgenet-1 --gas-prices "0.025usge" --gas-adjustment 1.5 --gas "auto" -y 
```

Unbond stake

```sh
sged tx staking unbond $(sged keys show wallet --bech val -a) 1000000usge --from wallet --chain-id sgenet-1 --gas-prices "0.025usge" --gas-adjustment 1.5 --gas "auto" -y 
```

Send tokens

```sh
sged tx bank send wallet TO_WALLET_ADDRESS 1000000usge --from wallet --chain-id sgenet-1 --gas-prices "0.025usge" --gas-adjustment 1.5 --gas "auto" -y 
```

### Governance

List all proposals

<pre class="language-sh"><code class="lang-sh"><strong>sged query gov proposals
</strong></code></pre>

Vote **YES / NO / ABSTAIN / NO\_WITH\_VETO**

```sh
sged tx gov vote 1 yes --from wallet --chain-id sgenet-1 --gas-prices "0.025usge" --gas-adjustment 1.5 --gas "auto" -y 
```

Create new text proposal

```sh
sged tx gov submit-proposal \
--title="Title" \
--description="Description" \
--deposit=100000000usge \
--type="Text" \
--from=wallet \
--gas-prices 0usge\ 
--gas-adjustment 1.5 \
--gas "auto" \
-y 
```

### Utility

Set Indexer **NULL / KV**

```sh
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.sge/config/config.toml
```

Set Custom Port

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

Get Validator info

```sh
sged status 2>&1 | jq .ValidatorInfo
```

Get denom info

```sh
sged q bank denom-metadata -oj | jq
```

Get sync status

```sh
sged status 2>&1 | jq .SyncInfo.catching_up
```

Get latest height

```sh
sged status 2>&1 | jq .SyncInfo.latest_block_height
```

Reset Node

```sh
sged tendermint unsafe-reset-all --home $HOME/.sge --keep-addr-book
```

Delete Node

```sh
sudo systemctl stop sged && sudo systemctl disable sged && sudo rm /etc/systemd/system/sged.service && sudo systemctl daemon-reload && rm -rf $HOME/.sge && sudo rm -rf $(which sged) 
```

### Services Management

```sh
# Reload Service
sudo systemctl daemon-reload

# Enable Service
sudo systemctl enable sged

# Disable Service
sudo systemctl disable sged

# Start Service
sudo systemctl start sged

# Stop Service
sudo systemctl stop sged

# Restart Service
sudo systemctl restart sged

# Check Service Status
sudo systemctl status sged

# Check Service Logs
sudo journalctl -u sged -f --no-hostname -o cat
```


# Chain4Energy

<figure><img src="https://explorer.indonode.net/logos/c4e.png" alt="" width="188"><figcaption></figcaption></figure>

Chain4Energy (C4E) is a sovereign global decentralized blockchain built on Cosmos SDK. The Decentralized Energy Marketplace which enables institutions and individuals to seamlessly participate in the renewable energy market accessing and offering a wide range of renewable energy solutions and services. Chain4Energy brings the energy industry to Web 3 by responding to the requirements and needs of all participants and enabling the effective creation and distribution of value. Blockchain removes delays, gets the right information to the right place, and eliminates the possibility of fraud and manipulation. It also enables P2P energy trading (without intermediaries), and thus effectively, between energy market participants.

***

## [STAKE WITH INDONODE](https://explorer.indonode.net/c4e-testnet/staking/c4evaloper10wmrjkcdwn0lx22upwlsnxtul4q2wu6s83ejtq)

***

### Links

[Website](https://c4e.io) | [Twitter](https://twitter.com/Chain4Energy) | [Discord](https://discord.com/invite/chain4energy)

***

<table data-full-width="false"><thead><tr><th>Version</th><th>Chain-id</th><th>Wasm</th><th data-hidden>WASM</th><th data-hidden>Chain-id</th></tr></thead><tbody><tr><td>1.3.0</td><td>babajaga-1</td><td>DISABLED</td><td>DISABLED</td><td>planq_7070-2</td></tr></tbody></table>

<details>

<summary>More Summary</summary>

* Binary Name : c4ed
* Binary Home : $HOME/.c4e-chain
* Denom : uc4e
* Exponent : 6

</details>

Addrbook

```sh
curl -Ls https://snapshots.indonode.net/c4e/testnet/addrbook.json > $HOME/.c4e-chain/config/addrbook.json
```

***


# Node Installation

<figure><img src="https://explorer.indonode.net/logos/c4e.png" alt="" width="188"><figcaption></figcaption></figure>

***

| Version | Chain-id   | Wasm     |
| ------- | ---------- | -------- |
| 1.3.0   | babajaga-1 | DISABLED |

### Setup Server

```shell
# Update Packages
sudo apt update && apt upgrade -y
sudo apt install curl git jq lz4 build-essential unzip fail2ban ufw -y

# Set Firewall
sudo apt install -y ufw
sudo ufw default allow outgoing
sudo ufw default deny incoming
sudo ufw allow ssh
sudo ufw allow 9100

# Enable Firewall
sudo ufw enable

# Install Go
ver="1.20"
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

# Install Cosmovisor (OPTIONAL If you are using Cosmovisor)
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@v1.5.0
```

### Node Installation

There is 2 ways to install node , using Cosmovisor or Run the binary directly, you can choose whats you prefer

{% tabs %}
{% tab title="Cosmovisor (Recommended)" %}
{% code fullWidth="true" %}

```sh
# Download and install binary
cd $HOME
rm -rf c4e-chain/
git clone https://github.com/chain4energy/c4e-chain.git
cd c4e-chain/
git checkout v1.3.0
make build


# Setup Cosmovisor Symlinks
mkdir -p $HOME/.c4e-chain/cosmovisor/genesis/bin
mv build/c4ed $HOME/.c4e-chain/cosmovisor/genesis/bin/
rm -rf build

sudo ln -s $HOME/.c4e-chain/cosmovisor/genesis $HOME/.c4e-chain/cosmovisor/current
sudo ln -s $HOME/.c4e-chain/cosmovisor/current/bin/c4ed /usr/local/bin/c4ed


# Set Configuration for your node
c4ed config chain-id babajaga-1
c4ed config keyring-backend file


# Init your node
# You can change "MyNode" to anything you like
c4ed init MyNode --chain-id babajaga-1


# Add Genesis File and Addrbook
curl -Ls https://snapshots.indonode.net/c4e/testnet/genesis.json > $HOME/.c4e-chain/config/genesis.json


#Configure Seeds and Peers
peers=$(curl -s https://ss-t.c4e.nodestake.top/peers.txt)
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" ~/.c4e-chain/config/config.toml


# Set Pruning, Enable Prometheus, Gas Price, and Indexer
PRUNING="custom"
PRUNING_KEEP_RECENT="100"
PRUNING_INTERVAL="19"

sed -i -e "s/^pruning *=.*/pruning = \"$PRUNING\"/" $HOME/.c4e-chain/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \
\"$PRUNING_KEEP_RECENT\"/" $HOME/.c4e-chain/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \
\"$PRUNING_INTERVAL\"/" $HOME/.c4e-chain/config/app.toml
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.c4e-chain/config/config.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.c4e-chain/config/config.toml
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.0025uc4e\"/" $HOME/.c4e-chain/config/app.toml

# Set Service file
sudo tee /etc/systemd/system/c4ed.service > /dev/null << EOF
[Unit]
Description=c4ed testnet node service
After=network-online.target

[Service]
User=$USER
ExecStart=$(which cosmovisor) run start
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
Environment="DAEMON_HOME=$HOME/.c4e-chain"
Environment="DAEMON_NAME=c4ed"
Environment="UNSAFE_SKIP_BACKUP=true"

[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable c4ed


# Start the Node
sudo systemctl restart c4ed
sudo journalctl -fu c4ed -o cat
```

{% endcode %}
{% endtab %}

{% tab title="Non-Cosmovisor" %}

```sh
# Download and install binary
cd $HOME
rm -rf c4e-chain/
git clone https://github.com/chain4energy/c4e-chain.git
cd c4e-chain/
git checkout v1.3.0
make install


# Set Configuration for your node
c4ed config chain-id babajaga-1
c4ed config keyring-backend file


# Init your node
# You can change "MyNode" to anything you like
c4ed init MyNode --chain-in babajaga-1


# Add Genesis File and Addrbook
wget https://raw.githubusercontent.com/planq-network/networks/main/mainnet/genesis.json
mv genesis.json $HOME/.c4e-chain/config/


#Configure Seeds and Peers
peers=$(curl -s https://ss-t.c4e.nodestake.top/peers.txt)
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" ~/.c4e-chain/config/config.toml



# Set Pruning, Enable Prometheus, Gas Prices, and Indexer
PRUNING="custom"
PRUNING_KEEP_RECENT="100"
PRUNING_INTERVAL="19"

sed -i -e "s/^pruning *=.*/pruning = \"$PRUNING\"/" $HOME/.c4e-chain/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \
\"$PRUNING_KEEP_RECENT\"/" $HOME/.c4e-chain/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \
\"$PRUNING_INTERVAL\"/" $HOME/.c4e-chain/config/app.toml
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.c4e-chain/config/config.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.c4e-chain/config/config.toml
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.0025uc4e\"/" $HOME/.c4e-chain/config/app.toml


# Set Service file
sudo tee /etc/systemd/system/c4ed.service > /dev/null <<EOF
[Unit]
Description=c4ed testnet node
After=network-online.target
[Service]
User=$USER
ExecStart=$(which c4ed) start
Restart=always
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable c4ed


# Start the Node
sudo systemctl restart c4ed
sudo journalctl -fu c4ed -o cat
```

{% endtab %}
{% endtabs %}


# Upgrade

<figure><img src="https://explorer.indonode.net/logos/c4e.png" alt="" width="188"><figcaption></figcaption></figure>

***

| Latest Version | Chain-id   | Wasm     |
| -------------- | ---------- | -------- |
| 1.3.0          | babajaga-1 | DISABLED |

### Upgrade Guide

{% tabs %}
{% tab title="Cosmovisor" %}

```sh
Upgrade not available
```

{% endtab %}

{% tab title="Binary" %}

```sh
Upgrade not available
```

{% endtab %}
{% endtabs %}


# CLI Cheatsheet

<figure><img src="https://explorer.indonode.net/logos/c4e.png" alt="" width="188"><figcaption></figcaption></figure>

### Key Management

Add new key

```
c4ed keys add wallet
```

Recover existing key

```
c4ed keys add wallet --recover
```

List All key

```
c4ed keys list
```

Delete key

```
c4ed keys delete wallet
```

Export Key (save to wallet.backup)

```
c4ed keys export wallet
```

Import key

```
c4ed keys import wallet wallet.backup
```

Query Wallet Balance

```
c4ed q bank balances $(c4ed keys show wallet -a)
```

### Validator Management

Create Validator

```sh
c4ed tx staking create-validator \
  --amount "1000000uc4e" \
  --pubkey $(c4ed tendermint show-validator) \
  --moniker "MONIKER" \
  --identity "KEYBASE_ID" \
  --details "YOUR DETAILS" \
  --website "YOUR WEBSITE" \
  --chain-id perun-1 \
  --commission-rate "0.05" \
  --commission-max-rate "0.20" \
  --commission-max-change-rate "0.01" \
  --min-self-delegation "1" \
  --gas-prices="0.0025uc4e" \
  --gas="auto" \
  --gas-adjustment="1.5" \
  --from wallet \
  -y
```

Edit Validator

```sh
c4ed tx staking edit-validator \
--new-moniker="MONIKER" \
--identity="YOUR_KEYBASE_ID" \
--details="YOUR_DETAILS" \
--website="YOUR_WEBSITE_URL" \
--chain-id babajaga-1 \
--commission-rate=0.05 \
--gas-prices="0.0025uc4e" \
--gas="auto" \
--gas-adjustment="1.5" \
--from wallet \
-y
```

Unjail Validator

```sh
c4ed tx slashing unjail --from wallet --chain-id babajaga-1 --gas-prices=0.0025uc4e --gas-adjustment 1.5 --gas auto -y 
```

Signing Info

```sh
c4ed query slashing signing-info $(c4ed tendermint show-validator) 
```

List all active validators

```sh
c4ed 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 
```

List all inactive validators

```sh
c4ed q staking validators -oj --limit=3000 | jq '.validators[] | select(.status=="BOND_STATUS_UNBONDED") or .status=="BOND_STATUS_UNBONDING")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " \t " + .description.moniker' | sort -gr | nl 
```

View validators details

```
c4ed q staking validator $(c4ed keys show wallet --bech val -a) 
```

### Token Management

Withdraw rewards from all validators

```sh
c4ed tx distribution withdraw-all-rewards --from wallet --chain-id babajaga-1 --gas-prices=0.0025uc4e --gas-adjustment 1.5 --gas auto -y 
```

Withdraw comission and rewards from your validator

```sh
c4ed tx distribution withdraw-rewards $(c4ed keys show wallet --bech val -a) --commission --from wallet --chain-id babajaga-1 --gas-prices=0.0025uc4e --gas-adjustment 1.5 --gas auto -y 
```

Delegate to your validator

```sh
c4ed tx staking delegate $(c4ed keys show wallet --bech val -a) 1000000uc4e --from wallet --chain-id babajaga-1 --gas-prices=0.0025uc4e --gas-adjustment 1.5 --gas auto -y 
```

Delegate to other

```sh
c4ed tx staking delegate TO_VALOPER_ADDRESS 1000000uc4e --from wallet --chain-id babajaga-1 --gas-prices=0.0025uc4e --gas-adjustment 1.5 --gas auto -y 
```

Redelegate your stake to other validators

```sh
c4ed tx staking redelegate $(c4ed keys show wallet --bech val -a) TO_VALOPER_ADDRESS 1000000uc4e --from wallet --chain-id babajaga-1 --gas-prices=0.0025uc4e --gas-adjustment 1.5 --gas auto -y 
```

Unbond stake

```sh
c4ed tx staking unbond $(c4ed keys show wallet --bech val -a) 1000000uc4e --from wallet --chain-id babajaga-1 --gas-prices=0.0025uc4e --gas-adjustment 1.5 --gas auto -y 
```

Send tokens

```sh
c4ed tx bank send wallet TO_WALLET_ADDRESS 1000000uc4e --from wallet --chain-id babajaga-1 --gas-prices=0.0025uc4e --gas-adjustment 1.5 --gas auto -y 
```

### Governance

List all proposals

<pre class="language-sh"><code class="lang-sh"><strong>c4ed query gov proposals
</strong></code></pre>

Vote **YES / NO / ABSTAIN / NO\_WITH\_VETO**

```sh
c4ed tx gov vote 1 yes --from wallet --chain-id babajaga-1 --gas-prices=0.0025uc4e --gas-adjustment 1.5 --gas auto -y 
```

Create new text proposal

```sh
c4ed tx gov submit-proposal \
--title="Title" \
--description="Description" \
--deposit=100000000uc4e \
--type="Text" \
--from=wallet \
--gas-prices 0.0025uc4e\ 
--gas-adjustment 1.5 \
--gas auto \
-y 
```

### Utility

Set Indexer **NULL / KV**

```sh
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.c4e-chain/config/config.toml
```

Set Custom Port

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

Get Validator info

```sh
c4ed status 2>&1 | jq .ValidatorInfo
```

Get denom info

```sh
c4ed q bank denom-metadata -oj | jq
```

Get sync status

```sh
c4ed status 2>&1 | jq .SyncInfo.catching_up
```

Get latest height

```sh
c4ed status 2>&1 | jq .SyncInfo.latest_block_height
```

Reset Node

```sh
c4ed tendermint unsafe-reset-all --home $HOME/.c4e-chain --keep-addr-book
```

Delete Node

```sh
sudo systemctl stop c4ed && sudo systemctl disable c4ed && sudo rm /etc/systemd/system/c4ed.service && sudo systemctl daemon-reload && rm -rf $HOME/.c4e-chain && sudo rm -rf $(which c4ed) 
```

### Services Management

```sh
# Reload Service
sudo systemctl daemon-reload

# Enable Service
sudo systemctl enable c4ed

# Disable Service
sudo systemctl disable c4ed

# Start Service
sudo systemctl start c4ed

# Stop Service
sudo systemctl stop c4ed

# Restart Service
sudo systemctl restart c4ed

# Check Service Status
sudo systemctl status c4ed

# Check Service Logs
sudo journalctl -u c4ed -f --no-hostname -o cat
```


# Selfchain

<figure><img src="https://pbs.twimg.com/profile_images/1676089023797039104/twD1uiHk_400x400.jpg" alt="" width="188"><figcaption></figcaption></figure>

Self Chain Is User-Centric Decentralized Blockchain Network And Infrastructure That Serves As The Storage Medium For Countless Applications. Opening The Gateway To The Crypto World For A Wide Range Of Users.

***

## STAKE WITH INDONODE

***

### Links

[Website](https://selfchain.xyz/) | [Twitter](https://twitter.com/selfchainxyz) | [Discord](https://discord.gg/selfchainxyz)

***

<table data-full-width="false"><thead><tr><th>Version</th><th>Chain-id</th><th>Wasm</th><th data-hidden>WASM</th><th data-hidden>Chain-id</th></tr></thead><tbody><tr><td>0.2.2</td><td>self-dev-1</td><td>DISABLED</td><td>DISABLED</td><td>planq_7070-2</td></tr></tbody></table>

<details>

<summary>More Summary</summary>

* Binary Name : selfchaind
* Binary Home : $HOME/.selfchain
* Denom : uself
* Exponent : 6

</details>

Explorer : <https://explorer.indonode.net/selfchain-testnet>

Addrbook

```sh
curl -Ls https://snapshots.indonode.net/selfchain/addrbook.json > $HOME/.selfchain/config/addrbook.json
```

Endpoints

```sh
api.selfchain-t.indonode.net
```

```sh
rpc.selfchain-t.indonode.net
```

***


# Node Installation

<figure><img src="https://pbs.twimg.com/profile_images/1676089023797039104/twD1uiHk_400x400.jpg" alt="" width="188"><figcaption></figcaption></figure>

***

| Version | Chain-id   | Wasm     |
| ------- | ---------- | -------- |
| 0.2.2   | self-dev-1 | DISABLED |

### Setup Server

```shell
# Update Packages
sudo apt update && apt upgrade -y
sudo apt install curl git jq lz4 build-essential unzip fail2ban ufw -y

# Set Firewall
sudo apt install -y ufw
sudo ufw default allow outgoing
sudo ufw default deny incoming
sudo ufw allow ssh
sudo ufw allow 9100

# Enable Firewall
sudo ufw enable

# Install Go
ver="1.20"
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

# Install Cosmovisor (OPTIONAL If you are using Cosmovisor)
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@v1.5.0
```

### Node Installation

```sh
# Download and install binary
cd $HOME
wget https://snapshots.indonode.net/selfchain/selfchaind
sudo chmod +x selfchaind
sudo mv selfchaind /usr/local/bin


# Set Configuration for your node
selfchaind config chain-id self-dev-1
selfchaind config keyring-backend test


# Init your node
# You can change "MyNode" to anything you like
selfchaind init MyNode --chain-in self-dev-1


# Add Genesis File and Addrbook
wget -O $HOME/.selfchain/config/genesis.json  https://raw.githubusercontent.com/hotcrosscom/selfchain-genesis/main/networks/devnet/genesis.json
curl -Ls https://snapshots.indonode.net/selfchain/addrbook.json > $HOME/.selfchain/config/addrbook.json

#Configure Seeds and Peers
SEEDS="94a7baabb2bcc00c7b47cbaa58adf4f433df9599@157.230.119.165:26656,d3b5b6ca39c8c62152abbeac4669816166d96831@165.22.24.236:26656,35f478c534e2d58dc2c4acdf3eb22eeb6f23357f@165.232.125.66:26656"
PEERS="94a7baabb2bcc00c7b47cbaa58adf4f433df9599@157.230.119.165:26656,d3b5b6ca39c8c62152abbeac4669816166d96831@165.22.24.236:26656,35f478c534e2d58dc2c4acdf3eb22eeb6f23357f@165.232.125.66:26656"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.selfchain/config/config.toml



# Set Pruning, Enable Prometheus, Gas Prices, and Indexer
PRUNING="custom"
PRUNING_KEEP_RECENT="100"
PRUNING_INTERVAL="19"

sed -i -e "s/^pruning *=.*/pruning = \"$PRUNING\"/" $HOME/.selfchain/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \
\"$PRUNING_KEEP_RECENT\"/" $HOME/.selfchain/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \
\"$PRUNING_INTERVAL\"/" $HOME/.selfchain/config/app.toml
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.selfchain/config/config.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.selfchain/config/config.toml
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.005uself\"/" $HOME/.selfchain/config/app.toml


# Set Service file
sudo tee /etc/systemd/system/selfchaind.service > /dev/null <<EOF
[Unit]
Description=selfchaind testnet node
After=network-online.target
[Service]
User=$USER
ExecStart=$(which selfchaind) start
Restart=always
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable selfchaind

# Download Snapshot for fast sync
curl -L https://snapshots.indonode.net/selfchain/selfchain-latest.tar.lz4 | tar -Ilz4 -xf - -C $HOME/.selfchain
[[ -f $HOME/.selfchain/data/upgrade-info.json ]] && cp $HOME/.selfchain/data/upgrade-info.json $HOME/.selfchain/cosmovisor/genesis/upgrade-info.json

# Start the Node
sudo systemctl restart selfchaind
sudo journalctl -fu selfchaind -o cat
```


# Upgrade

<figure><img src="https://pbs.twimg.com/profile_images/1676089023797039104/twD1uiHk_400x400.jpg" alt="" width="188"><figcaption></figcaption></figure>

***

| Latest Version | Chain-id   | Wasm     |
| -------------- | ---------- | -------- |
| 0.2.2          | self-dev-1 | DISABLED |

### Upgrade Guide

{% tabs %}
{% tab title="Cosmovisor" %}

```sh
Upgrade not available
```

{% endtab %}

{% tab title="Binary" %}

```sh
Upgrade not available
```

{% endtab %}
{% endtabs %}


# CLI Cheatsheet

<figure><img src="https://pbs.twimg.com/profile_images/1676089023797039104/twD1uiHk_400x400.jpg" alt="" width="188"><figcaption></figcaption></figure>

### Key Management

Add new key

```
selfchaind keys add wallet
```

Recover existing key

```
selfchaind keys add wallet --recover
```

List All key

```
selfchaind keys list
```

Delete key

```
selfchaind keys delete wallet
```

Export Key (save to wallet.backup)

```
selfchaind keys export wallet
```

Import key

```
selfchaind keys import wallet wallet.backup
```

Query Wallet Balance

```
selfchaind q bank balances $(selfchaind keys show wallet -a)
```

### Validator Management

Create Validator

```sh
selfchaind tx staking create-validator \
  --amount 1000000uself \
  --pubkey $(selfchaind tendermint show-validator) \
  --moniker "MONIKER" \
  --identity="YOUR_KEYBASE_ID" \
  --details="YOUR_DETAILS" \
  --website="YOUR_WEBSITE_URL" \
  --chain-id self-dev-1 \
  --commission-rate="0.05" \
  --commission-max-rate="0.20" \
  --commission-max-change-rate="0.01" \
  --min-self-delegation "1" \
  --gas-prices="0.005uself" \
  --gas="auto" \
  --gas-adjustment="1.5" \
  --from wallet \
  -y
```

Edit Validator

```sh
selfchaind tx staking edit-validator \
--new-moniker="MONIKER" \
--identity="YOUR_KEYBASE_ID" \
--details="YOUR_DETAILS" \
--website="YOUR_WEBSITE_URL" \
--chain-id self-dev-1 \
--commission-rate=0.05 \
--gas-prices="0.005uself" \
--gas="auto" \
--gas-adjustment="1.5" \
--from wallet \
-y
```

Unjail Validator

```sh
selfchaind tx slashing unjail --from wallet --chain-id self-dev-1 --gas-prices=0.005uself --gas-adjustment 1.5 --gas auto -y 
```

Signing Info

```sh
selfchaind query slashing signing-info $(selfchaind tendermint show-validator) 
```

List all active validators

```sh
selfchaind 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 
```

List all inactive validators

```sh
selfchaind q staking validators -oj --limit=3000 | jq '.validators[] | select(.status=="BOND_STATUS_UNBONDED") or .status=="BOND_STATUS_UNBONDING")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " \t " + .description.moniker' | sort -gr | nl 
```

View validators details

```
selfchaind q staking validator $(selfchaind  keys show wallet --bech val -a) 
```

### Token Management

Withdraw rewards from all validators

```sh
selfchaind  tx distribution withdraw-all-rewards --from wallet --chain-id self-dev-1 --gas-prices=0.005uself --gas-adjustment 1.5 --gas auto -y 
```

Withdraw comission and rewards from your validator

```sh
selfchaind tx distribution withdraw-rewards $(selfchaind keys show wallet --bech val -a) --commission --from wallet --chain-id self-dev-1 --gas-prices=0.005uself --gas-adjustment 1.5 --gas auto -y 
```

Delegate to your validator

```sh
selfchaind tx staking delegate $(selfchaind keys show wallet --bech val -a) 1000000uself --from wallet --chain-id self-dev-1 --gas-prices=0.005uself --gas-adjustment 1.5 --gas auto -y 
```

Delegate to other

```sh
selfchaind tx staking delegate TO_VALOPER_ADDRESS 1000000uself --from wallet --chain-id self-dev-1 --gas-prices=0.005uself --gas-adjustment 1.5 --gas auto -y 
```

Redelegate your stake to other validators

```sh
selfchaind tx staking redelegate $(selfchaind keys show wallet --bech val -a) TO_VALOPER_ADDRESS 1000000uself --from wallet --chain-id self-dev-1 --gas-prices=0.005uself --gas-adjustment 1.5 --gas auto -y 
```

Unbond stake

```sh
selfchaind tx staking unbond $(selfchaind keys show wallet --bech val -a) 1000000uself --from wallet --chain-id self-dev-1 --gas-prices=0.005uself --gas-adjustment 1.5 --gas auto -y 
```

Send tokens

```sh
selfchaind tx bank send wallet TO_WALLET_ADDRESS 1000000uself --from wallet --chain-id self-dev-1 --gas-prices=0.005uself --gas-adjustment 1.5 --gas auto -y 
```

### Governance

List all proposals

<pre class="language-sh"><code class="lang-sh"><strong>selfchaind query gov proposals
</strong></code></pre>

Vote **YES / NO / ABSTAIN / NO\_WITH\_VETO**

```sh
selfchaind tx gov vote 1 yes --from wallet --chain-id self-dev-1 --gas-prices=0.005uself --gas-adjustment 1.5 --gas auto -y 
```

Create new text proposal

```sh
selfchaind tx gov submit-proposal \
--title="Title" \
--description="Description" \
--deposit=100000000uself \
--type="Text" \
--from=wallet \
--gas-prices 0.005uself\ 
--gas-adjustment 1.5 \
--gas auto \
-y 
```

### Utility

Set Indexer **NULL / KV**

```sh
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.selfchain/config/config.toml
```

Set Custom Port

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

Get Validator info

```sh
selfchaind status 2>&1 | jq .ValidatorInfo
```

Get denom info

```sh
selfchaind q bank denom-metadata -oj | jq
```

Get sync status

```sh
selfchaind status 2>&1 | jq .SyncInfo.catching_up
```

Get latest height

```sh
selfchaind status 2>&1 | jq .SyncInfo.latest_block_height
```

Reset Node

```sh
selfchaind tendermint unsafe-reset-all --home $HOME/.selfchain --keep-addr-book
```

Delete Node

```sh
sudo systemctl stop selfchaind && sudo systemctl disable selfchaind && sudo rm /etc/systemd/system/selfchaind.service && sudo systemctl daemon-reload && rm -rf $HOME/.selfchain && sudo rm -rf $(which selfchaind) 
```

### Services Management

```sh
# Reload Service
sudo systemctl daemon-reload

# Enable Service
sudo systemctl enable selfchaind

# Disable Service
sudo systemctl disable selfchaind

# Start Service
sudo systemctl start selfchaind

# Stop Service
sudo systemctl stop selfchaind

# Restart Service
sudo systemctl restart selfchaind

# Check Service Status
sudo systemctl status selfchaind

# Check Service Logs
sudo journalctl -u selfchaind -f --no-hostname -o cat
```


# Entangle

<figure><img src="https://pbs.twimg.com/profile_images/1524402382809231365/AeJ-i5f1_400x400.jpg" alt="" width="188"><figcaption></figcaption></figure>

Entangle Blockchain is built using the Cosmos SDK (includes IBC transferablity and EVM compatibility) featuring the Tendermint Core Consensus Algorithm for agreement between Validators.

The Entangle Blockchain is a highly specialized Oracle-centric Blockchain with the sole purpose of storing information for Entangle Distributed Oracle Solution and validating Oracle messages.

***

## STAKE WITH INDONODE

***

### Links

[Website](https://www.entangle.fi/) | [Twitter](https://twitter.com/Entanglefi) | [Discord](https://discord.gg/entanglefi)

***

<table data-full-width="false"><thead><tr><th>Version</th><th>Chain-id</th><th>Wasm</th><th data-hidden>WASM</th><th data-hidden>Chain-id</th></tr></thead><tbody><tr><td>1.0.1</td><td>entangle_33133-1</td><td>DISABLED</td><td>DISABLED</td><td>planq_7070-2</td></tr></tbody></table>

<details>

<summary>More Summary</summary>

* Binary Name : entangled
* Binary Home : $HOME/.entangled
* Denom : aNGL
* Exponent : 18

</details>

Addrbook

```sh
curl -Ls https://snapshots.indonode.net/entangle/addrbook.json > $HOME/.entangled/config/addrbook.json
```

Peer

```sh
PEERS="$(curl -sS https://rpc.entangle-t.indonode.net/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/.entangled/config/config.toml
```

***


# Node Installation

<figure><img src="https://pbs.twimg.com/profile_images/1524402382809231365/AeJ-i5f1_400x400.jpg" alt="" width="188"><figcaption></figcaption></figure>

***

| Version | Chain-id          | Wasm     |
| ------- | ----------------- | -------- |
| 1.0.1   | entangle\_33133-1 | DISABLED |

### Setup Server

```shell
# Update Packages
sudo apt update && apt upgrade -y
sudo apt install curl git jq lz4 build-essential unzip fail2ban ufw -y

# Set Firewall
sudo apt install -y ufw
sudo ufw default allow outgoing
sudo ufw default deny incoming
sudo ufw allow ssh
sudo ufw allow 9100

# Enable Firewall
sudo ufw enable

# Install Go
ver="1.19"
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

# Install Cosmovisor (OPTIONAL If you are using Cosmovisor)
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@v1.5.0
```

### Node Installation (Auto)

This Installer has Cosmovisor or Straight Binary Installation, with Custom port, and Snapshot Included

```sh
curl -o install.sh https://snapshots.indonode.net/entangle/install.sh && chmod +x install.sh && ./install.sh
```

### Node Installation

There is 2 ways to install node , using Cosmovisor or Run the binary directly, you can choose whats you prefer

{% tabs %}
{% tab title="Cosmovisor (Recommended)" %}
{% code fullWidth="true" %}

```sh
# Download and install binary
cd $HOME
rm -rf entangle-blockchain/
git clone https://github.com/Entangle-Protocol/entangle-blockchain
cd entangle-blockchain/
make build


# Setup Cosmovisor Symlinks
mkdir -p $HOME/.entangled/cosmovisor/genesis/bin
mv build/entangled $HOME/.entangled/cosmovisor/genesis/bin/
rm -rf build

sudo ln -s $HOME/.entangled/cosmovisor/genesis $HOME/.entangled/cosmovisor/current
sudo ln -s $HOME/.entangled/cosmovisor/current/bin/entangled /usr/local/bin/entangled


# Set Configuration for your node
entangled config chain-id entangle_33133-1
entangled config keyring-backend file


# Init your node
# You can change "MyNode" to anything you like
entangled init MyNode --chain-id entangle_33133-1


# Add Genesis File and Addrbook
curl -Ls https://snapshots.indonode.net/entangle/genesis.json > $HOME/.entangled/config/genesis.json
curl -Ls https://snapshots.indonode.net/entangle/addrbook.json > $HOME/.entangled/config/addrbook.json


#Configure Seeds and Peers
seed="76492a1356c14304bdd7ec946a6df0b57ba51fe2@35.175.80.14:26656"
sed -i.bak -e "s/^seed *=.*/seed = \"$seed\"/" ~/.entangled/config/config.toml
PEERS="94ab1432b3f3a4b81f7eb0e16e14924a805d8f05@65.109.154.182:15656,9ba119b1dd617efb02a55c5a2ba67e16872bccfa@65.108.206.74:30656,4c54c26655da3a4f6b25689ae1f8dd656e881990@162.19.69.193:26656,1fef0cad71ccb4a002dfbdd977af319fba0c3978@207.244.253.244:29656,4ae0f2c882a25414a8a24a5597c95f06f4115f07@144.76.236.211:23656,8de5ae99b036bbbde75cc7310e19b3723cff5bd8@95.111.246.208:26656,f61e642debaee9682c54f24a03bd33bf73e327eb@207.180.207.148:26656,af5dc63c90f7fa46c67ff75023b366d1e407ebe5@167.235.14.83:16656,07fc7facfcb7b0455589af95c11b09cfc05b617b@65.109.24.78:12656,41c30eaa97a917b1b7cb228da5dfada6f06040d1@5.189.183.119:26656,d644cf8da1054d893eaa5c4a2586875d1975c76a@213.239.217.52:33656,7c88b766c64af2afd69bb28920e27b28f02f42a6@95.217.114.120:16656,c2a885dae42a0eb2714d5aeb1d3f28115e2d8e9c@144.91.99.255:36656,9af19bfc29daf7e5535cf10d5f59c32406b69e05@213.133.100.172:27322,342c1851d3ad8cc72e41c965594a0a01f190d13c@65.108.229.93:25656,07577d39b32ecb7f8bd4a92cc9b03d4048758027@91.229.245.140:26656,a4138a69d236586b6d03269a8ffcf0f41d69a9b5@65.109.104.118:61556,a20f27e5dd1b373b4b19508277a735dae622d00b@139.59.40.82:26656,a6a6535a4bb72daa5420e215c42f31ae57ca4e90@65.108.72.253:29656,87459b2f952b7f71bfff3a97a0504c603f03d02f@65.21.139.155:51656";
sed -i -e "s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.entangled/config/config.toml

# Set Pruning, Enable Prometheus, Gas Price, and Indexer
PRUNING="custom"
PRUNING_KEEP_RECENT="100"
PRUNING_INTERVAL="19"

sed -i -e "s/^pruning *=.*/pruning = \"$PRUNING\"/" $HOME/.entangled/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \
\"$PRUNING_KEEP_RECENT\"/" $HOME/.entangled/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \
\"$PRUNING_INTERVAL\"/" $HOME/.entangled/config/app.toml
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.entangled/config/config.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.entangled/config/config.toml
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"10aNGL\"/" $HOME/.entangled/config/app.toml

# Set Service file
sudo tee /etc/systemd/system/entangled.service > /dev/null << EOF
[Unit]
Description=entangled testnet node service
After=network-online.target

[Service]
User=$USER
ExecStart=$(which cosmovisor) run start
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
Environment="DAEMON_HOME=$HOME/.entangled"
Environment="DAEMON_NAME=entangled"
Environment="UNSAFE_SKIP_BACKUP=true"

[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable entangled

# Download Latest Snapshot
curl -L https://snapshots.indonode.net/entangle/entangle-snapshot.tar.lz4 | tar -Ilz4 -xf - -C $HOME/.entangled
[[ -f $HOME/.entangled/data/upgrade-info.json ]] && cp $HOME/.entangled/data/upgrade-info.json $HOME/.entangled/cosmovisor/genesis/upgrade-info.json

# Start the Node
sudo systemctl restart entangled
sudo journalctl -fu entangled -o cat
```

{% endcode %}
{% endtab %}

{% tab title="Non-Cosmovisor" %}

```sh
# Download and install binary
cd $HOME
rm -rf entangle-blockchain/
git clone https://github.com/Entangle-Protocol/entangle-blockchain
cd entangle-blockchain/
make install


# Set Configuration for your node
entangled config chain-id entangle_33133-1
entangled config keyring-backend file


# Init your node
# You can change "MyNode" to anything you like
entangled init MyNode --chain-in entangle_33133-1


# Add Genesis File and Addrbook
curl -Ls https://snapshots.indonode.net/entangle/genesis.json > $HOME/.entangled/config/genesis.json
curl -Ls https://snapshots.indonode.net/entangle/addrbook.json > $HOME/.entangled/config/addrbook.json

#Configure Seeds and Peers
seed="76492a1356c14304bdd7ec946a6df0b57ba51fe2@35.175.80.14:26656"
sed -i.bak -e "s/^seed *=.*/seed = \"$seed\"/" ~/.entangled/config/config.toml


# Set Pruning, Enable Prometheus, Gas Prices, and Indexer
PRUNING="custom"
PRUNING_KEEP_RECENT="100"
PRUNING_INTERVAL="19"

sed -i -e "s/^pruning *=.*/pruning = \"$PRUNING\"/" $HOME/.entangled/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \
\"$PRUNING_KEEP_RECENT\"/" $HOME/.entangled/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \
\"$PRUNING_INTERVAL\"/" $HOME/.entangled/config/app.toml
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.entangled/config/config.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.entangled/config/config.toml
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"10aNGL\"/" $HOME/.entangled/config/app.toml

# Set Service file
sudo tee /etc/systemd/system/entangled.service > /dev/null <<EOF
[Unit]
Description=entangle testnet node
After=network-online.target
[Service]
User=$USER
ExecStart=$(which entangled) start
Restart=always
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable entangled

# Download Latest Snapshot
curl -L https://snapshots.indonode.net/entangle/entangle-snapshot.tar.lz4 | tar -Ilz4 -xf - -C $HOME/.entangled
[[ -f $HOME/.entangled/data/upgrade-info.json ]] && cp $HOME/.entangled/data/upgrade-info.json $HOME/.entangled/cosmovisor/genesis/upgrade-info.json

# Start the Node
sudo systemctl restart entangled
sudo journalctl -fu entangled -o cat
```

{% endtab %}
{% endtabs %}


# Snapshot

<figure><img src="https://pbs.twimg.com/profile_images/1524402382809231365/AeJ-i5f1_400x400.jpg" alt="" width="188"><figcaption></figcaption></figure>

***

| Latest Version | Chain-id          | Wasm     |
| -------------- | ----------------- | -------- |
| 1.0.1          | entangle\_33133-1 | DISABLED |

### Snapshot Guide

### Setup Server

```shell
# Install Necessary package
sudo apt update
sudo apt-get install snapd lz4 -y
```

```shell
# Stop the service and reset the data
sudo systemctl stop entangled
cp $HOME/.entangled/data/priv_validator_state.json $HOME/.entangled/priv_validator_state.json.backup
rm -rf $HOME/.entangled/data
```

```shell
# Download Latest Snapshot
curl -L https://snapshots.indonode.net/entangle/entangle-snapshot.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.entangled
mv $HOME/.entangled/priv_validator_state.json.backup $HOME/.entangled/data/priv_validator_state.json
```

```shell
# Restart Service
sudo systemctl restart entangled && sudo journalctl -fu entangled -o cat
```


# Upgrade

<figure><img src="https://pbs.twimg.com/profile_images/1524402382809231365/AeJ-i5f1_400x400.jpg" alt="" width="188"><figcaption></figcaption></figure>

***

| Latest Version | Chain-id          | Wasm     |
| -------------- | ----------------- | -------- |
| 1.0.1          | entangle\_33133-1 | DISABLED |

### Upgrade Guide

{% tabs %}
{% tab title="Cosmovisor" %}

```sh
Upgrade not available
```

{% endtab %}

{% tab title="Binary" %}

```sh
Upgrade not available
```

{% endtab %}
{% endtabs %}


# CLI Cheatsheet

<figure><img src="https://pbs.twimg.com/profile_images/1524402382809231365/AeJ-i5f1_400x400.jpg" alt="" width="188"><figcaption></figcaption></figure>

### Key Management

Add new key

```
entangled keys add wallet
```

Recover existing key

```
entangled keys add wallet --recover
```

List All key

```
entangled keys list
```

Delete key

```
entangled keys delete wallet
```

Export Key (save to wallet.backup)

```
entangled keys export wallet
```

Import key

```
entangled keys import wallet wallet.backup
```

Query Wallet Balance

```
entangled q bank balances $(entangled keys show wallet -a)
```

### Validator Management

Create Validator

```sh
entangled tx staking create-validator \
  --amount "1000000000000000000aNGL" \
  --pubkey $(entangled tendermint show-validator) \
  --moniker "MONIKER" \
  --identity "KEYBASE_ID" \
  --details "YOUR DETAILS" \
  --website "YOUR WEBSITE" \
  --chain-id entangle_33133-1 \
  --commission-rate "0.05" \
  --commission-max-rate "0.20" \
  --commission-max-change-rate "0.01" \
  --min-self-delegation "1" \
  --gas-prices "10aNGL" \
  --gas "500000" \
  --gas-adjustment "1.5" \
  --from wallet \
  -y

```

Edit Validator

```sh
entangled tx staking edit-validator \
--new-moniker="MONIKER" \
--identity="YOUR_KEYBASE_ID" \
--details="YOUR_DETAILS" \
--website="YOUR_WEBSITE_URL" \
--chain-id entangle_33133-1 \
--commission-rate=0.05 \
--gas-prices="10aNGL" \
--gas="auto" \
--gas-adjustment="1.5" \
--from wallet \
-y
```

Unjail Validator

```sh
entangled tx slashing unjail --from wallet --chain-id entangle_33133-1 --gas-prices=10aNGL --gas-adjustment 1.5 --gas "500000" -y 
```

Signing Info

```sh
entangled query slashing signing-info $(entangled tendermint show-validator) 
```

List all active validators

```sh
entangled 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 
```

List all inactive validators

```sh
entangled q staking validators -oj --limit=3000 | jq '.validators[] | select(.status=="BOND_STATUS_UNBONDED") or .status=="BOND_STATUS_UNBONDING")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " \t " + .description.moniker' | sort -gr | nl 
```

View validators details

```
entangled q staking validator $(entangled keys show wallet --bech val -a) 
```

### Token Management

Withdraw rewards from all validators

```sh
entangled tx distribution withdraw-all-rewards --from wallet --chain-id entangle_33133-1 --gas-prices=10aNGL --gas-adjustment 1.5 --gas "500000" -y 
```

Withdraw comission and rewards from your validator

```sh
entangled tx distribution withdraw-rewards $(entangled keys show wallet --bech val -a) --commission --from wallet --chain-id entangle_33133-1 --gas-prices=10aNGL --gas-adjustment 1.5 --gas "500000" -y 
```

Delegate to your validator

```sh
entangled tx staking delegate $(entangled keys show wallet --bech val -a) 1000000aNGL --from wallet --chain-id entangle_33133-1 --gas-prices=10aNGL --gas-adjustment 1.5 --gas "500000" -y 
```

Delegate to other

```sh
c4ed tx staking delegate TO_VALOPER_ADDRESS 1000000aNGL --from wallet --chain-id entangle_33133-1 --gas-prices=10aNGL --gas-adjustment 1.5 --gas "500000" -y 
```

Redelegate your stake to other validators

```sh
entangled tx staking redelegate $(entangled keys show wallet --bech val -a) TO_VALOPER_ADDRESS 1000000aNGL --from wallet --chain-id entangle_33133-1 --gas-prices=10aNGL --gas-adjustment 1.5 --gas "500000" -y 
```

Unbond stake

```sh
entangled tx staking unbond $(entangled keys show wallet --bech val -a) 1000000aNGL --from wallet --chain-id entangle_33133-1 --gas-prices=10aNGL --gas-adjustment 1.5 --gas "500000" -y 
```

Send tokens

```sh
entangled tx bank send wallet TO_WALLET_ADDRESS 1000000aNGL --from wallet --chain-id entangle_33133-1 --gas-prices=10aNGL --gas-adjustment 1.5 --gas "500000" -y 
```

### Governance

List all proposals

<pre class="language-sh"><code class="lang-sh"><strong>entangled query gov proposals
</strong></code></pre>

Vote **YES / NO / ABSTAIN / NO\_WITH\_VETO**

```sh
entangled tx gov vote 1 yes --from wallet --chain-id entangle_33133-1 --gas-prices=10aNGL --gas-adjustment 1.5 --gas "500000" -y 
```

Create new text proposal

```sh
entangled tx gov submit-proposal \
--title="Title" \
--description="Description" \
--deposit=100000000aNGL \
--type="Text" \
--from=wallet \
--gas-prices 10aNGL\ 
--gas-adjustment 1.5 \
--gas "500000" \
-y 
```

### Utility

Set Indexer **NULL / KV**

```sh
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.entangled /config/config.toml
```

Set Custom Port

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

Get Validator info

```sh
entangled status 2>&1 | jq .ValidatorInfo
```

Get denom info

```sh
entangled q bank denom-metadata -oj | jq
```

Get sync status

```sh
entangled status 2>&1 | jq .SyncInfo.catching_up
```

Get latest height

```sh
entangled status 2>&1 | jq .SyncInfo.latest_block_height
```

Reset Node

```sh
entangled tendermint unsafe-reset-all --home $HOME/.entangled --keep-addr-book
```

Delete Node

```sh
sudo systemctl stop entangled && sudo systemctl disable entangled && sudo rm /etc/systemd/system/entangled.service && sudo systemctl daemon-reload && rm -rf $HOME/.entangled && sudo rm -rf $(which entangled) 
```

### Services Management

```sh
# Reload Service
sudo systemctl daemon-reload

# Enable Service
sudo systemctl enable entangled

# Disable Service
sudo systemctl disable entangled

# Start Service
sudo systemctl start entangled

# Stop Service
sudo systemctl stop entangled

# Restart Service
sudo systemctl restart entangled

# Check Service Status
sudo systemctl status entangled

# Check Service Logs
sudo journalctl -u entangled -f --no-hostname -o cat
```


# Mantra

<figure><img src="https://explorer.indonode.net/logos/mantra.jpg" alt="" width="188"><figcaption></figcaption></figure>

MANTRA Chain provides permissionless ability to build Web3 applications on a high-performance, scalable blockchain architecture combined with the toolkit to build regulated, compliant and permissioned applications.

***

## [STAKE WITH INDONODE](https://explorer.indonode.net/mantra-testnet/staking/mantravaloper1my33mltwrskg8jgvfpjagz8pu3tsgks7cxt3n7)

***

### Links

[Website](https://mantrachain.io/) | [Twitter](https://twitter.com/MANTRA_Chain) | [Discord](https://discord.gg/2RPywgGx)

***

| Version | Chain-id              | Wasm    |
| ------- | --------------------- | ------- |
|         | mantrachain-testnet-1 | ENABLED |

<details>

<summary>More Summary</summary>

* Binary Name : mantrachaind
* Binary Home : $HOME/.mantrachain
* Denom : uaum
* Exponent : 6

</details>

Addrbook

```sh
curl -Ls https://snapshots.indonode.net/mantra/addrbook.json > $HOME/.mantrachain/config/addrbook.json
```

***


# Node Installation

<figure><img src="https://explorer.indonode.net/logos/mantra.jpg" alt="" width="188"><figcaption></figcaption></figure>

***

| Version | Chain-id              | Wasm    |
| ------- | --------------------- | ------- |
|         | mantrachain-testnet-1 | ENABLED |

### Setup Server

```shell
# Update Packages
sudo apt update && apt upgrade -y
sudo apt install curl git jq lz4 build-essential unzip fail2ban ufw -y

# Set Firewall
sudo apt install -y ufw
sudo ufw default allow outgoing
sudo ufw default deny incoming
sudo ufw allow ssh
sudo ufw allow 9100

# Enable Firewall
sudo ufw enable

# Install Go
ver="1.20.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

# Install Cosmovisor (OPTIONAL If you are using Cosmovisor)
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@v1.5.0

# Install CosmWasm Library
sudo wget -P /usr/lib https://github.com/CosmWasm/wasmvm/releases/download/v1.3.0/libwasmvm.x86_64.so
```

### Node Installation

There is 2 ways to install node , using Cosmovisor or Run the binary directly, you can choose whats you prefer

{% tabs %}
{% tab title="Cosmovisor (Recommended)" %}
{% code fullWidth="true" %}

```sh
# Download and install binary
cd $HOME
wget https://snapshots.indonode.net/mantra/mantrachaind
sudo chmod +x mantrachaind


# Setup Cosmovisor Symlinks
mkdir -p $HOME/.mantrachain/cosmovisor/genesis/bin
mv mantrachaind $HOME/.mantrachain/cosmovisor/genesis/bin/

sudo ln -s $HOME/.mantrachain/cosmovisor/genesis $HOME/.mantrachain/cosmovisor/current
sudo ln -s $HOME/.mantrachain/cosmovisor/current/bin/mantrachaind /usr/local/bin/mantrachaind


# Set Configuration for your node
mantrachaind config chain-id mantrachain-testnet-1
mantrachaind config keyring-backend test


# Init your node
# You can change "MyNode" to anything you like
mantrachaind init MyNode --chain-id mantrachain-testnet-1


# Add Genesis File and Addrbook
curl -Ls https://snapshots.indonode.net/mantra/genesis.json > $HOME/.mantrachain/config/genesis.json
curl -Ls https://snapshots.indonode.net/mantra/addrbook.json > $HOME/.mantrachain/config/addrbook.json


#Configure Seeds and Peers
PEERS="$(curl -sS https://rpc.mantra-t.indonode.net/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/.mantrachain/config/config.toml

# Set Pruning, Enable Prometheus, Gas Price, and Indexer
PRUNING="custom"
PRUNING_KEEP_RECENT="100"
PRUNING_INTERVAL="19"

sed -i -e "s/^pruning *=.*/pruning = \"$PRUNING\"/" $HOME/.mantrachain/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \
\"$PRUNING_KEEP_RECENT\"/" $HOME/.mantrachain/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \
\"$PRUNING_INTERVAL\"/" $HOME/.mantrachain/config/app.toml
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.mantrachain/config/config.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.mantrachain/config/config.toml
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0uaum\"/" $HOME/.mantrachain/config/app.toml

# Set Service file
sudo tee /etc/systemd/system/mantrachaind.service > /dev/null << EOF
[Unit]
Description=mantrachaind testnet node service
After=network-online.target

[Service]
User=$USER
ExecStart=$(which cosmovisor) run start
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
Environment="DAEMON_HOME=$HOME/.mantrachain"
Environment="DAEMON_NAME=mantrachaind"
Environment="UNSAFE_SKIP_BACKUP=true"

[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable mantrachaind

# Download Latest Snapshot
curl -L https://snapshots.indonode.net/mantra/mantra-snapshot.tar.lz4 | tar -Ilz4 -xf - -C $HOME/.mantrachain
[[ -f $HOME/.mantrachain/data/upgrade-info.json ]] && cp $HOME/.mantrachain/data/upgrade-info.json $HOME/.mantrachain/cosmovisor/genesis/upgrade-info.json

# Start the Node
sudo systemctl restart mantrachaind
sudo journalctl -fu mantrachaind -o cat
```

{% endcode %}
{% endtab %}

{% tab title="Non-Cosmovisor" %}

```sh
# Download and install binary
cd $HOME
wget https://snapshots.indonode.net/mantra/mantrachaind
sudo chmod +x mantrachaind
sudo mv mantrachaind /usr/local/bin


# Set Configuration for your node
mantrachaind config chain-id mantrachain-testnet-1
mantrachaind config keyring-backend test


# Init your node
# You can change "MyNode" to anything you like
mantrachaind init MyNode --chain-in mantrachain-testnet-1


# Add Genesis File and Addrbook
curl -Ls https://snapshots.indonode.com/mantra/genesis.json > $HOME/.mantrachain/config/genesis.json
curl -Ls https://snapshots.indonode.com/mantra/addrbook.json > $HOME/.mantrachain/config/addrbook.json


#Configure Seeds and Peers
PEERS="$(curl -sS https://rpc.mantra-t.indonode.net/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/.mantrachain/config/config.toml


# Set Pruning, Enable Prometheus, Gas Prices, and Indexer
PRUNING="custom"
PRUNING_KEEP_RECENT="100"
PRUNING_INTERVAL="19"

sed -i -e "s/^pruning *=.*/pruning = \"$PRUNING\"/" $HOME/.mantrachain/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \
\"$PRUNING_KEEP_RECENT\"/" $HOME/.mantrachain/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \
\"$PRUNING_INTERVAL\"/" $HOME/.mantrachain/config/app.toml
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.mantrachain/config/config.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.mantrachain/config/config.toml
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0uaum\"/" $HOME/.mantrachain/config/app.toml

# Set Service file
sudo tee /etc/systemd/system/mantrachaind.service > /dev/null <<EOF
[Unit]
Description=entangle testnet node
After=network-online.target
[Service]
User=$USER
ExecStart=$(which mantrachaind) start
Restart=always
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable mantrachaind

# Download Latest Snapshot
curl -L https://snapshots.indonode.net/mantra/mantra-snapshot.tar.lz4 | tar -Ilz4 -xf - -C $HOME/.mantrachain
[[ -f $HOME/.mantrachain/data/upgrade-info.json ]] && cp $HOME/.mantrachain/data/upgrade-info.json $HOME/.mantrachain/cosmovisor/genesis/upgrade-info.json

# Start the Node
sudo systemctl restart mantrachaind
sudo journalctl -fu mantrachaind -o cat
```

{% endtab %}
{% endtabs %}


# Snapshot

<figure><img src="https://explorer.indonode.net/logos/mantra.jpg" alt="" width="188"><figcaption></figcaption></figure>

***

| Version | Chain-id      | Wasm    |
| ------- | ------------- | ------- |
|         | mantrachain-1 | ENABLED |

### Snapshot Guide

### Setup Server

```shell
# Install Necessary package
sudo apt update
sudo apt-get install snapd lz4 -y
```

```shell
# Stop the service and reset the data
sudo systemctl stop mantrachaind
cp $HOME/.mantrachain/data/priv_validator_state.json $HOME/.mantrachain/priv_validator_state.json.backup
rm -rf $HOME/.mantrachain/data
```

```shell
# Download Latest Snapshot
curl -L https://snapshots.indonode.net/mantra/mantra-snapshot.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.mantrachain
mv $HOME/.mantrachain/priv_validator_state.json.backup $HOME/.mantrachain/data/priv_validator_state.json
```

```shell
# Restart Service
sudo systemctl restart mantrachaind && sudo journalctl -fu mantrachaind -o cat
```


# Upgrade

<figure><img src="https://explorer.indonode.net/logos/mantra.jpg" alt="" width="188"><figcaption></figcaption></figure>

***

| Version | Chain-id              | Wasm    |
| ------- | --------------------- | ------- |
|         | mantrachain-testnet-1 | ENABLED |

### Upgrade Guide

{% tabs %}
{% tab title="Cosmovisor" %}

```sh
Upgrade not available
```

{% endtab %}

{% tab title="Binary" %}

```sh
Upgrade not available
```

{% endtab %}
{% endtabs %}


# CLI Cheatsheet

<figure><img src="https://explorer.indonode.net/logos/mantra.jpg" alt="" width="188"><figcaption></figcaption></figure>

### Key Management

Add new key

```
mantrachaind keys add wallet
```

Recover existing key

```
mantrachaind keys add wallet --recover
```

List All key

```
mantrachaind keys list
```

Delete key

```
mantrachaind keys delete wallet
```

Export Key (save to wallet.backup)

```
mantrachaind keys export wallet
```

Import key

```
mantrachaind keys import wallet wallet.backup
```

Query Wallet Balance

```
mantrachaind q bank balances $(mantrachaind keys show wallet -a)
```

### Validator Management

Create Validator

```sh
mantrachaind tx staking create-validator \
  --amount "1000000uaum" \
  --pubkey $(mantrachaind tendermint show-validator) \
  --moniker "MONIKER" \
  --identity "KEYBASE_ID" \
  --details "YOUR DETAILS" \
  --website "YOUR WEBSITE" \
  --chain-id mantrachain-testnet-1 \
  --commission-rate "0.05" \
  --commission-max-rate "0.20" \
  --commission-max-change-rate "0.01" \
  --min-self-delegation "1" \
  --fees 50uaum \
  --gas "auto" \
  --gas-adjustment "1.5" \
  --from wallet \
  -y

```

Edit Validator

```sh
mantrachaind tx staking edit-validator \
--new-moniker="MONIKER" \
--identity="YOUR_KEYBASE_ID" \
--details="YOUR_DETAILS" \
--website="YOUR_WEBSITE_URL" \
--chain-id mantrachain-testnet-1 \
--commission-rate=0.05 \
--fees 50uaum \
--gas="auto" \
--gas-adjustment="1.5" \
--from wallet \
-y
```

Unjail Validator

```sh
mantrachaind tx slashing unjail --from wallet --chain-id mantrachain-testnet-1 --fees 50uaum --gas-adjustment 1.5 --gas "auto" -y 
```

Signing Info

```sh
mantrachaind query slashing signing-info $(mantrachaind tendermint show-validator) 
```

List all active validators

```sh
mantrachaind 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 
```

List all inactive validators

```sh
mantrachaind q staking validators -oj --limit=3000 | jq '.validators[] | select(.status=="BOND_STATUS_UNBONDED") or .status=="BOND_STATUS_UNBONDING")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " \t " + .description.moniker' | sort -gr | nl 
```

View validators details

```
mantrachaind q staking validator $(mantrachaind keys show wallet --bech val -a) 
```

### Token Management

Withdraw rewards from all validators

```sh
mantrachaind tx distribution withdraw-all-rewards --from wallet --chain-id mantrachain-testnet-1 --fees 50uaum --gas-adjustment 1.5 --gas "auto" -y 
```

Withdraw comission and rewards from your validator

```sh
mantrachaind tx distribution withdraw-rewards $(mantrachaind keys show wallet --bech val -a) --commission --from wallet --chain-id mantrachain-testnet-1 --fees 50uaum --gas-adjustment 1.5 --gas "auto" -y 
```

Delegate to your validator

```sh
mantrachaind tx staking delegate $(mantrachaind keys show wallet --bech val -a) 1000000uaum --from wallet --chain-id mantrachain-testnet-1 --fees 50uaum --gas-adjustment 1.5 --gas "auto" -y 
```

Delegate to other

```sh
c4ed tx staking delegate TO_VALOPER_ADDRESS 1000000uaum --from wallet --chain-id mantrachain-testnet-1 --fees 50uaum --gas-adjustment 1.5 --gas "auto" -y 
```

Redelegate your stake to other validators

```sh
mantrachaind tx staking redelegate $(mantrachaind keys show wallet --bech val -a) TO_VALOPER_ADDRESS 1000000uaum --from wallet --chain-id mantrachain-testnet-1 --fees 50uaum --gas-adjustment 1.5 --gas "auto" -y 
```

Unbond stake

```sh
mantrachaind tx staking unbond $(mantrachaind keys show wallet --bech val -a) 1000000uaum --from wallet --chain-id mantrachain-testnet-1 --fees 50uaum --gas-adjustment 1.5 --gas "auto" -y 
```

Send tokens

```sh
mantrachaind tx bank send wallet TO_WALLET_ADDRESS 1000000uaum --from wallet --chain-id mantrachain-testnet-1 --fees 50uaum --gas-adjustment 1.5 --gas "auto" -y 
```

### Governance

List all proposals

<pre class="language-sh"><code class="lang-sh"><strong>mantrachaind query gov proposals
</strong></code></pre>

Vote **YES / NO / ABSTAIN / NO\_WITH\_VETO**

```sh
mantrachaind tx gov vote 1 yes --from wallet --chain-id mantrachain-testnet-1 --fees 50uaum --gas-adjustment 1.5 --gas "auto" -y 
```

Create new text proposal

```sh
mantrachaind tx gov submit-proposal \
--title="Title" \
--description="Description" \
--deposit=100000000uaum \
--type="Text" \
--from=wallet \
--fees 50uaum\ 
--gas-adjustment 1.5 \
--gas "auto" \
-y 
```

### Utility

Set Indexer **NULL / KV**

```sh
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.mantrachain /config/config.toml
```

Set Custom Port

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

Get Validator info

```sh
mantrachaind status 2>&1 | jq .ValidatorInfo
```

Get denom info

```sh
mantrachaind q bank denom-metadata -oj | jq
```

Get sync status

```sh
mantrachaind status 2>&1 | jq .SyncInfo.catching_up
```

Get latest height

```sh
mantrachaind status 2>&1 | jq .SyncInfo.latest_block_height
```

Reset Node

```sh
mantrachaind tendermint unsafe-reset-all --home $HOME/.mantrachain --keep-addr-book
```

Delete Node

```sh
sudo systemctl stop mantrachaind && sudo systemctl disable mantrachaind && sudo rm /etc/systemd/system/mantrachaind.service && sudo systemctl daemon-reload && rm -rf $HOME/.mantrachain && sudo rm -rf $(which mantrachaind) 
```

### Services Management

```sh
# Reload Service
sudo systemctl daemon-reload

# Enable Service
sudo systemctl enable mantrachaind

# Disable Service
sudo systemctl disable mantrachaind

# Start Service
sudo systemctl start mantrachaind

# Stop Service
sudo systemctl stop mantrachaind

# Restart Service
sudo systemctl restart mantrachaind

# Check Service Status
sudo systemctl status mantrachaind

# Check Service Logs
sudo journalctl -u mantrachaind -f --no-hostname -o cat
```


# Entrypoint

<figure><img src="https://pbs.twimg.com/profile_images/1655541754274119680/jPwIFpXf_400x400.png" alt="" width="188"><figcaption></figcaption></figure>

EntryPoint is a sovereign, governance-driven Cosmos SDK blockchain dedicated towards providing trust-minimised portfolio management and single-point access to tokenised markets, offering broadly diversified indexes to alleviate users of technical barriers and time-consuming due diligence. EntryPoint indexes are stored in non-custodial vaults, managed by on-chain governance, and represented by fully-collateralised and composable index tokens.

***

## STAKE WITH INDONODE

***

### Links

[Website](https://entrypoint.zone) | [Twitter](https://twitter.com/entrypointzone) | [Discord](https://discord.gg/6Ec9jDwVnB)

***

<table data-full-width="false"><thead><tr><th>Version</th><th>Chain-id</th><th>Wasm</th><th data-hidden>WASM</th><th data-hidden>Chain-id</th></tr></thead><tbody><tr><td>0.2.2</td><td>self-dev-1</td><td>DISABLED</td><td>DISABLED</td><td>planq_7070-2</td></tr></tbody></table>

<details>

<summary>More Summary</summary>

* Binary Name : entrypointd
* Binary Home : $HOME/.entrypoint
* Denom : uentry
* Exponent : 6

</details>

Explorer : <https://explorer.indonode.net/entrypoint-testnet>

Addrbook

```sh
curl -Ls https://snapshots.indonode.net/entrypoint/addrbook.json > $HOME/.entrypoint/config/addrbook.json
```

Endpoints

```sh
api.entrypoint-t.indonode.net
```

```sh
rpc.entrypoint-t.indonode.net
```

***


# Node Installation

<figure><img src="https://pbs.twimg.com/profile_images/1655541754274119680/jPwIFpXf_400x400.png" alt="" width="188"><figcaption></figcaption></figure>

***

| Version | Chain-id             |
| ------- | -------------------- |
| v1.2.0  | entrypoint-pubtest-2 |

### Setup Server

```shell
# Update Packages
sudo apt update && apt upgrade -y
sudo apt install curl git jq lz4 build-essential unzip fail2ban ufw -y

# Set Firewall
sudo apt install -y ufw
sudo ufw default allow outgoing
sudo ufw default deny incoming
sudo ufw allow ssh
sudo ufw allow 9100

# Enable Firewall
sudo ufw enable

# Install Go
ver="1.20"
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

# Install Cosmovisor (OPTIONAL If you are using Cosmovisor)
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@v1.5.0
```

### Node Installation

```sh
# Download and install binary
cd $HOME
wget https://github.com/entrypoint-zone/testnets/releases/download/v1.2.0/entrypointd-1.2.0-linux-amd64 -O entrypointd
sudo chmod +x entrypointd
sudo mv entrypointd /usr/local/bin


# Set Configuration for your node
entrypointd config chain-id entrypoint-pubtest-2
entrypointd config keyring-backend test


# Init your node
# You can change "MyNode" to anything you like
entrypointd init MyNode --chain-in entrypoint-pubtest-2


# Add Genesis File and Addrbook
curl -Ls https://snapshots.indonode.net/entrypoint/genesis.json > $HOME/.entrypoint/config/genesis.json
curl -Ls https://snapshots.indonode.net/entrypoint/addrbook.json > $HOME/.entrypoint/config/addrbook.json

#Configure Seeds and Peers
PEERS="$(curl -sS https://rpc.entrypoint-t.indonode.net/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/.entrypoint/config/config.toml


# Set Pruning, Enable Prometheus, Gas Prices, and Indexer
PRUNING="custom"
PRUNING_KEEP_RECENT="100"
PRUNING_INTERVAL="19"

sed -i -e "s/^pruning *=.*/pruning = \"$PRUNING\"/" $HOME/.entrypoint/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \
\"$PRUNING_KEEP_RECENT\"/" $HOME/.entrypoint/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \
\"$PRUNING_INTERVAL\"/" $HOME/.entrypoint/config/app.toml
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.entrypoint/config/config.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.entrypoint/config/config.toml
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0.01ibc/8A138BC76D0FB2665F8937EC2BF01B9F6A714F6127221A0E155106A45E09BCC5\"|" $HOME/.entrypoint/config/app.toml


# Set Service file
sudo tee /etc/systemd/system/entrypointd.service > /dev/null <<EOF
[Unit]
Description=entrypointd testnet node
After=network-online.target
[Service]
User=$USER
ExecStart=$(which entrypointd) start
Restart=always
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable entrypointd

# Download Snapshot for fast sync
curl -L https://snapshots.indonode.net/entrypoint/entrypoint-latest.tar.lz4 | tar -Ilz4 -xf - -C $HOME/.entrypoint
[[ -f $HOME/.entrypoint/data/upgrade-info.json ]] && cp $HOME/.entrypoint/data/upgrade-info.json $HOME/.entrypoint/cosmovisor/genesis/upgrade-info.json

# Start the Node
sudo systemctl restart entrypointd
sudo journalctl -fu entrypointd -o cat
```


# Snapshot

<figure><img src="https://pbs.twimg.com/profile_images/1655541754274119680/jPwIFpXf_400x400.png" alt="" width="188"><figcaption></figcaption></figure>

***

| Version | Chain-id             |
| ------- | -------------------- |
| v1.2.0  | entrypoint-pubtest-2 |

### Snapshot Guide

### Setup Server

```shell
# Install Necessary package
sudo apt update
sudo apt-get install snapd lz4 -y
```

```shell
# Stop the service and reset the data
sudo systemctl stop entrypointd
cp $HOME/.entrypoint/data/priv_validator_state.json $HOME/.entrypoint/priv_validator_state.json.backup
rm -rf $HOME/.entrypoint/data
```

```shell
# Download Latest Snapshot
curl -L https://snapshots.indonode.net/entrypoint/entrypoint-latest.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.entrypoint
mv $HOME/.entrypoint/priv_validator_state.json.backup $HOME/.entrypoint/data/priv_validator_state.json
```

```shell
# Restart Service
sudo systemctl restart entrypointd && sudo journalctl -fu entrypointd -o cat
```


# Statesync


# Upgrade

<figure><img src="https://pbs.twimg.com/profile_images/1655541754274119680/jPwIFpXf_400x400.png" alt="" width="188"><figcaption></figcaption></figure>

***

| Version | Chain-id             |
| ------- | -------------------- |
| v1.2.0  | entrypoint-pubtest-2 |

### Upgrade Guide

{% tabs %}
{% tab title="Cosmovisor" %}

```sh
Upgrade not available
```

{% endtab %}

{% tab title="Binary" %}

```sh
Upgrade not available
```

{% endtab %}
{% endtabs %}


# CLI Cheatsheet

<figure><img src="https://pbs.twimg.com/profile_images/1655541754274119680/jPwIFpXf_400x400.png" alt="" width="188"><figcaption></figcaption></figure>

### Key Management

Add new key

```
entrypointd keys add wallet
```

Recover existing key

```
entrypointd keys add wallet --recover
```

List All key

```
entrypointd keys list
```

Delete key

```
entrypointd keys delete wallet
```

Export Key (save to wallet.backup)

```
entrypointd keys export wallet
```

Import key

```
entrypointd keys import wallet wallet.backup
```

Query Wallet Balance

```
entrypointd q bank balances $(entrypointd keys show wallet -a)
```

### Validator Management

Create Validator

```sh
entrypointd tx staking create-validator \
  --amount 1000000uentry \
  --pubkey $(entrypointd tendermint show-validator) \
  --moniker "MONIKER" \
  --identity="YOUR_KEYBASE_ID" \
  --details="YOUR_DETAILS" \
  --website="YOUR_WEBSITE_URL" \
  --chain-id entrypoint-pubtest-2 \
  --commission-rate="0.05" \
  --commission-max-rate="0.20" \
  --commission-max-change-rate="0.01" \
  --min-self-delegation "1" \
  --gas-prices="0.01ibc/8A138BC76D0FB2665F8937EC2BF01B9F6A714F6127221A0E155106A45E09BCC5" \
  --gas="auto" \
  --gas-adjustment="1.5" \
  --from wallet \
  -y
```

Edit Validator

```sh
entrypointd tx staking edit-validator \
--new-moniker="MONIKER" \
--identity="YOUR_KEYBASE_ID" \
--details="YOUR_DETAILS" \
--website="YOUR_WEBSITE_URL" \
--chain-id entrypoint-pubtest-2 \
--commission-rate=0.05 \
--gas-prices="0.01ibc/8A138BC76D0FB2665F8937EC2BF01B9F6A714F6127221A0E155106A45E09BCC5" \
--gas="auto" \
--gas-adjustment="1.5" \
--from wallet \
-y
```

Unjail Validator

```sh
entrypointd tx slashing unjail --from wallet --chain-id entrypoint-pubtest-2 --gas-prices=0.01ibc/8A138BC76D0FB2665F8937EC2BF01B9F6A714F6127221A0E155106A45E09BCC5 --gas-adjustment 1.5 --gas auto -y 
```

Signing Info

```sh
entrypointd query slashing signing-info $(entrypointd tendermint show-validator) 
```

List all active validators

```sh
entrypointd 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 
```

List all inactive validators

```sh
entrypointd q staking validators -oj --limit=3000 | jq '.validators[] | select(.status=="BOND_STATUS_UNBONDED") or .status=="BOND_STATUS_UNBONDING")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " \t " + .description.moniker' | sort -gr | nl 
```

View validators details

```
entrypointd q staking validator $(entrypointd  keys show wallet --bech val -a) 
```

### Token Management

Withdraw rewards from all validators

```sh
entrypointd  tx distribution withdraw-all-rewards --from wallet --chain-id entrypoint-pubtest-2 --gas-prices=0.01ibc/8A138BC76D0FB2665F8937EC2BF01B9F6A714F6127221A0E155106A45E09BCC5 --gas-adjustment 1.5 --gas auto -y 
```

Withdraw comission and rewards from your validator

```sh
entrypointd tx distribution withdraw-rewards $(entrypointd keys show wallet --bech val -a) --commission --from wallet --chain-id entrypoint-pubtest-2 --gas-prices=0.01ibc/8A138BC76D0FB2665F8937EC2BF01B9F6A714F6127221A0E155106A45E09BCC5 --gas-adjustment 1.5 --gas auto -y 
```

Delegate to your validator

```sh
entrypointd tx staking delegate $(entrypointd keys show wallet --bech val -a) 1000000uentry --from wallet --chain-id entrypoint-pubtest-2 --gas-prices=0.01ibc/8A138BC76D0FB2665F8937EC2BF01B9F6A714F6127221A0E155106A45E09BCC5 --gas-adjustment 1.5 --gas auto -y 
```

Delegate to other

```sh
entrypointd tx staking delegate TO_VALOPER_ADDRESS 1000000uentry --from wallet --chain-id entrypoint-pubtest-2 --gas-prices=0.01ibc/8A138BC76D0FB2665F8937EC2BF01B9F6A714F6127221A0E155106A45E09BCC5 --gas-adjustment 1.5 --gas auto -y 
```

Redelegate your stake to other validators

```sh
entrypointd tx staking redelegate $(entrypointd keys show wallet --bech val -a) TO_VALOPER_ADDRESS 1000000uentry --from wallet --chain-id entrypoint-pubtest-2 --gas-prices=0.01ibc/8A138BC76D0FB2665F8937EC2BF01B9F6A714F6127221A0E155106A45E09BCC5 --gas-adjustment 1.5 --gas auto -y 
```

Unbond stake

```sh
entrypointd tx staking unbond $(entrypointd keys show wallet --bech val -a) 1000000uentry --from wallet --chain-id entrypoint-pubtest-2 --gas-prices=0.01ibc/8A138BC76D0FB2665F8937EC2BF01B9F6A714F6127221A0E155106A45E09BCC5 --gas-adjustment 1.5 --gas auto -y 
```

Send tokens

```sh
entrypointd tx bank send wallet TO_WALLET_ADDRESS 1000000uentry --from wallet --chain-id entrypoint-pubtest-2 --gas-prices=0.01ibc/8A138BC76D0FB2665F8937EC2BF01B9F6A714F6127221A0E155106A45E09BCC5 --gas-adjustment 1.5 --gas auto -y 
```

### Governance

List all proposals

<pre class="language-sh"><code class="lang-sh"><strong>entrypointd query gov proposals
</strong></code></pre>

Vote **YES / NO / ABSTAIN / NO\_WITH\_VETO**

```sh
entrypointd tx gov vote 1 yes --from wallet --chain-id entrypoint-pubtest-2 --gas-prices=0.01ibc/8A138BC76D0FB2665F8937EC2BF01B9F6A714F6127221A0E155106A45E09BCC5 --gas-adjustment 1.5 --gas auto -y 
```

Create new text proposal

```sh
entrypointd tx gov submit-proposal \
--title="Title" \
--description="Description" \
--deposit=100000000uentry \
--type="Text" \
--from=wallet \
--gas-prices 0.01ibc/8A138BC76D0FB2665F8937EC2BF01B9F6A714F6127221A0E155106A45E09BCC5\ 
--gas-adjustment 1.5 \
--gas auto \
-y 
```

### Utility

Set Indexer **NULL / KV**

```sh
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.entrypoint/config/config.toml
```

Set Custom Port

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

Get Validator info

```sh
entrypointd status 2>&1 | jq .ValidatorInfo
```

Get denom info

```sh
entrypointd q bank denom-metadata -oj | jq
```

Get sync status

```sh
entrypointd status 2>&1 | jq .SyncInfo.catching_up
```

Get latest height

```sh
entrypointd status 2>&1 | jq .SyncInfo.latest_block_height
```

Reset Node

```sh
entrypointd tendermint unsafe-reset-all --home $HOME/.entrypoint --keep-addr-book
```

Delete Node

```sh
sudo systemctl stop entrypointd && sudo systemctl disable entrypointd && sudo rm /etc/systemd/system/entrypointd.service && sudo systemctl daemon-reload && rm -rf $HOME/.entrypoint && sudo rm -rf $(which entrypointd) 
```

### Services Management

```sh
# Reload Service
sudo systemctl daemon-reload

# Enable Service
sudo systemctl enable entrypointd

# Disable Service
sudo systemctl disable entrypointd

# Start Service
sudo systemctl start entrypointd

# Stop Service
sudo systemctl stop entrypointd

# Restart Service
sudo systemctl restart entrypointd

# Check Service Status
sudo systemctl status entrypointd

# Check Service Logs
sudo journalctl -u entrypointd -f --no-hostname -o cat
```


# Nulink

<figure><img src="https://static.chainbroker.io/mediafiles/projects/nulink/nulink.jpeg" alt="" width="188"><figcaption></figcaption></figure>

Horus2.0 is NuLink's dedicated testnet designed for developers and community members to test and implement proprietary security infrastructure components within their Web3 applications.

## Horus2.0 Testnet Parameters

* Blockchain: BNB Smart Chain Testnet
* Horus 2.0 Token address: 0xa22BFb00bE8938C50833BFD2444ec721A9eeACc1
* Epoch Length: 24 hours
* Batch Length: 4 epochs
* Staking Pool Per Epoch: 100 TNLK
* Minimal Staking Amount: 1 TNLK
* Maximum Staking Amount: 5 TNLK

For the latest updates and progress, refer to our testnet milestones. The Horus 2.0 testnet is only for test purposes. The token in the testnet has no value to trade. And for each phase, all data and records will be cleared, so please do not store your valuable data in Horus testnet.

## Testnet Components

1. Supply Side Integration:

* Horus2.0 emphasizes the integration of proxy workers as the primary staking node. Developers can deploy and test proxy worker nodes to contribute services and earn test rewards.
* Essential tools for stakers include the NuLink Staking Dashboard and NuLink Worker Node Installer, ensuring efficient management and deployment of staking activities.

## Demand Side Integration:

* Products for DApp builders and users are seamlessly integrated, allowing developers to test the functionality of their applications with privacy-focused solutions.
* For DApp builders, integration with the NuLink Agent is supported, along with corresponding demonstration DApps.
* DApps from NuLink's grant program are actively integrated, showcasing diverse applications on the Horus2.0 testnet.

## Demonstration DApps

* Secure File Transfer (NuLink Agent Demo):
* The "Secure File Transfer" DApp serves as a demonstration for the integration of NuLink Agent on the Horus2.0 testnet.
* Users can experience the functionality of the NuLink Agent in a real-world scenario, emphasizing secure file transfers and data sharing.

## NuLink Snaps Showcase:

* A dedicated demonstration DApp for NuLink Snaps, allowing users to explore and understand the capabilities of decentralized end-to-end data management.


# Worker Installation

## Overview

The NuLink Worker is the node to provide cryptographic service in the NuLink network. It provides Proxy Re-encryption service in the Horus network and it will provide more services such as ABE, IBE, ZKP and FHE in NuLink mainnet. The staker needs running a Worker node to be eligible for token reward.

### There are four steps to run a NuLink Worker:

1. Create Worker Account
2. Install NuLink Worker
3. Configure and Run a Worker node
4. Bond the Worker node with your staking account

## Minimum System Requirements

* Debian/Ubuntu (Recommended)
* 30GB available storage
* 4GB RAM
* x86 architecture
* Static IP address
* Exposed TCP port 9151, make sure it's not occupied
* Nodes can be run on cloud infrastructure.

For this worker node im using CPX21 from Hetzner

## Installation

### Update Depencies

```bash
sudo apt update && sudo apt upgrade -y
sudo apt install ufw
```

### Install Latest Docker Engine and Pull Latest Horus Image

```bash
curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker $USER
docker pull nulink/nulink:latest
```

### Setup Firewall

```bash
sudo ufw allow ssh
sudo ufw allow 9151/tcp
sudo ufw enable
```

And press `y` then enter.

### Setup Password Variable

```bash
export NULINK_KEYSTORE_PASSWORD=YOUR NULINK STORAGE PASSWORD
export NULINK_OPERATOR_ETH_PASSWORD=YOUR WORKER ACCOUNT PASSWORD
```

Change both to the password you preffered

### Create Worker Account

Download GETH and Extract

```bash
wget https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-1.10.23-d901d853.tar.gz && tar -xvzf geth-linux-amd64-1.10.23-d901d853.tar.gz
```

I like to rename it to `geth` , you can skip this if you want

Rename the directory

```bash
mv geth-linux-amd64-1.10.23-d901d853 geth
```

Go to the `geth` dir

```bash
cd geth/
```

Now Create the worker account key by running the command below inside the dir `geth`

```bash
./geth account new --keystore ./keystore
```

You will be prompted to enter the password and confirm the password. **Please remember this password for late use.**

Example:

```bash
INFO [09-08|15:30:11.904] Maximum peer count                       ETH=50 LES=0 total=50
INFO [09-08|15:30:11.905] Smartcard socket not found, disabling    err="stat /run/pcscd/pcscd.comm: no such file or directory"
Your new account is locked with a password. Please give a password. Do not forget this password.
Password: 
Repeat password: 

Your new key was generated


Public address of the key:   0x8B1819341BEc211a45a2186C4D0030681cccE0Ee
Path of the secret key file: /root/geth-linux-amd64-1.10.23-d901d853/keystore/UTC--2022-09-13T01-14-32.465358210Z--8b1819341bec211a45a2186c4d0030681ccce0ee

- You can share your public address with anyone. Others need it to interact with you.
- You must NEVER share the secret key with anyone! The key controls access to your funds!
- You must BACKUP your key file! Without the key, it's impossible to access account funds!
- You must REMEMBER your password! Without the password, it's impossible to decrypt the key!
```

### Create Nulink Directory

```bash
cd $HOME
sudo mkdir nulink
```

Copy the keystore file of the Worker account to the host directory. The private file generated by NuLink Worker will also be stored in this directory.

```bash
cp $HOME/geth/keystore/* $HOME/nulink
```

Give the directory 777 Permission

```bash
sudo chmod -R 777 $HOME/nulink
```

### Init Worker

DONT CHANGE THE VALUE OF :

-e NULINK\_KEYSTORE\_PASSWORD \\

**Change the --signer and --operator-address to your own!**

```bash
docker run -it --rm \
-p 9151:9151 \
-v $HOME/nulink:/code \
-v $HOME/nulink:/home/circleci/.local/share/nulink \
-e NULINK_KEYSTORE_PASSWORD \
nulink/nulink nulink ursula init \
--signer keystore:///code/UTC--2022-09-13T01-14-32.465358210Z--8b1819341bec211a45a2186c4d0030681cccXXXX \
--eth-provider https://data-seed-prebsc-2-s2.binance.org:8545 \
--network horus \
--payment-provider https://data-seed-prebsc-2-s2.binance.org:8545 \
--payment-network bsc_testnet \
--operator-address Operator Address \
--max-gas-price 10000000000
```

Example Output :

```bash
# step 1
 Detected IPv4 address (8.219.186.xxx) - Is this the public-facing address of Ursula? [y/N]: y

 Please provide a password to lock Operator keys.
 Do not forget this password, and ideally store it using a password manager.

 # step 2
 Enter nulink keystore password (8 character minimum): xxxxxx
 Repeat for confirmation: xxxxxx

 Backup your seed words, you will not be able to view them again.

 xxxxxxxxxxxxxxxxxxxxxxxx

 # step 3
 Have you backed up your seed phrase? [y/N]: y

 # step 4
 Confirm seed words: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx


Public Key:   02bb2067d21a677ce928967c0ece79a9
Path to Keystore: /home/circleci/.local/share/nulink/keystore

- You can share your public key with anyone. Others need it to interact with you.
- Never share secret keys with anyone! 
- Backup your keystore! Character keys are required to interact with the protocol!
- Remember your password! Without the password, it's impossible to decrypt the key!
Generated configuration file at default filepath /home/circleci/.local/share/nulink/ursula.json
* Review configuration  -> nulink ursula config
* Start working         -> nulink ursula run
```

**Backup your Seed!**

### Run the worker

**Before running the worker make sure you have tBNB, if not request** [**BNB Testnet Faucet**](https://www.bnbchain.org/en/testnet-faucet) Run Worker

DONT CHANGE THE VALUE OF :

-e NULINK\_KEYSTORE\_PASSWORD \\

-e NULINK\_OPERATOR\_ETH\_PASSWORD \\

```bash
docker run --restart on-failure -d \
--name ursula \
-p 9151:9151 \
-v $HOME/nulink:/code \
-v $HOME/nulink:/home/circleci/.local/share/nulink \
-e NULINK_KEYSTORE_PASSWORD \
-e NULINK_OPERATOR_ETH_PASSWORD \
nulink/nulink nulink ursula run --no-block-until-ready
```

And Voila! Your worker is now running To check the logs you can type

```bash
docker logs -f ursula
```

Example output:

```bash
Authenticating Ursula
Loaded Ursula (horus)
✓ External IP matches configuration
Starting services
✓ Node Discovery (Horus)
✓ Work Tracking
✓ Start Operator Bonded Tracker
✓ Rest Server https://8.219.186.xxx:9151
Working ~ Keep Ursula Online!
```

To check running container you can run

```bash
docker ps
```

To stop container you can run

```bash
docker stop ursula
```

To Restart container

```bash
docker restart ursula
```

Now you can go to the next step which is Bonding the worker to provider.


# Bond Worker

To bond your worker node to your staking account you can simply got to the [Staking Dashboard](https://dashboard.testnet.nulink.org/)

Remember to use different wallet, dont use your worker wallet!

### Stake NLK

Request tNLK and tBNB like image shown below:

![Alt text](https://1883075364-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2ah2nLJBxYlBFMZS7zIL%2Fuploads%2Fgit-blob-696811a84ee17dc7e3e620e219a3289ddb6fce8b%2Fimage.png?alt=media)

After receiving yur tNLK and tBNB go to the [Staking Page](https://dashboard.testnet.nulink.org/staking)

And stake some NLK (Minimuum stake of 1 NLK) and Approve transaction.

![Alt text](https://1883075364-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2ah2nLJBxYlBFMZS7zIL%2Fuploads%2Fgit-blob-d0b6fe529c06135635fd1f5e3352d62978aed93e%2Fimage-2.png?alt=media)

If its first time you will be asked to approve token spent first.

![Alt text](https://1883075364-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2ah2nLJBxYlBFMZS7zIL%2Fuploads%2Fgit-blob-e7d6da25a48cae24bab8e39f00ea14eb5b2b2ab1%2Fimage-3.png?alt=media)

Then Stake your tNLK

![Alt text](https://1883075364-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2ah2nLJBxYlBFMZS7zIL%2Fuploads%2Fgit-blob-97abc448e77483ccbbc1ca2caf6694cfb7453ed3%2Fimage-1.png?alt=media)

### Bond Worker

Scroll down and you will see Node Information

![Alt text](https://1883075364-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2ah2nLJBxYlBFMZS7zIL%2Fuploads%2Fgit-blob-00994ba18f7af6cad788b6e53d56da530ed73795%2Fimage-4.png?alt=media)

Click Bond worker and put your Operator Address that is generated in the [Create Worker Account](https://docs.indonode.net/testnet/nulink/installation#create-worker-account) Step and approve transaction.

Wait a few minutes and refresh the page.

![Alt text](https://1883075364-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2ah2nLJBxYlBFMZS7zIL%2Fuploads%2Fgit-blob-0df5be7c34956362d8f78aa028d87da737d64324%2Fimage-5.png?alt=media)

And Thats it!


# Update Worker

To update Nulink Worker through docker is very simple , you just need to follow these steps:

Stop Container

```bash
docker kill ursula
```

Remove old container

```bash
docker rm ursula
```

Pull latest image

```bash
docker pull nulink/nulink:latest
```

Relaunch worker

```bash
docker run --restart on-failure -d \
--name ursula \
-p 9151:9151 \
-v $HOME/nulink:/code \
-v $HOME/nulink:/home/circleci/.local/share/nulink \
-e NULINK_KEYSTORE_PASSWORD \
-e NULINK_OPERATOR_ETH_PASSWORD \
nulink/nulink nulink ursula run --no-block-until-ready
```


# Namada


# Node Installation

## Namada Installation for Pilot

## Minimum System Requirements

* Validator 16GB 1TB\* 4 Core
* Full Node 8GB 1TB 2 Core
* Light Node TBD TBD TBD

For this node im using Hetzner AX-41 NVME Dedicated Server

## Installation

### Install Rust

```bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source "$HOME/.cargo/env"
```

### Update Depencies

```bash
sudo apt update && sudo apt upgrade -y
sudo apt install make clang pkg-config libssl-dev build-essential git jq llvm libudev-dev protobuf-compiler
```

### Install CometBFT

```bash
curl -sL https://github.com/cometbft/cometbft/releases/download/v0.37.2/cometbft_0.37.2_linux_amd64.tar.gz | tar -C /usr/local/bin -xzf- cometbft
```

### Setup Variable

```bash
CHAIN_ID="shielded-expedition.88f17d1d14"
KEY_NAME="wallet"
VAL_NAME="<YOUR VALIDATOR NAME HERE>"
EMAIL="<YOUR EMAIL HERE>"
```

Don't change the CHAIN\_ID!!

### Add Variable to the machine

```bash
echo 'export CHAIN_ID='\"${CHAIN_ID}\" >> $HOME/.bash_profile
echo 'export KEY_NAME='\"${KEY_NAME}\" >> $HOME/.bash_profile
echo 'export VAL_NAME='\"${VAL_NAME}\" >> $HOME/.bash_profile
echo 'export EMAIL='\"${EMAIL}\" >> $HOME/.bash_profile
```

### Download Pre-built Namada Binary

```bash
wget https://github.com/anoma/namada/releases/download/v0.31.4/namada-v0.31.4-Linux-x86_64.tar.gz
tar xf namada-*.tar.gz
sudo mv namada-v0.31.4-Linux-x86_64/namada* /usr/local/bin/
rm -rf namada*
```

### Init Chain

```bash
namada client utils join-network --chain-id $CHAIN_ID
```

### Add Service File

```bash
sudo tee /etc/systemd/system/namadad.service << EOF
[Unit]
Description=Namada Node
After=network.target
[Service]
User=$USER
WorkingDirectory=$HOME/.local/share/namada
Type=simple
ExecStart=/usr/local/bin/namada --base-dir=$HOME/.local/share/namada node ledger run
Environment=NAMADA_CMT_STDOUT=true
Environment=TM_LOG_LEVEL=p2p:none,pex:error
RemainAfterExit=no
Restart=on-failure
RestartSec=10s
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
```

### Enable Namada Service

```bash
sudo systemctl enable namadad.service
sudo systemctl daemon-reload
sudo systemctl restart namadad.service
```

#### Check Namada Logs

```bash
sudo journalctl -u namadad.service 
```

#### Check Sync Status

```bash
curl -s localhost:26657/status | jq .result.sync_info.catching_up
```

If the result is `false` then your node already synced.

Note : that Syncing proccess usually takes some times, be patient.

### Next Step

After your node is synced Create the wallet

#### Generate New Key

```bash
namadaw gen --alias "${KEY_NAME}"
```

#### Recover Existing key

```bash
namadaw derive --alias "${KEY_NAME}"
```

#### Check Alias Address

```bash
namadaw find --alias "${KEY_NAME}"
```

#### List Keys

```bash
namadaw  list
```

#### Check Balance

```bash
namadac balance --owner "${KEY_NAME}"
```

After you create or import your wallet next step is to Init your validator

#### Init Validator

```bash
namadac  init-validator \
 --alias "${VAL_NAME}" \
 --account-keys "${KEY_NAME}" \
 --signing-keys "${KEY_NAME}" \
 --commission-rate 0.1 \
 --max-commission-rate-change 0.1 \
 --email "${EMAIL}"
```

If the transaction is success , wait for 2 Epoch!

1 Epoch = 10 Hours

After 2 Epoch restart your node

#### Restart Node after 2 Epoch

```bash
sudo systemctl restart namadad.service
```

### Bond Token Validator

```bash
namadac  bond \
 --source "${KEY_NAME}" \
 --validator "${VAL_NAME}" \
 --amount 1000
```

You can Change the `--amount` to whatever your have in your balance

Done.


# Useful Commands

## Useful Commands

#### Generate New Key

```bash
namadaw gen --alias "${KEY_NAME}"
```

#### Recover Existing key

```bash
namadaw derive --alias "${KEY_NAME}"
```

#### Check Alias Address

```bash
namadaw find --alias "${KEY_NAME}"
```

#### List Keys

```bash
namadaw  list
```

#### Unjail Validator

```bash
namadac unjail-validator --validator  "<Validator address tham1...>"
```

#### Claim Rewards

```bash
namadac claim-rewards --validator "<Validator address tnam1...>"
```

#### Check Balance

```bash
namadac balance --owner "${KEY_NAME}"
```

#### Query TX

```bash
namadac tx-result --tx-hash <TX HASH> --node tcp://149.50.96.147:31657
```

#### Export Validator Key

```bash
namadac find-validator --tm-address=$(curl -s localhost:26657/status | jq -r .result.validator_info.address)
```

**Send Funds**

```bash
namadac  transfer --target <RECEIVER-KEY(tnam1..)> --source ${KEY_NAME} --amount 100 --token NAM 
```

#### Unbond Tokens

```bash
namadac unbond \
  --source wallet \
  --validator "${VAL_NAME}" \
  --amount 12.34
```

#### Check Validator Consensus

```bash
namadac validator-state --validator "<Validator address tham1...>"
```

### Service

#### Enable Service

```bash
sudo systemctl enable namadad.service
```

#### Disable Service

```bash
sudo systemctl disable namadad.service
```

#### Start Service

```bash
sudo systemctl start namadad.service
```

#### Stop Service

```bash
sudo systemctl stop namadad.service
```

#### Restart Service

```bash
sudo systemctl restart namadad.service
```

#### Check Service Status

```bash
sudo systemctl status namadad.service
```

#### Check Logs

```bash
sudo journalctl namadad.service -fu -o cat
```

#### Disable Indexer

```bash
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.local/share/namada/shielded-expedition.b40d8e9055/config.toml
```

#### Enable Indexer

```bash
sed -i -e 's|^indexer *=.*|indexer = "kv"|' $HOME/.local/share/namada/shielded-expedition.b40d8e9055/config.toml
```

#### Reset Node

```bash
sudo systemctl stop namadad.service
namada node ledger reset
```

## Delete Node

```bash
sudo systemctl stop namadad.service
sudo systemctl disable namadad.service

sudo rm /etc/systemd/system/namadad.service
sudo systemctl daemon-reload

rm -f /usr/local/bin/namada* /usr/local/bin/cometbft
rm -rf $HOME/.local/share/namada
```


