# Links

***

## <mark style="color:blue;">**Welcome to AKNodes - Your Trusted PoS Validator and Service Provider**</mark>

At AKNodes, we are more than just a PoS validator; we are your trusted partner in navigating the exciting world of Proof-of-Stake blockchain networks. With years of experience in the blockchain industry, we offer a comprehensive range of services to help you succeed in this dynamic landscape.

## <mark style="color:blue;">**Our Expertise**</mark>

Our team of dedicated professionals boasts extensive expertise in PoS blockchain networks. We've been actively participating in validator roles across various PoS networks, contributing to their security, decentralization, and overall success. With a deep understanding of network protocols and governance, you can trust us to provide top-tier services.

## <mark style="color:blue;">**Validator Services**</mark>

As a leading validator, we offer robust and reliable validation services. We secure and validate transactions on PoS networks, contributing to network integrity and performance. By choosing AKNodes as your validator, you can rest assured that your assets are in safe hands.

## <mark style="color:blue;">**Educational Guides**</mark>

We believe in the power of knowledge. We provide educational resources and guides to help you understand PoS networks better. Our in-depth guides cover staking, governance, and much more. Whether you're a newcomer or an experienced blockchain enthusiast, there's something valuable for everyone.

## <mark style="color:blue;">**Snapshots and Network Backups**</mark>

Maintaining a secure and up-to-date blockchain network is crucial. We offer snapshot services, ensuring that you have access to historical network data. With regular backups, your operations can continue without interruptions.

## <mark style="color:blue;">**Why Choose AKNodes?**</mark>

* **Reliability:** Count on us for uninterrupted validation services.
* **Experience:** Benefit from our deep industry knowledge.
* **Education:** Empower yourself with our educational materials.
* **Security:** Your assets are safeguarded through our secure practices.

Explore our website to discover how AKNodes can help you excel in the world of PoS blockchains. Feel free to reach out to us if you have any questions or require assistance. We are dedicated to your success.

Join us on this incredible journey into the future of decentralized finance and blockchain technology.


# TESTNET NETWORKS


# Pell network

Pell is the first and omnichain BTC Restaking Network. By building an Omnichain **Decentralized Validated Service** (DVS, aka AVS) Network driven by BTC Restaking, Pell extends BTCFi into the cryptoeconomic security sector, fully unlocks Bitcoin’s security potential, enhances capital efficiency for stakers, and provides developers with an efficient, secure, and affordable way to validate services.

{% embed url="<https://explorer.aknodes.com/pell>" %}

<figure><img src="https://383863627-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpsGHvwFmpqkZQJbG9ZSq%2Fuploads%2FwslOvjfeztIBRukj5XBe%2F_jr_bub2_400x400.png?alt=media&amp;token=97e148fd-fe2a-4b12-b7eb-30374c7074d8" alt="" width="100"><figcaption></figcaption></figure>

<table><thead><tr><th>Chain ID</th><th width="218.33333333333331">Version tag</th></tr></thead><tbody><tr><td>ignite_186-1</td><td>1.2.1</td></tr></tbody></table>

<table><thead><tr><th width="186.33333333333331">Binary Name</th><th>Wasm</th><th>SDK version</th></tr></thead><tbody><tr><td>pellcored</td><td>Disabled</td><td>v0.46.13</td></tr></tbody></table>

{% tabs %}
{% tab title="RPC" %}
<https://rpc.pell.aknodes.net/>
{% endtab %}

{% tab title="API" %}
[https://api.pell.aknodes.net/](https://api.arkeo.aknodes.net/)
{% endtab %}

{% tab title="gRPC" %}
grpc.pell.aknodes.net:58090
{% endtab %}
{% endtabs %}


# Installation

Minimum Hardware Requirements 4x CPUs; the faster clock speed the better  8GB RAM  100GB of storage (SSD or NVME)

## <mark style="color:blue;">Setup validator name</mark> <a href="#setup-validator-name" id="setup-validator-name"></a>

```
MONIKER="YOUR_MONIKER_GOES_HERE"
```

### Install dependencies <a href="#install-dependencies" id="install-dependencies"></a>

```
sudo apt update
sudo apt-get install git curl build-essential make jq gcc snapd chrony lz4 tmux unzip bc -y
```

### **INSTALL GO**

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

### Install Node

```
cd $HOME && \
wget -O pellcored https://github.com/0xPellNetwork/network-config/releases/download/v1.2.1/pellcored-v1.2.1-linux-amd64 && \
chmod +x pellcored && \
mv pellcored ~/go/bin/ && \
WASMVM_VERSION=v2.1.2 && \
export LD_LIBRARY_PATH=~/.pellcored/lib && \
mkdir -p $LD_LIBRARY_PATH && \
wget "https://github.com/CosmWasm/wasmvm/releases/download/$WASMVM_VERSION/libwasmvm.$(uname -m).so" -O "$LD_LIBRARY_PATH/libwasmvm.$(uname -m).so" && \
echo "export LD_LIBRARY_PATH=$HOME/.pellcored/lib:$LD_LIBRARY_PATH" >> $HOME/.bash_profile && \
source ~/.bash_profile

```

## **Initialize Node**

```
pellcored init "$MONIKER" --chain-id=ignite_186-1
```

### Download genesis and addrbook

<pre><code><strong>curl -Ls https://snapshots.aknodes.net/snapshots/pellcore/genesis.json > $HOME/.pellcored/config/genesis.json
</strong></code></pre>

```
curl -Ls https://snapshots.aknodes.net/snapshots/pellcore/addrbook.json > $HOME/.pellcored/config/addrbook.json
```

### **Create Service**

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

### **Download Snapshot**

```
pellcored tendermint unsafe-reset-all --home $HOME/.arkeo --keep-addr-book 
curl https://snapshots.aknodes.net/snapshots/pellcore/snapshot-pellcore.AKNodes.lz4 | lz4 -dc - | tar -xf - -C $HOME/.pellcored
```

### Start the node

```
sudo systemctl restart pellcored
journalctl -u pellcored -f
```


# Upgrade

Upgrade height: 907696 to version 1.2.1

<pre><code><strong>cd $HOME
</strong><strong>wget -O pellcored https://github.com/0xPellNetwork/network-config/releases/download/v1.2.1/pellcored-v1.2.1-linux-amd64
</strong>chmod +x pellcored
sudo mv $HOME/pellcored $(which pellcored)
sudo systemctl restart pellcored &#x26;&#x26; sudo journalctl -u pellcored -f
</code></pre>


# Sync


# Useful commands

### Service operations ⚙️ <a href="#service-operations" id="service-operations"></a>

Check logs

```bash
sudo journalctl -u pellcored -fo cat
```

Start service

```bash
sudo systemctl start pellcored
```

Stop service

```bash
sudo systemctl stop pellcored
```

Restart service

```bash
sudo systemctl restart pellcored
```

Check service status

```bash
sudo systemctl status pellcored
```

Reload services

```bash
sudo systemctl daemon-reload
```

Enable Service

```bash
sudo systemctl enable pellcored
```

Disable Service

```bash
sudo systemctl disable pellcored
```

Node info

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

Your node peer

```bash
echo $(pellcored tendermint show-node-id)'@'$(wget -qO- eth0.me)':'$(cat $HOME/.pellcored/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')
```

### Key management <a href="#key-management" id="key-management"></a>

Add New Wallet

```bash
pellcored keys add $WALLET
```

Restore executing wallet

```bash
pellcored keys add $WALLET --recover
```

List All Wallets

```bash
pellcored keys list
```

Delete wallet

```bash
pellcored keys delete $WALLET
```

Check Balance

```bash
pellcored q bank balances $WALLET_ADDRESS 
```

Export Key (save to wallet.backup)

```bash
pellcored keys export $WALLET
```

View EVM Prived Key

```bash
pellcored keys unsafe-export-eth-key $WALLET
```

Import Key (restore from wallet.backup)

```bash
pellcored keys import $WALLET wallet.backup
```

### Tokens <a href="#tokens" id="tokens"></a>

Withdraw all rewards

```bash
pellcored tx distribution withdraw-all-rewards --from $WALLET --chain-id ignite_186-1 --gas auto --gas-adjustment 1.5 
```

Withdraw rewards and commission from your validator

```bash
pellcored tx distribution withdraw-rewards $VALOPER_ADDRESS --from $WALLET --commission --chain-id ignite_186-1 --gas auto --gas-adjustment 1.5 -y 
```

Check your balance

```bash
pellcored query bank balances $WALLET_ADDRESS
```

Delegate to Yourself

```bash
pellcored tx staking delegate $(pellcored keys show $WALLET --bech val -a) 1000000apell --from $WALLET --chain-id ignite_186-1 --gas auto --gas-adjustment 1.5 -y 
```

Delegate

```bash
pellcored tx staking delegate <TO_VALOPER_ADDRESS> 1000000apell --from $WALLET --chain-id ignite_186-1 --gas auto --gas-adjustment 1.5 -y 	
```

Redelegate Stake to Another Validator

```bash
pellcored tx staking redelegate $VALOPER_ADDRESS <TO_VALOPER_ADDRESS> 1000000apell --from $WALLET --chain-id ignite_186-1 --gas auto --gas-adjustment 1.5 -y 
```

Unbond

```bash
pellcored tx staking unbond $(pellcored keys show $WALLET --bech val -a) 1000000apell --from $WALLET --chain-id ignite_186-1 --gas auto --gas-adjustment 1.5 -y 
```

Transfer Funds

```bash
pellcored tx bank send $WALLET_ADDRESS <TO_WALLET_ADDRESS> 1000000apell --gas auto --gas-adjustment 1.5 -y 
```

### Validator operations <a href="#validator-operations" id="validator-operations"></a>

Create New Validator

```bash
pellcored tx staking create-validator \
--amount 1000000apell \
--from $WALLET \
--commission-rate 0.1 \
--commission-max-rate 0.2 \
--commission-max-change-rate 0.01 \
--min-self-delegation 1 \
--pubkey $(pellcored tendermint show-validator) \
--moniker "$MONIKER" \
--identity "" \
--details "xxxxxxxx" \
--chain-id ignite_186-1 \
--gas auto --gas-adjustment 1.5 \
-y 
```

Edit Existing Validator

```bash
pellcored tx staking edit-validator \
--commission-rate 0.1 \
--new-moniker "$MONIKER" \
--identity "" \
--details "xxxxxxxx" \
--from $WALLET \
--chain-id ignite_186-1 \
--gas auto --gas-adjustment 1.5 \
-y 
```

Validator info

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

Validator Details

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

Jailing info

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

Slashing parameters

```bash
pellcored q slashing params 
```

Unjail validator

```bash
pellcored tx slashing unjail --from $WALLET --chain-id ignite_186-1 --gas auto --gas-adjustment 1.5 -y 
```

Active Validators List

```bash
pellcored q staking validators -oj --limit=2000 | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " 	 " + .description.moniker' | sort -gr | nl 
```

Check Validator key

```bash
[[ $(pellcored q staking validator $VALOPER_ADDRESS -oj | jq -r .consensus_pubkey.key) = $(pellcored status | jq -r .ValidatorInfo.PubKey.value) ]] && echo -e "Your key status is ok" || echo -e "Your key status is error"
```

Signing info

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

### Governance <a href="#governance" id="governance"></a>

Create New Text Proposal

```bash
pellcored  tx gov submit-proposal \
--title "" \
--description "" \
--deposit 1000000apell \
--type Text \
--from $WALLET \
--gas auto --gas-adjustment 1.5 \
-y 
```

Proposals List

```bash
pellcored query gov proposals 
```

View proposal

```bash
pellcored query gov proposal 1 
```

Vote

```bash
pellcored tx gov vote 1 yes --from $WALLET --chain-id ignite_186-1  --gas auto --gas-adjustment 1.5 -y 
```


# Arkeo network

Arkeo is a free-market decentralized network for providing access to blockchain data. Its intended goal is to create a decentralized option for interacting with any blockchain.

### Explorer

{% embed url="<https://explorer.aknodes.com/ARKEO-TESTNET>" %}

<figure><img src="https://383863627-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpsGHvwFmpqkZQJbG9ZSq%2Fuploads%2FxuQ6mvBHooVxMtvkuVB1%2Farkeo.png?alt=media&amp;token=3fe06485-517a-471b-b1b9-3b5bfe02064a" alt="" width="100"><figcaption></figcaption></figure>

<table><thead><tr><th>Chain ID</th><th width="218.33333333333331">Version tag</th></tr></thead><tbody><tr><td>arkeo</td><td>1</td></tr></tbody></table>

<table><thead><tr><th width="71.33333333333331">Binary Name</th><th>Wasm</th><th>SDK version</th></tr></thead><tbody><tr><td>arkeod</td><td>Disabled</td><td>v0.46.13</td></tr></tbody></table>

{% tabs %}
{% tab title="RPC" %}
<https://rpc.arkeo.aknodes.net>
{% endtab %}

{% tab title="API" %}
<https://api.arkeo.aknodes.net/>
{% endtab %}

{% tab title="gRPC" %}
grpc.arkro.aknodes.net:9390
{% endtab %}
{% endtabs %}


# Installation

Minimum Hardware Requirements 4x CPUs; the faster clock speed the better  8GB RAM  100GB of storage (SSD or NVME)

## <mark style="color:blue;">Setup validator name</mark> <a href="#setup-validator-name" id="setup-validator-name"></a>

```
MONIKER="YOUR_MONIKER_GOES_HERE"
```

### Install dependencies <a href="#install-dependencies" id="install-dependencies"></a>

```
sudo apt update
sudo apt-get install git curl build-essential make jq gcc snapd chrony lz4 tmux unzip bc -y
```

### **INSTALL GO**

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

### Install Node

```
cd $HOME

mkdir -p /root/go/bin/

wget https://snapshots.aknodes.net/snapshots/arkeo/arkeod

chmod +x arkeod

mv arkeod /root/go/bin/

arkeod version
```

## **Initialize Node**

```
arkeod init "$MONIKER" --chain-id=arkeo
```

### Download genesis and addrbook

<pre><code><strong>curl -Ls https://snapshots.aknodes.net/snapshots/arkeo/genesis.json > $HOME/.arkeo/config/genesis.json
</strong></code></pre>

```
curl -Ls https://snapshots.aknodes.net/snapshots/arkeo/addrbook.json > $HOME/.arkeo/config/addrbook.json
```

### **Create Service**

<pre><code>sudo tee /etc/systemd/system/arkeod.service > /dev/null &#x3C;&#x3C;EOF
<strong>[Unit]
</strong>Description=arkeod Daemon
<strong>After=network-online.target
</strong>[Service]
User=$USER
ExecStart=$(which arkeod) start
Restart=always
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable arkeod
</code></pre>

### **Download Snapshot**

```
arkeod tendermint unsafe-reset-all --home $HOME/.arkeo --keep-addr-book 
curl https://snapshots.aknodes.net/snapshots/arkeo/snapshot-arkeo.AKNodes.lz4 | lz4 -dc - | tar -xf - -C $HOME/.arkeo
```

### Start the node

```
sudo systemctl restart arkeod
journalctl -u arkeod -f
```


# Upgrade


# Sync

## Snapshot

Update every 6 hours

```
sudo systemctl stop arkeod

cp $HOME/.arkeo/data/priv_validator_state.json $HOME/.arkeo/priv_validator_state.json.backup 

arkeod tendermint unsafe-reset-all --home $HOME/.arkeo --keep-addr-book 
curl https://snapshots.aknodes.net/snapshots/arkeo/snapshot-arkeo.AKNodes.lz4 | lz4 -dc - | tar -xf - -C $HOME/.arkeo

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

sudo systemctl restart arkeod
sudo journalctl -u arkeod -f --no-hostname -o cat
```

### State-Sync

```
sudo systemctl stop arkeod

cp $HOME/.arkeo/data/priv_validator_state.json $HOME/.arkeo/priv_validator_state.json.backup
arkeod tendermint unsafe-reset-all --home $HOME/.arkeo

peers="844c7132a9f4550bf619edb5f59c20789357748b@167.235.14.83:18656,769de3fabb66d2dcbae7550ce7252f6f469c5d3f@65.108.126.188:26856,e033753cac027fc6605a95dab3b3fc5550d4b9bf@65.109.84.33:40656,2e447e582a3dcd681859acca930034ac684f7f86@158.220.105.59:26656,25a9af68f987e254e50d6d7e6a1e68a5a40c1b7c@65.109.92.148:60556,6ae2136893a08a412f0c02eab8d595d502cd5457@65.108.206.118:36656,5b697eefafeee7e6b907b1512efd5956bd0d700a@167.86.77.84:26656,be71f456a7aa3da953db899298b53d28b75f4676@65.108.229.93:37656,893a44b8501faa22fbe2f4d61c6586f231bd1638@65.109.28.177:33656,804b5d44906ffd71383a8763103ab250dab3c3a7@217.29.57.187:26656,8c2d799bcc4fbf44ef34bbd2631db5c3f4619e41@213.239.207.175:60656"  
SNAP_RPC="https://rpc.arkeo.aknodes.net:443"

sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.arkeo/config/config.toml 

LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height);
BLOCK_HEIGHT=$((LATEST_HEIGHT - 1000));
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash) 

echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH && sleep 2

sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ;
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ;
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ;
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"| ;
s|^(seeds[[:space:]]+=[[:space:]]+).*$|\1\"\"|" $HOME/.arkeo/config/config.toml

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

sudo systemctl restart arkeod && sudo journalctl -u arkeod -f
```


# Useful commands

### <mark style="color:yellow;">Service operations</mark> ⚙️ <a href="#service-operations" id="service-operations"></a>

Check logs

```bash
sudo journalctl -u arkeod -f
```

Start service

```bash
sudo systemctl start arkeod
```

Stop service

```bash
sudo systemctl stop arkeod
```

Restart service

```bash
sudo systemctl restart arkeod
```

Check service status

```bash
sudo systemctl status arkeod
```

Reload services

```bash
sudo systemctl daemon-reload
```

Enable Service

```bash
sudo systemctl enable arkeod
```

Disable Service

```bash
sudo systemctl disable arkeod
```

Sync info

```bash
arkeod status 2>&1 | jq .SyncInfo
```

Node info

```bash
arkeod status 2>&1 | jq .NodeInfo
```

Your node peer

```bash
echo $(arkeod tendermint show-node-id)'@'$(wget -qO- eth0.me)':'$(cat $HOME/.arkeo/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')
```

## *<mark style="color:purple;">Key</mark>*

#### Add New Key

```
arkeod keys add wallet
```

#### Recover Existing Key

```
arkeod keys add wallet --recover
```

#### List All Keys

```
arkeod keys list
```

#### Delete Key

```
arkeod keys delete wallet
```

#### Export Key (save to wallet.backup)

```
arkeod keys export wallet
```

#### Import Key

```
arkeod keys import wallet wallet.backup
```

#### Query Wallet Balance

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

### <mark style="color:green;">Tokens</mark> <a href="#tokens" id="tokens"></a>

Withdraw all rewards

```bash
arkeod tx distribution withdraw-all-rewards --from $WALLET --chain-id arkeo --gas auto --gas-adjustment 1.5
```

Withdraw rewards and commission from your validator

```bash
arkeod tx distribution withdraw-rewards $VALOPER_ADDRESS --from $WALLET --commission --chain-id arkeo --gas auto --gas-adjustment 1.5 -y
```

Check your balance

```bash
arkeod query bank balances $WALLET_ADDRESS
```

Delegate to Yourself

```bash
arkeod tx staking delegate $(arkeod keys show $WALLET --bech val -a) 1000000uarkeo --from $WALLET --chain-id arkeo --gas auto --gas-adjustment 1.5 -y
```

Delegate

```bash
arkeod tx staking delegate <TO_VALOPER_ADDRESS> 1000000uarkeo --from $WALLET --chain-id arkeo --gas auto --gas-adjustment 1.5 -y
```

Redelegate Stake to Another Validator

```bash
arkeod tx staking redelegate $VALOPER_ADDRESS <TO_VALOPER_ADDRESS> 1000000uarkeo --from $WALLET --chain-id arkeo --gas auto --gas-adjustment 1.5 -y
```

Unbond

```bash
arkeod tx staking unbond $(arkeod keys show $WALLET --bech val -a) 1000000uarkeo --from $WALLET --chain-id arkeo --gas auto --gas-adjustment 1.5 -y
```

Transfer Funds

```bash
arkeod tx bank send $WALLET_ADDRESS <TO_WALLET_ADDRESS> 1000000uarkeo --gas auto --gas-adjustment 1.5 -y
```

### <mark style="color:red;">Validator operations</mark> <a href="#validator-operations" id="validator-operations"></a>

Create New Validator

```bash
arkeod tx staking create-validator \
--amount 1000000uarkeo \
--from $WALLET \
--commission-rate 0.1 \
--commission-max-rate 0.2 \
--commission-max-change-rate 0.01 \
--min-self-delegation 1 \
--pubkey $(arkeod tendermint show-validator) \
--moniker "$MONIKER" \
--identity "" \
--details "xxxxxxxxxxxx" \
--chain-id arkeo \
--gas auto --gas-adjustment 1.5 \
-y
```

Edit Existing Validator

```bash
arkeod tx staking edit-validator \
--commission-rate 0.1 \
--new-moniker "$MONIKER" \
--identity "" \
--details "xxxxxxxxxx" \
--from $WALLET \
--chain-id arkeo \
--gas auto --gas-adjustment 1.5 \
-y
```

Validator info

```bash
arkeod status 2>&1 | jq .ValidatorInfo
```

Validator Details

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

Jailing info

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

Unjail validator

```bash
arkeod tx slashing unjail --from $WALLET --chain-id arkeo --gas auto --gas-adjustment 1.5 -y
```

Active Validators List

```bash
arkeod q staking validators -oj --limit=2000 | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " 	 " + .description.moniker' | sort -gr | nl
```

Check Validator key

```bash
[[ $(arkeod q staking validator $VALOPER_ADDRESS -oj | jq -r .consensus_pubkey.key) = $(arkeod status | jq -r .ValidatorInfo.PubKey.value) ]] && echo -e "Your key status is ok" || echo -e "Your key status is error"
```

Signing info

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

### <mark style="color:blue;">Governance</mark> <a href="#governance" id="governance"></a>

Create New Text Proposal

```bash
arkeod  tx gov submit-proposal \
--title "" \
--description "" \
--deposit 1000000uarkeo \
--type Text \
--from $WALLET \
--gas auto --gas-adjustment 1.5 \
-y 
```

Proposals List

```bash
arkeod query gov proposals
```

Proposal IDProposal optionYesNoNo with vetoAbstain

View proposal

```bash
arkeod query gov proposal 1
```

Vote

```bash
arkeod tx gov vote 1 yes --from $WALLET --chain-id arkeo  --gas auto --gas-adjustment 1.5 -y
```

#### Delete Node

```
sudo systemctl stop arkeod
sudo systemctl disable arkeod
sudo rm -rf /etc/systemd/system/arkeod.service
sudo rm $(which arkeod)
sudo rm -rf $HOME/.arkeo
sed -i "/ARKEO_/d" $HOME/.bash_profile
```


# Andromeda

Andromeda Protocol is an all-on-chain suite of products, tools, and utilities enabled by a decentralized operating system we call aOS, or Andromeda Operating System.

<figure><img src="https://383863627-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpsGHvwFmpqkZQJbG9ZSq%2Fuploads%2FCWrqe1kNa6DelpcrLBJk%2Fp_-removebg-preview.png?alt=media&amp;token=d78ea262-1aee-46a9-8333-b1d8d7637820" alt="" width="100"><figcaption></figcaption></figure>

<table><thead><tr><th>Chain ID</th><th width="218.33333333333331">Version tag</th></tr></thead><tbody><tr><td>galileo-3</td><td>galileo-3-v1.1.0-beta1</td></tr></tbody></table>

| Binary Name | Wasm    | SDK version |
| ----------- | ------- | ----------- |
| andromedad  | Enabled | v0.45.12    |

{% tabs %}
{% tab title="RPC" %}
<https://rpc.andromeda.aknodes.net>
{% endtab %}

{% tab title="API" %}
<https://api.andromeda.aknodes.net>
{% endtab %}

{% tab title="gRPC" %}
grpc.andromeda.aknodes.net:9790
{% endtab %}
{% endtabs %}


# Installation

## <mark style="color:blue;">Setup validator name</mark> <a href="#setup-validator-name" id="setup-validator-name"></a>

```
MONIKER="YOUR_MONIKER_GOES_HERE"
```

### Install dependencies <a href="#install-dependencies" id="install-dependencies"></a>

```
sudo apt update
sudo apt-get install git curl build-essential make jq gcc snapd chrony lz4 tmux unzip bc -y
```

### **INSTALL GO**

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

### Install Node

```
cd $HOME

rm -rf andromedad

git clone https://github.com/andromedaprotocol/andromedad.git

cd andromedad

git checkout galileo-3-v1.1.0-beta1

make build
```

## **Initialize Node**

```
andromedad init "$MONIKER" --chain-id=galileo-3
```

### Download genesis and addrbook

<pre><code><strong>curl -Ls https://snapshots.aknodes.net/snapshots/andromeda/genesis.json > $HOME/.andromedad/config/genesis.json
</strong></code></pre>

```
curl -Ls https://snapshots.aknodes.net/snapshots/andromeda/addrbook.json > $HOME/.andromedad/config/addrbook.json
```

### **Create Service**

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

### **Download Snapshot**

```
arkeod tendermint unsafe-reset-all --home $HOME/.arkeo --keep-addr-book 
curl https://snapshots.aknodes.net/snapshots/andromeda/snapshot-andromeda.AKNodes.lz4 | lz4 -dc - | tar -xf - -C $HOME/.arkeo
```

### Start the node

```
sudo systemctl restart andromedad
journalctl -u andromedad -f
```

[buy me a cup of coffe](https://www.paypal.com/paypalme/AbdelAkridi?country.x=NL\&locale.x=en_US)


# Upgarde


# Sync

## Snapshot

Update every 6 hours

```
sudo systemctl stop andromedad

cp $HOME/.andromedad/data/priv_validator_state.json $HOME/.andromedad/priv_validator_state.json.backup 

andromedad tendermint unsafe-reset-all --home $HOME/.andromedad --keep-addr-book 
curl https://snapshots.aknodes.net/snapshots/andromeda/snapshot-andromeda.AKNodes.lz4 | lz4 -dc - | tar -xf - -C $HOME/.andromedad

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

sudo systemctl restart andromedad
sudo journalctl -u andromedad -f --no-hostname -o cat
```

### State-Sync

```
sudo systemctl stop andromedad

cp $HOME/.andromedad/data/priv_validator_state.json $HOME/.andromedad/priv_validator_state.json.backup
andromedad tendermint unsafe-reset-all --home $HOME/.andromedad

peers="0b0c0c51a9a0bf170a83431a0f18262dce9e7179@167.235.14.83:33656,e61f287d51edab6f6dbe00a8b804614443ee6f82@80.85.242.117:26656,c5e98925ccca37f07b8ea03d9b7bcfe89834d7fd@94.190.90.38:35656,b99657df20590461b7df5492f97dc46f37082ecd@65.109.101.53:17556,50ca8e25cf1c5a83aa4c79bb1eabfe88b20eb367@65.108.199.120:61356,815e9378b05a40e4a774223b55f5c6b8457a1c79@31.220.79.166:26656,f370dbff00890cb017bef55128aa954c13cac1b2@62.171.153.45:11656"  
SNAP_RPC="https://rpc.andromeda.aknodes.net:443"

sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.andromedad/config/config.toml 

LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height);
BLOCK_HEIGHT=$((LATEST_HEIGHT - 1000));
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash) 

echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH && sleep 2

sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ;
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ;
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ;
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"| ;
s|^(seeds[[:space:]]+=[[:space:]]+).*$|\1\"\"|" $HOME/.andromedad/config/config.toml

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

sudo systemctl restart andromedad && sudo journalctl -u andromedad -f
```


# Useful commands

### <mark style="color:blue;">Service operations</mark> ⚙️ <a href="#service-operations" id="service-operations"></a>

Check logs

```bash
sudo journalctl -u andromedad -f
```

Start service

```bash
sudo systemctl start andromedad
```

Stop service

```bash
sudo systemctl stop andromedad
```

Restart service

```bash
sudo systemctl restart andromedad
```

Check service status

```bash
sudo systemctl status andromedad
```

Reload services

```bash
sudo systemctl daemon-reload
```

Enable Service

```bash
sudo systemctl enable andromedad
```

Disable Service

```bash
sudo systemctl disable andromedad
```

Sync info

```bash
andromedad status 2>&1 | jq .SyncInfo
```

Node info

```bash
andromedad status 2>&1 | jq .NodeInfo
```

Your node peer

```bash
echo $(andromedad tendermint show-node-id)'@'$(wget -qO- eth0.me)':'$(cat $HOME/.andromedad/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')
```

### <mark style="color:purple;">Key</mark>  <a href="#key-management" id="key-management"></a>

Add New Wallet

```bash
andromedad keys add $WALLET
```

Restore executing wallet

```bash
andromedad keys add $WALLET --recover
```

List All Wallets

```bash
andromedad keys list
```

Delete wallet

```bash
andromedad keys delete $WALLET
```

Check Balance

```bash
andromedad q bank balances $(andromedad keys show $WALLET -a)
```

Export Key (save to wallet.backup)

```bash
andromedad keys export $WALLET
```

Import Key (restore from wallet.backup)

```bash
andromedad keys import $WALLET wallet.backup
```

### <mark style="color:orange;">Tokens</mark> <a href="#tokens" id="tokens"></a>

Withdraw all rewards

```bash
andromedad tx distribution withdraw-all-rewards --from $WALLET --chain-id galileo-3 --gas auto --gas-adjustment 1.5
```

Withdraw rewards and commission from your validator

```bash
andromedad tx distribution withdraw-rewards $VALOPER_ADDRESS --from $WALLET --commission --chain-id galileo-3 --gas auto --gas-adjustment 1.5 -y
```

Check your balance

```bash
andromedad query bank balances $WALLET_ADDRESS
```

Delegate to Yourself

```bash
andromedad tx staking delegate $(andromedad keys show $WALLET --bech val -a) 1000000uandr --from $WALLET --chain-id galileo-3 --gas auto --gas-adjustment 1.5 -y
```

Delegate

```bash
andromedad tx staking delegate <TO_VALOPER_ADDRESS> 1000000uandr --from $WALLET --chain-id galileo-3 --gas auto --gas-adjustment 1.5 -y
```

Redelegate Stake to Another Validator

```bash
andromedad tx staking redelegate $VALOPER_ADDRESS <TO_VALOPER_ADDRESS> 1000000uandr --from $WALLET --chain-id galileo-3 --gas auto --gas-adjustment 1.5 -y
```

Unbond

```bash
andromedad tx staking unbond $(andromedad keys show $WALLET --bech val -a) 1000000uandr --from $WALLET --chain-id galileo-3 --gas auto --gas-adjustment 1.5 -y
```

Transfer Funds

```bash
andromedad tx bank send $WALLET_ADDRESS <TO_WALLET_ADDRESS> 1000000uandr --gas auto --gas-adjustment 1.5 -y
```

### <mark style="color:red;">Validator operations</mark> <a href="#validator-operations" id="validator-operations"></a>

Create New Validator

```bash
andromedad tx staking create-validator \
--amount 1000000uandr \
--from $WALLET \
--commission-rate 0.1 \
--commission-max-rate 0.2 \
--commission-max-change-rate 0.01 \
--min-self-delegation 1 \
--pubkey $(andromedad tendermint show-validator) \
--moniker "$MONIKER" \
--identity "" \
--details "xxxxxxxx" \
--chain-id galileo-3 \
--gas auto --gas-adjustment 1.5 \
-y
```

Edit Existing Validator

```bash
andromedad tx staking edit-validator \
--commission-rate 0.1 \
--new-moniker "$MONIKER" \
--identity "" \
--details "xxxxxxxxx" \
--from $WALLET \
--chain-id galileo-3 \
--gas auto --gas-adjustment 1.5 \
-y
```

Validator info

```bash
andromedad status 2>&1 | jq .ValidatorInfo
```

Validator Details

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

Jailing info

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

Unjail validator

```bash
andromedad tx slashing unjail --from $WALLET --chain-id galileo-3 --gas auto --gas-adjustment 1.5 -y
```

Active Validators List

```bash
andromedad q staking validators -oj --limit=2000 | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " 	 " + .description.moniker' | sort -gr | nl
```

Check Validator key

```bash
[[ $(andromedad q staking validator $VALOPER_ADDRESS -oj | jq -r .consensus_pubkey.key) = $(andromedad status | jq -r .ValidatorInfo.PubKey.value) ]] && echo -e "Your key status is ok" || echo -e "Your key status is error"
```

Signing info

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

### Governance <a href="#governance" id="governance"></a>

Create New Text Proposal

```bash
andromedad  tx gov submit-proposal \
--title "" \
--description "" \
--deposit 1000000uandr \
--type Text \
--from $WALLET \
--gas auto --gas-adjustment 1.5 \
-y 
```

Proposals List

```bash
andromedad query gov proposals
```

View proposal

```bash
andromedad query gov proposal 1
```

Vote

```bash
andromedad tx gov vote 1 yes --from $WALLET --chain-id galileo-3  --gas auto --gas-adjustment 1.5 -y
```

#### <mark style="color:yellow;">Delete Node</mark>

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


# Axelar

Axelar delivers secure cross-chain communication for Web3, enabling you to build Interchain dApps that grow beyond a single chain.

<figure><img src="https://383863627-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpsGHvwFmpqkZQJbG9ZSq%2Fuploads%2F4LKNSrddUtZYUwuJobCb%2Fswsw-removebg-preview.png?alt=media&amp;token=78f3e6d8-0a3d-4073-bbd4-7ffbf1bee248" alt=""><figcaption></figcaption></figure>

<table><thead><tr><th>Chain ID</th><th width="218.33333333333331">Version tag</th></tr></thead><tbody><tr><td>axelar-testnet-lisbon-3</td><td>v0.34.1</td></tr></tbody></table>

| Binary Name | Wasm    | SDK version |
| ----------- | ------- | ----------- |
| axelar      | Enabled | v0.13.6     |

{% tabs %}
{% tab title="RPC" %}
<https://rpc.axelar.testnet.aknodes.net>
{% endtab %}

{% tab title="API" %}
<https://api.axelar.testnet.aknodes.net>
{% endtab %}

{% tab title="gRPC" %}
grpc.axelar.testnet.aknodes.net:1090
{% endtab %}
{% endtabs %}


# Installation

Minimum Hardware Requirements 4x CPUs; the faster clock speed the better  8GB RAM  100GB of storage (SSD or NVME)

## <mark style="color:blue;">Setup validator name</mark> <a href="#setup-validator-name" id="setup-validator-name"></a>

```
MONIKER="YOUR_MONIKER_GOES_HERE"
```

### Install dependencies <a href="#install-dependencies" id="install-dependencies"></a>

```
sudo apt update
sudo apt-get install git curl build-essential make jq gcc snapd chrony lz4 tmux unzip bc -y
```

### **INSTALL GO**

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

### Install Node

```
cd $HOME

rm -rf axelar-core

git clone https://github.com/axelarnetwork/axelar-core.git

cd axelar-core

git checkout v0.34.1

make build
```

## **Initialize Node**

```
axelard init "$MONIKER" --chain-id=axelar-testnet-lisbon-3
```

### Download genesis and addrbook

<pre><code><strong>curl -Ls https://snapshots.aknodes.net/snapshots/axelar-testnet/genesis.json > $HOME/.axelar/config/genesis.json
</strong></code></pre>

```
curl -Ls https://snapshots.aknodes.net/snapshots/axelar-testnet/addrbook.json > $HOME/.axelar/config/addrbook.json
```

### **Create Service**

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

### **Download Snapshot**

```
axelard tendermint unsafe-reset-all --home $HOME/.axelar --keep-addr-book 
curl https://snapshots.aknodes.net/snapshots/axelar-testnet/snapshot-axelar-testnet.AKNodes.lz4 | lz4 -dc - | tar -xf - -C $HOME/.axelar
```

### Start the node

```
sudo systemctl restart axelard
journalctl -u axelard -f
```

[buy me a cup of coffe](https://www.paypal.com/paypalme/AbdelAkridi?country.x=NL\&locale.x=en_US)


# Upgrade


# Sync

## Snapshot

```
sudo systemctl stop axelard

cp $HOME/.axelar/data/priv_validator_state.json $HOME/.axelar/priv_validator_state.json.backup 

axelard tendermint unsafe-reset-all --home $HOME/.axelar --keep-addr-book 
curl https://snapshots.aknodes.net/snapshots/axelar-testnet/snapshot-axelar-testnet.AKNodes.lz4 | lz4 -dc - | tar -xf - -C $HOME/.axelar

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

sudo systemctl restart axelard
sudo journalctl -u axelard -f --no-hostname -o cat
```

### State-Sync

```
#!/bin/bash

SNAP_RPC="https://rpc.axelar.testnet.aknodes.net:443"

LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height); \
BLOCK_HEIGHT=$((LATEST_HEIGHT - 2000)); \
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash)

sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ; \
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ; \
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ; \
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"|" $HOME/.axelar/config/config.toml


```

```
chmod 700 state_sync.sh
./state_sync.sh
```

```
systemctl stop axelard
```

```
axelard tendermint unsafe-reset-all --home $HOME/.axelar --keep-addr-book
```

```
sudo systemctl restart axelard && sudo journalctl -u axelard -f
```


# Useful commands

#### Add new key

```bash
axelard keys add wallet
```

#### Recover existing key

```bash
axelard keys add wallet --recover
```

#### List all keys

```bash
axelard keys list
```

#### Delete key

```bash
axelard keys delete wallet
```

#### Query wallet balance

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

#### Create new validator

```bash
axelard tx staking create-validator \
--amount 1000000uaxl \
--pubkey $(axelard tendermint show-validator) \
--moniker "YOUR_MONIKER_NAME" \
--identity "YOUR_KEYBASE_ID" \
--details "YOUR_DETAILS" \
--website "YOUR_WEBSITE_URL" \
--chain-id axelar-testnet-lisbon-3 \
--commission-rate 0.05 \
--commission-max-rate 0.20 \
--commission-max-change-rate 0.01 \
--min-self-delegation 1 \
--from wallet \
--gas-adjustment 1.4 \
--gas auto \
--gas-prices 0.007uaxl \
-y
```

#### Edit validator

```bash
axelard tx staking edit-validator \
--new-moniker "YOUR_MONIKER_NAME" \
--identity "YOUR_KEYBASE_ID" \
--details "YOUR_DETAILS" \
--website "YOUR_WEBSITE_URL" \
--chain-id axelar-testnet-lisbon-3 \
--commission-rate 0.05 \
--from wallet \
--gas-adjustment 1.4 \
--gas auto \
--gas-prices 0.007uaxl \
-y
```

#### Unjail validator

```bash
axelard tx slashing unjail --from wallet --chain-id axelar-testnet-lisbon-3 --gas-adjustment 1.4 --gas auto --gas-prices 0.007uaxl -y
```

#### Jail reason

```bash
axelard query slashing signing-info $(axelard tendermint show-validator)
```

#### List all active validators

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

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

#### Withdraw rewards from all validators

```bash
axelard tx distribution withdraw-all-rewards --from wallet --chain-id axelar-testnet-lisbon-3 --gas-adjustment 1.4 --gas auto --gas-prices 0.007uaxl -y
```

#### Withdraw commission and rewards from your validator

```bash
axelard tx distribution withdraw-rewards $(axelard keys show wallet --bech val -a) --commission --from wallet --chain-id axelar-testnet-lisbon-3 --gas-adjustment 1.4 --gas auto --gas-prices 0.007uaxl -y
```

#### Delegate to yourself

```bash
axelard tx staking delegate $(axelard keys show wallet --bech val -a) 1000000uaxl --from wallet --chain-id axelar-testnet-lisbon-3 --gas-adjustment 1.4 --gas auto --gas-prices 0.007uaxl -y
```

#### Delegate tokens to validator

```bash
axelard tx staking delegate <TO_VALOPER_ADDRESS> 1000000uaxl --from wallet --chain-id axelar-testnet-lisbon-3 --gas-adjustment 1.4 --gas auto --gas-prices 0.007uaxl -y
```

#### Redelegate tokens to another validator

```bash
axelard tx staking redelegate $(axelard keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> 1000000uaxl --from wallet --chain-id axelar-testnet-lisbon-3 --gas-adjustment 1.4 --gas auto --gas-prices 0.007uaxl -y
```

#### Unbond tokens from your validator

```bash
axelard tx staking unbond $(axelard keys show wallet --bech val -a) 1000000uaxl --from wallet --chain-id axelar-testnet-lisbon-3 --gas-adjustment 1.4 --gas auto --gas-prices 0.007uaxl -y
```

#### Send tokens to the wallet

```bash
axelard tx bank send wallet <TO_WALLET_ADDRESS> 1000000uaxl --from wallet --chain-id axelar-testnet-lisbon-3 --gas-adjustment 1.4 --gas auto --gas-prices 0.007uaxl -y
```

#### View validator details

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

#### Slashing params

```bash
axelard q slashing params
```

#### Signing Info

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

#### Get validator info

```bash
axelard status 2>&1 | jq .ValidatorInfo
```

#### Get sync info

```bash
axelard status --node http://localhost:17457 2>&1 | jq .SyncInfo
```

#### Check validator key

```bash
[[ $(axelard q staking validator $(axelard keys show wallet --bech val -a) -oj | jq -r .consensus_pubkey.key) = $(axelard status | jq -r .ValidatorInfo.PubKey.value) ]] && echo -e "\n\e[1m\e[32mTrue\e[0m\n" || echo -e "\n\e[1m\e[31mFalse\e[0m\n"
```

#### Governance

```bash
axelard tx gov vote 1 yes --from wallet --chain-id axelar-testnet-lisbon-3 --gas-prices 0.007uaxl --gas-adjustment 1.5 --gas auto -y
```

#### Remove node

```bash
cd $HOME
sudo systemctl stop axelard
sudo systemctl disable axelard
sudo rm /etc/systemd/system/axelard.service
sudo systemctl daemon-reload
rm -f $(which axelard)
rm -rf $HOME/.axelar
rm -rf $HOME/axelar-core
```

#### Reload service configuration

```bash
sudo systemctl daemon-reload
```

#### Enable service

```bash
sudo systemctl enable axelard
```

#### Disable service

```bash
sudo systemctl disable axelard
```

#### Start service

```bash
sudo systemctl start axelard
```

#### Stop service

```bash
sudo systemctl stop axelard
```

#### Restart service

```bash
sudo systemctl restart axelard
```

#### Check service status

```bash
sudo systemctl status axelard
```

#### Check service logs

```bash
sudo journalctl -u axelard -f --no-hostname -o cat
```


# Evmos

Evmos is the blockchain network, that lets you use a new generation of applications, built by developers across the world.

<figure><img src="https://383863627-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpsGHvwFmpqkZQJbG9ZSq%2Fuploads%2FZ25Xiy8DXlFsulgoIAnI%2Fqqqq-removebg-preview.png?alt=media&amp;token=8f2ac755-7d71-4254-ba8a-a1572cd7112f" alt="" width="100"><figcaption></figcaption></figure>

<table><thead><tr><th>Chain ID</th><th width="218.33333333333331">Version tag</th></tr></thead><tbody><tr><td>evmos_9000-4</td><td>v15.0.0-rc2</td></tr></tbody></table>

| Binary Name | Wasm    | SDK version |
| ----------- | ------- | ----------- |
| evmosd      | Enabled | v0.47.5     |

{% tabs %}
{% tab title="RPC" %}
<https://rpc.evmos.testnet.aknodes.net>
{% endtab %}

{% tab title="API" %}
<https://api.evmos.testnet.aknodes.net>
{% endtab %}

{% tab title="gRPC" %}
grpc.evmos.testnet.aknodes.net:9090
{% endtab %}
{% endtabs %}


# Installation (PebbleDB)

Minimum Hardware Requirements 4x CPUs; the faster clock speed the better  8GB RAM  100GB of storage (SSD or NVME)

## <mark style="color:blue;">Setup validator name</mark> <a href="#setup-validator-name" id="setup-validator-name"></a>

```
MONIKER="YOUR_MONIKER_GOES_HERE"
```

### Install dependencies <a href="#install-dependencies" id="install-dependencies"></a>

```
sudo apt update
sudo apt-get install git curl build-essential make jq gcc snapd chrony lz4 tmux unzip bc -y
```

### **INSTALL GO**

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

### Install Node

```
# Clone project repository
cd $HOME
rm -rf evmos
git clone https://github.com/evmos/evmos.git
cd evmos
git checkout v15.0.0-rc2

go mod edit -replace github.com/tendermint/tm-db=github.com/notional-labs/tm-db@v0.6.8-pebble
go mod tidy
go mod edit -replace github.com/cometbft/cometbft-db=github.com/notional-labs/cometbft-db@pebble
go mod tidy

go install -ldflags "-w -s -X github.com/cosmos/cosmos-sdk/types.DBBackend=pebbledb \
 -X github.com/cosmos/cosmos-sdk/version.Version=$(git describe --tags)-pebbledb \
 -X github.com/cosmos/cosmos-sdk/version.Commit=$(git log -1 --format='%H')" -tags pebbledb ./...
```

## **Initialize Node**

<pre><code><strong>evmosd config chain-id evmos_9000-4
</strong>evmosd config keyring-backend test
evmosd config node tcp://localhost:26657

evmosd init $MONIKER --chain-id evmos_9000-4
</code></pre>

### Node Config

```
# Download genesis and addrbook
curl -Ls https://snapshots.aknodes.net/snapshots/evmos-testnet/genesis.json > $HOME/.evmosd/config/genesis.json
curl -Ls https://snapshots.aknodes.net/snapshots/evmos-testnet/addrbook.json > $HOME/.evmosd/config/addrbook.json

# Add seeds
sed -i 's/seeds = ""/seeds = "52063043827594ca2857f5029fa6952cb8048502@rpc-t.evmos.nodestake.top:666"/' ~/.evmosd/config/config.toml

# Set minimum gas price
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"25000000aevmos\"|" $HOME/.evmosd/config/app.toml

# prunning
pruning="custom"
pruning_keep_recent="50000"
pruning_keep_every="0"
pruning_interval="19"

sed -i "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.evmosd/config/app.toml
sed -i "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.evmosd/config/app.toml
sed -i "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.evmosd/config/app.toml
sed -i "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.evmosd/config/app.toml

# snapshots
sed -i 's/snapshot-interval *=.*/snapshot-interval = 0/' $HOME/.evmosd/config/app.toml

# set pebbledb
db_backend="pebbledb"
sed -i "s/^db_backend *=.*/db_backend = \"$db_backend\"/" $HOME/.evmosd/config/config.toml
sed -i "s/^app-db-backend *=.*/app-db-backend = \"$db_backend\"/" $HOME/.evmosd/config/app.toml
```

### **Create Service**

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

### **Download Snapshot**

```
evmosd tendermint unsafe-reset-all --home $HOME/.evmosd --keep-addr-book 
curl https://snapshots.aknodes.net/snapshots/evmos-testnet/snapshot-evmos-testnet.AKNodes.lz4 | lz4 -dc - | tar -xf - -C $HOME/.evmosd
```

### Start the node

```
sudo systemctl restart evmosd
journalctl -u evmosd -f
```

[buy me a cup of coffe](https://www.paypal.com/paypalme/AbdelAkridi?country.x=NL\&locale.x=en_US)


# Upgrade


# Sync

## Snapshot

```
sudo systemctl stop evmosd

cp $HOME/.evmosd/data/priv_validator_state.json $HOME/.evmosd/priv_validator_state.json.backup 

evmosd tendermint unsafe-reset-all --home $HOME/.evmosd --keep-addr-book 
curl https://snapshots.aknodes.net/snapshots/evmos-testnet/snapshot-evmos-testnet.AKNodes.lz4 | lz4 -dc - | tar -xf - -C $HOME/.evmosd

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

sudo systemctl restart evmosd
sudo journalctl -u evmosd -f --no-hostname -o cat
```

### State-Sync

```
#!/bin/bash

SNAP_RPC="https://rpc.evmos.testnet.aknodes.net:443"

LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height); \
BLOCK_HEIGHT=$((LATEST_HEIGHT - 2000)); \
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash)

sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ; \
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ; \
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ; \
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"|" $HOME/.evmosd/config/config.toml


```

```
chmod 700 state_sync.sh
./state_sync.sh
```

```
systemctl stop evmosd
```

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

```
sudo systemctl restart evmosd && sudo journalctl -u evmosd -f
```


# Useful commands

#### Add new key

```bash
evmosd keys add wallet
```

#### Recover existing key

```bash
evmosd keys add wallet --recover
```

#### List all keys

```bash
evmosd keys list
```

#### Delete key

```bash
evmosd keys delete wallet
```

#### Query wallet balance

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

#### Create new validator

```bash
evmosd tx staking create-validator \
--amount 1000000aevmos \
--pubkey $(evmosd tendermint show-validator) \
--moniker "YOUR_MONIKER_NAME" \
--identity "YOUR_KEYBASE_ID" \
--details "YOUR_DETAILS" \
--website "YOUR_WEBSITE_URL" \
--chain-id evmos_9000-4 \
--commission-rate 0.05 \
--commission-max-rate 0.20 \
--commission-max-change-rate 0.01 \
--min-self-delegation 1 \
--from wallet \
--gas-adjustment 1.4 \
--gas auto \
--gas-prices 25000000aevmos \
-y
```

#### Edit validator

```bash
evmosd tx staking edit-validator \
--new-moniker "YOUR_MONIKER_NAME" \
--identity "YOUR_KEYBASE_ID" \
--details "YOUR_DETAILS" \
--website "YOUR_WEBSITE_URL" \
--chain-id evmos_9000-4 \
--commission-rate 0.05 \
--from wallet \
--gas-adjustment 1.4 \
--gas auto \
--gas-prices 25000000aevmos \
-y
```

#### Unjail validator

```bash
evmosd tx slashing unjail --from wallet --chain-id evmos_9000-4 --gas-adjustment 1.4 --gas auto --gas-prices 25000000aevmos -y
```

#### Jail reason

```bash
evmosd query slashing signing-info $(evmosd tendermint show-validator)
```

#### List all active validators

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

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

#### Withdraw rewards from all validators

```bash
evmosd tx distribution withdraw-all-rewards --from wallet --chain-id evmos_9000-4 --gas-adjustment 1.4 --gas auto --gas-prices 25000000aevmos -y
```

#### Withdraw commission and rewards from your validator

```bash
evmosd tx distribution withdraw-rewards $(evmosd keys show wallet --bech val -a) --commission --from wallet --chain-id evmos_9000-4 --gas-adjustment 1.4 --gas auto --gas-prices 25000000aevmos -y
```

#### Delegate to yourself

```bash
evmosd tx staking delegate $(evmosd keys show wallet --bech val -a) 1000000aevmos --from wallet --chain-id evmos_9000-4 --gas-adjustment 1.4 --gas auto --gas-prices 25000000aevmos -y
```

#### Delegate tokens to validator

```bash
evmosd tx staking delegate <TO_VALOPER_ADDRESS> 1000000aevmos --from wallet --chain-id evmos_9000-4 --gas-adjustment 1.4 --gas auto --gas-prices 25000000aevmos -y
```

#### Redelegate tokens to another validator

```bash
evmosd tx staking redelegate $(evmosd keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> 1000000aevmos --from wallet --chain-id evmos_9000-4 --gas-adjustment 1.4 --gas auto --gas-prices 25000000aevmos -y
```

#### Unbond tokens from your validator

```bash
evmosd tx staking unbond $(evmosd keys show wallet --bech val -a) 1000000aevmos --from wallet --chain-id evmos_9000-4 --gas-adjustment 1.4 --gas auto --gas-prices 25000000aevmos -y
```

#### Send tokens to the wallet

```bash
evmosd tx bank send wallet <TO_WALLET_ADDRESS> 1000000aevmos --from wallet --chain-id evmos_9000-4 --gas-adjustment 1.4 --gas auto --gas-prices 25000000aevmos -y
```

#### View validator details

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

#### Slashing params

```bash
evmosd q slashing params
```

#### Signing Info

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

#### Get validator info

```bash
evmosd status 2>&1 | jq .ValidatorInfo
```

#### Get sync info

```bash
evmosd status 2>&1 | jq .SyncInfo
```

#### Check validator key

```bash
[[ $(evmosd q staking validator $(evmosd keys show wallet --bech val -a) -oj | jq -r .consensus_pubkey.key) = $(evmosd status | jq -r .ValidatorInfo.PubKey.value) ]] && echo -e "\n\e[1m\e[32mTrue\e[0m\n" || echo -e "\n\e[1m\e[31mFalse\e[0m\n"
```

#### Governance

```bash
evmosd tx gov vote 1 yes --from wallet --chain-id evmos_9000-4 --gas-prices 25000000aevmos --gas-adjustment 1.5 --gas auto -y
```

#### Remove node

```bash
cd $HOME
sudo systemctl stop evmosd
sudo systemctl disable evmosd
sudo rm /etc/systemd/system/evmosd.service
sudo systemctl daemon-reload
rm -f $(which evmosd)
rm -rf $HOME/.evmosd
rm -rf $HOME/evmos
```

#### Reload service configuration

```bash
sudo systemctl daemon-reload
```

#### Enable service

```bash
sudo systemctl enable evmosd
```

#### Disable service

```bash
sudo systemctl disable evmosd
```

#### Start service

```bash
sudo systemctl start evmosd
```

#### Stop service

```bash
sudo systemctl stop evmosd
```

#### Restart service

```bash
sudo systemctl restart evmosd
```

#### Check service status

```bash
sudo systemctl status evmosd
```

#### Check service logs

```bash
sudo journalctl -u evmosd -f --no-hostname -o cat
```


# Lava

We introduce the Lava Network, a trustless market for blockchain Remote Procedure Calls(RPC). Lava facilitates relay requests to any blockchain

### Explorer

{% embed url="<https://explorer.aknodes.com/LAVA-TESTNET/>" %}

<figure><img src="https://383863627-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpsGHvwFmpqkZQJbG9ZSq%2Fuploads%2FxozZDDKPJyeTj2gkwbnf%2Flava.png?alt=media&amp;token=cfd033b2-4b3d-423c-9c69-b9d1eca52af3" alt="" width="110"><figcaption></figcaption></figure>

<table><thead><tr><th>Chain ID</th><th width="218.33333333333331">Version tag</th></tr></thead><tbody><tr><td>lava-testnet-2</td><td>v5.2.0</td></tr></tbody></table>

| Binary Name | Wasm     | SDK version |
| ----------- | -------- | ----------- |
| lavad       | Disabled | v0.47.3     |

{% tabs %}
{% tab title="RPC" %}
<https://rpc.lava.aknodes.net>
{% endtab %}

{% tab title="API" %}
<https://api.lava.aknodes.net>
{% endtab %}

{% tab title="gRPC" %}
grpc.lava.aknodes.net:17090
{% endtab %}
{% endtabs %}


# Installation

Minimum Hardware Requirements 4x CPUs; the faster clock speed the better  8GB RAM  100GB of storage (SSD or NVME)

## <mark style="color:blue;">Setup validator name</mark> <a href="#setup-validator-name" id="setup-validator-name"></a>

```
MONIKER="YOUR_MONIKER_GOES_HERE"
```

### Install dependencies <a href="#install-dependencies" id="install-dependencies"></a>

```
sudo apt update
sudo apt-get install git curl build-essential make jq gcc snapd chrony lz4 tmux unzip bc -y
```

### **INSTALL GO**

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

### Install Node

```
export LAVA_BINARY=lavad

cd || return
rm -rf lava
git clone https://github.com/lavanet/lava
cd lava || return
git checkout v4.1.0
make install

make build
```

## **Initialize Node**

```
lavad init "$MONIKER" --chain-id=lava-testnet-2
```

### Download genesis and addrbook

<pre><code><strong>curl -Ls https://snapshots.aknodes.net/snapshots/lava/genesis.json > $HOME/.lava/config/genesis.json
</strong></code></pre>

```
curl -Ls https://snapshots.aknodes.net/snapshots/lava/addrbook.json > $HOME/.lava/config/addrbook.json
```

### **Create Service**

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

### **Download Snapshot**

```
lavad tendermint unsafe-reset-all --home $HOME/.lava --keep-addr-book 
curl https://snapshots.aknodes.net/snapshots/lava/snapshot-lava.AKNodes.lz4 | lz4 -dc - | tar -xf - -C $HOME/.lava
```

### Start the node

```
sudo systemctl restart lavad
journalctl -u lavad -f
```


# Upgrade

### Upgrade to v4.2.0 at height: 2311663

### Manual upgrade <a href="#manual" id="manual"></a>

```bash
cd $HOME
wget -O lavad https://github.com/lavanet/lava/releases/download/v5.2.0/lavad-v5.2.0-linux-amd64
chmod +x $HOME/lavad
sudo mv $HOME/lavad $(which lavad)
sudo systemctl restart lavad && sudo journalctl -u lavad -f
```

### Auto upgrade <a href="#auto" id="auto"></a>

```bash
cd $HOME && \
wget -O lavad https://github.com/lavanet/lava/releases/download/v5.2.0/lavad-v5.2.0-linux-amd64 && \
chmod +x $HOME/lavad && \
old_bin_path=$(which lavad) && \
home_path=$HOME && \
rpc_port=$(grep -m 1 -oP '^laddr = "\K[^"]+' "$HOME/.lava/config/config.toml" | cut -d ':' -f 3) && \
tmux new -s lava-upgrade "sudo bash -c 'curl -s https://raw.githubusercontent.com/appieasahbie/testnet-guides/main/utils/autoupgrade/upgrade.sh | bash -s -- -u \"2311663\" -b lavad -n \"$HOME/lavad\" -o \"$old_bin_path\" -h \"$home_path\" -p \"https://api.lava.aknodes.net//cosmos/gov/v1/proposals/283\" -r \"$rpc_port\"'"
```

## Upgrade Lavap to v4.1.0

```
wget -O lavap https://github.com/lavanet/lava/releases/download/v4.1.0/lavap-v4.1.0-linux-amd64
chmod +x lavap
mv lavap $(which lavap)
sudo systemctl restart lavap && sudo journalctl -u lavap -f -o cat
```


# Sync

## Snapshot

Update every 6 hours

```
sudo systemctl stop lavad

cp $HOME/.lava/data/priv_validator_state.json $HOME/.lava/priv_validator_state.json.backup 

lavad tendermint unsafe-reset-all --home $HOME/.lava --keep-addr-book 
curl https://snapshots.aknodes.net/snapshots/lava/snapshot-lava.AKNodes.lz4 | lz4 -dc - | tar -xf - -C $HOME/.lava

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

sudo systemctl restart lavad
sudo journalctl -u lavad -f --no-hostname -o cat
```

### State-Sync

```
sudo systemctl stop lavad

cp $HOME/.lava/data/priv_validator_state.json $HOME/.lava/priv_validator_state.json.backup
lavad tendermint unsafe-reset-all --home $HOME/.lava

peers="3306e10f1635f71e1d93219a369f4907ec062ad5@167.235.14.83:17656,3693ea5a8a9c0590440a7d6c9a98a022ce3b2455@lava-testnet-peer.itrocket.net:20656,0516c4d11552b334a683bdb4410fa22ef7e3f8ba@65.21.239.60:11656,e0f25590f8074b4ea70f069f9be332b19f81f344@23.88.70.109:15656,1f7e104872a3f4259343b8123f333b5b24869b02@159.89.111.21:26656"  
SNAP_RPC="https://rpc.lava.aknodes.net:443"

sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.lava/config/config.toml 

LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height);
BLOCK_HEIGHT=$((LATEST_HEIGHT - 1000));
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash) 

echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH && sleep 2

sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ;
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ;
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ;
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"| ;
s|^(seeds[[:space:]]+=[[:space:]]+).*$|\1\"\"|" $HOME/.lava/config/config.toml

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

sudo systemctl restart lavad && sudo journalctl -u lavad -f
```


# Useful commands

### <mark style="color:blue;">Service operations</mark> ⚙️ <a href="#service-operations" id="service-operations"></a>

Check logs

```bash
sudo journalctl -u lavad -f
```

Start service

```bash
sudo systemctl start lavad
```

Stop service

```bash
sudo systemctl stop lavad
```

Restart service

```bash
sudo systemctl restart lavad
```

Check service status

```bash
sudo systemctl status lavad
```

Reload services

```bash
sudo systemctl daemon-reload
```

Enable Service

```bash
sudo systemctl enable lavad
```

Disable Service

```bash
sudo systemctl disable lavad
```

Sync info

```bash
lavad status 2>&1 | jq .SyncInfo
```

Node info

```bash
lavad status 2>&1 | jq .NodeInfo
```

Your node peer

```bash
echo $(lavad tendermint show-node-id)'@'$(wget -qO- eth0.me)':'$(cat $HOME/.lava/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')
```

### <mark style="color:purple;">Key management</mark> <a href="#key-management" id="key-management"></a>

Add New Wallet

```bash
lavad keys add $WALLET
```

Restore executing wallet

```bash
lavad keys add $WALLET --recover
```

List All Wallets

```bash
lavad keys list
```

Delete wallet

```bash
lavad keys delete $WALLET
```

Check Balance

```bash
lavad q bank balances $(lavad keys show $WALLET -a)
```

Export Key (save to wallet.backup)

```bash
lavad keys export $WALLET
```

Import Key (restore from wallet.backup)

```bash
lavad keys import $WALLET wallet.backup
```

### <mark style="color:orange;">Tokens</mark> <a href="#tokens" id="tokens"></a>

Withdraw all rewards

```bash
lavad tx distribution withdraw-all-rewards --from $WALLET --chain-id lava-testnet-2 --fees 300ulava
```

Withdraw rewards and commission from your validator

```bash
lavad tx distribution withdraw-rewards $VALOPER_ADDRESS --from $WALLET --commission --chain-id lava-testnet-2 --fees 300ulava -y
```

Check your balance

```bash
lavad query bank balances $WALLET_ADDRESS
```

Delegate to Yourself

```bash
lavad tx staking delegate $(lavad keys show $WALLET --bech val -a) 1000000ulava --from $WALLET --chain-id lava-testnet-2 --fees 300ulava -y
```

Delegate

```bash
lavad tx staking delegate <TO_VALOPER_ADDRESS> 1000000ulava --from $WALLET --chain-id lava-testnet-2 --fees 300ulava -y
```

Redelegate Stake to Another Validator

```bash
lavad tx staking redelegate $VALOPER_ADDRESS <TO_VALOPER_ADDRESS> 1000000ulava --from $WALLET --chain-id lava-testnet-2 --fees 300ulava -y
```

Unbond

```bash
lavad tx staking unbond $(lavad keys show $WALLET --bech val -a) 1000000ulava --from $WALLET --chain-id lava-testnet-2 --fees 300ulava -y
```

Transfer Funds

```bash
lavad tx bank send $WALLET_ADDRESS <TO_WALLET_ADDRESS> 1000000ulava --fees 300ulava -y
```

### <mark style="color:red;">Validator operations</mark> <a href="#validator-operations" id="validator-operations"></a>

Create New Validator

```bash
lavad tx staking create-validator \
--amount 1000000ulava \
--from $WALLET \
--commission-rate 0.1 \
--commission-max-rate 0.2 \
--commission-max-change-rate 0.01 \
--min-self-delegation 1 \
--pubkey $(lavad tendermint show-validator) \
--moniker "$MONIKER" \
--identity "" \
--details "xxxxxxxxxx" \
--chain-id lava-testnet-2 \
--fees 300ulava \
-y
```

Edit Existing Validator

```bash
lavad tx staking edit-validator \
--commission-rate 0.1 \
--new-moniker "$MONIKER" \
--identity "" \
--details "xxxxxxxxxx" \
--from $WALLET \
--chain-id lava-testnet-2 \
--fees 300ulava \
-y
```

Validator info

```bash
lavad status 2>&1 | jq .ValidatorInfo
```

Validator Details

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

Jailing info

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

Unjail validator

```bash
lavad tx slashing unjail --from $WALLET --chain-id lava-testnet-2 --fees 300ulava -y
```

Active Validators List

```bash
lavad q staking validators -oj --limit=2000 | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " 	 " + .description.moniker' | sort -gr | nl
```

Check Validator key

```bash
[[ $(lavad q staking validator $VALOPER_ADDRESS -oj | jq -r .consensus_pubkey.key) = $(lavad status | jq -r .ValidatorInfo.PubKey.value) ]] && echo -e "Your key status is ok" || echo -e "Your key status is error"
```

Signing info

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

### <mark style="color:green;">Governance</mark> <a href="#governance" id="governance"></a>

Create New Text Proposal

```bash
lavad  tx gov submit-proposal \
--title "" \
--description "" \
--deposit 1000000ulava \
--type Text \
--from $WALLET \
--fees 300ulava \
-y 
```

Proposals List

```bash
lavad query gov proposals
```

Proposal ID

View proposal

```bash
lavad query gov proposal 1
```

Vote

```bash
lavad tx gov vote 1 yes --from $WALLET --chain-id lava-testnet-2  --fees 300ulava -y
```

#### <mark style="background-color:yellow;">Delete Node</mark>

```
sudo systemctl stop lavad
sudo systemctl disable lavad
sudo rm -rf /etc/systemd/system/lavad.service
sudo rm $(which lavad)
sudo rm -rf $HOME/.lava
sed -i "/LAVA_/d" $HOME/.bash_profile
```


# Migrate validator

## Migrate your validator to another machine

#### 1. install the testnet on your new server

#### 2. Confirm that you have the recovery seed phrase information for the active key running on the old machine

**backup your key**

```
lavad keys export mykey
```

> *This prints the private key that you can then paste into the file `mykey.backup`*

**get list of keys**

```
lavad keys list
```

#### 3. Recover the active key of the old machine on the new machine

**This can be done with the mnemonics**

```
lavad keys add mykey --recover
```

**Or with the backup file `mykey.backup` from the previous step**

```
lavad keys import mykey mykey.backup
```

#### 4. Wait for the new full node on the new machine to finish catching-up

**To check synchronization status**

```
lavad status 2>&1 | jq .SyncInfo
```

> *`catching_up` should be equal to `false`*

#### 5. After the new node has caught-up, stop the validator node

> *To prevent double signing, you should stop the validator node before stopping the new full node to ensure the new node is at a greater block height than the validator node* *If the new node is behind the old validator node, then you may double-sign blocks*

**Stop and disable service on old machine**

```
sudo systemctl stop lavad
sudo systemctl disable lavad
```

> *The validator should start missing blocks at this point*

#### 6. Stop service on new machine

```
sudo systemctl stop lavad
```

#### 7. Move the validator's private key from the old machine to the new machine

**Private key is located in: `~/.lavad/config/priv_validator_key.json`**

> *After being copied, the key `priv_validator_key.json` should then be removed from the old node's config directory to prevent double-signing if the node were to start back up*

```
sudo mv ~/.lavad/config/priv_validator_key.json ~/.lavad/bak_priv_validator_key.json
```

#### 8. Start service on a new validator node

```
sudo systemctl start lavad
```

> *The new node should start signing blocks once caught-up*

#### 9. Make sure your validator is not jailed

**To unjail your validator**

```
lavad tx slashing unjail --chain-id $LAVA_CHAIN_ID --from mykey --gas=auto -y
```


# Ojo

### Explorer

{% embed url="<https://explorer.aknodes.com/ojo/>" %}

<figure><img src="https://383863627-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpsGHvwFmpqkZQJbG9ZSq%2Fuploads%2Fq9amPCRgzAHICOt8XhGs%2Fhy-removebg-preview.png?alt=media&amp;token=c3aae448-0463-4376-b319-a2de74251fae" alt="" width="155"><figcaption></figcaption></figure>

<table><thead><tr><th>Chain ID</th><th width="218.33333333333331">Version tag</th></tr></thead><tbody><tr><td><p></p><p>ojo-devnet</p></td><td>HEAD-ad5a2377134aa13d7d76575b95613cf8ed12d1e4</td></tr></tbody></table>

| Binary Name | Wasm     | SDK version |
| ----------- | -------- | ----------- |
| ojo         | Disabled | v0.46.7     |

{% tabs %}
{% tab title="RPC" %}
<https://rpc.ojo.aknodes.net>
{% endtab %}

{% tab title="API" %}
<https://api.ojo.aknodes.net>
{% endtab %}

{% tab title="gRPC" %}
grpc.ojo.aknodes.net:9590
{% endtab %}
{% endtabs %}


# Installation

Minimum Hardware Requirements 4x CPUs; the faster clock speed the better  8GB RAM  100GB of storage (SSD or NVME)

## <mark style="color:blue;">Setup validator name</mark> <a href="#setup-validator-name" id="setup-validator-name"></a>

```
MONIKER="YOUR_MONIKER_GOES_HERE"
```

### Install dependencies <a href="#install-dependencies" id="install-dependencies"></a>

```
sudo apt update
sudo apt-get install git curl build-essential make jq gcc snapd chrony lz4 tmux unzip bc -y
```

### **INSTALL GO**

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

### Install Node

```
cd || return

rm -rf ojo

git clone https://github.com/ojo-network/ojo

cd ojo || return

git checkout v0.1.2

make install

```

## **Initialize Node**

```
ojod init "$MONIKER" --chain-id=ojo-devnet
```

### Download genesis and addrbook

<pre><code><strong>curl -Ls https://snapshots.aknodes.net/snapshots/ojo/genesis.json > $HOME/.ojo/config/genesis.json
</strong></code></pre>

```
curl -Ls https://snapshots.aknodes.net/snapshots/ojo/addrbook.json > $HOME/.ojo/config/addrbook.json
```

### **Create Service**

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

### **Download Snapshot**

```
ojod tendermint unsafe-reset-all --home $HOME/.ojod --keep-addr-book 
curl https://snapshots.aknodes.net/snapshots/ojo/snapshot-ojo.AKNodes.lz4 | lz4 -dc - | tar -xf - -C $HOME/.ojo
```

### Start the node

```
sudo systemctl restart ojod
journalctl -u ojod -f
```

[buy me a cup of coffe](https://www.paypal.com/paypalme/AbdelAkridi?country.x=NL\&locale.x=en_US)


# Upgrade


# Sync

## Snapshot

Update every 6 hours

```
sudo systemctl stop ojod

cp $HOME/.ojo/data/priv_validator_state.json $HOME/.ojo/priv_validator_state.json.backup 

ojod tendermint unsafe-reset-all --home $HOME/.ojo --keep-addr-book 
curl https://snapshots.aknodes.net/snapshots/ojo/snapshot-ojo.AKNodes.lz4 | lz4 -dc - | tar -xf - -C $HOME/.ojo

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

sudo systemctl restart ojod
sudo journalctl -u ojod -f --no-hostname -o cat
```

### State-Sync

```
sudo systemctl stop ojod

cp $HOME/.ojo/data/priv_validator_state.json $HOME/.ojo/priv_validator_state.json.backup
ojod tendermint unsafe-reset-all --home $HOME/.ojo

peers="a5614b1bbd5028e6df6bc279e71d984bf2699088@167.235.14.83:13956,f1da105838c677cb1e07a7a94cb277cdf24dd2df@91.207.54.57:26656,7664f59f128eb81d7209e33f59adcc5386aac67c@95.217.110.174:26656,2032c0663fb43bc45b69f079131eb1517a3266e4@31.220.75.138:30656,7a1a618b53bd0d16ec044fe21b53c5607abf176d@35.205.157.12:26656,8d800f25d7b8576cfeddf0ab1f2f21474e299486@124.115.207.253:26656,671e90537802858d7bdaa4f9ff0b0cea2323f005@88.198.52.46:19856,b60d74bff60c488bab38168a716ebe369fffb540@123.138.66.167:26656,e7ffd4c351785476aa3b362047759a8cad295da6@95.216.44.225:11656,564cbed0f73137c11620b37e2bf27f8b3f960e21@91.207.54.121:26656,8825b79f5610daea5ce745aed719ef2cbd198878@95.217.39.116:11656,698a8133bb74ca288ee8a45fc4ca950116a7da0e@91.207.54.204:26656,111dd6b7ac9d0f80d7a04ce212267ce95cb913e9@65.21.133.86:26656,60d5e034d23e14821507849a811042000abaee11@207.244.231.52:34656,081ff903784a3f1b69522d6167c998c88c91ce61@65.108.13.154:27656,c8135e557ae09c9f05ff9fca5cc66caf4f7dcb6a@91.207.54.156:26656,ee026a937bbb120e754a5af4cc9417bc0a10642f@36.47.76.171:26656,306b7549a5fd41c77a1695dea306292ffae38d8b@34.140.34.185:26656,76a0e0b05f4d25ca9ff80d9e49b42308f168fe65@91.207.54.81:26656,ac3d95ea70dbb52d2cd7652692430938faa7c3a8@158.220.109.60:26656"  
SNAP_RPC="https://rpc.ojo.aknodes.net:443"

sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.ojo/config/config.toml 

LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height);
BLOCK_HEIGHT=$((LATEST_HEIGHT - 1000));
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash) 

echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH && sleep 2

sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ;
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ;
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ;
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"| ;
s|^(seeds[[:space:]]+=[[:space:]]+).*$|\1\"\"|" $HOME/.ojo/config/config.toml

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

sudo systemctl restart ojod && sudo journalctl -u ojod -f
```


# Useful commands

### <mark style="color:blue;">Service operations</mark> ⚙️ <a href="#service-operations" id="service-operations"></a>

Check logs

```bash
sudo journalctl -u ojod -f
```

Start service

```bash
sudo systemctl start ojod
```

Stop service

```bash
sudo systemctl stop ojod
```

Restart service

```bash
sudo systemctl restart ojod
```

Check service status

```bash
sudo systemctl status ojod
```

Reload services

```bash
sudo systemctl daemon-reload
```

Enable Service

```bash
sudo systemctl enable ojod
```

Disable Service

```bash
sudo systemctl disable ojod
```

Sync info

```bash
ojod status 2>&1 | jq .SyncInfo
```

Node info

```bash
ojod status 2>&1 | jq .NodeInfo
```

Your node peer

```bash
echo $(ojod tendermint show-node-id)'@'$(wget -qO- eth0.me)':'$(cat $HOME/.ojo/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')
```

### <mark style="color:purple;">Key management</mark> <a href="#key-management" id="key-management"></a>

Add New Wallet

```bash
ojod keys add $WALLET
```

Restore executing wallet

```bash
ojod keys add $WALLET --recover
```

List All Wallets

```bash
ojod keys list
```

Delete wallet

```bash
ojod keys delete $WALLET
```

Check Balance

```bash
ojod q bank balances $(ojod keys show $WALLET -a)
```

Export Key (save to wallet.backup)

```bash
ojod keys export $WALLET
```

Import Key (restore from wallet.backup)

```bash
ojod keys import $WALLET wallet.backup
```

### <mark style="color:orange;">Tokens</mark> <a href="#tokens" id="tokens"></a>

Withdraw all rewards

```bash
ojod tx distribution withdraw-all-rewards --from $WALLET --chain-id ojo-devnet --gas auto --gas-adjustment 1.5
```

Withdraw rewards and commission from your validator

```bash
ojod tx distribution withdraw-rewards $VALOPER_ADDRESS --from $WALLET --commission --chain-id ojo-devnet --gas auto --gas-adjustment 1.5 -y
```

Check your balance

```bash
ojod query bank balances $WALLET_ADDRESS
```

Delegate to Yourself

```bash
ojod tx staking delegate $(ojod keys show $WALLET --bech val -a) 1000000uojo --from $WALLET --chain-id ojo-devnet --gas auto --gas-adjustment 1.5 -y
```

Delegate

```bash
ojod tx staking delegate <TO_VALOPER_ADDRESS> 1000000uojo --from $WALLET --chain-id ojo-devnet --gas auto --gas-adjustment 1.5 -y
```

Redelegate Stake to Another Validator

```bash
ojod tx staking redelegate $VALOPER_ADDRESS <TO_VALOPER_ADDRESS> 1000000uojo --from $WALLET --chain-id ojo-devnet --gas auto --gas-adjustment 1.5 -y
```

Unbond

```bash
ojod tx staking unbond $(ojod keys show $WALLET --bech val -a) 1000000uojo --from $WALLET --chain-id ojo-devnet --gas auto --gas-adjustment 1.5 -y
```

Transfer Funds

```bash
ojod tx bank send $WALLET_ADDRESS <TO_WALLET_ADDRESS> 1000000uojo --gas auto --gas-adjustment 1.5 -y
```

### <mark style="color:red;">Validator operations</mark> <a href="#validator-operations" id="validator-operations"></a>

Create New Validator

```bash
ojod tx staking create-validator \
--amount 1000000uojo \
--from $WALLET \
--commission-rate 0.1 \
--commission-max-rate 0.2 \
--commission-max-change-rate 0.01 \
--min-self-delegation 1 \
--pubkey $(ojod tendermint show-validator) \
--moniker "$MONIKER" \
--identity "" \
--details "XXXXXXXXXX" \
--chain-id ojo-devnet \
--gas auto --gas-adjustment 1.5 \
-y
```

Edit Existing Validator

```bash
ojod tx staking edit-validator \
--commission-rate 0.1 \
--new-moniker "$MONIKER" \
--identity "" \
--details "XXXXXXXXXXXXX" \
--from $WALLET \
--chain-id ojo-devnet \
--gas auto --gas-adjustment 1.5 \
-y
```

Validator info

```bash
ojod status 2>&1 | jq .ValidatorInfo
```

Validator Details

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

Jailing info

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

Unjail validator

```bash
ojod tx slashing unjail --from $WALLET --chain-id ojo-devnet --gas auto --gas-adjustment 1.5 -y
```

Active Validators List

```bash
ojod q staking validators -oj --limit=2000 | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " 	 " + .description.moniker' | sort -gr | nl
```

Check Validator key

```bash
[[ $(ojod q staking validator $VALOPER_ADDRESS -oj | jq -r .consensus_pubkey.key) = $(ojod status | jq -r .ValidatorInfo.PubKey.value) ]] && echo -e "Your key status is ok" || echo -e "Your key status is error"
```

Signing info

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

### Governance <a href="#governance" id="governance"></a>

Create New Text Proposal

```bash
ojod  tx gov submit-proposal \
--title "" \
--description "" \
--deposit 1000000uojo \
--type Text \
--from $WALLET \
--gas auto --gas-adjustment 1.5 \
-y 
```

Proposals List

```bash
ojod query gov proposals
```

Proposal

View proposal

```bash
ojod query gov proposal 1
```

Vote

```bash
ojod tx gov vote 1 yes --from $WALLET --chain-id ojo-devnet  --gas auto --gas-adjustment 1.5 -y
```

#### Delete Node

```
sudo systemctl stop ojod
sudo systemctl disable ojod
sudo rm -rf /etc/systemd/system/ojod.service
sudo rm $(which ojod)
sudo rm -rf $HOME/.ojo
sed -i "/OJO_/d" $HOME/.bash_profile
```


# Axone

Axone: The collaborative AI orchestration layer powering the decentralized AI economy. Connect builders, data, and infrastructure seamlessly.

## Explorer

{% embed url="<https://explorer.aknodes.com/AXONE-TESTNET>" %}

<figure><img src="https://383863627-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpsGHvwFmpqkZQJbG9ZSq%2Fuploads%2FkbJJofeeZ9oKpS1B4Xin%2FEeZIYE7B_400x400-removebg-preview.png?alt=media&amp;token=5a9805e4-6792-48fd-b231-49ca91bed68d" alt="" width="200"><figcaption></figcaption></figure>

<table><thead><tr><th>Chain ID</th><th width="218.33333333333331">Version tag</th></tr></thead><tbody><tr><td>axone-dentrite-2</td><td>12.0.0</td></tr></tbody></table>

| Binary Name | Wasm    | SDK version |
| ----------- | ------- | ----------- |
| axoned      | Enabled | v0.47.3     |

{% tabs %}
{% tab title="RPC" %}
<https://rpc.axone.aknodes.net>
{% endtab %}

{% tab title="API" %}
<https://api.axone.aknodes.net>
{% endtab %}

{% tab title="gRPC" %}
grpc.axone.aknodes.net:9290
{% endtab %}
{% endtabs %}


# Installation

Minimum Hardware Requirements 4x CPUs; the faster clock speed the better  8GB RAM  100GB of storage (SSD or NVME)

## <mark style="color:blue;">Setup validator name</mark> <a href="#setup-validator-name" id="setup-validator-name"></a>

```
MONIKER="YOUR_MONIKER_GOES_HERE"
```

### Install dependencies <a href="#install-dependencies" id="install-dependencies"></a>

```
sudo apt update
sudo apt-get install git curl build-essential make jq gcc snapd chrony lz4 tmux unzip bc -y
```

### **INSTALL GO**

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

### Install Node

```
cd || return

rm -rf axoned

git clone https://github.com/axone-protocol/axoned

cd axoned || return

git checkout v12.0.0

make install

```

## **Initialize Node**

```
axoned init "$MONIKER" --chain-id=axone-dendrite-2
```

### Download genesis and addrbook

<pre><code><strong>curl -Ls https://snapshots.aknodes.net/snapshots/axone/genesis.json > $HOME/.axoned/config/genesis.json
</strong></code></pre>

```
curl -Ls https://snapshots.aknodes.net/snapshots/axone/addrbook.json > $HOME/.axoned/config/addrbook.json
```

### **Create Service**

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

### **Download Snapshot**

```
axoned tendermint unsafe-reset-all --home $HOME/.axoned --keep-addr-book 
curl https://snapshots.aknodes.net/snapshots/axone/snapshot-axone.AKNodes.lz4 | lz4 -dc - | tar -xf - -C $HOME/.axoned
```

### Start the node

```
sudo systemctl restart axoned
journalctl -u axoned -f
```


# Upgrade

Height 2802853

```
cd $HOME
rm -rf axone
git clone https://github.com/axone-protocol.git
cd axone
git checkout v14.0.0
systemctl restart axoned && journalctl -u axoned -f
```

```
cd $HOME && \
rm -rf axoned && \
git clone https://github.com/axone-protocol/axoned && \
cd axoned && \
git checkout v14.0.0 && \
make install && \
old_bin_path=/usr/local/bin/axoned && \
home_path=$HOME && \
rpc_port=$(grep -m1 -oP '^laddr = "\K[^"]+' $HOME/.axoned/config/config.toml | cut -d':' -f3) && \
tmux new -s axone-upgrade "sudo bash -c 'curl -s https://raw.githubusercontent.com/appieasahbie/testnet-guides/main/utils/autoupgrade/upgrade.sh | bash -s -- -u \"2802853\" -b axoned -n \"$HOME/go/bin/axoned\" -o \"$old_bin_path\" -h \"$home_path\" -p \"https://api.axone.aknodes.com/AXONE-TESTNET/gov/1\" -r \"$rpc_port\"'"
```


# Sync

## Snapshot

Update every 6 hours

```
sudo systemctl stop axoned

cp $HOME/.axoned/data/priv_validator_state.json $HOME/.axoned/priv_validator_state.json.backup 

axoned tendermint unsafe-reset-all --home $HOME/.axoned --keep-addr-book 
curl https://snapshots.aknodes.net/snapshots/axone/snapshot-axone.AKNodes.lz4 | lz4 -dc - | tar -xf - -C $HOME/.axoned

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

sudo systemctl restart axoned
sudo journalctl -u axoned -f --no-hostname -o cat
```

### State-Sync

```
sudo systemctl stop axoned

cp $HOME/.axoned/data/priv_validator_state.json $HOME/.axoned/priv_validator_state.json.backup
axoned tendermint unsafe-reset-all --home $HOME/.axoned

peers="dfd73067f77e9a744eed90e1ae3dde145197adec@167.235.14.83:36656"  
SNAP_RPC="https://rpc.axone.aknodes.net:443"

sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.axoned/config/config.toml 

LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height);
BLOCK_HEIGHT=$((LATEST_HEIGHT - 1000));
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash) 

echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH && sleep 2

sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ;
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ;
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ;
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"| ;
s|^(seeds[[:space:]]+=[[:space:]]+).*$|\1\"\"|" $HOME/.axoned/config/config.toml

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

sudo systemctl restart axoned && sudo journalctl -u axoned -f
```


# Useful commands

### 🔑 Key management <a href="#key-management" id="key-management"></a>

&#x20;**Add new key**

```
axoned keys add wallet
```

&#x20;**Recover existing key**

```
axoned keys add wallet --recover
```

&#x20;**List all keys**

```
axoned keys list
```

&#x20;**Delete key**

```
axoned keys delete wallet
```

&#x20;**Export key to a file**

```
axoned keys export wallet
```

&#x20;**Import key from a file**

```
axoned keys import wallet wallet.backup
```

&#x20;**Query wallet balance**

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

### &#x20;👷 Validator management <a href="#validator-management" id="validator-management"></a>

&#x20;**Create new validator**

```
axoned tx staking create-validator <(cat <<EOF
{
  "pubkey": $(axoned comet show-validator),
  "amount": "1000000uaxone",
  "moniker": "YOUR_MONIKER_NAME",
  "identity": "YOUR_KEYBASE_ID",
  "website": "YOUR_WEBSITE_URL",
  "security": "YOUR_SECURITY_EMAIL",
  "details": "YOUR_DETAILS",
  "commission-rate": "0.05",
  "commission-max-rate": "0.20",
  "commission-max-change-rate": "0.05",
  "min-self-delegation": "1"
}
EOF
) \
--chain-id axone-dentrite-2 \
--from wallet \
--gas-adjustment 1.4 \
--gas auto \
--gas-prices 0uaxone \
-y
```

&#x20;**Edit existing validator**

```
axoned tx staking edit-validator \
--new-moniker "YOUR_MONIKER_NAME" \
--identity "YOUR_KEYBASE_ID" \
--details "YOUR_DETAILS" \
--website "YOUR_WEBSITE_URL" \
--chain-id axone-dentrite-2 \
--commission-rate 0.05 \
--from wallet \
--gas-adjustment 1.4 \
--gas auto \
--gas-prices 0uaxone \
-y
```

&#x20;**Unjail validator**

```
axoned tx slashing unjail --from wallet --chain-id axone-dentrite-2 --gas-adjustment 1.4 --gas auto --gas-prices 0uaxone -y
```

&#x20;**Jail reason**

```
axoned query slashing signing-info $(axoned comet show-validator)
```

&#x20;**List all active validators**

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

&#x20;**List all inactive validators**

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

&#x20;**View validator details**

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

### &#x20;💲 Token management <a href="#token-management" id="token-management"></a>

&#x20;**Withdraw rewards from all validators**

```
axoned tx distribution withdraw-all-rewards --from wallet --chain-id axone-dentrite-2 --gas-adjustment 1.4 --gas auto --gas-prices 0uaxone -y
```

&#x20;**Withdraw commission and rewards from your validator**

```
axoned tx distribution withdraw-rewards $(axoned keys show wallet --bech val -a) --commission --from wallet --chain-id axone-dentrite-2 --gas-adjustment 1.4 --gas auto --gas-prices 0uaxone -y
```

&#x20;**Delegate tokens to yourself**

```
axoned tx staking delegate $(axoned keys show wallet --bech val -a) 1000000uaxone --from wallet --chain-id axone-dentrite-2 --gas-adjustment 1.4 --gas auto --gas-prices 0uaxone -y
```

&#x20;**Delegate tokens to validator**

```
axoned tx staking delegate <TO_VALOPER_ADDRESS> 1000000uaxone --from wallet --chain-id axone-dentrite-2 --gas-adjustment 1.4 --gas auto --gas-prices 0uaxone -y
```

&#x20;**Redelegate tokens to another validator**

```
axoned tx staking redelegate $(axoned keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> 1000000uaxone --from wallet --chain-id axone-dentrite-2 --gas-adjustment 1.4 --gas auto --gas-prices 0uaxone -y
```

&#x20;**Unbond tokens from your validator**

```
axoned tx staking unbond $(axoned keys show wallet --bech val -a) 1000000uaxone --from wallet --chain-id axone-dentrite-2 --gas-adjustment 1.4 --gas auto --gas-prices 0uaxone -y
```

&#x20;**Send tokens to the wallet**

```
axoned tx bank send wallet <TO_WALLET_ADDRESS> 1000000uaxone --from wallet --chain-id axone-dentrite-2 --gas-adjustment 1.4 --gas auto --gas-prices 0uaxone -y
```

### &#x20;🗳 Governance <a href="#governance" id="governance"></a>

&#x20;**List all proposals**

```
axoned query gov proposals
```

&#x20;**View proposal by id**

```
axoned query gov proposal 1
```

&#x20;**Vote ‘Yes’**

```
axoned tx gov vote 1 yes --from wallet --chain-id axone-dentrite-2 --gas-adjustment 1.4 --gas auto --gas-prices 0uaxone -y
```

&#x20;**Vote ‘No’**

```
axoned tx gov vote 1 no --from wallet --chain-id axone-dentrite-2 --gas-adjustment 1.4 --gas auto --gas-prices 0uaxone -y
```

&#x20;**Vote ‘Abstain’**

```
axoned tx gov vote 1 abstain --from wallet --chain-id axone-dentrite-2 --gas-adjustment 1.4 --gas auto --gas-prices 0uaxone -y
```

&#x20;**Vote ‘NoWithVeto’**

```
axoned tx gov vote 1 NoWithVeto --from wallet --chain-id axone-dentrite-2 --gas-adjustment 1.4 --gas auto --gas-prices 0uaxone -y
```

### &#x20;⚡️ Utility <a href="#utility" id="utility"></a>

&#x20;**Update ports**

```
CUSTOM_PORT=110
sed -i -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:${CUSTOM_PORT}58\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://127.0.0.1:${CUSTOM_PORT}57\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:${CUSTOM_PORT}60\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:${CUSTOM_PORT}56\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":${CUSTOM_PORT}66\"%" $HOME/.axoned/config/config.toml
sed -i -e "s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:${CUSTOM_PORT}17\"%; s%^address = \":8080\"%address = \":${CUSTOM_PORT}80\"%; s%^address = \"0.0.0.0:9090\"%address = \"0.0.0.0:${CUSTOM_PORT}90\"%; s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:${CUSTOM_PORT}91\"%" $HOME/.axoned/config/app.toml
```

&#x20;**Update Indexer**

**Disable indexer**

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

**Enable indexer**

```
sed -i -e 's|^indexer *=.*|indexer = "kv"|' $HOME/.axoned/config/config.toml
```

&#x20;**Update pruning**

```
sed -i \
  -e 's|^pruning *=.*|pruning = "custom"|' \
  -e 's|^pruning-keep-recent *=.*|pruning-keep-recent = "100"|' \
  -e 's|^pruning-keep-every *=.*|pruning-keep-every = "0"|' \
  -e 's|^pruning-interval *=.*|pruning-interval = "19"|' \
  $HOME/.axoned/config/app.toml
```

### &#x20;🚨 Maintenance <a href="#maintenance" id="maintenance"></a>

&#x20;**Get validator info**

```
axoned status 2>&1 | jq .ValidatorInfo
```

&#x20;**Get sync info**

```
axoned status 2>&1 | jq .SyncInfo
```

&#x20;**Get node peer**

```
echo $(axoned comet show-node-id)'@'$(curl -4s ifconfig.me)':'$(cat $HOME/.axoned/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')
```

&#x20;**Check if validator key is correct**

```
[[ $(axoned q staking validator $(axoned keys show wallet --bech val -a) -oj | jq -r .consensus_pubkey.key) = $(axoned status | jq -r .ValidatorInfo.PubKey.value) ]] && echo -e "\n\e[1m\e[32mTrue\e[0m\n" || echo -e "\n\e[1m\e[31mFalse\e[0m\n"
```

&#x20;**Get live peers**

```
curl -sS http://localhost:13657/net_info | jq -r '.result.peers[] | "\(.node_info.id)@\(.remote_ip):\(.node_info.listen_addr)"' | awk -F ':' '{print $1":"$(NF)}'
```

&#x20;**Set minimum gas price**

```
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0uaxone\"/" $HOME/.axoned/config/app.toml
```

&#x20;**Enable prometheus**

```
sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.axoned/config/config.toml
```

&#x20;**Reset chain data**

```
axoned comet unsafe-reset-all --keep-addr-book --home $HOME/.axoned --keep-addr-book
```

&#x20;**Remove node**

```
cd $HOME
sudo systemctl stop axone-testnet.service
sudo systemctl disable axone-testnet.service
sudo rm /etc/systemd/system/axone-testnet.service
sudo systemctl daemon-reload
rm -f $(which axoned)
rm -rf $HOME/.axoned
rm -rf $HOME/axoned
```

### &#x20;⚙️ Service Management <a href="#service-management" id="service-management"></a>

&#x20;**Reload service configuration**

```
sudo systemctl daemon-reload
```

&#x20;**Enable service**

```
sudo systemctl enable axone-testnet.service
```

&#x20;**Disable service**

```
sudo systemctl disable axoned
```

&#x20;**Start service**

```
sudo systemctl start axoned
```

&#x20;**Stop service**

```
sudo systemctl stop axoned
```

&#x20;**Restart service**

```
sudo systemctl restart axoned
```

&#x20;**Check service status**

```
sudo systemctl status axoned
```

&#x20;**Check service logs**

```
sudo journalctl -u axoned -f --no-hostname -o cat
```


# Terp Network

Terp Network helps realize a sovereign blockchain ecosystem, for a full spectrum of verifiable smart contracts & buisness logic.

### Explorer

{% embed url="<https://explorer.aknodes.com/TERP-TESTNET/>" %}

<figure><img src="https://383863627-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpsGHvwFmpqkZQJbG9ZSq%2Fuploads%2FN3TZwBly68QjQRdvG2tX%2Fzxzx-removebg-preview.png?alt=media&amp;token=279e7e54-b261-4ebd-b7f8-e53516472204" alt="" width="100"><figcaption></figcaption></figure>

<table><thead><tr><th>Chain ID</th><th width="218.33333333333331">Version tag</th></tr></thead><tbody><tr><td>90u-4</td><td>v4.2.0</td></tr></tbody></table>

| Binary Name | Wasm    | SDK version |
| ----------- | ------- | ----------- |
| terp        | Enabled | v0.47.3     |

{% tabs %}
{% tab title="RPC" %}
<https://rpc.terp.testnet.aknodes.net>
{% endtab %}

{% tab title="API" %}
<https://api.terp.testnet.aknodes.net>
{% endtab %}

{% tab title="gRPC" %}
grpc.terp.testnet.aknodes.net:19090
{% endtab %}
{% endtabs %}


# Installation

Minimum Hardware Requirements 4x CPUs; the faster clock speed the better  8GB RAM  100GB of storage (SSD or NVME)

## <mark style="color:blue;">Setup validator name</mark> <a href="#setup-validator-name" id="setup-validator-name"></a>

```
MONIKER="YOUR_MONIKER_GOES_HERE"
```

### Install dependencies <a href="#install-dependencies" id="install-dependencies"></a>

```
sudo apt update
sudo apt-get install git curl build-essential make jq gcc snapd chrony lz4 tmux unzip bc -y
```

### **INSTALL GO**

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

### Install Node

```
cd $HOME
rm -rf ~/terp-core
git clone https://github.com/terpnetwork/terp-core.git
cd terp-core
git checkout v4.2.0
make install
```

## **Initialize Node**

```
terpd init "$MONIKER" --chain-id=90u-4
```

### Download genesis and addrbook

<pre><code><strong>curl -Ls https://snapshots.aknodes.net/snapshots/terp/genesis.json > $HOME/.terp/config/genesis.json
</strong></code></pre>

```
curl -Ls https://snapshots.aknodes.net/snapshots/terp/addrbook.json > $HOME/.terp/config/addrbook.json
```

### **Create Service**

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

### **Download Snapshot**

```
terpd tendermint unsafe-reset-all --home $HOME/.terp --keep-addr-book 
curl https://snapshots.aknodes.net/snapshots/terp-testnet/snapshot-terp-testnet.AKNodes.lz4 | lz4 -dc - | tar -xf - -C $HOME/.terpd
```

### Start the node

```
sudo systemctl restart terpd
journalctl -u terpd -f
```

[buy me a cup of coffe](https://www.paypal.com/paypalme/AbdelAkridi?country.x=NL\&locale.x=en_US)


# Upgrade

```
cd $HOME
rm -rf $HOME/terp-core
git clone https://github.com/terpnetwork/terp-core.git
cd terp-core
git checkout v4.1.1-testnet
make build
sudo mv $HOME/terp-core/build/terpd $(which terpd)
sudo systemctl restart terpd && sudo journalctl -u terpd -f
```


# Sync

## Snapshot

Update every 6 hours

```
sudo systemctl stop terpd

cp $HOME/.terp/data/priv_validator_state.json $HOME/.terp/priv_validator_state.json.backup 

terpd tendermint unsafe-reset-all --home $HOME/.terp --keep-addr-book 
curl https://snapshots.aknodes.net/snapshots/terp-testnet/snapshot-terp-testnet.AKNodes.lz4 | lz4 -dc - | tar -xf - -C $HOME/.terp

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

sudo systemctl restart terpd
sudo journalctl -u terpd -f --no-hostname -o cat
```

### State-Sync

```
sudo systemctl stop terpd

cp $HOME/.terp/data/priv_validator_state.json $HOME/.terp/priv_validator_state.json.backup
terpd tendermint unsafe-reset-all --home $HOME/.terp

peers="e23c7ecc1c07bcf0f6a17f8fe09a88adffc1dd89@167.235.14.83:13656"  
SNAP_RPC="https://rpc.terp.aknodes.net:443"

sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.terp/config/config.toml 

LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height);
BLOCK_HEIGHT=$((LATEST_HEIGHT - 1000));
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash) 

echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH && sleep 2

sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ;
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ;
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ;
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"| ;
s|^(seeds[[:space:]]+=[[:space:]]+).*$|\1\"\"|" $HOME/.terp/config/config.toml

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

sudo systemctl restart terpd && sudo journalctl -u terpd -f
```


# Useful commands

### <mark style="color:blue;">Service operations</mark> ⚙️ <a href="#service-operations" id="service-operations"></a>

Check logs

```bash
sudo journalctl -u terpd -f
```

Start service

```bash
sudo systemctl start terpd
```

Stop service

```bash
sudo systemctl stop terpd
```

Restart service

```bash
sudo systemctl restart terpd
```

Check service status

```bash
sudo systemctl status terpd
```

Reload services

```bash
sudo systemctl daemon-reload
```

Enable Service

```bash
sudo systemctl enable terpd
```

Disable Service

```bash
sudo systemctl disable terpd
```

Sync info

```bash
terpd status 2>&1 | jq .SyncInfo
```

Node info

```bash
terpd status 2>&1 | jq .NodeInfo
```

Your node peer

```bash
echo $(terpd tendermint show-node-id)'@'$(wget -qO- eth0.me)':'$(cat $HOME/.terp/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')
```

### <mark style="color:purple;">Key management</mark> <a href="#key-management" id="key-management"></a>

Add New Wallet

```bash
terpd keys add $WALLET
```

Restore executing wallet

```bash
terpd keys add $WALLET --recover
```

List All Wallets

```bash
terpd keys list
```

Delete wallet

```bash
terpd keys delete $WALLET
```

Check Balance

```bash
terpd q bank balances $(terpd keys show $WALLET -a)
```

Export Key (save to wallet.backup)

```bash
terpd keys export $WALLET
```

Import Key (restore from wallet.backup)

```bash
terpd keys import $WALLET wallet.backup
```

### <mark style="color:orange;">Tokens</mark> <a href="#tokens" id="tokens"></a>

Withdraw all rewards

```bash
terpd tx distribution withdraw-all-rewards --from $WALLET --chain-id 90u-2 --gas auto --gas-adjustment 1.5
```

Withdraw rewards and commission from your validator

```bash
terpd tx distribution withdraw-rewards $VALOPER_ADDRESS --from $WALLET --commission --chain-id 90u-2 --gas auto --gas-adjustment 1.5 -y
```

Check your balance

```bash
terpd query bank balances $WALLET_ADDRESS
```

Delegate to Yourself

```bash
terpd tx staking delegate $(terpd keys show $WALLET --bech val -a) 1000000uterpx --from $WALLET --chain-id 90u-2 --gas auto --gas-adjustment 1.5 -y
```

Delegate

```bash
terpd tx staking delegate <TO_VALOPER_ADDRESS> 1000000uterpx --from $WALLET --chain-id 90u-2 --gas auto --gas-adjustment 1.5 -y
```

Redelegate Stake to Another Validator

```bash
terpd tx staking redelegate $VALOPER_ADDRESS <TO_VALOPER_ADDRESS> 1000000uterpx --from $WALLET --chain-id 90u-2 --gas auto --gas-adjustment 1.5 -y
```

Unbond

```bash
terpd tx staking unbond $(terpd keys show $WALLET --bech val -a) 1000000uterpx --from $WALLET --chain-id 90u-2 --gas auto --gas-adjustment 1.5 -y
```

Transfer Funds

```bash
terpd tx bank send $WALLET_ADDRESS <TO_WALLET_ADDRESS> 1000000uterpx --gas auto --gas-adjustment 1.5 -y
```

### <mark style="color:red;">Validator operations</mark> <a href="#validator-operations" id="validator-operations"></a>

Create New Validator

```bash
terpd tx staking create-validator \
--amount 1000000uterpx \
--from $WALLET \
--commission-rate 0.1 \
--commission-max-rate 0.2 \
--commission-max-change-rate 0.01 \
--min-self-delegation 1 \
--pubkey $(terpd tendermint show-validator) \
--moniker "$MONIKER" \
--identity "" \
--details "xxxxxxxxxxxxx" \
--chain-id 90u-2 \
--gas auto --gas-adjustment 1.5 \
-y
```

Edit Existing Validator

```bash
terpd tx staking edit-validator \
--commission-rate 0.1 \
--new-moniker "$MONIKER" \
--identity "" \
--details "xxxxxxxxxx" \
--from $WALLET \
--chain-id 90u-2 \
--gas auto --gas-adjustment 1.5 \
-y
```

Validator info

```bash
terpd status 2>&1 | jq .ValidatorInfo
```

Validator Details

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

Jailing info

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

Unjail validator

```bash
terpd tx slashing unjail --from $WALLET --chain-id 90u-2 --gas auto --gas-adjustment 1.5 -y
```

Active Validators List

```bash
terpd q staking validators -oj --limit=2000 | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " 	 " + .description.moniker' | sort -gr | nl
```

Check Validator key

```bash
[[ $(terpd q staking validator $VALOPER_ADDRESS -oj | jq -r .consensus_pubkey.key) = $(terpd status | jq -r .ValidatorInfo.PubKey.value) ]] && echo -e "Your key status is ok" || echo -e "Your key status is error"
```

Signing info

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

### <mark style="color:yellow;">Governance</mark> <a href="#governance" id="governance"></a>

Create New Text Proposal

```bash
terpd  tx gov submit-proposal \
--title "" \
--description "" \
--deposit 1000000uterpx \
--type Text \
--from $WALLET \
--gas auto --gas-adjustment 1.5 \
-y 
```

Proposals List

```bash
terpd query gov proposals
```

Proposal IDProposal optionYesNoNo with vetoAbstain

View proposal

```bash
terpd query gov proposal 1
```

Vote

```bash
terpd tx gov vote 1 yes --from $WALLET --chain-id 90u-2  --gas auto --gas-adjustment 1.5 -y
```

#### <mark style="background-color:green;">Delete Node</mark>

```
sudo systemctl stop terpd
sudo systemctl disable terpd
sudo rm -rf /etc/systemd/system/terpd.service
sudo rm $(which terpd)
sudo rm -rf $HOME/.terp
sed -i "/TERP_/d" $HOME/.bash_profile
```


# Mantra

MANTRA recognizes that the Cosmos ecosystem lacks a chain that is specifically designed to provide regulatory compliance across a wide range of real-world assets (RWA) and tokenized assets.

### Explorer

{% embed url="<https://explorer.aknodes.com/MANTRA-TESTNET>" %}

<figure><img src="https://383863627-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpsGHvwFmpqkZQJbG9ZSq%2Fuploads%2FcQr3jgycRq2ut7GRJveg%2Fmantra.jpg?alt=media&amp;token=b0c68e5b-f02e-4ae3-b50c-bbce2bd1b3a0" alt="" width="100"><figcaption></figcaption></figure>

<table><thead><tr><th>Chain ID</th><th width="218.33333333333331">Version tag</th></tr></thead><tbody><tr><td>mantra-dukong-1</td><td>v8.0.0.rc3</td></tr></tbody></table>

| Binary Name | Wasm    | SDK version |
| ----------- | ------- | ----------- |
| mantrachain | Enabled | v0.47.3     |

{% tabs %}
{% tab title="RPC" %}
<https://rpc.mantrachain.aknodes.net>
{% endtab %}

{% tab title="API" %}
<https://api.mantrachain.aknodes.net>
{% endtab %}

{% tab title="gRPC" %}
grpc.mantrachain.aknodes.net:1390
{% endtab %}
{% endtabs %}


# Installation

Minimum Hardware Requirements 4x CPUs; the faster clock speed the better  8GB RAM  100GB of storage (SSD or NVME)

## <mark style="color:blue;">Setup validator name</mark> <a href="#setup-validator-name" id="setup-validator-name"></a>

```
MONIKER="YOUR_MONIKER_GOES_HERE"
```

### Install dependencies <a href="#install-dependencies" id="install-dependencies"></a>

```
sudo apt update
sudo apt-get install git curl build-essential make jq gcc snapd chrony lz4 tmux unzip bc -y
```

### **INSTALL GO**

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

### Install Node

```
cd $HOME
wget https://github.com/MANTRA-Chain/mantrachain/releases/download/v7.0.0-rc2/mantrachaind-7.0.0-rc2-linux-amd64.tar.gz
tar -xvf mantrachaind-7.0.0-rc2-linux-amd64.tar.gz
rm mantrachaind-7.0.0-rc2-linux-amd64.tar.gz
chmod +x $HOME/bin/mantrachaind
sudo mv $HOME/bin/mantrachaind $HOME/go/bin/

```

## **Initialize Node**

```
mantrachaind init "$MONIKER" --chain-id=mantra-dukong-1
```

### Download genesis and addrbook

<pre><code><strong>curl -Ls https://snapshots.aknodes.net/snapshots/mantrachain/genesis.json > $HOME/.mantrachain/config/genesis.json
</strong></code></pre>

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

### **Create Service**

```
sudo tee /etc/systemd/system/mantrachaind.service > /dev/null <<EOF
[Unit]
Description=mantrachaind Daemon
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 Snapshot**

```
mantrachaind tendermint unsafe-reset-all --home $HOME/.mantrachain --keep-addr-book 
curl https://snapshots.aknodes.net/snapshots/mantrachain/snapshot-mantrachain.AKNodes.lz4 | lz4 -dc - | tar -xf - -C $HOME/.mantrachain
```

### Start the node

```
sudo systemctl restart mantrachaind
journalctl -u mantrachaind -f
```


# Upgrade

```
cd $HOME
wget https://github.com/MANTRA-Finance/public/releases/download/v2.0.0/mantrachaind-2.0.0-linux-amd64.tar.gz
tar -xvf mantrachaind-2.0.0-linux-amd64.tar.gz
rm $HOME/mantrachaind-2.0.0-linux-amd64.tar.gz
chmod +x mantrachaind
sudo mv $HOME/mantrachaind $(which mantrachaind)
sudo systemctl restart mantrachaind && sudo journalctl -u mantrachaind -f
```


# Sync

## Snapshot

Update every 6 hours

```
sudo systemctl stop mantrachaind

cp $HOME/.mantrachain/data/priv_validator_state.json $HOME/.mantrachain/priv_validator_state.json.backup 

mantrachaind tendermint unsafe-reset-all --home $HOME/.mantrachain --keep-addr-book 
curl https://snapshots.aknodes.net/snapshots/mantrachain/snapshot-mantrachain.AKNodes.lz4 | lz4 -dc - | tar -xf - -C $HOME/.mantrachain

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

sudo systemctl restart mantrachaind
sudo journalctl -u mantrachaind -f --no-hostname -o cat
```

### State-Sync

```
sudo systemctl stop mantrachaind

cp $HOME/.entangled/data/priv_validator_state.json $HOME/.entangled/priv_validator_state.json.backup
mantrachaind tendermint unsafe-reset-all --home $HOME/.mantrachain

peers="63763bfb78d296187754c367a9740e24730a7fc4@167.235.14.83:32656,eea43b2084e78945c3a51babe659efe55fe58370@35.222.198.102:26656,21ff2d5d6c4abcc7c4874ab6bf68551da979656a@172.93.185.122:26656"  
SNAP_RPC="https://rpc.mantrachain.aknodes.net:443"

sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.mantrachain/config/config.toml 

LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height);
BLOCK_HEIGHT=$((LATEST_HEIGHT - 1000));
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash) 

echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH && sleep 2

sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ;
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ;
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ;
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"| ;
s|^(seeds[[:space:]]+=[[:space:]]+).*$|\1\"\"|" $HOME/.mantrachain/config/config.toml

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

sudo systemctl restart mantrachaind && sudo journalctl -u mantrachaind -f
```


# Useful commands

### Service operations ⚙️ <a href="#service-operations" id="service-operations"></a>

Check logs

```bash
sudo journalctl -u mantrachaind -f
```

Start service

```bash
sudo systemctl start mantrachaind
```

Stop service

```bash
sudo systemctl stop mantrachaind
```

Restart service

```bash
sudo systemctl restart mantrachaind
```

Check service status

```bash
sudo systemctl status mantrachaind
```

Reload services

```bash
sudo systemctl daemon-reload
```

Enable Service

```bash
sudo systemctl enable mantrachaind
```

Disable Service

```bash
sudo systemctl disable mantrachaind
```

Node info

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

Your node peer

```bash
echo $(mantrachaind tendermint show-node-id)'@'$(wget -qO- eth0.me)':'$(cat $HOME/.mantrachain/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')
```

### Key management <a href="#key-management" id="key-management"></a>

Add New Wallet

```bash
mantrachaind keys add $WALLET
```

Restore executing wallet

```bash
mantrachaind keys add $WALLET --recover
```

List All Wallets

```bash
mantrachaind keys list
```

Delete wallet

```bash
mantrachaind keys delete $WALLET
```

Check Balance

```bash
mantrachaind q bank balances $WALLET_ADDRESS 
```

Export Key (save to wallet.backup)

```bash
mantrachaind keys export $WALLET
```

View EVM Prived Key

```bash
mantrachaind keys unsafe-export-eth-key $WALLET
```

Import Key (restore from wallet.backup)

```bash
mantrachaind keys import $WALLET wallet.backup
```

### Tokens <a href="#tokens" id="tokens"></a>

Withdraw all rewards

```bash
mantrachaind tx distribution withdraw-all-rewards --from $WALLET --chain-id mantra-hongbai-1 --gas auto --gas-adjustment 1.5 --fees 50uom 
```

Withdraw rewards and commission from your validator

```bash
mantrachaind tx distribution withdraw-rewards $VALOPER_ADDRESS --from $WALLET --commission --chain-id mantra-hongbai-1 --gas auto --gas-adjustment 1.5 --fees 50uom -y 
```

Check your balance

```bash
mantrachaind query bank balances $WALLET_ADDRESS
```

Delegate to Yourself

```bash
mantrachaind tx staking delegate $(mantrachaind keys show $WALLET --bech val -a) 1000000uom --from $WALLET --chain-id mantra-hongbai-1 --gas auto --gas-adjustment 1.5 --fees 50uom -y 
```

Delegate

```bash
mantrachaind tx staking delegate <TO_VALOPER_ADDRESS> 1000000uom --from $WALLET --chain-id mantra-hongbai-1 --gas auto --gas-adjustment 1.5 --fees 50uom -y 	
```

Redelegate Stake to Another Validator

```bash
mantrachaind tx staking redelegate $VALOPER_ADDRESS <TO_VALOPER_ADDRESS> 1000000uom --from $WALLET --chain-id mantra-hongbai-1 --gas auto --gas-adjustment 1.5 --fees 50uom -y 
```

Unbond

```bash
mantrachaind tx staking unbond $(mantrachaind keys show $WALLET --bech val -a) 1000000uom --from $WALLET --chain-id mantra-hongbai-1 --gas auto --gas-adjustment 1.5 --fees 50uom -y 
```

Transfer Funds

```bash
mantrachaind tx bank send $WALLET_ADDRESS <TO_WALLET_ADDRESS> 1000000uom --gas auto --gas-adjustment 1.5 --fees 50uom -y 
```

### Validator operations <a href="#validator-operations" id="validator-operations"></a>

Create New Validator

```bash
mantrachaind tx staking create-validator \
--amount 1000000uom \
--from $WALLET \
--commission-rate 0.1 \
--commission-max-rate 0.2 \
--commission-max-change-rate 0.01 \
--min-self-delegation 1 \
--pubkey $(mantrachaind tendermint show-validator) \
--moniker "$MONIKER" \
--identity "" \
--details "I love blockchain ❤️" \
--chain-id mantra-hongbai-1 \
--gas auto --gas-adjustment 1.5 --fees 50uom \
-y \
```

Edit Existing Validator

```bash
mantrachaind tx staking edit-validator \
--commission-rate 0.1 \
--new-moniker "$MONIKER" \
--identity "" \
--details "I love blockchain ❤️" \
--from $WALLET \
--chain-id mantra-hongbai-1 \
--gas auto --gas-adjustment 1.5 --fees 50uom \
-y \
```

Validator info

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

Validator Details

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

Jailing info

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

Slashing parameters

```bash
mantrachaind q slashing params 
```

Unjail validator

```bash
mantrachaind tx slashing unjail --from $WALLET --chain-id mantra-hongbai-1 --gas auto --gas-adjustment 1.5 --fees 50uom -y 
```

Active Validators List

```bash
mantrachaind q staking validators -oj --limit=2000 | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " 	 " + .description.moniker' | sort -gr | nl 
```

Check Validator key

```bash
[[ $(mantrachaind q staking validator $VALOPER_ADDRESS -oj | jq -r .consensus_pubkey.key) = $(mantrachaind status | jq -r .ValidatorInfo.PubKey.value) ]] && echo -e "Your key status is ok" || echo -e "Your key status is error"
```

Signing info

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

### Governance <a href="#governance" id="governance"></a>

Create New Text Proposal

```bash
mantrachaind  tx gov submit-proposal \
--title "" \
--description "" \
--deposit 1000000uom \
--type Text \
--from $WALLET \
--gas auto --gas-adjustment 1.5 --fees 50uom \
-y \
 
```

Proposals List

```bash
mantrachaind query gov proposals 
```

View proposal

```bash
mantrachaind query gov proposal 1 
```

Vote

```bash
mantrachaind tx gov vote 1 yes --from $WALLET --chain-id mantra-hongbai-1  --gas auto --gas-adjustment 1.5 --fees 50uom -y 
```


# SAO

A decentralized storage infrastructure for Web3

<figure><img src="https://383863627-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpsGHvwFmpqkZQJbG9ZSq%2Fuploads%2FXQTpFYi1a4xSWID8HeYD%2Ffrf-removebg-preview.png?alt=media&amp;token=08220876-5433-4663-bc99-700c209a4c49" alt="" width="100"><figcaption></figcaption></figure>

<table><thead><tr><th>Chain ID</th><th width="218.33333333333331">Version tag</th></tr></thead><tbody><tr><td>sao-20230629</td><td>v0.1.9</td></tr></tbody></table>

| Binary Name | Wasm    | SDK version |
| ----------- | ------- | ----------- |
| sao         | Enabled | v0.47.3     |

{% tabs %}
{% tab title="RPC" %}
<https://rpc.sao.aknodes.net>
{% endtab %}

{% tab title="API" %}
<https://api.sao.aknodes.net>
{% endtab %}

{% tab title="gRPC" %}
grpc.sao.aknodes.net:49090
{% endtab %}
{% endtabs %}


# Installation

## <mark style="color:blue;">Setup validator name</mark> <a href="#setup-validator-name" id="setup-validator-name"></a>

```
MONIKER="YOUR_MONIKER_GOES_HERE"
```

### Install dependencies <a href="#install-dependencies" id="install-dependencies"></a>

```
sudo apt update
sudo apt-get install git curl build-essential make jq gcc snapd chrony lz4 tmux unzip bc -y
```

### **INSTALL GO**

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

### Install Node

```
cd $HOME

rm -rf sao-consensus

git clone https://github.com/SaoNetwork/sao-consensus.git

cd sao-consensus

git checkout v0.1.9

make install

```

## **Initialize Node**

```
saod init "$MONIKER" --chain-id=sao-20230629
```

### Download genesis and addrbook

<pre><code><strong>curl -Ls https://snapshots.aknodes.net/snapshots/sao/genesis.json > $HOME/.sao/config/genesis.json
</strong></code></pre>

```
curl -Ls https://snapshots.aknodes.net/snapshots/sao/addrbook.json > $HOME/.sao/config/addrbook.json
```

### **Create Service**

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

### **Download Snapshot**

```
saod tendermint unsafe-reset-all --home $HOME/.sao --keep-addr-book 
curl https://snapshots.aknodes.net/snapshots/sao/snapshot-sao.AKNodes.lz4 | lz4 -dc - | tar -xf - -C $HOME/.sao
```

### Start the node

```
sudo systemctl restart saod
journalctl -u saod -f
```

[buy me a cup of coffe](https://www.paypal.com/paypalme/AbdelAkridi?country.x=NL\&locale.x=en_US)


# Upgrade


# Sync

## Snapshot

Update every 6 hours

```
sudo systemctl stop saod

cp $HOME/.sao/data/priv_validator_state.json $HOME/.sao/priv_validator_state.json.backup 

saod tendermint unsafe-reset-all --home $HOME/.sao --keep-addr-book 
curl https://snapshots.aknodes.net/snapshots/sao/snapshot-saod.AKNodes.lz4 | lz4 -dc - | tar -xf - -C $HOME/.sao

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

sudo systemctl restart saod
sudo journalctl -u saod -f --no-hostname -o cat
```

### State-Sync

```
sudo systemctl stop saod

cp $HOME/.sao/data/priv_validator_state.json $HOME/.sao/priv_validator_state.json.backup
saod tendermint unsafe-reset-all --home $HOME/.sao

peers="3f649c43579759cc525b8aed6f2a4febe66aa0b1@167.235.14.83:49656"  
SNAP_RPC="https://rpc.sao.aknodes.net:443"

sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.sao/config/config.toml 

LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height);
BLOCK_HEIGHT=$((LATEST_HEIGHT - 1000));
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash) 

echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH && sleep 2

sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ;
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ;
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ;
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"| ;
s|^(seeds[[:space:]]+=[[:space:]]+).*$|\1\"\"|" $HOME/.mantrachain/config/config.toml

mv $HOME/.mantrachain/priv_validator_state.json.backup $HOME/.sao/data/priv_validator_state.json

sudo systemctl restart saod && sudo journalctl -u saod -f
```


# Useful commands

### <mark style="color:blue;">Service operations</mark> ⚙️ <a href="#service-operations" id="service-operations"></a>

Check logs

```bash
sudo journalctl -u saod -f
```

Start service

```bash
sudo systemctl start saod
```

Stop service

```bash
sudo systemctl stop saod
```

Restart service

```bash
sudo systemctl restart saod
```

Check service status

```bash
sudo systemctl status saod
```

Reload services

```bash
sudo systemctl daemon-reload
```

Enable Service

```bash
sudo systemctl enable saod
```

Disable Service

```bash
sudo systemctl disable saod
```

Sync info

```bash
saod status 2>&1 | jq .SyncInfo
```

Node info

```bash
saod status 2>&1 | jq .NodeInfo
```

Your node peer

```bash
echo $(saod tendermint show-node-id)'@'$(wget -qO- eth0.me)':'$(cat $HOME/.sao/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')
```

### <mark style="color:purple;">Key management</mark> <a href="#key-management" id="key-management"></a>

Add New Wallet

```bash
saod keys add $WALLET
```

Restore executing wallet

```bash
saod keys add $WALLET --recover
```

List All Wallets

```bash
saod keys list
```

Delete wallet

```bash
saod keys delete $WALLET
```

Check Balance

```bash
saod q bank balances $(mantrachaind keys show $WALLET -a)
```

Export Key (save to wallet.backup)

```bash
saod keys export $WALLET
```

Import Key (restore from wallet.backup)

```bash
saod keys import $WALLET wallet.backup
```

### <mark style="color:red;">Validator operations</mark> <a href="#validator-operations" id="validator-operations"></a>

Create New Validator

```bash
saod tx staking create-validator \
  --amount=1000000usct \
  --pubkey=$(saod tendermint show-validator) \
  --chain-id=sao-20230629 \
  --commission-rate="0.10" \
  --commission-max-rate="0.20" \
  --commission-max-change-rate="0.20" \
  --min-self-delegation=1 \
  --from mykey \
  --moniker="*YourMonikerName*" \
  --gas="2000000" \
  --gas-prices="0.0025usct" \
  --yes
```

Edit Existing Validator

```bash
saod tx staking edit-validator \
--commission-rate 0.10 \
--new-moniker "$MONIKER" \
--identity "" \
--details "xxxxxxxxx" \
--from $WALLET \
--chain-id sao-20230629 \
--gas auto --gas-adjustment 1.5 \
-y
```

Validator info

```bash
saod status 2>&1 | jq .ValidatorInfo
```

Validator Details

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

Jailing info

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

Unjail validator

```bash
saod tx slashing unjail --from $WALLET --chain-id sao-20230629 --gas auto --gas-adjustment 1.5 -y
```

Active Validators List

```bash
saod q staking validators -oj --limit=2000 | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " 	 " + .description.moniker' | sort -gr | nl
```

Check Validator key

```bash
[[ $(saod q staking validator $VALOPER_ADDRESS -oj | jq -r .consensus_pubkey.key) = $(mantrachaind status | jq -r .ValidatorInfo.PubKey.value) ]] && echo -e "Your key status is ok" || echo -e "Your key status is error"
```

Signing info

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

#### <mark style="background-color:green;">Delete Node</mark>

```
sudo systemctl stop saod
sudo systemctl disable saod
sudo rm -rf /etc/systemd/system/saod.service
sudo rm $(which saod)
sudo rm -rf $HOME/.sao
sed -i "/SAO_/d" $HOME/.bash_profile
```


# Artela

Artela is an extensible blockchain network enabling developers to build feature-rich dApps. Developers can build smart contract in EVM and add WASM native extension at blockchain runtime called Aspect

<img src="https://383863627-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpsGHvwFmpqkZQJbG9ZSq%2Fuploads%2Fmc1nOtoNXuUgPsDNEWmc%2Fartela_network_logo__1_-removebg-preview.png?alt=media&amp;token=b1827b23-8fdb-43ab-86c1-b7c8b9f2c313" alt="" width="100">

<table><thead><tr><th>Chain ID</th><th width="218.33333333333331">Version tag</th></tr></thead><tbody><tr><td>artela_11822_1</td><td>v0.4.7-rc4</td></tr></tbody></table>

| Binary Name | Wasm     | SDK version |
| ----------- | -------- | ----------- |
| artelad     | Disabled | v0.47.3     |

{% tabs %}
{% tab title="RPC" %}
<https://rpc.artela.aknodes.net>
{% endtab %}

{% tab title="API" %}
<https://api.artela.aknodes.net>
{% endtab %}

{% tab title="gRPC" %}
grpc.artela.aknodes.net:14490
{% endtab %}
{% endtabs %}


# Installation

Minimum Hardware Requirements 4x CPUs; the faster clock speed the better  8GB RAM  100GB of storage (SSD or NVME)

## <mark style="color:blue;">Setup validator name</mark> <a href="#setup-validator-name" id="setup-validator-name"></a>

```
MONIKER="YOUR_MONIKER_GOES_HERE"
```

### Install dependencies <a href="#install-dependencies" id="install-dependencies"></a>

```
sudo apt update
sudo apt-get install git curl build-essential make jq gcc snapd chrony lz4 tmux unzip bc -y
```

### **INSTALL GO**

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

### Install Node

```
cd $HOME
rm -rf artela
git clone https://github.com/artela-network/artela
cd artela
git checkout v0.4.7-rc4
make install

```

## **Initialize Node**

```
artelad init "test" --chain-id artela_11822-1
```

### Download genesis and addrbook

<pre><code><strong>curl -Ls https://snapshots.aknodes.net/snapshots/artela/genesis.json > $HOME/.artelad/config/genesis.json
</strong></code></pre>

```
curl -Ls https://snapshots.aknodes.net/snapshots/artela/addrbook.json > $HOME/.artelad/config/addrbook.json
```

### **Create Service**

```
sudo tee /etc/systemd/system/artelad.service > /dev/null <<EOF
[Unit]
Description=Artela node
After=network-online.target
[Service]
User=$USER
WorkingDirectory=$HOME/.artelad
ExecStart=$(which artelad) start --home $HOME/.artelad
Restart=on-failure
RestartSec=5
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
```

### **Download Snapshot**

```
artelad tendermint unsafe-reset-all --home $HOME/.dora --keep-addr-book 
curl https://snapshots.aknodes.net/snapshots/artela/snapshot-artela.AKNodes.lz4 | lz4 -dc - | tar -xf - -C $HOME/.artelad
```

### Start the node

```
sudo systemctl restart artelad
journalctl -u artelad -f
```


# Upgrade


# Sync


# Useful commands

### Service operations ⚙️ <a href="#service-operations" id="service-operations"></a>

Check logs

```bash
sudo journalctl -u artelad -f
```

Start service

```bash
sudo systemctl start artelad
```

Stop service

```bash
sudo systemctl stop artelad
```

Restart service

```bash
sudo systemctl restart artelad
```

Check service status

```bash
sudo systemctl status artelad
```

Reload services

```bash
sudo systemctl daemon-reload
```

Enable Service

```bash
sudo systemctl enable artelad
```

Disable Service

```bash
sudo systemctl disable artelad
```

Sync info

```bash
artelad status 2>&1 | jq .SyncInfo
```

Node info

```bash
artelad status 2>&1 | jq .NodeInfo
```

Your node peer

```bash
echo $(artelad tendermint show-node-id)'@'$(wget -qO- eth0.me)':'$(cat $HOME/.artelad/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')
```

### Key management <a href="#key-management" id="key-management"></a>

Add New Wallet

```bash
artelad keys add $WALLET
```

Restore executing wallet

```bash
artelad keys add $WALLET --recover
```

List All Wallets

```bash
artelad keys list
```

Delete wallet

```bash
artelad keys delete $WALLET
```

Check Balance

```bash
artelad q bank balances $(artelad keys show $WALLET -a)
```

Export Key (save to wallet.backup)

```bash
artelad keys export $WALLET
```

View EVM Prived Key

```bash
artelad keys unsafe-export-eth-key $WALLET
```

Import Key (restore from wallet.backup)

```bash
artelad keys import $WALLET wallet.backup
```

### Tokens <a href="#tokens" id="tokens"></a>

Withdraw all rewards

```bash
artelad tx distribution withdraw-all-rewards --from $WALLET --chain-id artela_11822-1 --gas auto --gas-adjustment 1.5
```

Withdraw rewards and commission from your validator

```bash
artelad tx distribution withdraw-rewards $VALOPER_ADDRESS --from $WALLET --commission --chain-id artela_11822-1 --gas auto --gas-adjustment 1.5 -y
```

Check your balance

```bash
artelad query bank balances $WALLET_ADDRESS
```

Delegate to Yourself

```bash
artelad tx staking delegate $(artelad keys show $WALLET --bech val -a) 1000000uart --from $WALLET --chain-id artela_11822-1 --gas auto --gas-adjustment 1.5 -y
```

Delegate

```bash
artelad tx staking delegate <TO_VALOPER_ADDRESS> 1000000uart --from $WALLET --chain-id artela_11822-1 --gas auto --gas-adjustment 1.5 -y
```

Redelegate Stake to Another Validator

```bash
artelad tx staking redelegate $VALOPER_ADDRESS <TO_VALOPER_ADDRESS> 1000000uart --from $WALLET --chain-id artela_11822-1 --gas auto --gas-adjustment 1.5 -y
```

Unbond

```bash
artelad tx staking unbond $(artelad keys show $WALLET --bech val -a) 1000000uart --from $WALLET --chain-id artela_11822-1 --gas auto --gas-adjustment 1.5 -y
```

Transfer Funds

```bash
artelad tx bank send $WALLET_ADDRESS <TO_WALLET_ADDRESS> 1000000uart --gas auto --gas-adjustment 1.5 -y
```

### Validator operations <a href="#validator-operations" id="validator-operations"></a>

Create New Validator

```bash
artelad tx staking create-validator \
--amount 1000000uart \
--from $WALLET \
--commission-rate 0.1 \
--commission-max-rate 0.2 \
--commission-max-change-rate 0.01 \
--min-self-delegation 1 \
--pubkey $(artelad tendermint show-validator) \
--moniker "$MONIKER" \
--identity "" \
--details "" \
--chain-id artela_11822-1 \
--gas auto --gas-adjustment 1.5 \
-y
```

Edit Existing Validator

```bash
artelad tx staking edit-validator \
--commission-rate 0.1 \
--new-moniker "$MONIKER" \
--identity "" \
--details "" \
--from $WALLET \
--chain-id artela_11822-1 \
--gas auto --gas-adjustment 1.5 \
-y
```

Validator info

```bash
artelad status 2>&1 | jq .ValidatorInfo
```

Validator Details

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

Jailing info

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

Slashing parameters

```bash
artelad q slashing params
```

Unjail validator

```bash
artelad tx slashing unjail --from $WALLET --chain-id artela_11822-1 --gas auto --gas-adjustment 1.5 -y
```

Active Validators List

```bash
artelad q staking validators -oj --limit=2000 | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " 	 " + .description.moniker' | sort -gr | nl
```

Check Validator key

```bash
[[ $(artelad q staking validator $VALOPER_ADDRESS -oj | jq -r .consensus_pubkey.key) = $(artelad status | jq -r .ValidatorInfo.PubKey.value) ]] && echo -e "Your key status is ok" || echo -e "Your key status is error"
```

Signing info

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

### Governance <a href="#governance" id="governance"></a>

Create New Text Proposal

```bash
artelad  tx gov submit-proposal \
--title "" \
--description "" \
--deposit 1000000uart \
--type Text \
--from $WALLET \
--gas auto --gas-adjustment 1.5 \
-y 
```

Proposals List

```bash
artelad query gov proposals
```

View proposal

```bash
artelad query gov proposal 1
```

Vote

```bash
artelad tx gov vote 1 yes --from $WALLET --chain-id artela_11822-1  --gas auto --gas-adjustment 1.5 -y
```


# Migrate validator

## Migrate your validator to another machine

#### 1. install the testnet on your new server

#### 2. Confirm that you have the recovery seed phrase information for the active key running on the old machine

**backup your key**

```
artelad keys export mykey
```

> *This prints the private key that you can then paste into the file `mykey.backup`*

**get list of keys**

```
artelad keys list
```

#### 3. Recover the active key of the old machine on the new machine

**This can be done with the mnemonics**

```
artelad keys add mykey --recover
```

**Or with the backup file `mykey.backup` from the previous step**

```
artelad keys import mykey mykey.backup
```

#### 4. Wait for the new full node on the new machine to finish catching-up

**To check synchronization status**

```
artelad status 2>&1 | jq .SyncInfo
```

> *`catching_up` should be equal to `false`*

#### 5. After the new node has caught-up, stop the validator node

> *To prevent double signing, you should stop the validator node before stopping the new full node to ensure the new node is at a greater block height than the validator node* *If the new node is behind the old validator node, then you may double-sign blocks*

**Stop and disable service on old machine**

```
sudo systemctl stop artelad
sudo systemctl disable artelad
```

> *The validator should start missing blocks at this point*

#### 6. Stop service on new machine

```
sudo systemctl stop artelad
```

#### 7. Move the validator's private key from the old machine to the new machine

**Private key is located in: `~/.artelad/config/priv_validator_key.json`**

> *After being copied, the key `priv_validator_key.json` should then be removed from the old node's config directory to prevent double-signing if the node were to start back up*

```
sudo mv ~/.artelad/config/priv_validator_key.json ~/.artelad/bak_priv_validator_key.json
```

#### 8. Start service on a new validator node

```
sudo systemctl start artelad
```

> *The new node should start signing blocks once caught-up*

#### 9. Make sure your validator is not jailed

**To unjail your validator**

```
artelad tx slashing unjail --chain-id $ARTELA_CHAIN_ID --from mykey --gas=auto -y
```


# Swisstronik

Swisstronik is a layer 1 solution built on the Cosmos SDK framework. It aims to combine the benefits of the Ethereum Virtual Machine (EVM).

### Explorer

{% embed url="<https://explorer.aknodes.com/SWISSTRONIK-TESTNET/>" %}

<img src="https://383863627-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpsGHvwFmpqkZQJbG9ZSq%2Fuploads%2FS9Sny02M5zflWbqKLWZn%2F1673641806600.jpeg?alt=media&amp;token=e4bc4c66-d90d-45cb-b587-5ebac706138d" alt="" width="100">

<table><thead><tr><th>Chain ID</th><th width="218.33333333333331">Version tag</th></tr></thead><tbody><tr><td>swisstronik_1291-1</td><td>v1.0.2</td></tr></tbody></table>

| Binary Name  | Wasm     | SDK version |
| ------------ | -------- | ----------- |
| swisstronikd | Disabled | v0.50       |

{% tabs %}
{% tab title="RPC" %}
<https://rpc.swisstronik.aknodes.net>
{% endtab %}

{% tab title="API" %}
<https://api.swisstronik.aknodes.net>
{% endtab %}

{% tab title="gRPC" %}
grpc.swisstronik.aknodes.net:9290
{% endtab %}

{% tab title="WSS" %}
wss\://ws-jsonrpc-swisstronik.aknodes.net:443
{% endtab %}

{% tab title="JSONRPC" %}
<https://jsonrpc-swisstronik.aknodes.net/>
{% endtab %}
{% endtabs %}


# Installation

Minimum Hardware Requirements 4x CPUs; the faster clock speed the better  8GB RAM  100GB of storage (SSD or NVME)

## <mark style="color:blue;">Setup validator name</mark> <a href="#setup-validator-name" id="setup-validator-name"></a>

```
MONIKER="YOUR_MONIKER_GOES_HERE"
```

### Install dependencies <a href="#install-dependencies" id="install-dependencies"></a>

```
sudo apt update
sudo apt-get install git curl build-essential make jq gcc snapd chrony lz4 tmux unzip bc -y
```

### **INSTALL GO**

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

### Install Node

```
cd $HOME
rm -rf swisstronik-chain
git clone https://github.com/SigmaGmbH/swisstronik-chain swisstronik
cd swisstronik
git submodule update --init --recursive
make build
make install
```

## **Initialize Node**

```
swisstronikd init MyNode --chain-in swisstronik_1291-1
```

### Download genesis and addrbook

<pre><code><strong>curl -Ls https://snapshots.aknodes.net/snapshots/swisstronik/genesis.json > $HOME/.swisstronik/config/genesis.json
</strong></code></pre>

```
curl -Ls https://snapshots.aknodes.net/snapshots/swisstronik/addrbook.json > $HOME/.swisstronik/config/addrbook.json
```

### **Create Service**

```
sudo tee /etc/systemd/system/swisstronikd.service > /dev/null <<EOF
[Unit]
Description=swisstronik node
After=network-online.target
[Service]
User=$USER
WorkingDirectory=$HOME/.swisstronik
ExecStart=$(which swisstronikd) start --home $HOME/.swisstronik
Restart=on-failure
RestartSec=5
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
```

### **Download Snapshot**

```
swisstronikd tendermint unsafe-reset-all --home $HOME/.swisstronik --keep-addr-book 
curl https://snapshots.aknodes.net/snapshots/swisstronik/snapshot-swisstronik.AKNodes.lz4 | lz4 -dc - | tar -xf - -C $HOME/.swisstronik
```

### Start the node

```
sudo systemctl restart swisstronikd
journalctl -u swisstronikd -f
```


# Upgrade

```
cd $HOcd $HOME
wget https://github.com/SigmaGmbH/swisstronik-chain/releases/download/testnet-v1.0.5/swisstronikd.zip
unzip swisstronikd.zip
sudo cp $HOME/bin/libsgx_wrapper_v1.0.5.x86_64.so /usr/lib
cp $HOME/bin/v1.0.5_enclave.signed.so $HOME/.swisstronik-enclave
chmod +x $HOME/bin/swisstronikd
sudo mv $HOME/bin/swisstronikd $(which swisstronikd)
sudo systemctl restart swisstronikd && sudo journalctl -u swisstronikd -f

```


# Sync

## Snapshot

Update every 6 hours

```
sudo systemctl stop swisstronikd

cp $HOME/.swisstronik/data/priv_validator_state.json $HOME/.swisstronik/priv_validator_state.json.backup 

swisstronikd tendermint unsafe-reset-all --home $HOME/.swisstronik --keep-addr-book 
curl https://snapshots.aknodes.net/snapshots/swisstronik/snapshot-swisstronik.AKNodes.lz4 | lz4 -dc - | tar -xf - -C $HOME/.swisstronik

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

sudo systemctl restart swisstronikd
sudo journalctl -u swisstronikd -f --no-hostname -o cat
```

### State-Sync

```
sudo systemctl stop swisstronik

cp $HOME/.swisstronik/data/priv_validator_state.json $HOME/.swisstronik/priv_validator_state.json.backup
swisstronikd tendermint unsafe-reset-all --home $HOME/.swisstronik

peers="9d6330bb966e1475082cda63102ed4a707cf8fdf@148.113.153.62:26656"  
SNAP_RPC="https://rpc.swisstronik.aknodes.net:443"

sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.swisstronik/config/config.toml 

LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height);
BLOCK_HEIGHT=$((LATEST_HEIGHT - 1000));
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash) 

echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH && sleep 2

sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ;
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ;
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ;
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"| ;
s|^(seeds[[:space:]]+=[[:space:]]+).*$|\1\"\"|" $HOME/.swisstronik/config/config.toml

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

sudo systemctl restart swisstronikd && sudo journalctl -u swisstronikd -f
```


# Useful commands

### Key Management <a href="#key" id="key"></a>

Add new key

```bash
swisstronikd keys add wallet
```

Recover existing key

```bash
swisstronikd keys add wallet --recover
```

List All key

```bash
swisstronikd keys list
```

Delete key

```bash
swisstronikd keys delete wallet
```

Export Key (save to wallet.backup)

```bash
swisstronikd keys export wallet
```

Import key

```bash
swisstronikd keys import wallet wallet.backup
```

Query Wallet Balance

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

### Validator Management <a href="#validator" id="validator"></a>

Create Validator

```bash
swisstronikd tx staking create-validator \
  --amount "1000000uswrt" \
  --pubkey $(swisstronikd tendermint show-validator) \
  --moniker "<MONIKER>" \
  --identity "" \
  --website "YOUR WEBSITE" \
  --chain-id swisstronik_1291-1 \
  --commission-rate "0.01" \
  --commission-max-rate "0.2" \
  --commission-max-change-rate "0.01" \
  --min-self-delegation "1" \
  --gas-prices 7uswrt \
  --gas "auto" \
  --gas-adjustment "1.5" \
  --from wallet \
  -y
```

Edit Validator

```bash
swisstronikd tx staking edit-validator \
--new-moniker "<MONIKER>" \
--identity "" \
--details "Indonode Guide" \
--website "YOUR WEBSITE" \
--chain-id swisstronik_1291-1 \
--commission-rate "0.01" \
--gas-prices 7uswrt \
--gas "auto" \
--gas-adjustment "1.5" \
--from wallet \
-y
```

Unjail Validator

```bash
swisstronikd tx slashing unjail \
--chain-id swisstronik_1291-1 \
--gas-prices 7uswrt \
--gas-adjustment 1.5\
--gas "auto" \
--from wallet \
-y 
```

Signing Info

```bash
swisstronikd query slashing signing-info $(swisstronikd tendermint show-validator) 
```

List all active validators

```bash
swisstronikd q staking validators -oj --limit=3000 | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " 	 " + .description.moniker' | sort -gr | nl 
```

List all inactive validators

```bash
swisstronikd 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) + " 	 " + .description.moniker' | sort -gr | nl 
```

View validators details

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

### Token Management <a href="#token" id="token"></a>

To valoper addressTo wallet addressAmount, uswrt

Withdraw rewards from all validators

```bash
swisstronikd tx distribution withdraw-all-rewards --from wallet --chain-id swisstronik_1291-1 --gas-prices 7uswrt  --gas-adjustment 1.5 --gas "auto" -y 
```

Withdraw comission and rewards from your validator

```bash
swisstronikd tx distribution withdraw-rewards $(swisstronikd keys show wallet --bech val -a) --commission --from wallet --chain-id swisstronik_1291-1 --gas-prices 7uswrt  --gas-adjustment 1.5 --gas "auto" -y 
```

Delegate to your validator

```bash
swisstronikd tx staking delegate $(swisstronikd keys show wallet --bech val -a) 1000000uswrt --from wallet --chain-id swisstronik_1291-1 --gas-prices 7uswrt  --gas-adjustment 1.5 --gas "auto" -y 
```

Delegate to other

```bash
c4ed tx staking delegate <TO_VALOPER_ADDRESS> 1000000uswrt --from wallet --chain-id swisstronik_1291-1 --gas-prices 7uswrt  --gas-adjustment 1.5 --gas "auto" -y 
```

Redelegate your stake to other validators

```bash
swisstronikd tx staking redelegate $(swisstronikd keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> 1000000uswrt --from wallet --chain-id swisstronik_1291-1 --gas-prices 7uswrt  --gas-adjustment 1.5 --gas "auto" -y 
```

Unbond stake

```bash
swisstronikd tx staking unbond $(swisstronikd keys show wallet --bech val -a) 1000000uswrt --from wallet --chain-id swisstronik_1291-1 --gas-prices 7uswrt  --gas-adjustment 1.5 --gas "auto" -y 
```

Send tokens

```bash
swisstronikd tx bank send wallet <TO_WALLET_ADDRESS> 1000000uswrt --from wallet --chain-id swisstronik_1291-1 --gas-prices 7uswrt  --gas-adjustment 1.5 --gas "auto" -y 
```

### Governance <a href="#governance" id="governance"></a>

Create new text proposal

```bash
swisstronikd tx gov submit-proposal \
--title "" \
--description "" \
--deposit "1000000uswrt" \
--type "Text" \
--from wallet \
--gas-prices 7uswrt \ 
--gas-adjustment 1.5 \
--gas "auto" \
-y 
```

List all proposals

```bash
swisstronikd query gov proposals
```

Proposal IDProposal optionYesNoNo with vetoAbstain

Vote

```bash
swisstronikd tx gov vote 1 yes \
--from wallet \
--chain-id swisstronik_1291-1 \
--gas-prices 7uswrt \
--gas-adjustment 1.5 \
--gas "auto" \
-y 
```

### Utility <a href="#utility" id="utility"></a>

Set IndexerNULLKV

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

Get Validator info

```bash
swisstronikd status 2>&1 | jq .ValidatorInfo
```

Get denom info

```bash
swisstronikd q bank denom-metadata -oj | jq
```

Get sync status

```bash
swisstronikd status 2>&1 | jq .SyncInfo.catching_up
```

Get latest height

```bash
swisstronikd status 2>&1 | jq .SyncInfo.latest_block_height
```

Reset Node

```bash
swisstronikd tendermint unsafe-reset-all --home $HOME/.swisstronik --keep-addr-book
```

Delete Node

```bash
cd $HOME && sudo systemctl stop swisstronikd && sudo systemctl disable swisstronikd && sudo rm /etc/systemd/system/swisstronikd.service && sudo systemctl daemon-reload && sudo rm -rf $(which swisstronikd) && sudo rm -rf $HOME/.swisstronik && sudo rm -rf $(which swisstronikd) 
```

### Services Management <a href="#services" id="services"></a>

Reload Service

```bash
sudo systemctl daemon-reload
```

Enable Service

```bash
sudo systemctl enable swisstronikd
```

Disable Service

```bash
sudo systemctl disable swisstronikd
```

Start Service

```bash
sudo systemctl start swisstronikd
```

Stop Service

```bash
sudo systemctl stop swisstronikd
```

Restart Service

```bash
sudo systemctl restart swisstronikd
```

Check Service Status

```bash
sudo systemctl status swisstronikd
```

Check Service Logs

```bash
sudo journalctl -u swisstronikd -f --no-hostname -o cat
```


# Crossfi

CrossFi Chain is a layer 1 blockchain with a modular architecture. It consists of two integral parts, Cosmos and EVM. Each part is responsible for its specific functionality.

### Explorer

{% embed url="<https://explorer.aknodes.com/CROSSFI-TESTNET>" %}

<img src="https://383863627-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpsGHvwFmpqkZQJbG9ZSq%2Fuploads%2FwZ1flKOexg5V1iGnX3iV%2Fimages.jpeg?alt=media&amp;token=b9e108aa-e709-4b0e-90bf-6ef6e274cd21" alt="" width="113">

<table><thead><tr><th>Chain ID</th><th width="218.33333333333331">Version tag</th></tr></thead><tbody><tr><td>crossfi-evm-testnet-1</td><td>v0.3.0-prebuild3</td></tr></tbody></table>

| Binary Name | Wasm     | SDK version |
| ----------- | -------- | ----------- |
| crossfid    | Disabled | v0.47.3     |

{% tabs %}
{% tab title="RPC" %}
<https://rpc.crossfi.aknodes.net>
{% endtab %}

{% tab title="API" %}
<https://api.crossfi.aknodes.net>
{% endtab %}

{% tab title="gRPC" %}
grpc.crossfi.aknodes.net:9090
{% endtab %}
{% endtabs %}


# Installation

Minimum Hardware Requirements 4x CPUs; the faster clock speed the better  8GB RAM  100GB of storage (SSD or NVME)

## <mark style="color:blue;">Setup validator name</mark> <a href="#setup-validator-name" id="setup-validator-name"></a>

```
MONIKER="YOUR_MONIKER_GOES_HERE"
```

### Install dependencies <a href="#install-dependencies" id="install-dependencies"></a>

```
sudo apt update
sudo apt-get install git curl build-essential make jq gcc snapd chrony lz4 tmux unzip bc -y
```

### **INSTALL GO**

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

### Install Node

```
cd $HOME
wget https://github.com/crossfichain/crossfi-node/releases/download/v0.3.0-prebuild9/crossfi-node_0.3.0-prebuild9_linux_amd64.tar.gz
tar -xvf crossfi-node_0.3.0-prebuild9_linux_amd64.tar.gz
chmod +x $HOME/bin/crossfid
rm crossfi-node_0.3.0-prebuild9_linux_amd64.tar.gz
sudo mv $HOME/bin/crossfid $(which crossfid)
```

## **Initialize Node**

```
crossfid config chain-id crossfi-evm-testnet-1
```

### Download genesis and addrbook

<pre><code><strong>curl -Ls https://snapshots.aknodes.net/snapshots/crossfi/genesis.json > $HOME/.crossfid/config/genesis.json
</strong></code></pre>

```
curl -Ls https://snapshots.aknodes.net/snapshots/crossfi/addrbook.json > $HOME/.crossfid/config/addrbook.json
```

### **Create Service**

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

[Service]
User=$USER
ExecStart=$(which crossfid) start
Restart=on-failure
RestartSec=3
LimitNOFILE=65535

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

### **Download Snapshot**

```
crossfid tendermint unsafe-reset-all --home $HOME/.mineplex-chain --keep-addr-book 
curl https://snapshots.aknodes.net/snapshots/crossfi/snapshot-crossfi.AKNodes.lz4 | lz4 -dc - | tar -xf - -C $HOME/.crossfid
```

### Start the node

```
sudo systemctl restart crossfid
journalctl -u crossfid -f
```


# Upgrade

height 3520000

### Manual  <a href="#manual" id="manual"></a>

```bash
cd $HOME
wget https://github.com/crossfichain/crossfi-node/releases/download/v0.3.0-prebuild9/crossfi-node_0.3.0-prebuild9_linux_amd64.tar.gz
tar -xvf crossfi-node_0.3.0-prebuild9_linux_amd64.tar.gz
chmod +x $HOME/bin/crossfid
rm crossfi-node_0.3.0-prebuild9_linux_amd64.tar.gz
sudo mv $HOME/bin/crossfid $(which crossfid)

sudo systemctl restart crossfid
sudo journalctl -u crossfid -f --no-hostname -o cat
```

### Auto  <a href="#auto" id="auto"></a>

```bash
cd $HOME && \
wget https://github.com/crossfichain/crossfi-node/releases/download/v0.3.0-prebuild9/crossfi-node_0.3.0-prebuild9_linux_amd64.tar.gz && \
tar -xvf crossfi-node_0.3.0-prebuild9_linux_amd64.tar.gz && \
chmod +x $HOME/bin/crossfid && \
rm crossfi-node_0.3.0-prebuild9_linux_amd64.tar.gz && \
old_bin_path=$(which crossfid) && \
home_path=$HOME && \
rpc_port=$(grep -m 1 -oP '^laddr = "\K[^"]+' "$HOME/.mineplex-chain/config/config.toml" | cut -d ':' -f 3) && \
[[ -z "$rpc_port" ]] && rpc_port=$(grep -oP 'node = "tcp://[^:]+:\K\d+' "$HOME/.mineplex-chain/config/client.toml") ; \
tmux new -s crossfi-upgrade "sudo bash -c 'curl -s https://raw.githubusercontent.com/appieasahbie/testnet-guides/main/utils/autoupgrade/upgrade.sh | bash -s -- -u \"3520000\" -b crossfid -n \"$HOME/bin/crossfid\" -o \"$old_bin_path\" -h \"$home_path\" -p \"https://api.crossfi.aknodes.net/cosmos/gov/v1/proposals/5\" -r \"$rpc_port\"'"
```


# Sync

## Snapshot

Update every 6 hours

```
sudo systemctl stop crossfid

cp $HOME/.crossfi/data/priv_validator_state.json $HOME/.crossfi/priv_validator_state.json.backup 

crossfid tendermint unsafe-reset-all --home $HOME/.crossfi --keep-addr-book 
curl https://snapshots.aknodes.net/snapshots/crossfi/snapshot-crossfi.AKNodes.lz4 | lz4 -dc - | tar -xf - -C $HOME/.crossfi

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

sudo systemctl restart crossfid
sudo journalctl -u crossfid -f --no-hostname -o cat
```

### State-Sync

```
sudo systemctl stop crossfid

cp $HOME/.crossfi/data/priv_validator_state.json $HOME/.crossfi/priv_validator_state.json.backup
crossfid tendermint unsafe-reset-all --home $HOME/.crossfi

peers="9d6330bb966e1475082cda63102ed4a707cf8fdf@148.113.153.62:26656"  
SNAP_RPC="https://rpc.crossfi.aknodes.net:443"

sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.crossfi/config/config.toml 

LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height);
BLOCK_HEIGHT=$((LATEST_HEIGHT - 1000));
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash) 

echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH && sleep 2

sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ;
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ;
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ;
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"| ;
s|^(seeds[[:space:]]+=[[:space:]]+).*$|\1\"\"|" $HOME/.crossfi/config/config.toml

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

sudo systemctl restart crossfid && sudo journalctl -u crossfid -f
```


# Useful commands

## Service operations ⚙️ <a href="#service-operations" id="service-operations"></a>

Check logs

```bash
sudo journalctl -u crossfid -f
```

Start service

```bash
sudo systemctl start crossfid
```

Stop service

```bash
sudo systemctl stop crossfid
```

Restart service

```bash
sudo systemctl restart crossfid
```

Check service status

```bash
sudo systemctl status crossfid
```

Reload services

```bash
sudo systemctl daemon-reload
```

Enable Service

```bash
sudo systemctl enable crossfid
```

Disable Service

```bash
sudo systemctl disable crossfid
```

Sync info

```bash
crossfid status 2>&1 | jq .SyncInfo
```

Node info

```bash
crossfid status 2>&1 | jq .NodeInfo
```

Your node peer

```bash
echo $(crossfid tendermint show-node-id)'@'$(wget -qO- eth0.me)':'$(cat $HOME/.mineplex-chain/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')
```

### Key management <a href="#key-management" id="key-management"></a>

Add New Wallet

```bash
crossfid keys add $WALLET
```

Restore executing wallet

```bash
crossfid keys add $WALLET --recover
```

List All Wallets

```bash
crossfid keys list
```

Delete wallet

```bash
crossfid keys delete $WALLET
```

Check Balance

```bash
crossfid q bank balances $(crossfid keys show $WALLET -a)
```

Export Key (save to wallet.backup)

```bash
crossfid keys export $WALLET
```

View EVM Prived Key

```bash
crossfid keys unsafe-export-eth-key $WALLET
```

Import Key (restore from wallet.backup)

```bash
crossfid keys import $WALLET wallet.backup
```

### Tokens <a href="#tokens" id="tokens"></a>

Withdraw all rewards

```bash
crossfid tx distribution withdraw-all-rewards --from $WALLET --chain-id crossfi-evm-testnet-1 --gas auto --gas-adjustment 1.5 --gas-prices 10000000000000mpx
```

Withdraw rewards and commission from your validator

```bash
crossfid tx distribution withdraw-rewards $VALOPER_ADDRESS --from $WALLET --commission --chain-id crossfi-evm-testnet-1 --gas auto --gas-adjustment 1.5 --gas-prices 10000000000000mpx -y
```

Check your balance

```bash
crossfid query bank balances $WALLET_ADDRESS
```

Delegate to Yourself

```bash
crossfid tx staking delegate $(crossfid keys show $WALLET --bech val -a) 1000000mpx --from $WALLET --chain-id crossfi-evm-testnet-1 --gas auto --gas-adjustment 1.5 --gas-prices 10000000000000mpx -y
```

Delegate

```bash
crossfid tx staking delegate <TO_VALOPER_ADDRESS> 1000000mpx --from $WALLET --chain-id crossfi-evm-testnet-1 --gas auto --gas-adjustment 1.5 --gas-prices 10000000000000mpx -y
```

Redelegate Stake to Another Validator

```bash
crossfid tx staking redelegate $VALOPER_ADDRESS <TO_VALOPER_ADDRESS> 1000000mpx --from $WALLET --chain-id crossfi-evm-testnet-1 --gas auto --gas-adjustment 1.5 --gas-prices 10000000000000mpx -y
```

Unbond

```bash
crossfid tx staking unbond $(crossfid keys show $WALLET --bech val -a) 1000000mpx --from $WALLET --chain-id crossfi-evm-testnet-1 --gas auto --gas-adjustment 1.5 --gas-prices 10000000000000mpx -y
```

Transfer Funds

```bash
crossfid tx bank send $WALLET_ADDRESS <TO_WALLET_ADDRESS> 1000000mpx --gas auto --gas-adjustment 1.5 --gas-prices 10000000000000mpx -y
```

### Validator operations <a href="#validator-operations" id="validator-operations"></a>

Create New Validator

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

Edit Existing Validator

```bash
crossfid tx staking edit-validator \
--commission-rate 0.1 \
--new-moniker "$MONIKER" \
--identity "" \
--details "" \
--from $WALLET \
--chain-id crossfi-evm-testnet-1 \
--gas auto --gas-adjustment 1.5 --gas-prices 10000000000000mpx \
-y
```

Validator info

```bash
crossfid status 2>&1 | jq .ValidatorInfo
```

Validator Details

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

Jailing info

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

Slashing parameters

```bash
crossfid q slashing params
```

Unjail validator

```bash
crossfid tx slashing unjail --from $WALLET --chain-id crossfi-evm-testnet-1 --gas auto --gas-adjustment 1.5 --gas-prices 10000000000000mpx -y
```

Active Validators List

```bash
crossfid q staking validators -oj --limit=2000 | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " 	 " + .description.moniker' | sort -gr | nl
```

Check Validator key

```bash
[[ $(crossfid q staking validator $VALOPER_ADDRESS -oj | jq -r .consensus_pubkey.key) = $(crossfid status | jq -r .ValidatorInfo.PubKey.value) ]] && echo -e "Your key status is ok" || echo -e "Your key status is error"
```

Signing info

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

### Governance <a href="#governance" id="governance"></a>

Create New Text Proposal

```bash
crossfid  tx gov submit-proposal \
--title "" \
--description "" \
--deposit 1000000mpx \
--type Text \
--from $WALLET \
--gas auto --gas-adjustment 1.5 --gas-prices 10000000000000mpx \
-y 
```

Proposals List

```bash
crossfid query gov proposals
```

View proposal

```bash
crossfid query gov proposal 1
```

Vote

```bash
crossfid tx gov vote 1 yes --from $WALLET --chain-id crossfi-evm-testnet-1  --gas auto --gas-adjustment 1.5 --gas-prices 10000000000000mpx -y
```


# Migrate validator

## Migrate your validator to another machine

#### 1. install the testnet on your new server

#### 2. Confirm that you have the recovery seed phrase information for the active key running on the old machine

**backup your key**

```
crossfid keys export mykey
```

> *This prints the private key that you can then paste into the file `mykey.backup`*

**get list of keys**

```
crossfid keys list
```

#### 3. Recover the active key of the old machine on the new machine

**This can be done with the mnemonics**

```
crossfid keys add mykey --recover
```

**Or with the backup file `mykey.backup` from the previous step**

```
crossfid keys import mykey mykey.backup
```

#### 4. Wait for the new full node on the new machine to finish catching-up

**To check synchronization status**

```
crossfid status 2>&1 | jq .SyncInfo
```

> *`catching_up` should be equal to `false`*

#### 5. After the new node has caught-up, stop the validator node

> *To prevent double signing, you should stop the validator node before stopping the new full node to ensure the new node is at a greater block height than the validator node* *If the new node is behind the old validator node, then you may double-sign blocks*

**Stop and disable service on old machine**

```
sudo systemctl stop crossfid
sudo systemctl disable crossfid
```

> *The validator should start missing blocks at this point*

#### 6. Stop service on new machine

```
sudo systemctl stop crossfid
```

#### 7. Move the validator's private key from the old machine to the new machine

**Private key is located in: `~/.`**&#x6D;ineplex-chain/**`config/priv_validator_key.json`**

> *After being copied, the key `priv_validator_key.json` should then be removed from the old node's config directory to prevent double-signing if the node were to start back up*

```
sudo mv ~/.mineplex-chain/config/priv_validator_key.json ~/.lavad/bak_priv_validator_key.json
```

#### 8. Start service on a new validator node

```
sudo systemctl start crossfid
```

> *The new node should start signing blocks once caught-up*

#### 9. Make sure your validator is not jailed

**To unjail your validator**

```
crossfid tx slashing unjail --from $WALLET --chain-id crossfi-evm-testnet-1 --gas auto --gas-adjustment 1.5 --gas-prices 10000000000000mpx -y
```


# Hedge

Hedge Blockchain is a cutting-edge blockchain platform designed to enhance security, transparency, and efficiency in transactions.

### Explorer

{% embed url="<https://explorer.aknodes.com/HEDGE-TESTNET/>" %}

<img src="https://383863627-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpsGHvwFmpqkZQJbG9ZSq%2Fuploads%2FpbjjXtCLJJkWS5HI5WsP%2FIMG_1397-removebg-preview%20(1).png?alt=media&amp;token=df374b5a-2fb6-4d3c-9646-a37276b0722f" alt="" width="100">

<table><thead><tr><th>Chain ID</th><th width="218.33333333333331">Version tag</th></tr></thead><tbody><tr><td>berberis-1</td><td>v0.1.0</td></tr></tbody></table>

| Binary Name | Wasm  | SDK version |
| ----------- | ----- | ----------- |
| hedged      | xxxxx | v0.47.5     |

{% tabs %}
{% tab title="RPC" %}
<https://rpc.hedge.aknodes.net>
{% endtab %}

{% tab title="API" %}
<https://api.hedge.aknodes.net>
{% endtab %}

{% tab title="gRPC" %}
grpc.hedge.aknodes.net:9890
{% endtab %}
{% endtabs %}


# Installation

Minimum Hardware Requirements 4x CPUs; the faster clock speed the better 8GB RAM 100GB of storage (SSD or NVME)

## <mark style="color:blue;">Setup validator name</mark> <a href="#setup-validator-name" id="setup-validator-name"></a>

```
MONIKER="YOUR_MONIKER_GOES_HERE"
```

### Install dependencies <a href="#install-dependencies" id="install-dependencies"></a>

```
sudo apt update
sudo apt-get install git curl build-essential make jq gcc snapd chrony lz4 tmux unzip bc -y
```

### **INSTALL GO**

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

### Install Node

```
cd $HOME
mkdir -p $HOME/go/bin/
wget https://snapshots.aknodes.net/snapshots/hedge/hedged
chmod +x hedged
mv hedged $HOME/go/bin/
hedged version
```

## **Initialize Node**

```
hedged init MyNode --chain-id berberis-1
```

### Download genesis and addrbook

<pre><code><strong>curl -Ls https://snapshots.aknodes.net/snapshots/hedge/genesis.json > $HOME/.hedge/config/genesis.json
</strong></code></pre>

```
curl -Ls https://snapshots.aknodes.net/snapshots/hedge/addrbook.json > $HOME/.hedge/config/addrbook.json
```

### **Create Service**

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

[Service]
User=$USER
ExecStart=$(which hedged) start
Restart=on-failure
RestartSec=3
LimitNOFILE=65535

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

### **Download Snapshot**

```
hedged tendermint unsafe-reset-all --home $HOME/.hedge --keep-addr-book 
curl https://snapshots.aknodes.net/snapshots/hedge/snapshot-hedge.AKNodes.lz4 | lz4 -dc - | tar -xf - -C $HOME/.hedge
```

### Start the node

```
sudo systemctl restart hedged
journalctl -u hedged -f
```


# Upgrade


# Sync

## Snapshot

Update every 6 hours

```
sudo systemctl stop hedged

cp $HOME/.hedge/data/priv_validator_state.json $HOME/.hedge/priv_validator_state.json.backup 

hedged tendermint unsafe-reset-all --home $HOME/.hedge --keep-addr-book 
curl https://snapshots.aknodes.net/snapshots/hedge/snapshot-hedge.AKNodes.lz4 | lz4 -dc - | tar -xf - -C $HOME/.hedge

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

sudo systemctl restart hedged
sudo journalctl -u hedged -f --no-hostname -o cat
```

### State-Sync

```
sudo systemctl stop hedged

cp $HOME/.hedge/data/priv_validator_state.json $HOME/.hedge/priv_validator_state.json.backup
hedged tendermint unsafe-reset-all --home $HOME/.hedge

peers="8ac6567595653de3ee0b37d390e26e84fffd05ec@167.235.14.83:34656"  
SNAP_RPC="https://rpc.hedge.aknodes.net:443"

sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.hedge/config/config.toml 

LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height);
BLOCK_HEIGHT=$((LATEST_HEIGHT - 1000));
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash) 

echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH && sleep 2

sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ;
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ;
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ;
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"| ;
s|^(seeds[[:space:]]+=[[:space:]]+).*$|\1\"\"|" $HOME/.hedge/config/config.toml

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

sudo systemctl restart hedged && sudo journalctl -u hedged -f
```


# Useful commands

### <mark style="color:yellow;">Keys</mark> :

* add keys<br>

  ```
  hedged keys add wallet
  ```
* delete keys<br>

  ```
  hedged keys delete wallet
  ```
* recover keys from a seed passphrase<br>

  ```
  hedged keys add wallet --recover
  ```
* list all keys<br>

  ```
  hedged keys list
  ```

###

* send balance<br>

  ```
  hedged tx bank send wallet [TO_ADDRESS] [AMOUNT]uhedge \
  --chain-id berberis-1 \
  --from "wallet" \
  --gas "200000"
  ```

* multi send balance<br>

  ```
  hedged tx bank multi-send wallet [TO_ADDRESS1] [TO_ADDRESS2] [TO_ADDRESS3] [AMOUNT]uhedge \
  --chain-id berberis-1 \
  --from "wallet" \
  --gas "200000"
  ```

* create-validator<br>

  ```
  hedged tx staking create-validator \
  --amount 1000000uhedge \
  --pubkey $(hedged tendermint show-validator) \
  --chain-id berberis-1 \
  --min-self-delegation 1 \
  --commission-max-change-rate 0.01 \
  --commission-max-rate 0.2 \
  --commission-rate 0.05 \
  --moniker "VALIDATOR-MONIKER" \
  --identity "VALIDATOR-IDENTITY" \
  --details "VALIDATOR-DESCRIPTION" \
  --website "VALIDATOR-WEBSITE" \
  --security-contact ["VALIDATOR-CONTACT" \
  --from "wallet" \
  --gas "200000"
  ```

* edit-validator<br>

  ```
  hedged tx staking edit-validator \
  --chain-id berberis-1 \
  --commission-rate 0.05 \
  --new-moniker ["NEW-VALIDATOR-MONIKER"] \
  --identity ["NEW-VALIDATOR-IDENTITY"] \
  --details ["NEW-VALIDATOR-DESCRIPTION"] \
  --website ["NEW-VALIDATOR-WEBSITE"] \
  --security-contact ["NEW-VALIDATOR-CONTACT"] \
  --from "wallet" \
  --gas "200000"
  ```

* delegate / stake<br>

  ```
  hedged tx staking delegate [TO_VALOPER_ADDRESS] [AMOUNT]uhedge \
  --chain-id berberis-1 \
  --from "wallet" \
  --gas "200000"
  ```

* redelegate<br>

  ```
  hedged tx staking redelegate [SRC_VALOPER_ADDRESS] [TO_VALOPER_ADDRESS] [AMOUNT]uhedge \
  --chain-id berberis-1 \
  --from "wallet" \
  --gas "200000"
  ```

### <mark style="color:red;">Slashing</mark> :

* unjail-validator<br>

  ```
  hedged tx slashing unjail \
  --chain-id berberis-1 \
  --from "wallet" \
  --gas "200000"
  ```

### <mark style="color:orange;">Gov</mark> :

* query all proposals:<br>

  ```
  hedged query gov proposals
  ```

* query specific proposals by id:<br>

  ```
  hedged query gov proposal [PROPOSAL_ID]
  ```

* vote proposal:

  OPTION\_VALUE: yes , no , no\_with\_veto and abstain

  ```
  hedged tx gov vote [PROPOSAL_ID] [OPTION] \
  --chain-id berberis-1 \
  --from "wallet" \
  --gas "200000"
  ```

### <mark style="color:purple;">Distribution</mark> :

* Withdraw all rewards :<br>

  ```
  hedged tx distribution withdraw-all-rewards \
  --chain-id berberis-1 \
  --from "wallet" \
  --gas "200000"
  ```

* Withdraw reward and commission:<br>

  ```
  hedged tx distribution withdraw-rewards $(hedged keys show wallet --bech val -a) \
  --commission \
  --chain-id berberis-1 \
  --from "wallet" \
  --gas "200000"
  ```


# Warden Protocol

Warden Protocol is an intent-centric protocol, built on the Cosmos SDK, that enables various execution layers for interoperability

### Explorer

{% embed url="<https://explorer.aknodes.com/WARDEN-TESTNET/>" %}

<figure><img src="https://383863627-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpsGHvwFmpqkZQJbG9ZSq%2Fuploads%2FhNLtY5ljIZwXXXVFmFtS%2Fwarden.webp?alt=media&amp;token=45fbdbb3-a7e8-43d5-890c-e847c7c98577" alt=""><figcaption></figcaption></figure>

<table><thead><tr><th>Chain ID</th><th width="218.33333333333331">Version tag</th></tr></thead><tbody><tr><td>barra_9191-1</td><td>v0.7.4</td></tr></tbody></table>

| Binary Name | Wasm    | SDK version |
| ----------- | ------- | ----------- |
| wardend     | Enabled | v0.50.5     |

{% tabs %}
{% tab title="RPC" %}
<https://rpc.warden.aknodes.net>
{% endtab %}

{% tab title="API" %}
<https://api.warden.aknodes.net>
{% endtab %}

{% tab title="gRPC" %}
grpc.warden.aknodes.net:18090
{% endtab %}
{% endtabs %}


# Installation

## <mark style="color:blue;">Setup validator name</mark> <a href="#setup-validator-name" id="setup-validator-name"></a>

```
MONIKER="YOUR_MONIKER_GOES_HERE"
```

### Install dependencies <a href="#install-dependencies" id="install-dependencies"></a>

```
sudo apt update
sudo apt-get install git curl build-essential make jq gcc snapd chrony lz4 tmux unzip bc -y
```

### **INSTALL GO**

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

### Install Node

```
cd $HOME
rm -rf wardenprotocol
mkdir bin && cd bin
git clone https://github.com/warden-protocol/wardenprotocol.git
cd wardenprotocol
git checkout v0.7.4
just wardend build
mv $HOME/wardenprotocol/build/wardend $HOME/go/bin
```

## **Initialize Node**

```
wardend init MyNode --chain-id barra_9191-1
```

### Download genesis and addrbook

<pre><code><strong>curl -Ls https://snapshots.aknodes.net/snapshots/warden/genesis.json > $HOME/.warden/config/genesis.json
</strong></code></pre>

```
curl -Ls https://snapshots.aknodes.net/snapshots/warden/addrbook.json > $HOME/.warden/config/addrbook.json
```

### **Create Service**

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

[Service]
User=$USER
ExecStart=$(which wardend) start
Restart=on-failure
RestartSec=3
LimitNOFILE=65535

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

### **Download Snapshot**

```
wardend tendermint unsafe-reset-all --home $HOME/.warden --keep-addr-book 
curl https://snapshots.aknodes.net/snapshots/warden/snapshot-warden.AKNodes.lz4 | lz4 -dc - | tar -xf - -C $HOME/.warden
```

### Start the node

```
sudo systemctl restart wardend
journalctl -u wardend -f
```


# Upgrade

### Manually & Auto

```
cd $HOME
rm -rf wardenprotocol
git clone https://github.com/warden-protocol/wardenprotocol.git
cd wardenprotocol
git checkout v0.7.4
make install-wardend
sudo mv wardend $HOME/go/bin/
sudo systemctl restart wardend && sudo journalctl -u wardend -fo cat
```

```
cd $HOME && \
wget -O wardend https://github.com/warden-protocol/wardenprotocol/releases/download/v0.7.4/wardend-v0.7.4-linux-amd64 && \
chmod +x $HOME/wardend && \
old_bin_path=$(which wardend) && \
home_path=$HOME && \
rpc_port=$(grep -m 1 -oP '^laddr = "\K[^"]+' "$HOME/.warden/config/config.toml" | cut -d ':' -f 3) && \
tmux new -s warden-upgrade "sudo bash -c 'curl -s https://raw.githubusercontent.com/appieasahbie/testnet-guides/main/utils/autoupgrade/upgrade.sh | bash -s -- -u \"1310000\" -b wardend -n \"$HOME/lavad\" -o \"$old_bin_path\" -h \"$home_path\" -p \"https://api.warden.aknodes.net//cosmos/gov/v1/proposals/5\" -r \"$rpc_port\"'"
```


# Sync

## Snapshot

Update every 6 hours

```
sudo systemctl stop wardend

cp $HOME/.warden/data/priv_validator_state.json $HOME/.warden/priv_validator_state.json.backup 

wardend tendermint unsafe-reset-all --home $HOME/.warden --keep-addr-book 
curl https://snapshots.aknodes.net/snapshots/warden/snapshot-warden.AKNodes.lz4 | lz4 -dc - | tar -xf - -C $HOME/.warden

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

sudo systemctl restart wardend
sudo journalctl -u wardend -f --no-hostname -o cat
```

### State-Sync

<pre><code>sudo systemctl stop wardend

cp $HOME/.warden/data/priv_validator_state.json $HOME/.warden/priv_validator_state.json.backup
wardend tendermint unsafe-reset-all --home $HOME/.warden

<strong>peers="7345881034f09a7b6e621bed6f803168139a9a62@167.235.14.83:13656"  
</strong>SNAP_RPC="https://rpc.warden.aknodes.net:443"

sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.warden/config/config.toml 

LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height);
BLOCK_HEIGHT=$((LATEST_HEIGHT - 1000));
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash) 

echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH &#x26;&#x26; sleep 2

sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ;
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ;
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ;
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"| ;
s|^(seeds[[:space:]]+=[[:space:]]+).*$|\1\"\"|" $HOME/.hedge/config/config.toml

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

sudo systemctl restart wardend &#x26;&#x26; sudo journalctl -u wardend -f
</code></pre>


# Useful commands

### Service operations ⚙️ <a href="#service-operations" id="service-operations"></a>

Check logs

```bash
sudo journalctl -u wardend -fo cat
```

Start service

```bash
sudo systemctl start wardend
```

Stop service

```bash
sudo systemctl stop wardend
```

Restart service

```bash
sudo systemctl restart wardend
```

Check service status

```bash
sudo systemctl status wardend
```

Reload services

```bash
sudo systemctl daemon-reload
```

Enable Service

```bash
sudo systemctl enable wardend
```

Disable Service

```bash
sudo systemctl disable wardend
```

Node info

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

Your node peer

```bash
echo $(wardend tendermint show-node-id)'@'$(wget -qO- eth0.me)':'$(cat $HOME/.warden/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')
```

### Key management <a href="#key-management" id="key-management"></a>

Add New Wallet

```bash
wardend keys add $WALLET
```

Restore executing wallet

```bash
wardend keys add $WALLET --recover
```

List All Wallets

```bash
wardend keys list
```

Delete wallet

```bash
wardend keys delete $WALLET
```

Check Balance

```bash
wardend q bank balances $WALLET_ADDRESS 
```

Export Key (save to wallet.backup)

```bash
wardend keys export $WALLET
```

View EVM Prived Key

```bash
wardend keys unsafe-export-eth-key $WALLET
```

Import Key (restore from wallet.backup)

```bash
wardend keys import $WALLET wallet.backup
```

### Tokens <a href="#tokens" id="tokens"></a>

To valoper addressTo wallet addressAmount, award

Withdraw all rewards

```bash
wardend tx distribution withdraw-all-rewards --from $WALLET --chain-id barra_9191-1 --gas auto --gas-adjustment 1.6 --fees 250000000000000award 
```

Withdraw rewards and commission from your validator

```bash
wardend tx distribution withdraw-rewards $VALOPER_ADDRESS --from $WALLET --commission --chain-id barra_9191-1 --gas auto --gas-adjustment 1.6 --fees 250000000000000award -y 
```

Check your balance

```bash
wardend query bank balances $WALLET_ADDRESS
```

Delegate to Yourself

```bash
wardend tx staking delegate $(wardend keys show $WALLET --bech val -a) 1000000award --from $WALLET --chain-id barra_9191-1 --gas auto --gas-adjustment 1.6 --fees 250000000000000award -y 
```

Delegate

```bash
wardend tx staking delegate <TO_VALOPER_ADDRESS> 1000000award --from $WALLET --chain-id barra_9191-1 --gas auto --gas-adjustment 1.6 --fees 250000000000000award -y 	
```

Redelegate Stake to Another Validator

```bash
wardend tx staking redelegate $VALOPER_ADDRESS <TO_VALOPER_ADDRESS> 1000000award --from $WALLET --chain-id barra_9191-1 --gas auto --gas-adjustment 1.6 --fees 250000000000000award -y 
```

Unbond

```bash
wardend tx staking unbond $(wardend keys show $WALLET --bech val -a) 1000000award --from $WALLET --chain-id barra_9191-1 --gas auto --gas-adjustment 1.6 --fees 250000000000000award -y 
```

Transfer Funds

```bash
wardend tx bank send $WALLET_ADDRESS <TO_WALLET_ADDRESS> 1000000award --gas auto --gas-adjustment 1.6 --fees 250000000000000award -y 
```

### Governance <a href="#governance" id="governance"></a>

Create New Text Proposal

```bash
wardend  tx gov submit-proposal \
--title "" \
--description "" \
--deposit 1000000award \
--type Text \
--from $WALLET \
--gas auto --gas-adjustment 1.6 --fees 250000000000000award \
-y 
```

### Validator operations <a href="#validator-operations" id="validator-operations"></a>

Create New Validator

```bash
wardend tx staking create-validator \
--amount 1000000award \
--from $WALLET \
--commission-rate 0.1 \
--commission-max-rate 0.2 \
--commission-max-change-rate 0.01 \
--min-self-delegation 1 \
--pubkey $(wardend tendermint show-validator) \
--moniker "$MONIKER" \
--identity "" \
--details "xxxxxxxxx" \
--chain-id barra_9191-1 \
--gas auto --gas-adjustment 1.6 --fees 250000000000000award \
-y 
```

Edit Existing Validator

```bash
wardend tx staking edit-validator \
--commission-rate 0.1 \
--new-moniker "$MONIKER" \
--identity "" \
--details "xxxxxxxxx" \
--from $WALLET \
--chain-id barra_9191-1 \
--gas auto --gas-adjustment 1.6 --fees 250000000000000award \
-y 
```

Validator info

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

Validator Details

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

Jailing info

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

Slashing parameters

```bash
wardend q slashing params 
```

Unjail validator

```bash
wardend tx slashing unjail --from $WALLET --chain-id barra_9191-1 --gas auto --gas-adjustment 1.6 --fees 250000000000000award -y 
```

Active Validators List

```bash
wardend q staking validators -oj --limit=2000 | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " 	 " + .description.moniker' | sort -gr | nl 
```

Check Validator key

```bash
[[ $(wardend q staking validator $VALOPER_ADDRESS -oj | jq -r .consensus_pubkey.key) = $(wardend status | jq -r .ValidatorInfo.PubKey.value) ]] && echo -e "Your key status is ok" || echo -e "Your key status is error"
```

Signing info

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

### &#x20;<a href="#governance" id="governance"></a>


# Side Protocol

Side Protocol is a settlement and value exchange layer for the Bitcoin modular blockchains.

<figure><img src="https://383863627-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpsGHvwFmpqkZQJbG9ZSq%2Fuploads%2FBdCqGp6epppkv4ROLxce%2FywO_kmkx_400x400.jpg?alt=media&amp;token=07eb3322-4d2d-4b13-8e2a-8c57f2930190" alt="" width="100"><figcaption></figcaption></figure>

<table><thead><tr><th>Chain ID</th><th width="218.33333333333331">Version tag</th></tr></thead><tbody><tr><td>side-testnet-3</td><td>v0.7.0</td></tr></tbody></table>

| Binary Name | Wasm  | SDK version |
| ----------- | ----- | ----------- |
| sided       | xxxxx | xxxxx       |

{% tabs %}
{% tab title="RPC" %}
<https://rpc.side.aknodes.net>
{% endtab %}

{% tab title="API" %}
<https://api.side.aknodes.net>
{% endtab %}

{% tab title="gRPC" %}
grpc.side.aknodes.net:11390
{% endtab %}
{% endtabs %}


# Installation

## <mark style="color:blue;">Setup validator name</mark> <a href="#setup-validator-name" id="setup-validator-name"></a>

```
MONIKER="YOUR_MONIKER_GOES_HERE"
```

### Install dependencies <a href="#install-dependencies" id="install-dependencies"></a>

```
sudo apt update
sudo apt-get install git curl build-essential make jq gcc snapd chrony lz4 tmux unzip bc -y
```

### **INSTALL GO**

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

### Install Node

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

## **Initialize Node**

```
sided init "MONIKER" --chain-id side-testnet-3
```

### Download genesis and addrbook

<pre><code><strong>curl -Ls https://snapshots.aknodes.net/snapshots/side/genesis.json > $HOME/.side/config/genesis.json
</strong></code></pre>

```
curl -Ls https://snapshots.aknodes.net/snapshots/side/addrbook.json > $HOME/.side/config/addrbook.json
```

### **Create Service**

```
sudo tee /etc/systemd/system/sided.service > /dev/null <<EOF
[Unit]
Description=Side node
After=network-online.target
[Service]
User=$USER
WorkingDirectory=$HOME/.side
ExecStart=$(which sided) start --home $HOME/.side
Restart=on-failure
RestartSec=5
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
```

### **Download Snapshot**

```
sided tendermint unsafe-reset-all --home $HOME/.side --keep-addr-book 
curl https://snapshots.aknodes.net/snapshots/side/snapshot-side.AKNodes.lz4 | lz4 -dc - | tar -xf - -C $HOME/.side
```

### Start the node

```
sudo systemctl restart sided
journalctl -u sided -f
```


# Upgrade


# Sync

## Snapshot

Update every 6 hours

```
sudo systemctl stop sided

cp $HOME/.side/data/priv_validator_state.json $HOME/.side/priv_validator_state.json.backup 

sided tendermint unsafe-reset-all --home $HOME/.side --keep-addr-book 
curl https://snapshots.aknodes.net/snapshots/side/snapshot-side.AKNodes.lz4 | lz4 -dc - | tar -xf - -C $HOME/.side

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

sudo systemctl restart sided
sudo journalctl -u sided -f --no-hostname -o cat
```

### State-Sync

<pre><code>sudo systemctl stop sided

cp $HOME/.side/data/priv_validator_state.json $HOME/.side/priv_validator_state.json.backup
sided tendermint unsafe-reset-all --home $HOME/.side

peers="1688ce2c799e2ea5f73fb017895ea6fb5d4a5f14@167.235.14.83:30656"  
SNAP_RPC="https://rpc.side.aknodes.net:443"

sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.side/config/config.toml 

LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height);
BLOCK_HEIGHT=$((LATEST_HEIGHT - 1000));
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash) 

echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH &#x26;&#x26; sleep 2

<strong>sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ;
</strong>s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ;
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ;
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"| ;
s|^(seeds[[:space:]]+=[[:space:]]+).*$|\1\"\"|" $HOME/.side/config/config.toml

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

sudo systemctl restart sided &#x26;&#x26; sudo journalctl -u sided -f
</code></pre>


# Useful commands

### Service operations ⚙️ <a href="#service-operations" id="service-operations"></a>

Check logs

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

Start service

```bash
sudo systemctl start sided
```

Stop service

```bash
sudo systemctl stop sided
```

Restart service

```bash
sudo systemctl restart sided
```

Check service status

```bash
sudo systemctl status sided
```

Reload services

```bash
sudo systemctl daemon-reload
```

Enable Service

```bash
sudo systemctl enable sided
```

Disable Service

```bash
sudo systemctl disable sided
```

Sync info

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

Node info

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

Your node peer

```bash
echo $(sided tendermint show-node-id)'@'$(wget -qO- eth0.me)':'$(cat $HOME/.side/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')
```

### Key management <a href="#key-management" id="key-management"></a>

Add New Wallet

```bash
sided keys add $WALLET
```

Restore executing wallet

```bash
sided keys add $WALLET --recover
```

List All Wallets

```bash
sided keys list
```

Delete wallet

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

Check Balance

```bash
sided q bank balances $(sided keys show $WALLET -a)
```

Export Key (save to wallet.backup)

```bash
sided keys export $WALLET
```

View EVM Prived Key

```bash
sided keys unsafe-export-eth-key $WALLET
```

Import Key (restore from wallet.backup)

```bash
sided keys import $WALLET wallet.backup
```

### Tokens <a href="#tokens" id="tokens"></a>

Withdraw all rewards

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

Withdraw rewards and commission from your validator

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

Check your balance

```bash
sided query bank balances $WALLET_ADDRESS
```

Delegate to Yourself

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

Delegate

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

Redelegate Stake to Another Validator

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

Unbond

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

Transfer Funds

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

### Validator operations <a href="#validator-operations" id="validator-operations"></a>

Create New Validator

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

Edit Existing Validator

```bash
sided tx staking edit-validator \
--commission-rate 0.1 \
--new-moniker "$MONIKER" \
--identity "" \
--from $WALLET \
--chain-id side-testnet-3 \
--gas auto --fees 1000uside \
-y
```

Validator info

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

Validator Details

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

Jailing info

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

Slashing parameters

```bash
sided q slashing params
```

Unjail validator

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

Active Validators List

```bash
sided q staking validators -oj --limit=2000 | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " 	 " + .description.moniker' | sort -gr | nl
```

Check Validator key

```bash
[[ $(sided q staking validator $VALOPER_ADDRESS -oj | jq -r .consensus_pubkey.key) = $(sided status | jq -r .ValidatorInfo.PubKey.value) ]] && echo -e "Your key status is ok" || echo -e "Your key status is error"
```

Signing info

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

### Governance <a href="#governance" id="governance"></a>

Create New Text Proposal

```bash
sided  tx gov submit-proposal \
--title "" \
--description "" \
--deposit 1000000uside \
--type Text \
--from $WALLET \
--gas auto --fees 1000uside \
-y 
```

Proposals List

```bash
sided query gov proposals
```

View proposal

```bash
sided query gov proposal 1
```

Vote

```bash
sided tx gov vote 1 yes --from $WALLET --chain-id side-testnet-3  --gas auto --fees 1000uside -y
```


# Galactica

Galactica Network is an L1 with unique protocol properties. Powered by zero knowledge cryptography, Galactica aspires to be the first chain with KYC- contingent transactions.

### Explorer

{% embed url="<https://explorer.aknodes.com/galactica/>" %}

<figure><img src="https://383863627-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpsGHvwFmpqkZQJbG9ZSq%2Fuploads%2FBoTp6HO70Zw3XTYu1sZ3%2F1680700239688.jpg?alt=media&amp;token=dfb7fb41-7448-4678-b4fd-930bb95d35a4" alt="" width="100"><figcaption></figcaption></figure>

<table><thead><tr><th>Chain ID</th><th width="218.33333333333331">Version tag</th></tr></thead><tbody><tr><td>galactica_9302_1</td><td>v0.1.2</td></tr></tbody></table>

| Binary Name | Wasm  | SDK version |
| ----------- | ----- | ----------- |
| galacticad  | xxxxx | xxxxx       |

{% tabs %}
{% tab title="RPC" %}
<https://rpc.galactica.aknodes.net>
{% endtab %}

{% tab title="API" %}
<https://api.galactica.aknodes.net>
{% endtab %}

{% tab title="gRPC" %}
grpc.galactica.aknodes.net:14990
{% endtab %}
{% endtabs %}


# Installation

Minimum Hardware Requirements 4x CPUs; the faster clock speed the better  8GB RAM  100GB of storage (SSD or NVME)

## <mark style="color:blue;">Setup validator name</mark> <a href="#setup-validator-name" id="setup-validator-name"></a>

```
MONIKER="YOUR_MONIKER_GOES_HERE"
```

### Install dependencies <a href="#install-dependencies" id="install-dependencies"></a>

```
sudo apt update
sudo apt-get install git curl build-essential make jq gcc snapd chrony lz4 tmux unzip bc -y
```

### **INSTALL GO**

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

### Install Node

<pre><code>cd $HOME
<strong>git clone https://github.com/Galactica-corp/galactica
</strong>cd galactica
git checkout v0.1.2
make install
</code></pre>

## **Initialize Node**

```
galacticad config chain-id galactica_9302-1
```

### Download genesis and addrbook

<pre><code><strong>curl -Ls https://snapshots.aknodes.net/snapshots/galactica/genesis.json > $HOME/.galactica/config/genesis.json
</strong></code></pre>

```
curl -Ls https://snapshots.aknodes.net/snapshots/galactica/addrbook.json > $HOME/.galactica/config/addrbook.json
```

### **Create Service**

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

[Service]
User=$USER
ExecStart=$(which galacticad) start
Restart=on-failure
RestartSec=3
LimitNOFILE=65535

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

### **Download Snapshot**

```
galacticad tendermint unsafe-reset-all --home $HOME/.galactica --keep-addr-book 
curl https://snapshots.aknodes.net/snapshots/galactica/snapshot-galactica.AKNodes.lz4 | lz4 -dc - | tar -xf - -C $HOME/.galactica
```

### Start the node

```
sudo systemctl restart galacticad
journalctl -u galacticad -f
```


# Upgrade


# Sync

## Snapshot

Update every 6 hours

```
sudo systemctl stop galacticad

cp $HOME/.galactica/data/priv_validator_state.json $HOME/.galactica/priv_validator_state.json.backup 

galacticad tendermint unsafe-reset-all --home $HOME/.galactica --keep-addr-book 
curl https://snapshots.aknodes.net/snapshots/galactica/snapshot-galactica.AKNodes.lz4 | lz4 -dc - | tar -xf - -C $HOME/.galactica

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

sudo systemctl restart galacticad
sudo journalctl -u galacticad -f --no-hostname -o cat
```

### State-Sync

```
sudo systemctl stop galacticad

cp $HOME/.galactica/data/priv_validator_state.json $HOME/.galactica/priv_validator_state.json.backup
galacticad tendermint unsafe-reset-all --home $HOME/.galactica

peers="03d3c773e52c46274e35f3a36a7644e7f2ff37be@167.235.14.83:35656"  
SNAP_RPC="https://rpc.galactica.aknodes.net:443"

sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.galactica/config/config.toml 

LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height);
BLOCK_HEIGHT=$((LATEST_HEIGHT - 1000));
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash) 

echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH && sleep 2

sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ;
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ;
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ;
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"| ;
s|^(seeds[[:space:]]+=[[:space:]]+).*$|\1\"\"|" $HOME/.galactica/config/config.toml

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

sudo systemctl restart galacticad && sudo journalctl -u galacticad -f
```


# Usefull Commands

### Service operations ⚙️ <a href="#service-operations" id="service-operations"></a>

Check logs

```bash
sudo journalctl -u galacticad -f
```

Start service

```bash
sudo systemctl start galacticad
```

Stop service

```bash
sudo systemctl stop galacticad
```

Restart service

```bash
sudo systemctl restart galacticad
```

Check service status

```bash
sudo systemctl status galacticad
```

Reload services

```bash
sudo systemctl daemon-reload
```

Enable Service

```bash
sudo systemctl enable galacticad
```

Disable Service

```bash
sudo systemctl disable galacticad
```

Sync info

```bash
galacticad status 2>&1 | jq .SyncInfo
```

Node info

```bash
galacticad status 2>&1 | jq .NodeInfo
```

Your node peer

```bash
echo $(galacticad tendermint show-node-id)'@'$(wget -qO- eth0.me)':'$(cat $HOME/.galactica/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')
```

### Key management <a href="#key-management" id="key-management"></a>

Add New Wallet

```bash
galacticad keys add $WALLET
```

Restore executing wallet

```bash
galacticad keys add $WALLET --recover
```

List All Wallets

```bash
galacticad keys list
```

Delete wallet

```bash
galacticad keys delete $WALLET
```

Check Balance

```bash
galacticad q bank balances $(galacticad keys show $WALLET -a)
```

Export Key (save to wallet.backup)

```bash
galacticad keys export $WALLET
```

View EVM Prived Key

```bash
galacticad keys unsafe-export-eth-key $WALLET
```

Import Key (restore from wallet.backup)

```bash
galacticad keys import $WALLET wallet.backup
```

### Tokens <a href="#tokens" id="tokens"></a>

Withdraw all rewards

```bash
galacticad tx distribution withdraw-all-rewards --from $WALLET --chain-id galactica_9302-1 --gas 200000 --gas-prices 10agnet
```

Withdraw rewards and commission from your validator

```bash
galacticad tx distribution withdraw-rewards $VALOPER_ADDRESS --from $WALLET --commission --chain-id galactica_9302-1 --gas 200000 --gas-prices 10agnet -y
```

Check your balance

```bash
galacticad query bank balances $WALLET_ADDRESS
```

Delegate to Yourself

```bash
galacticad tx staking delegate $(galacticad keys show $WALLET --bech val -a) 1000000agnet --from $WALLET --chain-id galactica_9302-1 --gas 200000 --gas-prices 10agnet -y
```

Delegate

```bash
galacticad tx staking delegate <TO_VALOPER_ADDRESS> 1000000agnet --from $WALLET --chain-id galactica_9302-1 --gas 200000 --gas-prices 10agnet -y
```

Redelegate Stake to Another Validator

```bash
galacticad tx staking redelegate $VALOPER_ADDRESS <TO_VALOPER_ADDRESS> 1000000agnet --from $WALLET --chain-id galactica_9302-1 --gas 200000 --gas-prices 10agnet -y
```

Unbond

```bash
galacticad tx staking unbond $(galacticad keys show $WALLET --bech val -a) 1000000agnet --from $WALLET --chain-id galactica_9302-1 --gas 200000 --gas-prices 10agnet -y
```

Transfer Funds

```bash
galacticad tx bank send $WALLET_ADDRESS <TO_WALLET_ADDRESS> 1000000agnet --gas 200000 --gas-prices 10agnet -y
```

### Validator operations <a href="#validator-operations" id="validator-operations"></a>

Create New Validator

```bash
galacticad tx staking create-validator \
--amount 1000000agnet \
--from $WALLET \
--commission-rate 0.1 \
--commission-max-rate 0.2 \
--commission-max-change-rate 0.01 \
--min-self-delegation 1 \
--pubkey $(galacticad tendermint show-validator) \
--moniker "$MONIKER" \
--identity "" \
--details "xxxxxxxxx" \
--chain-id galactica_9302-1 \
--gas 200000 --gas-prices 10agnet \
-y
```

Edit Existing Validator

```bash
galacticad tx staking edit-validator \
--commission-rate 0.1 \
--new-moniker "$MONIKER" \
--identity "" \
--details "xxxxxxxxxx" \
--from $WALLET \
--chain-id galactica_9302-1 \
--gas 200000 --gas-prices 10agnet \
-y
```

Validator info

```bash
galacticad status 2>&1 | jq .ValidatorInfo
```

Validator Details

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

Jailing info

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

Slashing parameters

```bash
galacticad q slashing params
```

Unjail validator

```bash
galacticad tx slashing unjail --from $WALLET --chain-id galactica_9302-1 --gas 200000 --gas-prices 10agnet -y
```

Active Validators List

```bash
galacticad q staking validators -oj --limit=2000 | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " 	 " + .description.moniker' | sort -gr | nl
```

Check Validator key

```bash
[[ $(galacticad q staking validator $VALOPER_ADDRESS -oj | jq -r .consensus_pubkey.key) = $(galacticad status | jq -r .ValidatorInfo.PubKey.value) ]] && echo -e "Your key status is ok" || echo -e "Your key status is error"
```

Signing info

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

### Governance <a href="#governance" id="governance"></a>

Create New Text Proposal

```bash
galacticad  tx gov submit-proposal \
--title "" \
--description "" \
--deposit 1000000agnet \
--type Text \
--from $WALLET \
--gas 200000 --gas-prices 10agnet \
-y 
```

Proposals List

```bash
galacticad query gov proposals
```


# Initia

Binding a highly interwoven system of modular networks through architectural ownership of the L1 orchestration layer, L2 network, and the communication protocol.

### Explorer

{% embed url="<https://explorer.aknodes.com/INITIA-TESTNET>" %}

<figure><img src="https://383863627-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpsGHvwFmpqkZQJbG9ZSq%2Fuploads%2FVGHz6L4KDx4ZgRP4cB2c%2FayyW6i94_400x400.jpg?alt=media&amp;token=c59d08d9-c265-4f7f-8381-db6d2e979423" alt="" width="100"><figcaption></figcaption></figure>

<table><thead><tr><th>Chain ID</th><th width="218.33333333333331">Version tag</th></tr></thead><tbody><tr><td>initiation-1 </td><td>v0.2.21</td></tr></tbody></table>

| Binary Name | Wasm  | SDK version |
| ----------- | ----- | ----------- |
| initiad     | xxxxx | xxxxx       |

{% tabs %}
{% tab title="RPC" %}
<https://rpc.initia.aknodes.net>
{% endtab %}

{% tab title="API" %}
<https://api.initia.aknodes.net>
{% endtab %}

{% tab title="gRPC" %}
grpc.initia.aknodes.net:11290
{% endtab %}
{% endtabs %}


# Installation

Minimum Hardware Requirements 4x CPUs; the faster clock speed the better  8GB RAM  100GB of storage (SSD or NVME)

## <mark style="color:blue;">Setup validator name</mark> <a href="#setup-validator-name" id="setup-validator-name"></a>

```
MONIKER="YOUR_MONIKER_GOES_HERE"
```

### Install dependencies <a href="#install-dependencies" id="install-dependencies"></a>

```
sudo apt update
sudo apt-get install git curl build-essential make jq gcc snapd chrony lz4 tmux unzip bc -y
```

### **INSTALL GO**

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

### Install Node

```
cd $HOME
rm -rf initia
git clone https://github.com/initia-labs/initia.git
cd initia
git checkout v0.2.21
make install
```

## **Initialize Node**

```
initiad init $MONIKER
```

### Download genesis and addrbook

<pre><code><strong>curl -Ls https://snapshots.aknodes.net/snapshots/initia/genesis.json > $HOME/.initia/config/genesis.json
</strong></code></pre>

```
curl -Ls https://snapshots.aknodes.net/snapshots/initia/addrbook.json > $HOME/.initia/config/addrbook.json
```

### **Create Service**

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

[Service]
User=$USER
ExecStart=$(which initiad) start
Restart=on-failure
RestartSec=3
LimitNOFILE=65535

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

### **Download Snapshot**

```
initiad tendermint unsafe-reset-all --home $HOME/.initia --keep-addr-book 
curl https://snapshots.aknodes.net/snapshots/initia/snapshot-initia.AKNodes.lz4 | lz4 -dc - | tar -xf - -C $HOME/.initia
```

### Start the node

```
sudo systemctl restart initiad
journalctl -u initiad -f
```


# Upgrade

```
cd $HOME
rm -rf initia
git clone https://github.com/initia-labs/initia.git
cd initia
git checkout v0.2.15
make build
sudo mv $HOME/initia/build/initiad $(which initiad)
sudo systemctl restart initiad && sudo journalctl -u initiad -f
```


# Sync

## Snapshot

Update every 6 hours

```
sudo systemctl stop initiad

cp $HOME/.initia/data/priv_validator_state.json $HOME/.initia/priv_validator_state.json.backup 

initiad tendermint unsafe-reset-all --home $HOME/.initia --keep-addr-book 
curl https://snapshots.aknodes.net/snapshots/initia/snapshot-initia.AKNodes.lz4 | lz4 -dc - | tar -xf - -C $HOME/.initia

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

sudo systemctl restart initiad
sudo journalctl -u initiad -f --no-hostname -o cat
```

### State-Sync

```
sudo systemctl stop initiad

cp $HOME/.initia/data/priv_validator_state.json $HOME/.initia/priv_validator_state.json.backup
initiad tendermint unsafe-reset-all --home $HOME/.initia

peers="f52406af9d63b32434db1b3625b414c1cd89aaf1@167.235.14.83:11256"  
SNAP_RPC="https://rpc.initia.aknodes.net:443"

sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.initia/config/config.toml 

LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height);
BLOCK_HEIGHT=$((LATEST_HEIGHT - 1000));
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash) 

echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH && sleep 2

sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ;
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ;
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ;
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"| ;
s|^(seeds[[:space:]]+=[[:space:]]+).*$|\1\"\"|" $HOME/.initia/config/config.toml

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

sudo systemctl restart initiad && sudo journalctl -u initiad -f
```


# Useful Commands

### Service operations ⚙️ <a href="#service-operations" id="service-operations"></a>

Check logs

```bash
sudo journalctl -u initiad -f
```

Start service

```bash
sudo systemctl start initiad
```

Stop service

```bash
sudo systemctl stop initiad
```

Restart service

```bash
sudo systemctl restart initiad
```

Check service status

```bash
sudo systemctl status initiad
```

Reload services

```bash
sudo systemctl daemon-reload
```

Enable Service

```bash
sudo systemctl enable initiad
```

Disable Service

```bash
sudo systemctl disable initiad
```

Node info

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

Your node peer

```bash
echo $(initiad tendermint show-node-id)'@'$(wget -qO- eth0.me)':'$(cat $HOME/.initia/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')
```

### Key management <a href="#key-management" id="key-management"></a>

Add New Wallet

```bash
initiad keys add $WALLET
```

Restore executing wallet

```bash
initiad keys add $WALLET --recover
```

List All Wallets

```bash
initiad keys list
```

Delete wallet

```bash
initiad keys delete $WALLET
```

Check Balance

```bash
initiad q bank balances $WALLET_ADDRESS 
```

Export Key (save to wallet.backup)

```bash
initiad keys export $WALLET
```

View EVM Prived Key

```bash
initiad keys unsafe-export-eth-key $WALLET
```

Import Key (restore from wallet.backup)

```bash
initiad keys import $WALLET wallet.backup
```

### Tokens <a href="#tokens" id="tokens"></a>

Withdraw all rewards

```bash
initiad tx distribution withdraw-all-rewards --from $WALLET --chain-id initiation-1 --gas auto --fees 80000uinit 
```

Withdraw rewards and commission from your validator

```bash
initiad tx distribution withdraw-rewards $VALOPER_ADDRESS --from $WALLET --commission --chain-id initiation-1 --gas auto --fees 80000uinit -y 
```

Check your balance

```bash
initiad query bank balances $WALLET_ADDRESS
```

Delegate to Yourself

```bash
initiad tx staking delegate $(initiad keys show $WALLET --bech val -a) 1000000uinit --from $WALLET --chain-id initiation-1 --gas auto --fees 80000uinit -y 
```

Delegate

```bash
initiad tx staking delegate <TO_VALOPER_ADDRESS> 1000000uinit --from $WALLET --chain-id initiation-1 --gas auto --fees 80000uinit -y 	
```

Redelegate Stake to Another Validator

```bash
initiad tx staking redelegate $VALOPER_ADDRESS <TO_VALOPER_ADDRESS> 1000000uinit --from $WALLET --chain-id initiation-1 --gas auto --fees 80000uinit -y 
```

Unbond

```bash
initiad tx staking unbond $(initiad keys show $WALLET --bech val -a) 1000000uinit --from $WALLET --chain-id initiation-1 --gas auto --fees 80000uinit -y 
```

Transfer Funds

```bash
initiad tx bank send $WALLET_ADDRESS <TO_WALLET_ADDRESS> 1000000uinit --gas auto --fees 80000uinit -y 
```

### Validator operations <a href="#validator-operations" id="validator-operations"></a>

Create New Validator

```bash
initiad tx staking create-validator \
--amount 1000000uinit \
--from $WALLET \
--commission-rate 0.1 \
--commission-max-rate 0.2 \
--commission-max-change-rate 0.01 \
--min-self-delegation 1 \
--pubkey $(initiad tendermint show-validator) \
--moniker "$MONIKER" \
--identity "" \
--details "I love blockchain ❤️" \
--chain-id initiation-1 \
--gas auto --fees 80000uinit \
-y 
```

Edit Existing Validator

```bash
initiad tx staking edit-validator \
--commission-rate 0.1 \
--new-moniker "$MONIKER" \
--identity "" \
--details "I love blockchain ❤️" \
--from $WALLET \
--chain-id initiation-1 \
--gas auto --fees 80000uinit \
-y 
```

Validator info

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

Validator Details

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

Jailing info

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

Slashing parameters

```bash
initiad q slashing params 
```

Unjail validator

```bash
initiad tx slashing unjail --from $WALLET --chain-id initiation-1 --gas auto --fees 80000uinit -y 
```

Active Validators List

```bash
initiad q staking validators -oj --limit=2000 | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " 	 " + .description.moniker' | sort -gr | nl 
```

Check Validator key

```bash
[[ $(initiad q staking validator $VALOPER_ADDRESS -oj | jq -r .consensus_pubkey.key) = $(initiad status | jq -r .ValidatorInfo.PubKey.value) ]] && echo -e "Your key status is ok" || echo -e "Your key status is error"
```

Signing info

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

### Governance <a href="#governance" id="governance"></a>

Create New Text Proposal

```bash
initiad  tx gov submit-proposal \
--title "" \
--description "" \
--deposit 1000000uinit \
--type Text \
--from $WALLET \
--gas auto --fees 80000uinit \
-y 
```

Proposals List

```bash
initiad query gov proposals 
```

View proposal

```bash
initiad query gov proposal 1 
```

Vote

```bash
initiad tx gov vote 1 yes --from $WALLET --chain-id initiation-1  --gas auto --fees 80000uinit -y 
```




---

[Next Page](/llms-full.txt/1)

