# HOME

### About Me

SyaNodes an enthusiastic node runner is committed to running nodes for blockchain projects, committed to keeping abreast of industry advancements and informed, and passionate about using dependable and effective node operation to advance blockchain technology.

***

### Contact Me

[Telegram](https://t.me/syanodes) | [Discord](http://discordapp.com/users/424422625662468096) | [Twitter](https://x.com/syanodes) | [Email](mailto:syanodess@gmail.com)


# Aaron

<figure><img src="https://3732959305-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fr1ChzocIBBGBlfbyRi9s%2Fuploads%2FGqDSiLPGFfuW5CCqz5R5%2Faaron.jpg?alt=media&amp;token=3822f2bd-b8b1-4028-a128-8ad238280441" alt="" width="200"><figcaption></figcaption></figure>

Aaron Network is a decentralized platform offering secure messaging and address reputation tools, inspired by Aaron Swartz, to enhance communication and transparency in blockchain.

| Chain ID    | Latest Version Tag |
| ----------- | ------------------ |
| aaronetwork | v1.0.0             |

### Public endpoints <a href="#public-endpoints" id="public-endpoints"></a>

* Api : <https://aaron-m-api.syanodes.my.id>
* Rpc :  <https://aaron-m-rpc.syanodes.my.id>
* grpc with ssl/tls: aaron-m-grpc.syanodes.my.id:443

### Links

[Website](https://aaronetwork.xyz/) | [Discord](https://discord.gg/HezQu22zxZ) | [Twitter](https://x.com/aaronetwork)

***


# Node Installation

### Hardware requirements The following requirements are recommended for running AARON:

* **6 or more physical CPU cores**
* **At least 1TB of SSD disk storage**
* **At least 16GB of memory (RAM)**
* **At least 500mbps network bandwidth**

## Manual Installation

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

# Install Go
cd $HOME
VER="1.23.3"
wget "https://golang.org/dl/go$VER.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$VER.linux-amd64.tar.gz"
rm "go$VER.linux-amd64.tar.gz"
[ ! -f ~/.bash_profile ] && touch ~/.bash_profile
echo "export PATH=$PATH:/usr/local/go/bin:~/go/bin" >> ~/.bash_profile
source $HOME/.bash_profile
[ ! -d ~/go/bin ] && mkdir -p ~/go/bin
go version


# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export AARON_CHAIN_ID="aaronetwork"" >> $HOME/.bash_profile
echo "export AARON_PORT="110"" >> $HOME/.bash_profile
source $HOME/.bash_profile


# Install Ignite
sudo curl https://get.ignite.com/cli | sudo bash
sudo mv ignite /usr/local/bin/


# Download Binary
cd $HOME
rm -rf aaronetwork-chain
git clone https://github.com/aaronetwork/aaronetwork-chain.git
cd aaronetwork-chain
git checkout v1.0.0
ignite chain build 


# Config and Init App
aaronetworkd init $MONIKER --chain-id $AARON_CHAIN_ID


# Add Genesis File and Addrbook
wget -O $HOME/.aaronetwork/config/genesis.json https://snapshot.syanodes.my.id/mainnets/aaron/genesis.json
wget -O $HOME/.aaronetwork/config/addrbook.json https://snapshot.syanodes.my.id/mainnets/aaron/addrbook.json


#Configure Seeds and Peers
SEEDS=""
PEERS="1a8c6f839120a18ff270bf3a0e57e14db6d2301c@212.34.129.79:26656,dc647a7389d3396b0a0d72d71240b02c30c47ef7@63.250.41.78:26656,84243f09dff669988670a98cbd0de164e988aba9@95.217.204.58:30356,7105c9f21b0a22ba243f22d9a27ea940d2638e79@77.238.248.110:26656"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.aaronetwork/config/config.toml
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.25uaaron\"/" $HOME/.aaronetwork/config/app.toml
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.aaronetwork/config/config.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.aaronetwork/config/config.toml


# Config Pruning
pruning="custom"
pruning_keep_recent="100"
pruning_keep_every="0"
pruning_interval="10"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.aaronetwork/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.aaronetwork/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.aaronetwork/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.aaronetwork/config/app.toml


# Set Custom Port
sed -i -e "s%:1317%:${AARON_PORT}17%; s%:8080%:${AARON_PORT}80%; s%:9090%:${AARON_PORT}90%; s%:9091%:${AARON_PORT}91%; s%:8545%:${AARON_PORT}45%; s%:8546%:${AARON_PORT}46%; s%:6065%:${AARON_PORT}65%" $HOME/.aaronetwork/config/app.toml
sed -i -e "s%:26658%:${AARON_PORT}58%; s%:26657%:${AARON_PORT}57%; s%:6060%:${AARON_PORT}60%; s%:26656%:${AARON_PORT}56%; s%:26660%:${AARON_PORT}61%" $HOME/.aaronetwork/config/config.toml
sed -i \
  -e 's|^chain-id *=.*|chain-id = "aaronetwork"|' \
  -e 's|^keyring-backend *=.*|keyring-backend = "os"|' \
  -e 's|^node *=.*|node = "tcp://localhost:11057"|' \
  $HOME/.aaronetwork/config/client.toml


# Set Service File
sudo tee /etc/systemd/system/aaronetworkd.service > /dev/null <<EOF
[Unit]
Description=aaron-mainnet
After=network-online.target

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

[Install]
WantedBy=multi-user.target
EOF


# Enable and Start Service
sudo systemctl daemon-reload
sudo systemctl enable aaronetworkd
sudo systemctl start aaronetworkd && sudo journalctl -fu aaronetworkd -o cat
```

## Auto Installation

```bash
wget https://snapshot.syanodes.my.id/auto/mainnet/aaron_auto && chmod +x aaron_auto && ./aaron_auto 
```


# Upgrade

```bash
//
```


# Snapshot & State sync

## Snapshot

```bash
//
```

## State Sync

```bash
//
```


# Useful commands

```bash
# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export AARON_CHAIN_ID="aaronetwork"" >> $HOME/.bash_profile
source $HOME/.bash_profile
```

### WALLET MANAGEMENT

{% hint style="info" %}
*Add Wallet Specify the value \<wallet> with your own wallet name*
{% endhint %}

```bash
#Add new wallet
aaronetworkd keys add wallet

#Recover Wallet
aaronetworkd keys add wallet --recover

#List Wallet
aaronetworkd keys list

#Delete Wallet
aaronetworkd keys delete wallet

#Check Wallet Balance
aaronetworkd q bank balances $(aaronetworkd keys show wallet -a)
```

### VALIDATOR MANAGEMENT

{% hint style="info" %}
*Please adjust , MONIKER , YOUR\_KEYBASE\_ID , YOUR\_DETAILS , YOUR\_WEBSITE\_URL*
{% endhint %}

```bash
#check pubkey 
aaronetworkd tendermint show-validator

#Make file validator.json
tee $HOME/.aaronetwork/validator.json > /dev/null << EOF
{
    "pubkey": YOUR_PUBKEY,
    "amount": "1000000uaaron",
    "moniker": "MONIKER",
    "identity": "YOUR_KEYBASE_ID",
    "website": "YOUR_WEBSITE_URL",
    "details": "YOUR_DETAILS.",
    "commission-rate": "0.1",
    "commission-max-rate": "0.2",
    "commission-max-change-rate": "0.01",
    "min-self-delegation": "1"
}
EOF 

#Create Validator
aaronetworkd tx staking create-validator $HOME/.aaronetwork/validator.json --from wallet --chain-id $AARON_CHAIN_ID --gas auto

#Unjail Validator
aaronetworkd tx slashing unjail --from wallet --chain-id $AARON_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 0.25uaaron -y

#Check Jailed Reason
aaronetworkd query slashing signing-info $(aaronetworkd tendermint show-validator)
```

### TOKEN MANAGEMENT

```bash
#Withdraw Rewards
aaronetworkd tx distribution withdraw-all-rewards --from wallet --chain-id $AARON_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 0.25uaaron -y

#Withdraw Rewards with Comission
aaronetworkd tx distribution withdraw-rewards $(aaronetworkd keys show wallet --bech val -a) --commission --from wallet --chain-id $AARON_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 0.25uaaron -y

#Delegate Token to your own validator
aaronetworkd tx staking delegate $(aaronetworkd keys show wallet --bech val -a) 100000aaron --from wallet --chain-id $AARON_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 0.25uaaron -y

#Delegate Token to other validator
aaronetworkd tx staking redelegate $(aaronetworkd keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> 100000aaron --from wallet --chain-id $AARON_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 0.25uaaron -y

#Unbond Token from your validator
aaronetworkd tx staking unbond $(aaronetworkd keys show wallet --bech val -a) 100000aaron --from wallet --chain-id $AARON_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 0.25uaaron -y

#Send Token to another wallet
aaronetworkd tx bank send wallet <TO_WALLET_ADDRESS> 100000aaron --from wallet --chain-id $AARON_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 0.25uaaron -y
```

### GOVERNANCE

```bash
#Vote, You can change the value of yes to no,abstain,nowithveto
aaronetworkd tx gov vote 1 yes --from wallet --chain-id $AARON_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 0.25uaaron -y

#List all proposals
aaronetworkd query gov proposals

#Create new text proposal
aaronetworkd tx gov submit-proposal \
--title="Title" \
--description="Description" \
--deposit=10000000aaron \
--type="Text" \
--from=wallet \
--gas-adjustment 1.5 \
--gas "auto" \
--gas-prices=0.25uaaron \ 
-y 
```

### SERVICES MANAGEMENT

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

# Enable Service
sudo systemctl enable aaronetworkd

# Disable Service
sudo systemctl disable aaronetworkd

# Start Service
sudo systemctl start aaronetworkd

# Stop Service
sudo systemctl stop aaronetworkd

# Restart Service
sudo systemctl restart aaronetworkd

# Check Service Status
sudo systemctl status aaronetworkd

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

### UTILITY

```bash
#Set Indexer NULL / KV
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.aaronetwork/config/config.toml

#Get Validator info
aaronetworkd status 2>&1 | jq .ValidatorInfo

#Get denom info
aaronetworkd q bank denom-metadata -oj | jq

#Get sync status
aaronetworkd status 2>&1 | jq .sync_info.catching_up

#Get latest height
aaronetworkd status 2>&1 | jq .sync_info.latest_block_height

#Reset Node
aaronetworkd tendermint unsafe-reset-all --home $HOME/.aaronetwork --keep-addr-book
```

### DELETE NODE

{% hint style="warning" %} <mark style="color:red;">**WARNING! Use this command wisely Backup your key first it will remove node from your system**</mark>
{% endhint %}

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


# Atomone

<figure><img src="https://3732959305-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fr1ChzocIBBGBlfbyRi9s%2Fuploads%2FqkSl1zVCqPUTE7vk0J12%2FA1.svg?alt=media&amp;token=2e6242f5-2682-4118-b521-5da770adecc0" alt="" width="188"><figcaption></figcaption></figure>

AtomOne is a minimal alternative fork of Gaia, designed to enhance representation for diverse subgroups and act as a political base within the Cosmos ecosystem. It fosters cooperation and competition among specialized zones, promoting diverse perspectives and introducing a governance model inspired by direct democracy.

| Chain ID  | Latest Version Tag |
| --------- | ------------------ |
| atomone-1 | v1.1.2             |

### Public endpoints <a href="#public-endpoints" id="public-endpoints"></a>

* Api : <https://atomone-m-api.syanodes.my.id>
* Rpc :  <https://atomone-m-rpc.syanodes.my.id>
* grpc with ssl/tls: atomone-m-grpc.syanodes.my.id:443

### Links

[Website](https://atom.one/) | [Discord](https://t.co/Zi98jg0OY7) | [Twitter](https://x.com/_atomone)

***


# Node Installation

### Hardware requirements The following requirements are recommended for running ATOMONE:

* **6 or more physical CPU cores**
* **At least 1TB of SSD disk storage**
* **At least 16GB of memory (RAM)**
* **At least 500mbps network bandwidth**

## Manual Installation

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

# Install Go
cd $HOME
VER="1.21.13"
wget "https://golang.org/dl/go$VER.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$VER.linux-amd64.tar.gz"
rm "go$VER.linux-amd64.tar.gz"
[ ! -f ~/.bash_profile ] && touch ~/.bash_profile
echo "export PATH=$PATH:/usr/local/go/bin:~/go/bin" >> ~/.bash_profile
source $HOME/.bash_profile
[ ! -d ~/go/bin ] && mkdir -p ~/go/bin
go version


# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export ATOMONE_CHAIN_ID="atomone-1"" >> $HOME/.bash_profile
echo "export ATOMONE_PORT="109"" >> $HOME/.bash_profile
source $HOME/.bash_profile


# Download Binary
cd $HOME
rm -rf atomone
git clone https://github.com/atomone-hub/atomone.git
cd atomone
git checkout v1.1.2
make install 


# Config and Init App
atomoned config node tcp://localhost:${ATOMONE_PORT}57
atomoned config chain-id $ATOMONE_CHAIN_ID
atomoned init $MONIKER --chain-id $ATOMONE_CHAIN_ID


# Add Genesis File and Addrbook
wget -O $HOME/.atomone/config/genesis.json https://snapshot.syanodes.my.id/mainnets/atomone/genesis.json
wget -O $HOME/.atomone/config/addrbook.json https://snapshot.syanodes.my.id/mainnes/atomone/addrbook.json


#Configure Seeds and Peers
SEEDS=""
PEERS="883d672fad793dd87764cd578aa07f390ab500e3@169.155.46.203:26656,622c89060ed88ac4c9d29f0e18ad8fb72fa07104@159.65.101.79:26656,302b2277a5936c5cf9225fa54b6b627df960b43c@212.56.47.197:26656,ca6b5e45924deaba86616d1d7dad29182d83aa0f@5.78.119.101:26656,66dd543dac0f7fdf865190dc904bc46caedcdd07@2001:bc8:702:16d0::5:26656,51ebff95bd1ecfde3eff1dc8b16b5c497d87b0b5@88.99.252.213:26656,af89f2273ff313b143d49376eca165ecd9673393@5.9.94.151:26706,2c02f0e92e00a7fdacdfafb1919b3424047b1701@45.87.107.24:27656,752bb5f1c914c5294e0844ddc908548115c1052c@65.108.236.5:14556,dc92e7b8ed2aafc34c400405916569aad0d990f3@169.155.44.68:26656,706a835221dcc171afa14429fac536d6b5a3736d@63.250.54.71:26656,af9595a740be37ddf8aac7eedc4699786f2e98a9@65.109.78.7:29956,ca1d8ab2fdc1cbff4c8283ddbcc8fd53a7d9a254@65.21.215.167:26656,522826623d65d27ef3f7db8a5259d003be5a93d3@65.108.229.19:26666,1edb42a4ee4526f80882ef6821b0bb231d320447@135.181.61.200:27656,9e6916423eaa4302127a0b7cb518ead4f8b98fd8@89.109.112.42:30656,b1cd93aaa6ce46e536893c3d0ae064134e70849f@65.21.79.120:26656,61b7861a468dfa84532526afd98bea81bf41a874@121.78.247.244:16656,d3adcf9eee8665ee2d3108f721b3613cdd18c3a3@23.227.223.49:26656,6219193bd3b127e980686b745b97bdcd2ff429ef@95.217.107.137:11656,e28ee47043a193f67fa9598a47a32494c5382a12@164.92.105.245:26656,9aceed722f09a3b0de202bbdd98dc345e2b84731@65.108.109.48:26656,e1b058e5cfa2b836ddaa496b10911da62dcf182e@164.152.161.227:26656,a05191b9ec3023be00e9584d5255f7dfcd3a167e@135.181.138.95:2110,da165aaeac3adbc9845879e06f336c2668c5d915@65.21.214.84:9756,a9d606f503566650d39e8c7e381c78918218f0fe@95.217.204.58:29956"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.atomone/config/config.toml
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.001uatone\"/" $HOME/.atomone/config/app.toml
sed -i -e 's|^indexer *=.*|indexer = "kv"|' $HOME/.atomone/config/config.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.atomone/config/config.toml


# Config Pruning
pruning="custom"
pruning_keep_recent="100"
pruning_keep_every="0"
pruning_interval="10"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.atomone/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.atomone/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.atomone/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.atomone/config/app.toml


# Set Custom Port
sed -i -e "s%:1317%:${ATOMONE_PORT}17%; s%:8080%:${ATOMONE_PORT}80%; s%:9090%:${ATOMONE_PORT}90%; s%:9091%:${ATOMONE_PORT}91%; s%:8545%:${ATOMONE_PORT}45%; s%:8546%:${ATOMONE_PORT}46%; s%:6065%:${ATOMONE_PORT}65%" $HOME/.atomone/config/app.toml
sed -i -e "s%:26658%:${ATOMONE_PORT}58%; s%:26657%:${ATOMONE_PORT}57%; s%:6060%:${ATOMONE_PORT}60%; s%:26656%:${ATOMONE_PORT}56%; s%:26660%:${ATOMONE_PORT}61%" $HOME/.atomone/config/config.toml


# Set Service File
sudo tee /etc/systemd/system/atomoned.service > /dev/null <<EOF
[Unit]
Description=atomone-mainnet
After=network-online.target

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

[Install]
WantedBy=multi-user.target
EOF


# Enable and Start Service
sudo systemctl daemon-reload
sudo systemctl enable atomoned
sudo systemctl start atomoned && sudo journalctl -fu atomoned -o cat
```

## Auto Installation

```bash
wget https://snapshot.syanodes.my.id/auto/mainnet/atomone_auto && chmod +x atomone_auto && ./atomone_auto 
```


# Upgrade

## Manual Upgrade

**upgrade at height**

```bash
cd $HOME
mkdir download
cd download
wget -O atomoned https://github.com/atomone-hub/atomone/releases/download/v1.1.2/atomoned-v1.1.2-linux-amd64
chmod +x atomoned
mv atomoned $HOME/go/bin
sudo systemctl restart atomoned && sudo journalctl -fu atomoned -o cat 
```


# Snapshot & State sync

## Snapshot

```bash
sudo systemctl stop atomoned

cp $HOME/.atomone/data/priv_validator_state.json $HOME/.atomone/priv_validator_state.json.backup
atomoned tendermint unsafe-reset-all --home ~/.atomone/ --keep-addr-book

curl https://ss.syanodes.my.id/atomone/ss-atomone.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.atomone

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

sudo systemctl restart atomoned && sudo journalctl -fu atomoned -o cat
```

## State Sync

```bash
sudo systemctl stop atomoned

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

peers="883d672fad793dd87764cd578aa07f390ab500e3@169.155.46.203:26656,622c89060ed88ac4c9d29f0e18ad8fb72fa07104@159.65.101.79:26656,302b2277a5936c5cf9225fa54b6b627df960b43c@212.56.47.197:26656,ca6b5e45924deaba86616d1d7dad29182d83aa0f@5.78.119.101:26656,66dd543dac0f7fdf865190dc904bc46caedcdd07@2001:bc8:702:16d0::5:26656,51ebff95bd1ecfde3eff1dc8b16b5c497d87b0b5@88.99.252.213:26656,af89f2273ff313b143d49376eca165ecd9673393@5.9.94.151:26706,2c02f0e92e00a7fdacdfafb1919b3424047b1701@45.87.107.24:27656,752bb5f1c914c5294e0844ddc908548115c1052c@65.108.236.5:14556,dc92e7b8ed2aafc34c400405916569aad0d990f3@169.155.44.68:26656,706a835221dcc171afa14429fac536d6b5a3736d@63.250.54.71:26656,af9595a740be37ddf8aac7eedc4699786f2e98a9@65.109.78.7:29956,ca1d8ab2fdc1cbff4c8283ddbcc8fd53a7d9a254@65.21.215.167:26656,522826623d65d27ef3f7db8a5259d003be5a93d3@65.108.229.19:26666,1edb42a4ee4526f80882ef6821b0bb231d320447@135.181.61.200:27656,9e6916423eaa4302127a0b7cb518ead4f8b98fd8@89.109.112.42:30656,b1cd93aaa6ce46e536893c3d0ae064134e70849f@65.21.79.120:26656,61b7861a468dfa84532526afd98bea81bf41a874@121.78.247.244:16656,d3adcf9eee8665ee2d3108f721b3613cdd18c3a3@23.227.223.49:26656,6219193bd3b127e980686b745b97bdcd2ff429ef@95.217.107.137:11656,e28ee47043a193f67fa9598a47a32494c5382a12@164.92.105.245:26656,9aceed722f09a3b0de202bbdd98dc345e2b84731@65.108.109.48:26656,e1b058e5cfa2b836ddaa496b10911da62dcf182e@164.152.161.227:26656,a05191b9ec3023be00e9584d5255f7dfcd3a167e@135.181.138.95:2110,da165aaeac3adbc9845879e06f336c2668c5d915@65.21.214.84:9756,a9d606f503566650d39e8c7e381c78918218f0fe@95.217.204.58:29956"
SNAP_RPC="https://atomone-m-rpc.syanodes.my.id:443"

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

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) 

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/.atomone/config/config.toml

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

sudo systemctl restart atomoned && sudo journalctl -fu atomoned -o cat
```


# Useful commands

```bash
# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export ATOMONE_CHAIN_ID="atomone-1"" >> $HOME/.bash_profile
source $HOME/.bash_profile
```

### WALLET MANAGEMENT

{% hint style="info" %}
*Add Wallet Specify the value \<wallet> with your own wallet name*
{% endhint %}

```bash
#Add new wallet
atomoned keys add wallet

#Recover Wallet
atomoned keys add wallet --recover

#List Wallet
atomoned keys list

#Delete Wallet
atomoned keys delete wallet

#Check Wallet Balance
atomoned q bank balances $(atomoned keys show wallet -a)
```

### VALIDATOR MANAGEMENT

{% hint style="info" %}
*Please adjust , MONIKER , YOUR\_KEYBASE\_ID , YOUR\_DETAILS , YOUR\_WEBSITE\_URL*
{% endhint %}

```bash
#Create Validator
atomoned tx staking create-validator \
--amount=1000000uatone \
--pubkey=$(atomoned tendermint show-validator) \
--moniker=$MONIKER \
--identity="YOUR_KEYBASE_ID" \
--details="YOUR_DETAILS" \
--website="YOUR_WEBSITE_URL" \
--chain-id=$ATOMONE_CHAIN_ID \
--commission-rate=0.10 \
--commission-max-rate=0.20 \
--commission-max-change-rate=0.01 \
--min-self-delegation=1000 \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices=1uatone \ 
-y

#Edit Validator
atomoned tx staking edit-validator \
--new-moniker="YOUR MONIKER" \
--identity="IDENTITY KEYBASE" \
--details="DETAILS VALIDATOR" \
--website="LINK WEBSITE" \
--chain-id=$ATOMONE_CHAIN_ID \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices=1uatone \ 
-y

#Unjail Validator
atomoned tx slashing unjail --from wallet --chain-id $ATOMONE_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uatone -y

#Check Jailed Reason
atomoned query slashing signing-info $(atomoned tendermint show-validator)
```

### TOKEN MANAGEMENT

```bash
#Withdraw Rewards
atomoned tx distribution withdraw-all-rewards --from wallet --chain-id $ATOMONE_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uatone -y

#Withdraw Rewards with Comission
atomoned tx distribution withdraw-rewards $(atomoned keys show wallet --bech val -a) --commission --from wallet --chain-id $ATOMONE_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uatone -y

#Delegate Token to your own validator
atomoned tx staking delegate $(atomoned keys show wallet --bech val -a) 100000uatone --from wallet --chain-id $ATOMONE_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uatone -y

#Delegate Token to other validator
atomoned tx staking redelegate $(atomoned keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> 100000uatone --from wallet --chain-id $ATOMONE_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uatone -y

#Unbond Token from your validator
atomoned tx staking unbond $(atomoned keys show wallet --bech val -a) 100000uatone --from wallet --chain-id $ATOMONE_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uatone -y

#Send Token to another wallet
atomoned tx bank send wallet <TO_WALLET_ADDRESS> 100000uatone --from wallet --chain-id $ATOMONE_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uatone -y
```

### GOVERNANCE

```bash
#Vote, You can change the value of yes to no,abstain,nowithveto
atomoned tx gov vote 1 yes --from wallet --chain-id $ATOMONE_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uatone -y

#List all proposals
atomoned query gov proposals

#Create new text proposal
atomoned tx gov submit-proposal \
--title="Title" \
--description="Description" \
--deposit=10000000uatone \
--type="Text" \
--from=wallet \
--gas-adjustment 1.5 \
--gas "auto" \
--gas-prices=1uatone \ 
-y 
```

### SERVICES MANAGEMENT

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

# Enable Service
sudo systemctl enable atomoned

# Disable Service
sudo systemctl disable atomoned

# Start Service
sudo systemctl start atomoned

# Stop Service
sudo systemctl stop atomoned

# Restart Service
sudo systemctl restart atomoned

# Check Service Status
sudo systemctl status atomoned

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

### UTILITY

```bash
#Set Indexer NULL / KV
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.atomone/config/config.toml

#Get Validator info
atomoned status 2>&1 | jq .ValidatorInfo

#Get denom info
atomoned q bank denom-metadata -oj | jq

#Get sync status
atomoned status 2>&1 | jq .SyncInfo.catching_up

#Get latest height
atomoned status 2>&1 | jq .SyncInfo.latest_block_height

#Reset Node
atomoned tendermint unsafe-reset-all --home $HOME/.atomone --keep-addr-book
```

### DELETE NODE

{% hint style="warning" %} <mark style="color:red;">**WARNING! Use this command wisely Backup your key first it will remove node from your system**</mark>
{% endhint %}

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


# Beezee

<figure><img src="https://3732959305-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fr1ChzocIBBGBlfbyRi9s%2Fuploads%2FjvF31sMBNefIC4iG0StL%2Fbeezee.png?alt=media&amp;token=a8397242-caca-4d30-bee3-cbdf0da406e0" alt="" width="188"><figcaption></figcaption></figure>

Unleash the power of a community-driven, transparent blockchain project. Empowering our community through decentralized applications, BeeZee eliminates single points of failure and offers an unparalleled blockchain experience.

| Chain ID | Latest Version Tag |
| -------- | ------------------ |
| beezee-1 | v7.1.1             |

### Public endpoints <a href="#public-endpoints" id="public-endpoints"></a>

* Api : <https://beezee-m-api.syanodes.my.id>
* Rpc :  <https://beezee-m-rpc.syanodes.my.id>
* grpc with ssl/tls: beezee-m-grpc.syanodes.my.id:443

### Links

[Website](https://getbze.com/) | [Discord](https://discord.gg/wb68JV3QhZ) | [Twitter](https://x.com/BZEdgeCoin)

***


# Node Installation

### Hardware requirements The following requirements are recommended for running BEEZEE:

* **6 or more physical CPU cores**
* **At least 1TB of SSD disk storage**
* **At least 16GB of memory (RAM)**
* **At least 500mbps network bandwidth**

## Manual Installation

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

# Install Go
cd $HOME
VER="1.20.5"
wget "https://golang.org/dl/go$VER.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$VER.linux-amd64.tar.gz"
rm "go$VER.linux-amd64.tar.gz"
[ ! -f ~/.bash_profile ] && touch ~/.bash_profile
echo "export PATH=$PATH:/usr/local/go/bin:~/go/bin" >> ~/.bash_profile
source $HOME/.bash_profile
[ ! -d ~/go/bin ] && mkdir -p ~/go/bin
go version


# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export BEEZEE_CHAIN_ID="beezee-1"" >> $HOME/.bash_profile
echo "export BEEZEE_PORT="113"" >> $HOME/.bash_profile
source $HOME/.bash_profile


# Download Binary
cd $HOME
rm -rf $HOME/bze
git clone https://github.com/bze-alphateam/bze
cd bze
git checkout v7.1.1
make install


# Config and Init App
bzed config node tcp://localhost:${BEEZEE_PORT}57
bzed config chain-id $BEEZEE_CHAIN_ID
bzed init $MONIKER --chain-id $BEEZEE_CHAIN_ID


# Add Genesis File and Addrbook
wget -O $HOME/.bze/config/genesis.json https://snapshot.syanodes.my.id/mainnets/beezee/genesis.json
wget -O $HOME/.bze/config/addrbook.json https://snapshot.syanodes.my.id/mainnets/beezee/addrbook.json


#Configure Seeds and Peers
SEEDS=""
PEERS="e3945aa782f28d2fdad92855c0a3c17eefb726ae@65.108.126.46:26656,246036506f4dc3905622a7c2d34553c321f21b7a@65.109.28.177:29576,542eb02117bffda60af61f2c1efd02c3c18acf95@65.109.92.241:21076,784f0e1b256ab1a0cc12bfbbd0fe8d86892ede9e@65.21.45.173:16356,a7539f7dc7a4d470ff8687acb599d75a323e34b7@65.108.76.33:21116,4308278c28a318d669fc53bd005aca400bca2a33@95.214.55.100:26456,e110f485635b947fa7c73853c8989aa5aa556213@75.119.156.205:26656,026415a6a3ca60f2777e3da8e546210fb58e16cd@172.190.17.88:26656,501528a7f445f3c741cd991fee6754ff2c594ffe@37.187.149.93:26667"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.bze/config/config.toml
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.00025ubze\"/" $HOME/.bze/config/app.toml
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.bze/config/config.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.bze/config/config.toml


# Config Pruning
pruning="custom"
pruning_keep_recent="100"
pruning_keep_every="0"
pruning_interval="10"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.bze/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.bze/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.bze/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.bze/config/app.toml


# Set Custom Port
sed -i -e "s%:1317%:${BEEZEE_PORT}17%; s%:8080%:${BEEZEE_PORT}80%; s%:9090%:${BEEZEE_PORT}90%; s%:9091%:${BEEZEE_PORT}91%; s%:8545%:${BEEZEE_PORT}45%; s%:8546%:${BEEZEE_PORT}46%; s%:6065%:${BEEZEE_PORT}65%" $HOME/.bze/config/app.toml
sed -i -e "s%:26658%:${BEEZEE_PORT}58%; s%:26657%:${BEEZEE_PORT}57%; s%:6060%:${BEEZEE_PORT}60%; s%:26656%:${BEEZEE_PORT}56%; s%:26660%:${BEEZEE_PORT}61%" $HOME/.bze/config/config.toml


# Set Service File
sudo tee /etc/systemd/system/bzed.service > /dev/null <<EOF
[Unit]
Description=beezee-mainnet
After=network-online.target

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

[Install]
WantedBy=multi-user.target
EOF


# Enable and Start Service
sudo systemctl daemon-reload
sudo systemctl enable bzed
sudo systemctl start bzed && sudo journalctl -fu bzed -o cat
```

## Auto Installation

```bash
wget https://snapshot.syanodes.my.id/auto/mainnet/beezee_auto && chmod +x beezee_auto && ./beezee_auto 
```


# Upgrade

## Manual Upgrade

**upgrade at height** [*15951000*](https://explorer.syanodes.my.id/beezee-mainnet/block/15951000)

```bash
cd $HOME
mkdir download
cd download
curl -LO https://github.com/bze-alphateam/bze/releases/download/v7.2.0/bze-7.2.0-linux-amd64.tar.gz
tar -xvf bze-7.2.0-linux-amd64.tar.gz
rm bze-7.2.0-linux-amd64.tar.gz
chmod +x bzed
sudo mv $HOME/download/bzed $(which bzed)
sudo systemctl restart bzed && sudo journalctl -fu bzed -o cat
```


# Snapshot & State sync

## Snapshot

```bash
sudo systemctl stop bzed

cp $HOME/.bze/data/priv_validator_state.json $HOME/.bze/priv_validator_state.json.backup
bzed tendermint unsafe-reset-all --home ~/.bze/ --keep-addr-book

curl https://ss.syanodes.my.id/beezee/ss-beezee.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.bze

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

sudo systemctl restart bzed && sudo journalctl -fu bzed -o cat
```

## State Sync

```bash
sudo systemctl stop bzed

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

peers="e3945aa782f28d2fdad92855c0a3c17eefb726ae@65.108.126.46:26656,246036506f4dc3905622a7c2d34553c321f21b7a@65.109.28.177:29576,542eb02117bffda60af61f2c1efd02c3c18acf95@65.109.92.241:21076,784f0e1b256ab1a0cc12bfbbd0fe8d86892ede9e@65.21.45.173:16356,a7539f7dc7a4d470ff8687acb599d75a323e34b7@65.108.76.33:21116,4308278c28a318d669fc53bd005aca400bca2a33@95.214.55.100:26456,e110f485635b947fa7c73853c8989aa5aa556213@75.119.156.205:26656,026415a6a3ca60f2777e3da8e546210fb58e16cd@172.190.17.88:26656,501528a7f445f3c741cd991fee6754ff2c594ffe@37.187.149.93:26667"
SNAP_RPC="https://beezee-m-rpc.syanodes.my.id:443"

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

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) 

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/.bze/config/config.toml

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

sudo systemctl restart bzed && sudo journalctl -fu bzed -o cat
```


# Useful commands

```bash
# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export BEEZEE_CHAIN_ID="beezee-1"" >> $HOME/.bash_profile
source $HOME/.bash_profile
```

### WALLET MANAGEMENT

{% hint style="info" %}
*Add Wallet Specify the value \<wallet> with your own wallet name*
{% endhint %}

```bash
#Add new wallet
bzed keys add wallet

#Recover Wallet
bzed keys add wallet --recover

#List Wallet
bzed keys list

#Delete Wallet
bzed keys delete wallet

#Check Wallet Balance
bzed q bank balances $(bzed keys show wallet -a)
```

### VALIDATOR MANAGEMENT

{% hint style="info" %}
*Please adjust , MONIKER , YOUR\_KEYBASE\_ID , YOUR\_DETAILS , YOUR\_WEBSITE\_URL*
{% endhint %}

```bash
#Create Validator
bzed tx staking create-validator \
--amount=1000000ubze \
--pubkey=$(bzed tendermint show-validator) \
--moniker=$MONIKER \
--identity="YOUR_KEYBASE_ID" \
--details="YOUR_DETAILS" \
--website="YOUR_WEBSITE_URL" \
--chain-id=$BEEZEE_CHAIN_ID \
--commission-rate=0.10 \
--commission-max-rate=0.20 \
--commission-max-change-rate=0.01 \
--min-self-delegation=1000 \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices=1ubze 

#Edit Validator
bzed tx staking edit-validator \
--new-moniker="YOUR MONIKER" \
--identity="IDENTITY KEYBASE" \
--details="DETAILS VALIDATOR" \
--website="LINK WEBSITE" \
--chain-id=$BEEZEE_CHAIN_ID \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices=1ubze

#Unjail Validator
bzed tx slashing unjail --from wallet --chain-id $BEEZEE_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1ubze -y

#Check Jailed Reason
bzed query slashing signing-info $(bzed tendermint show-validator)
```

### TOKEN MANAGEMENT

```bash
#Withdraw Rewards
bzed tx distribution withdraw-all-rewards --from wallet --chain-id $BEEZEE_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1ubze -y

#Withdraw Rewards with Comission
bzed tx distribution withdraw-rewards $(bzed keys show wallet --bech val -a) --commission --from wallet --chain-id $BEEZEE_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1ubze -y

#Delegate Token to your own validator
bzed tx staking delegate $(bzed keys show wallet --bech val -a) 100000ubze --from wallet --chain-id $BEEZEE_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1ubze -y

#Delegate Token to other validator
bzed tx staking redelegate $(bzed keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> 100000ubze --from wallet --chain-id $BEEZEE_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1ubze -y

#Unbond Token from your validator
bzed tx staking unbond $(bzed keys show wallet --bech val -a) 100000ubze --from wallet --chain-id $BEEZEE_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1ubze -y

#Send Token to another wallet
bzed tx bank send wallet <TO_WALLET_ADDRESS> 100000ubze --from wallet --chain-id $BEEZEE_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1ubze -y
```

### GOVERNANCE

```bash
#Vote, You can change the value of yes to no,abstain,nowithveto
bzed tx gov vote 1 yes --from wallet --chain-id $BEEZEE_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1ubze -y

#List all proposals
bzed query gov proposals

#Create new text proposal
bzed tx gov submit-proposal \
--title="Title" \
--description="Description" \
--deposit=10000000ubze \
--type="Text" \
--from=wallet \
--gas-adjustment 1.5 \
--gas "auto" \
--gas-prices=1ubze
```

### SERVICES MANAGEMENT

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

# Enable Service
sudo systemctl enable bzed

# Disable Service
sudo systemctl disable bzed

# Start Service
sudo systemctl start bzed

# Stop Service
sudo systemctl stop bzed

# Restart Service
sudo systemctl restart bzed

# Check Service Status
sudo systemctl status bzed

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

### UTILITY

```bash
#Set Indexer NULL / KV
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.bze/config/config.toml

#Get Validator info
bzed status 2>&1 | jq .ValidatorInfo

#Get denom info
bzed q bank denom-metadata -oj | jq

#Get sync status
bzed status 2>&1 | jq .SyncInfo.catching_up

#Get latest height
bzed status 2>&1 | jq .SyncInfo.latest_block_height

#Reset Node
bzed tendermint unsafe-reset-all --home $HOME/.bze --keep-addr-book
```

### DELETE NODE

{% hint style="warning" %} <mark style="color:red;">**WARNING! Use this command wisely Backup your key first it will remove node from your system**</mark>
{% endhint %}

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


# Chain4Energy

<figure><img src="https://3732959305-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fr1ChzocIBBGBlfbyRi9s%2Fuploads%2FgaRlpEoNot8pen4VMwpS%2Fc4e.png?alt=media&amp;token=59a7f7d9-8ba1-4920-a0a7-d82380cd4943" alt="" width="188"><figcaption></figcaption></figure>

INTRODUCING DEPIN L1 BLOCKCHAIN AND PRODUCTS: A FOUNDATION FOR A DECENTRALIZED, COMMUNITY-DRIVEN ENERGY MARKET.

| Chain ID | Latest Version Tag |
| -------- | ------------------ |
| perun-1  | v1.4.3             |

### Public endpoints <a href="#public-endpoints" id="public-endpoints"></a>

* Api : <https://c4e-m-api.syanodes.my.id>
* Rpc :  <https://c4e-m-rpc.syanodes.my.id>
* grpc with ssl/tls: c4e-m-grpc.syanodes.my.id:443

### Links

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

***


# Node Installation

### Hardware requirements The following requirements are recommended for running CHAIN4ENERGY:

* **6 or more physical CPU cores**
* **At least 1TB of SSD disk storage**
* **At least 16GB of memory (RAM)**
* **At least 500mbps network bandwidth**

## Manual Installation

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

# Install Go
cd $HOME
VER="1.21.6"
wget "https://golang.org/dl/go$VER.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$VER.linux-amd64.tar.gz"
rm "go$VER.linux-amd64.tar.gz"
[ ! -f ~/.bash_profile ] && touch ~/.bash_profile
echo "export PATH=$PATH:/usr/local/go/bin:~/go/bin" >> ~/.bash_profile
source $HOME/.bash_profile
[ ! -d ~/go/bin ] && mkdir -p ~/go/bin
go version


# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export C4E_CHAIN_ID="perun-1"" >> $HOME/.bash_profile
echo "export C4E_PORT="114"" >> $HOME/.bash_profile
source $HOME/.bash_profile


# Download Binary
cd $HOME
rm -rf $HOME/c4e-chain
git clone https://github.com/chain4energy/c4e-chain
cd c4e-chain
git checkout v1.4.3
make install


# Config and Init App
c4ed config node tcp://localhost:${C4E_PORT}57
c4ed config chain-id $C4E_CHAIN_ID
c4ed init $MONIKER --chain-id $C4E_CHAIN_ID


# Add Genesis File and Addrbook
wget -O $HOME/.c4e-chain/config/genesis.json https://snapshot.syanodes.my.id/mainnets/c4e/genesis.json
wget -O $HOME/.c4e-chain/config/addrbook.json https://snapshot.syanodes.my.id/mainnets/c4e/addrbook.json


#Configure Seeds and Peers
SEEDS=""
PEERS="fdaf76c3d8c19c1d2e4d00b1557b441ffa6dc934@23.88.13.39:26656,6e07322479eb7e31c1b33513544e03245b6de561@185.252.235.83:26656,a8d513fa1cfd23d500344eb81a80485c7ad55a06@168.119.226.107:26956,b536d1816a220dc5894769c94c865d2c4252608e@38.46.220.210:13456,e72f3b554c5580ced0e4fa1e493ca9cb4a2541bf@198.244.213.92:28656,3b45ee54d6250747d439f209d7cefc5ea128d9f3@144.76.97.251:29656,eb6d4504241599224cd4e9e3c28a0d7d6dce0bab@139.144.96.120:26656,e8086cf746917cbe7090e5879d4a51147a1a6c61@65.21.167.185:27256,a9bdcae2527c4a27a6f4882e852329241a945699@46.4.81.204:30656,1bae86fca1b0ed46d1169e830afb7b3d2940f8b6@185.11.248.93:26656,5e7688ac669671ef7837a5536760e5fa35946858@148.251.9.235:26656,6aae2a2c38ce6eb243988f4c54d6f9afada38114@143.110.248.56:26656,61a1e4bbc0844df04b8938c17f15f307e5f89cc9@65.21.247.218:26656,06adb18017d6c1041220e4bc3f2a85641f1f2979@172.105.229.177:26656,bb7d1cbdbba4eed8e48998c144a1ca91aa95ba7e@207.120.6.252:46656,088136fd5cd59b3806d1c79f9ef26bcdd7de6c0f@65.109.70.100:24656,5ced5f8ac86ea701636ee92507ff94403c88fae4@94.130.230.164:26644,32a412aee27e0f4691ab7eee0680109faa66f093@65.108.124.219:31656,d81f51b4a1aae66792fb1717589fa28975f328b0@164.68.125.243:26656,7fdb48b6eda39ceda2749960292b4ba73b6ad92e@176.9.183.45:29656,bb9cbee9c391f5b0744d5da0ea1abc17ed0ca1b2@159.69.56.25:26656,d4c6f17b49af7f96c587613cbdb6e41b179079c2@185.208.206.217:26656,595dca937ee92264687424478a316cdcb8b53ae3@78.46.174.72:27256,a397ca5fe59de57b3d3b2b3ea8389c64d2b7267a@163.172.18.162:26656,d1c10bb6a139ddb29af596fc888bd57c143124b7@93.189.30.124:26656,1a9c055259e67b36def5c978a02f20545722e8e7@62.212.65.138:27656,4ab999fbc7333fc03b15cc3b8ab7e581ed1941d1@149.50.96.147:41656,2f6141859c28c088514b46f7783509aeeb87553f@141.94.193.12:11656,d09b54188bda615c13cdd92a18bef11bed8d4735@79.137.68.96:26656,f4b30afd4f46eedfc421272280242cc2fd39e55f@38.242.220.64:16656,4890f5eeb33048ee1a10e52c328a776e6d454745@168.119.139.86:32656,7c7c5158c5b67797f85a4e376db8b79da0dadbac@212.109.147.99:26656,5be2027950e249c42e20390c94fc1e8f3cd16657@65.108.70.119:33656,01d209a3166c85193a7c922eae43a4d8972f40e4@65.109.125.189:26656,00eb92db69a4848f8ac1c84e7b8b2d9b01b95dff@157.90.0.102:30656,b1a90de2596e73493f3ef5fda723acd0e80e1bf2@85.10.200.232:26956,e32345e23f702978a6d34a54066c853e11fb4dc0@167.86.82.140:26656,bf78d9bd64cf7e83357966aa3b4ca19d996ef1ef@51.75.55.49:26656,47be6c595d4c2c417e754098d70778a059c145b8@152.53.36.47:30056"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.c4e-chain/config/config.toml
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.00025uc4e\"/" $HOME/.c4e-chain/config/app.toml
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.c4e-chain/config/config.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.c4e-chain/config/config.toml


# Config Pruning
pruning="custom"
pruning_keep_recent="100"
pruning_keep_every="0"
pruning_interval="10"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.c4e-chain/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.c4e-chain/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.c4e-chain/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.c4e-chain/config/app.toml


# Set Custom Port
sed -i -e "s%:1317%:${C4E_PORT}17%; s%:8080%:${C4E_PORT}80%; s%:9090%:${C4E_PORT}90%; s%:9091%:${C4E_PORT}91%; s%:8545%:${C4E_PORT}45%; s%:8546%:${C4E_PORT}46%; s%:6065%:${C4E_PORT}65%" $HOME/.c4e-chain/config/app.toml
sed -i -e "s%:26658%:${C4E_PORT}58%; s%:26657%:${C4E_PORT}57%; s%:6060%:${C4E_PORT}60%; s%:26656%:${C4E_PORT}56%; s%:26660%:${C4E_PORT}61%" $HOME/.c4e-chain/config/config.toml


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

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

[Install]
WantedBy=multi-user.target
EOF


# Enable and Start Service
sudo systemctl daemon-reload
sudo systemctl enable c4ed
sudo systemctl start c4ed && sudo journalctl -fu c4ed -o cat
```

## Auto Installation

```bash
wget https://snapshot.syanodes.my.id/auto/mainnet/c4e_auto && chmod +x c4e_auto && ./c4e_auto 
```


# Upgrade

```bash
//
```


# Snapshot & State sync

## Snapshot

*Updated every 12 hours*

```bash
sudo systemctl stop c4ed

cp $HOME/.c4e-chain/data/priv_validator_state.json $HOME/.c4e-chain/priv_validator_state.json.backup
c4ed tendermint unsafe-reset-all --home ~/.c4e-chain/ --keep-addr-book

curl https://ss.syanodes.my.id/c4e/ss-c4e.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.c4e-chain

mv $HOME/.c4e-chain/priv_validator_state.json.backup $HOME/.c4e-chain/data/priv_validator_state.json

sudo systemctl restart c4ed && sudo journalctl -fu c4ed -o cat
```

## State Sync

```bash
sudo systemctl stop c4ed

cp $HOME/.c4e-chain/data/priv_validator_state.json $HOME/.c4e-chain/priv_validator_state.json.backup
c4ed tendermint unsafe-reset-all --home $HOME/.c4e-chain

peers="fdaf76c3d8c19c1d2e4d00b1557b441ffa6dc934@23.88.13.39:26656,6e07322479eb7e31c1b33513544e03245b6de561@185.252.235.83:26656,a8d513fa1cfd23d500344eb81a80485c7ad55a06@168.119.226.107:26956,b536d1816a220dc5894769c94c865d2c4252608e@38.46.220.210:13456,e72f3b554c5580ced0e4fa1e493ca9cb4a2541bf@198.244.213.92:28656,3b45ee54d6250747d439f209d7cefc5ea128d9f3@144.76.97.251:29656,eb6d4504241599224cd4e9e3c28a0d7d6dce0bab@139.144.96.120:26656,e8086cf746917cbe7090e5879d4a51147a1a6c61@65.21.167.185:27256,a9bdcae2527c4a27a6f4882e852329241a945699@46.4.81.204:30656,1bae86fca1b0ed46d1169e830afb7b3d2940f8b6@185.11.248.93:26656,5e7688ac669671ef7837a5536760e5fa35946858@148.251.9.235:26656,6aae2a2c38ce6eb243988f4c54d6f9afada38114@143.110.248.56:26656,61a1e4bbc0844df04b8938c17f15f307e5f89cc9@65.21.247.218:26656,06adb18017d6c1041220e4bc3f2a85641f1f2979@172.105.229.177:26656,bb7d1cbdbba4eed8e48998c144a1ca91aa95ba7e@207.120.6.252:46656,088136fd5cd59b3806d1c79f9ef26bcdd7de6c0f@65.109.70.100:24656,5ced5f8ac86ea701636ee92507ff94403c88fae4@94.130.230.164:26644,32a412aee27e0f4691ab7eee0680109faa66f093@65.108.124.219:31656,d81f51b4a1aae66792fb1717589fa28975f328b0@164.68.125.243:26656,7fdb48b6eda39ceda2749960292b4ba73b6ad92e@176.9.183.45:29656,bb9cbee9c391f5b0744d5da0ea1abc17ed0ca1b2@159.69.56.25:26656,d4c6f17b49af7f96c587613cbdb6e41b179079c2@185.208.206.217:26656,595dca937ee92264687424478a316cdcb8b53ae3@78.46.174.72:27256,a397ca5fe59de57b3d3b2b3ea8389c64d2b7267a@163.172.18.162:26656,d1c10bb6a139ddb29af596fc888bd57c143124b7@93.189.30.124:26656,1a9c055259e67b36def5c978a02f20545722e8e7@62.212.65.138:27656,4ab999fbc7333fc03b15cc3b8ab7e581ed1941d1@149.50.96.147:41656,2f6141859c28c088514b46f7783509aeeb87553f@141.94.193.12:11656,d09b54188bda615c13cdd92a18bef11bed8d4735@79.137.68.96:26656,f4b30afd4f46eedfc421272280242cc2fd39e55f@38.242.220.64:16656,4890f5eeb33048ee1a10e52c328a776e6d454745@168.119.139.86:32656,7c7c5158c5b67797f85a4e376db8b79da0dadbac@212.109.147.99:26656,5be2027950e249c42e20390c94fc1e8f3cd16657@65.108.70.119:33656,01d209a3166c85193a7c922eae43a4d8972f40e4@65.109.125.189:26656,00eb92db69a4848f8ac1c84e7b8b2d9b01b95dff@157.90.0.102:30656,b1a90de2596e73493f3ef5fda723acd0e80e1bf2@85.10.200.232:26956,e32345e23f702978a6d34a54066c853e11fb4dc0@167.86.82.140:26656,bf78d9bd64cf7e83357966aa3b4ca19d996ef1ef@51.75.55.49:26656,47be6c595d4c2c417e754098d70778a059c145b8@152.53.36.47:30056"
SNAP_RPC="https://c4e-m-rpc.syanodes.my.id:443"

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

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) 

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/.c4e-chain/config/config.toml

mv $HOME/.c4e-chain/priv_validator_state.json.backup $HOME/.c4e-chain/data/priv_validator_state.json

sudo systemctl restart c4ed && sudo journalctl -fu c4ed -o cat
```


# Useful commands

```bash
# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export C4E_CHAIN_ID="perun-1"" >> $HOME/.bash_profile
source $HOME/.bash_profile
```

### WALLET MANAGEMENT

{% hint style="info" %}
*Add Wallet Specify the value \<wallet> with your own wallet name*
{% endhint %}

```bash
#Add new wallet
c4ed keys add wallet

#Recover Wallet
c4ed keys add wallet --recover

#List Wallet
c4ed keys list

#Delete Wallet
c4ed keys delete wallet

#Check Wallet Balance
c4ed q bank balances $(c4ed keys show wallet -a)
```

### VALIDATOR MANAGEMENT

{% hint style="info" %}
*Please adjust , MONIKER , YOUR\_KEYBASE\_ID , YOUR\_DETAILS , YOUR\_WEBSITE\_URL*
{% endhint %}

```bash
#Create Validator
c4ed tx staking create-validator \
--amount=1000000uc4e \
--pubkey=$(c4ed tendermint show-validator) \
--moniker=$MONIKER \
--identity="YOUR_KEYBASE_ID" \
--details="YOUR_DETAILS" \
--website="YOUR_WEBSITE_URL" \
--chain-id=$C4E_CHAIN_ID \
--commission-rate=0.10 \
--commission-max-rate=0.20 \
--commission-max-change-rate=0.01 \
--min-self-delegation=1000 \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices=1uc4e \ 
-y

#Edit Validator
c4ed tx staking edit-validator \
--new-moniker="YOUR MONIKER" \
--identity="IDENTITY KEYBASE" \
--details="DETAILS VALIDATOR" \
--website="LINK WEBSITE" \
--chain-id=$C4E_CHAIN_ID \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices=1uc4e \ 
-y

#Unjail Validator
c4ed tx slashing unjail --from wallet --chain-id $C4E_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uc4e -y

#Check Jailed Reason
c4ed query slashing signing-info $(c4ed tendermint show-validator)
```

### TOKEN MANAGEMENT

```bash
#Withdraw Rewards
c4ed tx distribution withdraw-all-rewards --from wallet --chain-id $C4E_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uc4e -y

#Withdraw Rewards with Comission
c4ed tx distribution withdraw-rewards $(c4ed keys show wallet --bech val -a) --commission --from wallet --chain-id $C4E_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uc4e -y

#Delegate Token to your own validator
c4ed tx staking delegate $(c4ed keys show wallet --bech val -a) 100000uc4e --from wallet --chain-id $C4E_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uc4e -y

#Delegate Token to other validator
c4ed tx staking redelegate $(c4ed keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> 100000uc4e --from wallet --chain-id $C4E_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uc4e -y

#Unbond Token from your validator
c4ed tx staking unbond $(c4ed keys show wallet --bech val -a) 100000uc4e --from wallet --chain-id $C4E_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uc4e -y

#Send Token to another wallet
c4ed tx bank send wallet <TO_WALLET_ADDRESS> 100000uc4e --from wallet --chain-id $C4E_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uc4e -y
```

### GOVERNANCE

```bash
#Vote, You can change the value of yes to no,abstain,nowithveto
c4ed tx gov vote 1 yes --from wallet --chain-id $C4E_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uc4e -y

#List all proposals
c4ed query gov proposals

#Create new text proposal
c4ed tx gov submit-proposal \
--title="Title" \
--description="Description" \
--deposit=10000000uc4e \
--type="Text" \
--from=wallet \
--gas-adjustment 1.5 \
--gas "auto" \
--gas-prices=1uc4e\ 
-y 
```

### SERVICES MANAGEMENT

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

# Enable Service
sudo systemctl enable c4ed

# Disable Service
sudo systemctl disable c4ed

# Start Service
sudo systemctl start c4ed

# Stop Service
sudo systemctl stop c4ed

# Restart Service
sudo systemctl restart c4ed

# Check Service Status
sudo systemctl status c4ed

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

### UTILITY

```bash
#Set Indexer NULL / KV
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.c4e-chain/config/config.toml

#Get Validator info
c4ed status 2>&1 | jq .ValidatorInfo

#Get denom info
c4ed q bank denom-metadata -oj | jq

#Get sync status
c4ed status 2>&1 | jq .SyncInfo.catching_up

#Get latest height
c4ed status 2>&1 | jq .SyncInfo.latest_block_height

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

### DELETE NODE

{% hint style="warning" %} <mark style="color:red;">**WARNING! Use this command wisely Backup your key first it will remove node from your system**</mark>
{% endhint %}

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


# Cheqd

<figure><img src="https://3732959305-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fr1ChzocIBBGBlfbyRi9s%2Fuploads%2FI9vigRfIJN4npxVmvU99%2Fcheqd.png?alt=media&amp;token=fef5c79f-6219-42aa-9cbc-208105d119a5" alt="" width="250"><figcaption></figcaption></figure>

The Payment & Trust Infrastructure for Credentials and Verifiable AI.

| Chain ID        | Latest Version Tag |
| --------------- | ------------------ |
| cheqd-mainnet-1 | v3.1.5             |

### Public endpoints <a href="#public-endpoints" id="public-endpoints"></a>

* Api : <https://cheqd-m-api.syanodes.my.id>
* Rpc :  <https://cheqd-m-rpc.syanodes.my.id>
* grpc with ssl/tls: cheqd-m-grpc.syanodes.my.id:443

### Links

[Website](https://cheqd.io/) | [Discord](https://discord.gg/yuSCqDEVNh) | [Twitter](https://x.com/cheqd_io)

***


# Node Installation

### Hardware requirements The following requirements are recommended for running CHEQD:

* **6 or more physical CPU cores**
* **At least 1TB of SSD disk storage**
* **At least 16GB of memory (RAM)**
* **At least 500mbps network bandwidth**

## Manual Installation

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

# Install Go
cd $HOME
VER="1.23.4"
wget "https://golang.org/dl/go$VER.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$VER.linux-amd64.tar.gz"
rm "go$VER.linux-amd64.tar.gz"
[ ! -f ~/.bash_profile ] && touch ~/.bash_profile
echo "export PATH=$PATH:/usr/local/go/bin:~/go/bin" >> ~/.bash_profile
source $HOME/.bash_profile
[ ! -d ~/go/bin ] && mkdir -p ~/go/bin
go version


# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export CHEQD_CHAIN_ID="cheqd-mainnet-1"" >> $HOME/.bash_profile
echo "export CHEQD_PORT="116"" >> $HOME/.bash_profile
source $HOME/.bash_profile


# Download Binary
cd $HOME
rm -rf cheqd-noded-node
git clone https://github.com/cheqd-noded/cheqd-noded-node
cd cheqd-noded-node
git checkout v3.1.5
make install


# Config and Init App
cheqd-noded config node tcp://localhost:${CHEQD_PORT}57
cheqd-noded config chain-id $CHEQD_CHAIN_ID
cheqd-noded init $MONIKER --chain-id $CHEQD_CHAIN_ID


# Add Genesis File and Addrbook
wget -O $HOME/.cheqdnode/config/genesis.json https://snapshot.syanodes.my.id/mainnets/cheqd/genesis.json
wget -O $HOME/.cheqdnode/config/addrbook.json https://snapshot.syanodes.my.id/mainnets/cheqd/addrbook.json


#Configure Seeds and Peers
SEEDS=""
PEERS="5f0ed44abfc697b0ccbd2b20b107a5e198befd5c@65.108.234.251:26656,f49be2132551cddb332b1a6bf458cbe6bdca2da1@149.102.138.109:26656,cd490e23a84015ff2478f181a79a5d53ed17aefe@206.189.137.229:26656,34466c16a62efa879984521e1690ab20e467dd5d@64.227.177.178:26170,3dd3b69ea166966d53bc8874ebcac49c6cf4d9c9@65.108.201.240:16156,60a8f9affe24dd24c50978ec69857a93d13566f9@159.65.188.152:26170,f388cc3395f03b897749791746a333f98e780f0f@142.93.38.208:26170,547abaa9925a2f39521b60840248a9fca4d09182@143.198.36.150:26170,63b5562bcfa721443801ae0adb8dcc0034f3a3cb@159.69.174.238:26656,b67862d18b6f5f7b785e0af0c7a641bf8b1f4556@65.108.230.113:21016,a5d1e4eabf9f638262683f5565bb26b8ad22c5e3@3.147.54.102:26656,e1b058e5cfa2b836ddaa496b10911da62dcf182e@164.152.160.124:26656,8102b30ef139f1e98fb996f519cabc2ed917bc19@65.109.30.53:16156,a27bcd0c8f588dcc83bf02e4f50c021f3d3747e8@54.153.187.95:26656,5ded87d9b6aeed9777abeb29b965a4f3e8cc253f@136.243.95.31:16156,261c7d339c4d17568202ca9e01e14b33a652e8ac@65.109.117.113:26656,aed026a175a0754620b18ff3b02aa5926d4e0325@142.132.248.138:26609,9d205041d8b3eb0a532a578c70010e8aaa057851@173.214.171.102:26676,25481bfb4d4f85119e6ba087b40615d815a3db74@141.95.66.131:16156,9201b408d24941fd342e739f0814aa3eb8ab7577@139.59.220.12:26656,930067f48301adccaa9f7e28424fa6da3a023de4@116.203.250.20:26656"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.cheqdnode/config/config.toml
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"25ncheq\"/" $HOME/.cheqdnode/config/app.toml
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.cheqdnode/config/config.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.cheqdnode/config/config.toml


# Config Pruning
pruning="custom"
pruning_keep_recent="100"
pruning_keep_every="0"
pruning_interval="10"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.cheqdnode/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.cheqdnode/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.cheqdnode/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.cheqdnode/config/app.toml


# Set Custom Port
sed -i -e "s%:1317%:${CHEQD_PORT}17%; s%:8080%:${CHEQD_PORT}80%; s%:9090%:${CHEQD_PORT}90%; s%:9091%:${CHEQD_PORT}91%; s%:8545%:${CHEQD_PORT}45%; s%:8546%:${CHEQD_PORT}46%; s%:6065%:${CHEQD_PORT}65%" $HOME/.cheqdnode/config/app.toml
sed -i -e "s%:26658%:${CHEQD_PORT}58%; s%:26657%:${CHEQD_PORT}57%; s%:6060%:${CHEQD_PORT}60%; s%:26656%:${CHEQD_PORT}56%; s%:26660%:${CHEQD_PORT}61%" $HOME/.cheqdnode/config/config.toml


# Set Service File
sudo tee /etc/systemd/system/cheqd-noded.service > /dev/null <<EOF
[Unit]
Description=cheqd-mainnet
After=network-online.target

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

[Install]
WantedBy=multi-user.target
EOF


# Enable and Start Service
sudo systemctl daemon-reload
sudo systemctl enable cheqd-noded
sudo systemctl start cheqd-noded && sudo journalctl -fu cheqd-noded -o cat
```

## Auto Installation

```bash
wget https://snapshot.syanodes.my.id/auto/mainnet/cheqd_auto && chmod +x cheqd_auto && ./cheqd_auto 
```


# Upgrade

## Manual Upgrade

**upgrade at height** [*17334100*](https://explorer.syanodes.my.id/cheqd-mainnet/block/17334100)

```bash
cd $HOME
mkdir download
cd download
curl -LO https://github.com/cheqd/cheqd-node/releases/download/v3.1.5/cheqd-noded-3.1.5-linux-amd64.tar.gz
tar -xvf cheqd-noded-3.1.5-linux-amd64.tar.gz
rm cheqd-noded-3.1.5-linux-amd64.tar.gz
chmod +x cheqd-noded
sudo mv $HOME/download/cheqd-noded $(which cheqd-noded)
sudo systemctl restart cheqd-noded && sudo journalctl -fu cheqd-noded -o cat
```


# Snapshot & State sync

## Snapshot

```bash
sudo systemctl stop cheqd-noded

cp $HOME/.cheqdnode/data/priv_validator_state.json $HOME/.cheqdnode/priv_validator_state.json.backup
cheqd-noded tendermint unsafe-reset-all --home ~/.cheqdnode/ --keep-addr-book

curl https://ss.syanodes.my.id/cheqd/ss-cheqd.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.cheqdnode

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

sudo systemctl restart cheqd-noded && sudo journalctl -fu cheqd-noded -o cat
```

## State Sync

```bash
sudo systemctl stop cheqd-noded

cp $HOME/.cheqdnode/data/priv_validator_state.json $HOME/.cheqdnode/priv_validator_state.json.backup
cheqd-noded tendermint unsafe-reset-all --home $HOME/.cheqdnode

peers="5f0ed44abfc697b0ccbd2b20b107a5e198befd5c@65.108.234.251:26656,f49be2132551cddb332b1a6bf458cbe6bdca2da1@149.102.138.109:26656,cd490e23a84015ff2478f181a79a5d53ed17aefe@206.189.137.229:26656,34466c16a62efa879984521e1690ab20e467dd5d@64.227.177.178:26170,3dd3b69ea166966d53bc8874ebcac49c6cf4d9c9@65.108.201.240:16156,60a8f9affe24dd24c50978ec69857a93d13566f9@159.65.188.152:26170,f388cc3395f03b897749791746a333f98e780f0f@142.93.38.208:26170,547abaa9925a2f39521b60840248a9fca4d09182@143.198.36.150:26170,63b5562bcfa721443801ae0adb8dcc0034f3a3cb@159.69.174.238:26656,b67862d18b6f5f7b785e0af0c7a641bf8b1f4556@65.108.230.113:21016,a5d1e4eabf9f638262683f5565bb26b8ad22c5e3@3.147.54.102:26656,e1b058e5cfa2b836ddaa496b10911da62dcf182e@164.152.160.124:26656,8102b30ef139f1e98fb996f519cabc2ed917bc19@65.109.30.53:16156,a27bcd0c8f588dcc83bf02e4f50c021f3d3747e8@54.153.187.95:26656,5ded87d9b6aeed9777abeb29b965a4f3e8cc253f@136.243.95.31:16156,261c7d339c4d17568202ca9e01e14b33a652e8ac@65.109.117.113:26656,aed026a175a0754620b18ff3b02aa5926d4e0325@142.132.248.138:26609,9d205041d8b3eb0a532a578c70010e8aaa057851@173.214.171.102:26676,25481bfb4d4f85119e6ba087b40615d815a3db74@141.95.66.131:16156,9201b408d24941fd342e739f0814aa3eb8ab7577@139.59.220.12:26656,930067f48301adccaa9f7e28424fa6da3a023de4@116.203.250.20:26656"
SNAP_RPC="https://cheqd-m-rpc.syanodes.my.id:443"

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

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) 

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/.cheqdnode/config/config.toml

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

sudo systemctl restart cheqd-noded && sudo journalctl -fu cheqd-noded -o cat
```


# Useful commands

```bash
# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export CHEQD_CHAIN_ID="cheqd-mainnet-1"" >> $HOME/.bash_profile
source $HOME/.bash_profile
```

### WALLET MANAGEMENT

{% hint style="info" %}
*Add Wallet Specify the value \<wallet> with your own wallet name*
{% endhint %}

```bash
#Add new wallet
cheqd-noded keys add wallet

#Recover Wallet
cheqd-noded keys add wallet --recover

#List Wallet
cheqd-noded keys list

#Delete Wallet
cheqd-noded keys delete wallet

#Check Wallet Balance
cheqd-noded q bank balances $(cheqd-noded keys show wallet -a)
```

### VALIDATOR MANAGEMENT

{% hint style="info" %}
*Please adjust , MONIKER , YOUR\_KEYBASE\_ID , YOUR\_DETAILS , YOUR\_WEBSITE\_URL*
{% endhint %}

```bash
#Create Validator
cheqd-noded tx staking create-validator \
--amount=1000000ncheq \
--pubkey=$(cheqd-noded tendermint show-validator) \
--moniker=$MONIKER \
--identity="YOUR_KEYBASE_ID" \
--details="YOUR_DETAILS" \
--website="YOUR_WEBSITE_URL" \
--chain-id=$CHEQD_CHAIN_ID \
--commission-rate=0.10 \
--commission-max-rate=0.20 \
--commission-max-change-rate=0.01 \
--min-self-delegation=1000 \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices=25ncheq \ 
-y

#Edit Validator
cheqd-noded tx staking edit-validator \
--new-moniker="YOUR MONIKER" \
--identity="IDENTITY KEYBASE" \
--details="DETAILS VALIDATOR" \
--website="LINK WEBSITE" \
--chain-id=$CHEQD_CHAIN_ID \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices=25ncheq \ 
-y

#Unjail Validator
cheqd-noded tx slashing unjail --from wallet --chain-id $CHEQD_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 25ncheq -y

#Check Jailed Reason
cheqd-noded query slashing signing-info $(cheqd-noded tendermint show-validator)
```

### TOKEN MANAGEMENT

```bash
#Withdraw Rewards
cheqd-noded tx distribution withdraw-all-rewards --from wallet --chain-id $CHEQD_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 25ncheq -y

#Withdraw Rewards with Comission
cheqd-noded tx distribution withdraw-rewards $(cheqd-noded keys show wallet --bech val -a) --commission --from wallet --chain-id $CHEQD_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 25ncheq -y

#Delegate Token to your own validator
cheqd-noded tx staking delegate $(cheqd-noded keys show wallet --bech val -a) 100000ncheq --from wallet --chain-id $CHEQD_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 25ncheq -y

#Delegate Token to other validator
cheqd-noded tx staking redelegate $(cheqd-noded keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> 100000ncheq --from wallet --chain-id $CHEQD_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 25ncheq -y

#Unbond Token from your validator
cheqd-noded tx staking unbond $(cheqd-noded keys show wallet --bech val -a) 100000ncheq --from wallet --chain-id $CHEQD_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 25ncheq -y

#Send Token to another wallet
cheqd-noded tx bank send wallet <TO_WALLET_ADDRESS> 100000ncheq --from wallet --chain-id $CHEQD_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 25ncheq -y
```

### GOVERNANCE

```bash
#Vote, You can change the value of yes to no,abstain,nowithveto
cheqd-noded tx gov vote 1 yes --from wallet --chain-id $CHEQD_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 25ncheq -y

#List all proposals
cheqd-noded query gov proposals

#Create new text proposal
cheqd-noded tx gov submit-proposal \
--title="Title" \
--description="Description" \
--deposit=10000000ncheq \
--type="Text" \
--from=wallet \
--gas-adjustment 1.5 \
--gas "auto" \
--gas-prices=25ncheq \ 
-y 
```

### SERVICES MANAGEMENT

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

# Enable Service
sudo systemctl enable cheqd-noded

# Disable Service
sudo systemctl disable cheqd-noded

# Start Service
sudo systemctl start cheqd-noded

# Stop Service
sudo systemctl stop cheqd-noded

# Restart Service
sudo systemctl restart cheqd-noded

# Check Service Status
sudo systemctl status cheqd-noded

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

### UTILITY

```bash
#Set Indexer NULL / KV
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.cheqdnode/config/config.toml

#Get Validator info
cheqd-noded status 2>&1 | jq .ValidatorInfo

#Get denom info
cheqd-noded q bank denom-metadata -oj | jq

#Get sync status
cheqd-noded status --node tcp://localhost:11657  2>&1 | jq .SyncInfo.catching_up

#Get latest height
cheqd-noded status --node tcp://localhost:11657 2>&1 | jq .SyncInfo.latest_block_height

#Reset Node
cheqd-noded tendermint unsafe-reset-all --home $HOME/.cheqdnode --keep-addr-book
```

### DELETE NODE

{% hint style="warning" %} <mark style="color:red;">**WARNING! Use this command wisely Backup your key first it will remove node from your system**</mark>
{% endhint %}

```bash
sudo systemctl stop cheqd-noded && sudo systemctl disable cheqd-noded && sudo rm /etc/systemd/system/cheqd-noded.service && sudo systemctl daemon-reload && sudo rm -rf $(which cheqd-noded) && rm -rf $HOME/.cheqdnode
```


# Copy of Upgrade

## Manual Upgrade

**upgrade at height** [*3186227*](https://explorer.syanodes.my.id/synternet-mainnet/block/3186227)

```bash
wget https://github.com/Synternet/synternet-chain-releases/releases/download/v0.21.0/syntd-linux-amd64-v0.21.0 -O syntd
chmod +x syntd
sudo mv syntd $HOME/go/bin/
sudo systemctl restart syntd && sudo journalctl -fu syntd -o cat
```


# Dhealth

<figure><img src="https://3732959305-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fr1ChzocIBBGBlfbyRi9s%2Fuploads%2Fk7OooRMW1nhS2iwYMZCR%2Fdhealth.jpg?alt=media&amp;token=bb8276f0-d0fd-46bd-bba1-9272febd2d72" alt="" width="182"><figcaption></figcaption></figure>

The healthcare-dedicated network of nodes serves as an alternative solution for permissioned, regulated, and government-controlled infrastructure. It provides the pillars of a real-time and efficient data-transaction healthcare ecosystem.

| Chain ID | Latest Version Tag |
| -------- | ------------------ |
| dhealth  | v.1.0.0            |

### Public endpoints <a href="#public-endpoints" id="public-endpoints"></a>

* Api : <https://dhealth-m-api.syanodes.my.id>
* Rpc :  <https://dhealth-m-rpc.syanodes.my.id>
* grpc with ssl/tls: dhealth-m-grpc.syanodes.my.id:443

### Links

[Website](https://www.dhealth.com/) | [Discord](https://discord.com/invite/trzPzVzW) | [Twitter](https://twitter.com/dHealth_Network)

***


# Node Installation

### Hardware requirements The following requirements are recommended for running DHEALTH:

* **6 or more physical CPU cores**
* **At least 1TB of SSD disk storage**
* **At least 16GB of memory (RAM)**
* **At least 500mbps network bandwidth**

## Manual Installation

```bash
# Update & install dependencies
sudo apt update && sudo apt upgrade -y
sudo apt install clang pkg-config libssl-dev curl git wget htop tmux build-essential jq make lz4 gcc unzip -y


# Install Go
cd $HOME
VER="1.21.6"
wget "https://golang.org/dl/go$VER.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$VER.linux-amd64.tar.gz"
rm "go$VER.linux-amd64.tar.gz"
[ ! -f ~/.bash_profile ] && touch ~/.bash_profile
echo "export PATH=$PATH:/usr/local/go/bin:~/go/bin" >> ~/.bash_profile
source $HOME/.bash_profile
[ ! -d ~/go/bin ] && mkdir -p ~/go/bin
go version


# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export DHEALTH_CHAIN_ID="dhealth"" >> $HOME/.bash_profile
echo "export DHEALTH_PORT="7"" >> $HOME/.bash_profile
source $HOME/.bash_profile


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


# Download Binary
cd $HOME
wget https://snapshot.syanodes.my.id/dhealthd
chmod +x dhealthd
mv dhealthd $HOME/go/bin/
dhealthd version


# Config and Init App
dhealthd config node tcp://localhost:${DHEALTH_PORT}657
dhealthd config chain-id $DHEALTH_CHAIN_ID
dhealthd init $MONIKER --chain-id $DHEALTH_CHAIN_ID


# Add Genesis File and Addrbook
wget -O $HOME/.dhealth/config/genesis.json https://testnet-files.syanodes.my.id/dhealth-m-genesis.json
wget -O $HOME/.dhealth/config/addrbook.json https://testnet-files.syanodes.my.id/dhealth-m-addrbook.json


#Configure Seeds and Peers
SEEDS=""
PEERS="67243a0ed11567250aa02d5e47f6c4a0b8313975@142.93.174.93:26656,69d16d1147e90cdfb8ed066331a0abb9c71c3ae2@162.19.223.89:26656"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.dhealth/config/config.toml
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.dhealth/config/config.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.dhealth/config/config.toml


# Config Pruning
pruning="custom"
pruning_keep_recent="100"
pruning_keep_every="0"
pruning_interval="10"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.dhealth/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.dhealth/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.dhealth/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.dhealth/config/app.toml


# Set Custom Port
sed -i.bak -e "s%:1317%:${DHEALTH_PORT}317%g;
s%:8080%:${DHEALTH_PORT}080%g;
s%:9090%:${DHEALTH_PORT}090%g;
s%:9091%:${DHEALTH_PORT}091%g;
s%:8545%:${DHEALTH_PORT}545%g;
s%:8546%:${DHEALTH_PORT}546%g;
s%:6065%:${DHEALTH_PORT}065%g" $HOME/.dhealth/config/app.toml
sed -i.bak -e "s%:26658%:${DHEALTH_PORT}658%g;
s%:26657%:${DHEALTH_PORT}657%g;
s%:6060%:${DHEALTH_PORT}060%g;
s%:26656%:${DHEALTH_PORT}656%g;
s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):${DHEALTH_PORT}656\"%;
s%:26660%:${DHEALTH_PORT}660%g" $HOME/.dhealth/config/config.toml



# Set Service File
sudo tee /etc/systemd/system/dhealthd.service > /dev/null <<EOF
[Unit]
Description=dhealth-mainnet
After=network-online.target

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

[Install]
WantedBy=multi-user.target
EOF


# Enable and Start Service
sudo systemctl daemon-reload
sudo systemctl enable dhealthd
sudo systemctl start dhealthd
sudo journalctl -fu dhealthd -o cat
```

## Auto Installation

```bash
wget https://snapshot.syanodes.my.id/auto/mainnet/dhealth_auto && chmod +x dhealth_auto && ./dhealth_auto
```


# Snapshot & State sync

## Snapshot

```bash
sudo systemctl stop dhealthd

cp $HOME/.dhealth/data/priv_validator_state.json $HOME/.dhealth/priv_validator_state.json.backup
dhealthd tendermint unsafe-reset-all --home ~/.dhealth/ --keep-addr-book

curl https://snapshot1.syanodes.my.id/dhealth/snapshot1-dhealth.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.dhealth

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

sudo systemctl restart dhealthd && sudo journalctl -fu dhealthd -o cat
```

## State Sync

```bash
sudo systemctl stop dhealthd

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

PEERS="39107ab0d29a2a23738ba98626e63594b6948907@95.217.62.179:12456,cc45db56335a918651dfe29a2b70a534b335f0ef@46.101.196.105:26656,5f8b325babef09655d53cc060efc72a959ffbc22@167.235.12.38:10856,9ff70edee323ba40445e79e4108ae8c5aa7dd63f@78.46.174.72:28256"
SNAP_RPC="https://dhealth-m-rpc.syanodes.my.id:443"
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.dhealth/config/config.toml 

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) 

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/.dhealth/config/config.toml

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

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


# Useful commands

```bash
# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export DHEALTH_CHAIN_ID="dhealth"" >> $HOME/.bash_profile
source $HOME/.bash_profile
```

### WALLET MANAGEMENT

{% hint style="info" %}
*Add Wallet Specify the value \<wallet> with your own wallet name*
{% endhint %}

```bash
#Add new wallet
dhealthd keys add wallet

#Recover Wallet
dhealthd keys add wallet --recover

#List Wallet
dhealthd keys list

#Delete Wallet
dhealthd keys delete wallet

#Check Wallet Balance
dhealthd q bank balances $(dhealthd keys show wallet -a)
```

### VALIDATOR MANAGEMENT

{% hint style="info" %}
*Please adjust , MONIKER , YOUR\_KEYBASE\_ID , YOUR\_DETAILS , YOUR\_WEBSITE\_URL*
{% endhint %}

```bash
#Create Validator
dhealthd tx staking create-validator \
--amount=10000000udhp \
--pubkey=$(dhealthd tendermint show-validator) \
--moniker=$MONIKER \
--identity="YOUR_KEYBASE_ID" \
--details="YOUR_DETAILS" \
--website="YOUR_WEBSITE_URL" \
--chain-id=$DHEALTH_CHAIN_ID \
--commission-rate=0.10 \
--commission-max-rate=0.20 \
--commission-max-change-rate=0.01 \
--min-self-delegation=1000 \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices=1udhp\ 
-y

#Edit Validator
dhealthd tx staking edit-validator \
--new-moniker="YOUR MONIKER" \
--identity="IDENTITY KEYBASE" \
--details="DETAILS VALIDATOR" \
--website="LINK WEBSITE" \
--chain-id=$DHEALTH_CHAIN_ID \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices=1udhp\ 
-y

#Unjail Validator
dhealthd tx slashing unjail --from wallet --chain-id $DHEALTH_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1udhp -y

#Check Jailed Reason
dhealthd query slashing signing-info $(dhealthd tendermint show-validator)
```

### TOKEN MANAGEMENT

```bash
#Withdraw Rewards
dhealthd tx distribution withdraw-all-rewards --from wallet --chain-id $DHEALTH_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1udhp -y

#Withdraw Rewards with Comission
dhealthd tx distribution withdraw-rewards $(dhealthd keys show wallet --bech val -a) --commission --from wallet --chain-id $DHEALTH_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1udhp -y

#Delegate Token to your own validator
dhealthd tx staking delegate $(dhealthd keys show wallet --bech val -a) 1000000udhp --from wallet --chain-id $DHEALTH_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1udhp -y

#Delegate Token to other validator
dhealthd tx staking redelegate $(dhealthd keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> 1000000udhp --from wallet --chain-id $DHEALTH_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1udhp -y

#Unbond Token from your validator
dhealthd tx staking unbond $(dhealthd keys show wallet --bech val -a) 1000000udhp --from wallet --chain-id $DHEALTH_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1udhp -y

#Send Token to another wallet
dhealthd tx bank send wallet <TO_WALLET_ADDRESS> 1000000udhp --from wallet --chain-id $DHEALTH_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1udhp -y
```

### GOVERNANCE

```bash
#Vote, You can change the value of yes to no,abstain,nowithveto
dhealthd tx gov vote 1 yes --from wallet --chain-id $DHEALTH_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1udhp -y

#List all proposals
dhealthd query gov proposals

#Create new text proposal
dhealthd tx gov submit-proposal \
--title="Title" \
--description="Description" \
--deposit=100000000udhp \
--type="Text" \
--from=wallet \
--gas-adjustment 1.5 \
--gas "auto" \
--gas-prices=1udhp\ 
-y
```

### SERVICES MANAGEMENT

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

# Enable Service
sudo systemctl enable dhealthd

# Disable Service
sudo systemctl disable dhealthd

# Start Service
sudo systemctl start dhealthd

# Stop Service
sudo systemctl stop dhealthd

# Restart Service
sudo systemctl restart dhealthd

# Check Service Status
sudo systemctl status dhealthd

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

### UTILITY

```bash
#Set Indexer NULL / KV
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.dhealth/config/config.toml

#Get Validator info
dhealthd status 2>&1 | jq .ValidatorInfo

#Get denom info
dhealthd q bank denom-metadata -oj | jq

#Get sync status
dhealthd status 2>&1 | jq .SyncInfo.catching_up

#Get latest height
dhealthd status 2>&1 | jq .SyncInfo.latest_block_height

#Reset Node
dhealthd tendermint unsafe-reset-all --home $HOME/.dhealth --keep-addr-book
```

### DELETE NODE

{% hint style="warning" %} <mark style="color:red;">**WARNING! Use this command wisely Backup your key first it will remove node from your system**</mark>
{% endhint %}

```bash
sudo systemctl stop dhealthd && sudo systemctl disable dhealthd && sudo rm /etc/systemd/system/dhealthd.service && sudo systemctl daemon-reload && sudo rm -rf $(which dhealthd) && rm -rf $HOME/.dhealth && rm -rf $HOME/go/bin/dhealthd && rm -rf $HOME/dhealth
```


# Entangle

<figure><img src="https://3732959305-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fr1ChzocIBBGBlfbyRi9s%2Fuploads%2FtwraEaVNNOBXthhg53wz%2Fphoto_2023-11-12_19-50-07.jpg?alt=media&amp;token=b42c7641-8eb5-47e0-b23f-8fed263eb327" alt="" width="200"><figcaption></figcaption></figure>

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

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

| Chain ID          | Latest Version Tag |
| ----------------- | ------------------ |
| entangle\_33033-1 | main               |

### Public endpoints <a href="#public-endpoints" id="public-endpoints"></a>

* Api : <https://entangle-m-api.syanodes.my.id/>
* Rpc : [ ](< https://mantra-testnet-rpc.syanodes.my.id/>)<https://entangle-m-rpc.syanodes.my.id/>

### Links

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

***


# Node Installation

### Hardware requirements The following requirements are recommended for running ENTANGLE:

* **6 or more physical CPU cores**
* **At least 1TB of SSD disk storage**
* **At least 16GB of memory (RAM)**
* **At least 500mbps network bandwidth**

## Manual Installation

```bash
# Update & install dependencies
sudo apt update && sudo apt upgrade -y
sudo apt install clang pkg-config libssl-dev curl git wget htop tmux build-essential jq make lz4 gcc unzip -y


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


# Install Go
cd $HOME
sudo rm -rf /usr/local/go
curl -Ls https://go.dev/dl/go1.21.4.linux-amd64.tar.gz | sudo tar -xzf - -C /usr/local
eval $(echo 'export PATH=$PATH:/usr/local/go/bin' | sudo tee /etc/profile.d/golang.sh)
eval $(echo 'export PATH=$PATH:$HOME/go/bin' | tee -a $HOME/.profile)
go version


# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export ENTANGLE_CHAIN_ID="entangle_33033-1"" >> $HOME/.bash_profile
echo "export ENTANGLE_PORT="5"" >> $HOME/.bash_profile
source $HOME/.bash_profile


# Download Binary
cd $HOME
rm -rf entangle-blockchain
git clone https://github.com/Entangle-Protocol/entangle-blockchain
cd entangle-blockchain
git checkout main
make install


# Config and Init App
entangled config node tcp://localhost:${ENTANGLE_PORT}657
entangled config keyring-backend os
entangled config chain-id $ENTANGLE_CHAIN_ID
entangled init $MONIKER --chain-id $ENTANGLE_CHAIN_ID


# Add Genesis File and Addrbook
wget -O $HOME/.entangled/config/genesis.json https://testnet-files.syanodes.my.id/entangle-m-genesis.json
wget -O $HOME/.entangled/config/addrbook.json https://testnet-files.syanodes.my.id/entangle-m-addrbook.json


#Configure Seeds and Peers
SEEDS=""
PEERS="46156e0932e548ac124b3fa159f23d6072318019@35.228.9.108:26656,7ca810f11ddd54e7a10fed03a067b0ec3c1e8ba2@34.174.1.1:26656,d9e855c34efd86dcb024b8de363374f070955d20@[2a01:4f9:2a:79e::2]:32656,31eb7abe3bcabff89c381f8502da7f5a98c42d0d@158.220.98.0:15656,f78d0c5c0b8abb5115fc79fc6acb7951518b2105@104.244.208.243:27156,c85f120508d63834a7cab9abf766884d0135372e@[2a01:4f9:3081:4158::2]:31656,2831d7b924b2b2774f70dbda6ebc8d8aa6f39e5d@95.216.75.190:26656,7378259114db42b8b46fad4cc9f31d32a5419b60@[2a03:4000:60:56:1879:e1ff:fe07:89f5]:12656,135b64976feabeefd5776818c3fafe29c2bbc886@[2607:5300:203:b704::]:26656,1731c1b2f3bc8316a74d645a3f045c0f1aba7bc5@94.76.242.68:26656,9d25b1205658df64b509c21bcb212159f13039e3@37.252.186.204:26656,c31e8d2f3427c05e83b6f06262d59374547eee90@[2a01:4f9:6a:4732::2]:22656,821a704cb5cad8f0d2024888c54f330057d34040@34.174.161.121:26656,bac38cc68c8bcf09e7484a4ae64c3f9381b3abf4@142.132.202.50:33656,ce48739e5a187007c8bb66de1a0a4b78af203a61@34.174.164.70:26656,101f4f7041266d4f318b2f45ec9eb31f4ab1ef73@162.19.169.74:36656,6de7cd16d8816a4c2a8a3344210e9634f17b97d8@[2a01:4f9:1a:b181::2]:10656,2899b5bbba96c4a99674ca780ad8bbc6179d5c94@[2a01:4f9:4a:2864::2]:11956,05b5bde0eb0a6374d796c7f467fc6d25b0bb3e2c@57.129.37.24:26656,10d0f0e10b12c37bf64f6eca08076ffaf9cb18ab@[2a01:4f9:3081:2ee2::2]:15656,17619aea4a13201bccf803a2bb7f44e387134f47@[2a01:4f8:262:1b2f::2]:21856,00495ccd54c09560ab2d2fe6638523418901786f@[2a01:4f9:3081:3aa3::2]:21856,8e682c52253e8d892e47b5e6cc0672e435301038@[2a01:4f8:261:2c1a::2]:4156,7030ba7898fe4b557e916ab7e13b006071d6f5c0@[2a01:4f9:5a:2248::2]:15656,858489814116c3011216bddfc35c60385040bb61@[2a01:4f8:10a:c0c::2]:26656,06b3c3ecc479983958190d26ce1aafc18398d5be@94.72.107.225:26656,0d57afd37f4f4f566c8359b1d4c5a439e2c7f009@[2a01:4f9:1a:ac89::2]:22656,cc8bf40df39533f1867141c8d99d62dc7f2a1867@[2a01:4f8:221:374c::2]:29656,122399866c25b888679904e99450b6ab86fbcc32@[2001:41d0:304:300::4f69]:26656,c3318235ce692b7d9abe0833faeba667d04b5f83@[2a01:4f8:2200:1275::2]:22656,1ea44942d500f9bd83df93dbdcac4f79f5f79901@[2a01:4f8:10a:d70::2]:10656,2d457167788939ef2e6e0a79b76097ba0421d706@158.220.121.173:15656,841380487cf89030e9ae865dfb884cc703e6c2b2@94.76.242.98:26656,7aab5c045aeb072341cdd8e7b692d4d56553e5b7@[2a01:4f9:3a:2699::2]:34656,b0f28d454343a605c10f8f7bc4149d4764ee1e89@[2a01:4f9:3081:2f30::2]:15656,d2c05a9a98f7b47b91f21e6cb757cfcdf37239d0@[2a01:4f8:210:338f::2]:26656,6662a6b320b8f7520ebbc04e2891ee43227631a8@[2a01:4f9:3081:5155::2]:1550,a0eeae37a0e8c25dd98ffd84ff21504221a8d14f@[2a01:4f9:3080:1188::2]:38656,9b01145fc6fe490a59cbdceeee96678245ebeecf@[2a02:c206:2128:4299::1]:26656,bed1c2d7f2466e90f3e703ecbe1dafe370bd3e14@88.99.102.36:26656,fbe38cb0500221859e631a93d7f830babea8871c@94.76.242.57:26656,08e8fc80d1d26dca253894e209f20f5138f3dcde@35.228.227.105:26656,990d17a2686b47fe4bcf885bfae3f29897a58a32@[2a01:4f9:6b:47e6::2]:26656,3e5001558765a6092d1284f3b5b24f6bd76a9433@[2a01:4f8:171:1d8::2]:26656,8a6be04c58c3e633f9d3d201fd03d23b6cfcb3d1@[2a01:4f9:3a:4156::2]:26656,addb29cd41f917faca1276f294751840757ff865@[2a01:4f8:241:528f::2]:22656,46a736eddfd1b068bb33e6be49f3a740b209a42d@[2a12:5940:18cb::2]:26656,7ca810f11ddd54e7a10fed03a067b0ec3c1e8ba2@34.174.1.1:26656,2831d7b924b2b2774f70dbda6ebc8d8aa6f39e5d@95.216.75.190:26656,fbe38cb0500221859e631a93d7f830babea8871c@94.76.242.57:26656,1731c1b2f3bc8316a74d645a3f045c0f1aba7bc5@94.76.242.68:26656,841380487cf89030e9ae865dfb884cc703e6c2b2@94.76.242.98:26656,f381ea4431ba812caf27f65f1fbd31b64a699358@38.146.3.231:27156,6662a6b320b8f7520ebbc04e2891ee43227631a8@65.21.65.254:1550,9d25b1205658df64b509c21bcb212159f13039e3@37.252.186.204:26656,990d17a2686b47fe4bcf885bfae3f29897a58a32@65.108.71.227:26656,01f693f3f219e4fc58f4161c377a63011d369243@37.27.109.36:26656,da8baf26d486b9dd268dc62dd962141592f40068@65.108.97.119:26656,d47a5d94defcfa5eaac0dfc136b227a215a8f2b9@37.27.109.45:26656,8a6be04c58c3e633f9d3d201fd03d23b6cfcb3d1@65.21.33.59:26656,75e62df2ed4615cabe38a7b2d645e329a800be47@185.205.246.212:26656"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.entangled/config/config.toml
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0aNGL\"/" $HOME/.entangled/config/app.toml
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.entangled/config/config.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.entangled/config/config.toml


# Config Pruning
pruning="custom"
pruning_keep_recent="100"
pruning_keep_every="0"
pruning_interval="19"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.entangled/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.entangled/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.entangled/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.entangled/config/app.toml


# Set Custom Port
sed -i.bak -e "s%:1317%:${ENTANGLE_PORT}317%g;
s%:8080%:${ENTANGLE_PORT}080%g;
s%:9090%:${ENTANGLE_PORT}090%g;
s%:9091%:${ENTANGLE_PORT}091%g;
s%:8545%:${ENTANGLE_PORT}545%g;
s%:8546%:${ENTANGLE_PORT}546%g;
s%:6065%:${ENTANGLE_PORT}065%g" $HOME/.entangled/config/app.toml
sed -i.bak -e "s%:26658%:${ENTANGLE_PORT}658%g;
s%:26657%:${ENTANGLE_PORT}657%g;
s%:6060%:${ENTANGLE_PORT}060%g;
s%:26656%:${ENTANGLE_PORT}656%g;
s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):${ENTANGLE_PORT}656\"%;
s%:26660%:${ENTANGLE_PORT}660%g" $HOME/.entangled/config/config.toml


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

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

[Install]
WantedBy=multi-user.target
EOF


# Enable and Start Service
sudo systemctl daemon-reload
sudo systemctl enable entangled
sudo systemctl start entangled
sudo journalctl -fu entangled -o cat
```

## Auto Installation

```bash
wget https://snapshot.syanodes.my.id/auto/mainnet/entangle_auto && chmod +x entangle_auto && ./entangle_auto
```


# Snapshot & State sync

## Snapshot

```bash
sudo systemctl stop entangled

cp $HOME/.entangled/data/priv_validator_state.json $HOME/.entangled/priv_validator_state.json.backup
entangled tendermint unsafe-reset-all --home ~/.entangled/ --keep-addr-book

curl https://snapshot1.syanodes.my.id/entangle/snapshot1-entangle.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.entangled

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

sudo systemctl restart entangled && sudo journalctl -fu entangled -o cat
```

## State Sync

```bash
sudo systemctl stop entangled

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

PEERS="46156e0932e548ac124b3fa159f23d6072318019@35.228.9.108:26656,7378259114db42b8b46fad4cc9f31d32a5419b60@[2a03:4000:60:56:1879:e1ff:fe07:89f5]:12656,d9e855c34efd86dcb024b8de363374f070955d20@[2a01:4f9:2a:79e::2]:32656,31eb7abe3bcabff89c381f8502da7f5a98c42d0d@158.220.98.0:15656,f78d0c5c0b8abb5115fc79fc6acb7951518b2105@104.244.208.243:27156,3e5001558765a6092d1284f3b5b24f6bd76a9433@[2a01:4f8:171:1d8::2]:26656,2831d7b924b2b2774f70dbda6ebc8d8aa6f39e5d@95.216.75.190:26656,c3318235ce692b7d9abe0833faeba667d04b5f83@167.235.102.45:22656,135b64976feabeefd5776818c3fafe29c2bbc886@[2607:5300:203:b704::]:26656,1731c1b2f3bc8316a74d645a3f045c0f1aba7bc5@94.76.242.68:26656,9d25b1205658df64b509c21bcb212159f13039e3@37.252.186.204:26656,c31e8d2f3427c05e83b6f06262d59374547eee90@[2a01:4f9:6a:4732::2]:22656,821a704cb5cad8f0d2024888c54f330057d34040@34.174.161.121:26656,bac38cc68c8bcf09e7484a4ae64c3f9381b3abf4@142.132.202.50:33656,ce48739e5a187007c8bb66de1a0a4b78af203a61@34.174.164.70:26656,101f4f7041266d4f318b2f45ec9eb31f4ab1ef73@162.19.169.74:36656,6de7cd16d8816a4c2a8a3344210e9634f17b97d8@[2a01:4f9:1a:b181::2]:10656,2899b5bbba96c4a99674ca780ad8bbc6179d5c94@[2a01:4f9:4a:2864::2]:11956,05b5bde0eb0a6374d796c7f467fc6d25b0bb3e2c@57.129.37.24:26656,10d0f0e10b12c37bf64f6eca08076ffaf9cb18ab@[2a01:4f9:3081:2ee2::2]:15656,17619aea4a13201bccf803a2bb7f44e387134f47@[2a01:4f8:262:1b2f::2]:21856,00495ccd54c09560ab2d2fe6638523418901786f@[2a01:4f9:3081:3aa3::2]:21856,8e682c52253e8d892e47b5e6cc0672e435301038@[2a01:4f8:261:2c1a::2]:4156,7030ba7898fe4b557e916ab7e13b006071d6f5c0@[2a01:4f9:5a:2248::2]:15656,858489814116c3011216bddfc35c60385040bb61@[2a01:4f8:10a:c0c::2]:26656,06b3c3ecc479983958190d26ce1aafc18398d5be@94.72.107.225:26656,0d57afd37f4f4f566c8359b1d4c5a439e2c7f009@[2a01:4f9:1a:ac89::2]:22656,cc8bf40df39533f1867141c8d99d62dc7f2a1867@[2a01:4f8:221:374c::2]:29656,122399866c25b888679904e99450b6ab86fbcc32@[2001:41d0:304:300::4f69]:26656,207a5a0ede03ec13d18392fa2f6775b9c0223727@[2a01:4f9:5a:15c4::2]:13356,1ea44942d500f9bd83df93dbdcac4f79f5f79901@[2a01:4f8:10a:d70::2]:10656,2d457167788939ef2e6e0a79b76097ba0421d706@158.220.121.173:15656,841380487cf89030e9ae865dfb884cc703e6c2b2@94.76.242.98:26656,7aab5c045aeb072341cdd8e7b692d4d56553e5b7@[2a01:4f9:3a:2699::2]:34656,8a6be04c58c3e633f9d3d201fd03d23b6cfcb3d1@[2a01:4f9:3a:4156::2]:26656,d2c05a9a98f7b47b91f21e6cb757cfcdf37239d0@[2a01:4f8:210:338f::2]:26656,6662a6b320b8f7520ebbc04e2891ee43227631a8@[2a01:4f9:3081:5155::2]:1550,a0eeae37a0e8c25dd98ffd84ff21504221a8d14f@[2a01:4f9:3080:1188::2]:38656,9b01145fc6fe490a59cbdceeee96678245ebeecf@[2a02:c206:2128:4299::1]:26656,bed1c2d7f2466e90f3e703ecbe1dafe370bd3e14@88.99.102.36:26656,fbe38cb0500221859e631a93d7f830babea8871c@94.76.242.57:26656,08e8fc80d1d26dca253894e209f20f5138f3dcde@35.228.227.105:26656,990d17a2686b47fe4bcf885bfae3f29897a58a32@[2a01:4f9:6b:47e6::2]:26656,7ca810f11ddd54e7a10fed03a067b0ec3c1e8ba2@34.174.1.1:26656,b0f28d454343a605c10f8f7bc4149d4764ee1e89@[2a01:4f9:3081:2f30::2]:15656,addb29cd41f917faca1276f294751840757ff865@[2a01:4f8:241:528f::2]:22656"
SNAP_RPC="https://entangle-m-rpc.syanodes.my.id:443"
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.entangled/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/.entangled/config/config.toml

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

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


# Useful commands

```bash
# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export ENTANGLE_CHAIN_ID="entangle_33033-1"" >> $HOME/.bash_profile
source $HOME/.bash_profile
```

### WALLET MANAGEMENT

{% hint style="info" %}
*Add Wallet Specify the value \<wallet> with your own wallet name*
{% endhint %}

```bash
#Create Wallet
entangled keys add wallet

#Recover Wallet
entangled keys add wallet --recover

#List Wallet
entangled keys list

#Delete Wallet
entangled keys delete wallet

#Check Wallet Balance
entangled q bank balances $(entangled keys show wallet -a)
```

### VALIDATOR MANAGEMENT

{% hint style="info" %}
*Please adjust , MONIKER , YOUR\_KEYBASE\_ID , YOUR\_DETAILS , YOUR\_WEBSITE\_URL*
{% endhint %}

```bash
#Create Validator
entangled tx staking create-validator \
--amount=100000000000aNGL \
--pubkey=$(entangled tendermint show-validator) \
--moniker=$MONIKER \
--identity="YOUR_KEYBASE_ID" \
--details="YOUR_DETAILS" \
--website="YOUR_WEBSITE_URL" \
--chain-id=$ENTANGLE_CHAIN_ID \
--commission-rate=0.10 \
--commission-max-rate=0.20 \
--commission-max-change-rate=0.01 \
--min-self-delegation=10000 \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices=20aNGL \
-y

#Edit Validator
entangled tx staking edit-validator \
--new-moniker="YOUR MONIKER" \
--identity="IDENTITY KEYBASE" \
--details="DETAILS VALIDATOR" \
--website="LINK WEBSITE" \
--chain-id=$ENTANGLE_CHAIN_ID \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices=20aNGL \
-y

#Unjail Validator
entangled tx slashing unjail --from wallet --chain-id $ENTANGLE_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 20aNGL -y

#Check Jailed Reason
entangled query slashing signing-info $(entangled tendermint show-validator)
```

### TOKEN MANAGEMENT

```bash
#Withdraw Rewards
entangled tx distribution withdraw-all-rewards --from wallet --chain-id $ENTANGLE_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 20aNGL -y

#Withdraw Rewards with Comission
entangled tx distribution withdraw-rewards $(entangled keys show wallet --bech val -a) --commission --from wallet --chain-id $ENTANGLE_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 20aNGL -y

#Delegate Token to your own validator
entangled tx staking delegate $(entangled keys show wallet --bech val -a) 100000000aNGL --from wallet --chain-id $ENTANGLE_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 20aNGL -y

#Delegate Token to other validator
entangled tx staking redelegate $(entangled keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> 1000000uaum --from wallet --chain-id $ENTANGLE_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 20aNGL -y

#Unbond Token from your validator
entangled tx staking unbond $(entangled keys show wallet --bech val -a) 1000000000aNGL --from wallet --chain-id $ENTANGLE_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 20aNGL -y

#Send Token to another wallet
entangled tx bank send wallet <TO_WALLET_ADDRESS> 100000000aNGL --from wallet --chain-id $ENTANGLE_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 20aNGL -y
```

### GOVERNANCE

```bash
#Vote You can change the value of yes to no,abstain,nowithveto
entangled tx gov vote 1 yes --from wallet --chain-id $ENTANGLE_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 20aNGL -y

#List all proposals
entangled query gov proposals

#Create new text proposal
entangled tx gov submit-proposal \
--title="Title" \
--description="Description" \
--deposit=1000000000aNGL \
--type="Text" \
--from=wallet \
--gas-prices=20aNGL\ 
--gas-adjustment=1.5 \
--gas="auto" \
-y 
```

### SERVICES MANAGEMENT

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

# Enable Service
sudo systemctl enable entangled

# Disable Service
sudo systemctl disable entangled

# Start Service
sudo systemctl start entangled

# Stop Service
sudo systemctl stop entangled

# Restart Service
sudo systemctl restart entangled

# Check Service Status
sudo systemctl status entangled

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

### UTILITY

```bash
#Set Indexer NULL / KV
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.entangled/config/config.toml

#Get Validator info
entangled status 2>&1 | jq .ValidatorInfo

#Get denom info
entangled q bank denom-metadata -oj | jq

#Get sync status
entangled status 2>&1 | jq .SyncInfo.catching_up

#Get latest height
entangled status 2>&1 | jq .SyncInfo.latest_block_height

#Reset Node
entangled tendermint unsafe-reset-all --home $HOME/.entangled --keep-addr-book
```

### DELETE NODE

{% hint style="warning" %} <mark style="color:red;">**WARNING! Use this command wisely Backup your key first it will remove node from your system**</mark>
{% endhint %}

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


# Oraichain

<figure><img src="https://3732959305-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fr1ChzocIBBGBlfbyRi9s%2Fuploads%2FXe3MHC5LwsQhv4MgG3A8%2Foraichain.jpg?alt=media&amp;token=966cedb3-b621-480f-b1ef-c2fe182e2df2" alt="" width="200"><figcaption></figcaption></figure>

Oraichain is a data oracle platform that aggregates and connects Artificial Intelligence APIs to smart contracts, serving as a foundational base for the creation of new Dapps leveraging AI technologies. Oraichain is the world’s first AI-powered oracle aiming to revolutionize the AI, DeFi, and Blockchain industries.

| Chain ID  | Latest Version Tag |
| --------- | ------------------ |
| Oraichain | v0.42.0            |

### Public endpoints <a href="#public-endpoints" id="public-endpoints"></a>

* Api : <https://orai-m-api.syanodes.my.id>
* Rpc :  <https://orai-m-rpc.syanodes.my.id>
* grpc with ssl/tls: orai-m-grpc.syanodes.my.id:443

### Links

[Website](https://orai.io/) | [Discord](https://discord.gg/wwjg2ddfzd) | [Twitter](https://twitter.com/oraichain)

***


# Node Installation

### Hardware requirements The following requirements are recommended for running ORAICHAIN:

* **16 or more physical CPU cores**
* **At least 1TB of SSD disk storage**
* **At least 32GB of memory (RAM)**
* **At least 1Gbps network bandwidth**

## Manual Installation

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


# Install Go
cd $HOME
VER="1.22.2"
wget "https://golang.org/dl/go$VER.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$VER.linux-amd64.tar.gz"
rm "go$VER.linux-amd64.tar.gz"
[ ! -f ~/.bash_profile ] && touch ~/.bash_profile
echo "export PATH=$PATH:/usr/local/go/bin:~/go/bin" >> ~/.bash_profile
source $HOME/.bash_profile
[ ! -d ~/go/bin ] && mkdir -p ~/go/bin
go version


# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export ORAI_CHAIN_ID="Oraichain"" >> $HOME/.bash_profile
echo "export ORAI_PORT="104"" >> $HOME/.bash_profile
source $HOME/.bash_profile


# Download Binary
cd $HOME
rm -rf orai
git clone https://github.com/oraichain/orai
cd orai
git checkout v0.42.0
make install


# Config and Init App
oraid config node tcp://localhost:${ORAI_PORT}57
oraid config keyring-backend os
oraid config chain-id $ORAI_CHAIN_ID
oraid init $MONIKER --chain-id $ORAI_CHAIN_ID


# Add Genesis File and Addrbook
wget -O $HOME/.oraid/config/genesis.json https://testnet-files.syanodes.my.id/orai-m-genesis.json
wget -O $HOME/.oraid/config/addrbook.json https://testnet-files.syanodes.my.id/orai-m-addrbook.json


#Configure Seeds and Peers
SEEDS=""
PEERS="ea3c594a7327129b7c2194cc2e16c951f75860dc@148.251.22.211:26656,fc3709fe48c109d90cc9c276bcae6f0405dbfd79@15.235.218.25:11256,4c2299507ac661c0697476b9fc8a9df9a2f8ab37@8.218.43.245:26656,d45349a906b6a8bf5d63ca04f24767519a47fbbe@95.168.173.33:27656,76c0a363d26beae470d351af564c2762433267db@51.77.54.5:26696,dcb6fe9f40398653c892f265a214e07ce3dc54e6@95.217.100.232:26656,22ea1c13c7d144181c2f558f27af02e585be7289@52.69.218.214:26656,7040896f8ae59146dd5b24a598d4bdaeb944e73e@3.14.142.99:26656,17905a181e472cfcae60857e1b20eeab0f060d31@168.119.75.88:37095,1e4252cfc66c001c49f94a8a9b73a40e9bd2f4ef@144.24.107.218:26656,4c407d55d9f611081c1fd884ec02af27cf2f413b@213.199.53.219:30456,3d94333b01145ca232377db6c828ee145a1d8ff2@168.119.96.244:26656,bca27bfe8a46076f27a15bfa75a383c1494e1010@88.99.208.30:26656,9efc1af629161400e27a7a013bf690f8100bf10b@135.125.67.226:26656,8153bf1cff50d0d0d8cfea3e75ac5d7de3db1207@18.182.78.42:26643,899f5240db3b5b47251c3143f4f1ff0187e8985d@51.158.62.39:25956,9ec9f0c04ea681e7c118561563ceade8fd90f39c@46.165.213.225:26656,bdf3f54758e6a712d13fbcda9f49b01f3c1c73b2@65.109.89.245:26656,3bd69ffc421d412ac2c55d31b91c06a991fe0d53@108.143.225.32:26656,2dd8da1b0832dc63cdb32dc4b185fdda72a8e344@203.149.210.210:26656,f3d49c352d201bd816d50fd0a53257f6a603af98@204.10.194.109:26656,d3da792039cf9c4d1dd59a6e6560be199ecd3d9a@157.143.106.68:34656,6353618502d6d292262f3026532fa78579d65c01@82.146.83.3:26656,5d616ce580e08dc50bbfb38187e41b6d6239a731@88.99.102.140:26656,e40764355e1c7f70e34c4803916473adc16e5028@65.109.66.210:26656,696d298d07e41a4137854ec22724e732fa5d13b4@128.140.9.197:26656,19f75a1aea4cdf8ce987b3d4e1ef6617eb3604b3@185.16.38.159:27436,0241c04cf7dd42562af4e4e71e7db1ca09e237f9@202.61.240.193:38801,4d3139b31f5a7d9765a622791e439ea27e8d0bcd@65.109.38.38:24556,fd0bc768e4cbe3daa7b1cd977c8f78e52c5650bd@23.88.38.95:26656,a64d9a66eb9e4bf4f37cecf68e8407bb1a7a845f@135.125.67.228:26656,66fb8062f05a567334e8536d08fc8b70113b0c47@5.9.77.116:11256,b583e4e18de98fce7bae62220b807fbf340373e2@143.198.11.18:26656,bad3bfc35f89a674f38f42778b6929e3d1c808e5@65.21.29.228:23356,e1b058e5cfa2b836ddaa496b10911da62dcf182e@169.155.45.117:26656,285e35b56b08a0eb5ec9ec1dac2007f28500869f@65.108.12.145:26656,d263c8c8fdd279d33de643c3baffbe053d0a8a73@18.223.242.70:26656,24631e98a167492fd4c92c582cee5fd6fcd8ad59@188.34.151.189:26656,916d7fdea49590876a433d7e0d1fe75cba3ae6b4@162.55.6.147:26656,252392f6227c8677bff9975d52877396d5a1c339@174.138.172.50:42656,42a3e1e8c009b3f9ea16e93d18cd057ad1bdfa73@45.13.105.123:26656,1dbf48e4cb50e8fdfd494ebe8d9f3ec148c1cef6@20.61.175.199:26656,022c4aca71fd3824b18243b3d3e7c9ef2fcf52bd@65.108.75.96:11256,02f89d03cb72e02afed36c3843a0252ae744dd18@204.10.194.31:26656,f81e482d6d649e80d8637c0b5aa54ffdc7928b20@65.108.127.231:26656,6c9f6c2836a5d81b982c36c742fc804fe569b8b1@35.78.61.71:26656,1c51f26bb2f727dc212918a89c215ff0ccb58a27@88.99.102.177:26656,259d42b7349c8cb3f71541c2ce6cb5b92c917107@23.88.73.142:26656,f7e5069c1acd824edb05f1d2460fa4a14ddacafc@209.145.53.118:26656,c39c6f17f509011db87f9159dd7fbab9017e5388@65.21.88.53:26656,09551a1c8692b91869ca8a39fcc1fcb076f6fb92@37.27.116.113:23356,f3f437ea0efebe1ce120e852b94fd840a278f9d6@65.21.105.206:26656,0d16ce98d64c0bd09db3d4bb1e06bdd38e2b12e7@135.181.194.81:26656,79dd7594e02dd0710ad89f3a766ae211d4e51531@95.216.68.38:26656,d9b834857365490dffa6a36017b611ad7b6974ee@85.10.193.148:26656,ff029861311d209dd8b900d3dcf7daedac0e8320@144.76.28.47:16456,d41a3069b63e8be34069583d986d1358fa3c9217@136.243.78.152:26656,d32aa17ace03973c2bf9e658ab925892b300b781@85.237.193.117:26656,85aa075c70baa375d1d8a4d4d3e173ed660d1193@161.35.226.148:26656,281ffed48d529d12b211e8fc7dd07bf2c9c60314@37.252.186.199:26656,4f3621e39edc79ab57ba1da46a31694de7423119@79.18.149.68:26656,fc374037cde5d48682250e3b31cd394eab198d43@65.109.30.53:23356,6b03729c64d7a7f1cc7f5d32c271d3157f2685d1@37.27.84.181:26656,add029daa5a196b594dba5bf71704f082c66014d@65.109.53.108:26656,ae64fe43d8df467f383dd037e2c806fc621f3a42@65.108.232.93:23356,360f9f88b03b82449b4b97257ee700ecb0f7f39a@65.21.71.55:26656,59f65cfbe57666e35ea916e4caf25a97bc23f3bf@3.16.251.231:26656,1262ce266dfc393c109876c51274e5393de7baaf@47.243.203.221:26656,9e7f854b7f6142799c8f58a37cd982d006ca329d@37.27.58.244:22656,06e425a39b1f114f3a11b6bae34d569091a265ad@164.152.161.131:26656,5d4bc81abc9632003c0dd625ae995c0d50534cec@136.243.104.103:11256,3aa52a453167f09fc57c144d460fb828dcf3113e@49.13.86.247:26656,eace5ae84412ec175999bc5904c7d3aa484e2f8a@65.108.241.34:26656,0413b3cebc124880a4483473ff927238087f48d4@95.168.164.244:27656,fd10d86445854ec8b91d952c946e4dc86469fc82@88.99.102.150:26656,22971f781f2efebe1f27936ff8a32694f5ff678c@213.199.54.195:26656,8d7743eeb35af9a547a68a22e269b85547a5bc5f@18.141.10.59:26656,1c2d6802a9a33b723d6c82f687b65ec088a89437@185.248.24.16:35656,ea9c06db0790ba32110fe9fe4b3a99c958bc550f@77.248.159.123:26656,9c352ad859d5950238c5fa9aec32695d8b7afaf0@51.79.72.77:23356,f88651fda1455b1ff449d254b798a1397ed85b7e@18.171.122.160:26656,4babdcd4c81d589e789db3b294eebcd779f2227c@66.45.246.166:2056,91ace3666408cc457f0129088a03d9e253236dd1@167.235.12.38:12356,429ebeb33e2c081c790b03b4dee3216e03ff2428@135.181.217.58:26656,12a9657636c239ff6f41ab4d7fba3b001a9badd8@65.21.104.77:26656,d4535a724a45ee78d127a28b533eb314f24c9cc1@65.109.30.14:26656,d55f76487553e2645f9174f5bed4abb6864b2847@37.27.117.86:26656,8cfa6b05576a8da3b3c759d107c8bdbd81e515e2@65.108.201.240:23356,9da443214bea30edd8bcf3008cda5d371aa4a361@94.72.163.162:26656,b5d09cb83dcb8e65999316c0cf7e4ea94f90cf82@37.27.81.108:26656,5ff540218c73f08320396a597bae07c7b6fd2391@95.217.227.117:26656,35c1f999d67de56736b412a1325370a8e2fdb34a@5.189.169.99:26656,f73ff86d28761c010c7afcca1f33455068ac82fd@178.251.228.65:26656,f04796731b6f664233cccbd5c180495017d0290a@95.217.207.17:40656,7257dcc015cfc912960f7d1b50a90d01fb0667bb@95.217.120.218:26656,de9c4333609bf326e0d8a55c8b2e5d70df9dd09d@85.17.178.18:27656,654414d137d02d83af22c7d91bb4f481ccdbc0d8@141.95.97.30:11256,437d5fb4ef2c1485cf92d72777101ad482599ed1@213.199.55.170:30456,a433dde605befdf241bab4361aef844176a48c0d@167.99.124.244:26656,efb9d22a6fdf7460f965982ae013d242bbbfd53c@152.53.19.64:33656,1e0ce4c70da22f27f555b7609acc1a7fac22ba09@51.159.0.48:23177,0e9387a4aa548998eda8f2bb4a5cd799345d5367@65.21.198.100:11256"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.oraid/config/config.toml
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0orai\"/" $HOME/.oraid/config/app.toml
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.oraid/config/config.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.oraid/config/config.toml


# Config Pruning
pruning="custom"
pruning_keep_recent="100"
pruning_keep_every="0"
pruning_interval="10"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.oraid/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.oraid/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.oraid/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.oraid/config/app.toml



# Set Custom Port
sed -i -e "s%:1317%:${ORAI_PORT}17%; s%:8080%:${ORAI_PORT}80%; s%:9090%:${ORAI_PORT}90%; s%:9091%:${ORAI_PORT}91%; s%:8545%:${ORAI_PORT}45%; s%:8546%:${ORAI_PORT}46%; s%:6065%:${ORAI_PORT}65%" $HOME/.oraid/config/app.toml
sed -i -e "s%:26658%:${ORAI_PORT}58%; s%:26657%:${ORAI_PORT}57%; s%:6060%:${ORAI_PORT}60%; s%:26656%:${ORAI_PORT}56%; s%:26660%:${ORAI_PORT}61%" $HOME/.oraid/config/config.toml
sed -i \
  -e 's|^chain-id *=.*|chain-id = "Oraichain"|' \
  -e 's|^node *=.*|node = "tcp://localhost:10457"|' \
  $HOME/.oraid/config/client.toml


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

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

[Install]
WantedBy=multi-user.target
EOF


# Enable and Start Service
sudo systemctl daemon-reload
sudo systemctl enable oraid
sudo systemctl start oraid
sudo journalctl -fu oraid -o cat
```

## Auto Installation

```bash
wget https://snapshot.syanodes.my.id/auto/mainnet/orai_auto && chmod +x orai_auto && ./orai_auto
```


# Snapshot & State sync

## Snapshot

```bash
sudo systemctl stop oraid

cp $HOME/.oraid/data/priv_validator_state.json $HOME/.oraid/priv_validator_state.json.backup
oraid tendermint unsafe-reset-all --home ~/.oraid/ --keep-addr-book

curl https://snapshot2.syanodes.my.id/orai/snapshot2-orai.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.oraid

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

sudo systemctl restart oraid && sudo journalctl -fu oraid -o cat
```

## State Sync

```bash
sudo systemctl stop oraid

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

peers="ea3c594a7327129b7c2194cc2e16c951f75860dc@148.251.22.211:26656,fc3709fe48c109d90cc9c276bcae6f0405dbfd79@15.235.218.25:11256,4c2299507ac661c0697476b9fc8a9df9a2f8ab37@8.218.43.245:26656,d45349a906b6a8bf5d63ca04f24767519a47fbbe@95.168.173.33:27656,76c0a363d26beae470d351af564c2762433267db@51.77.54.5:26696,dcb6fe9f40398653c892f265a214e07ce3dc54e6@95.217.100.232:26656,22ea1c13c7d144181c2f558f27af02e585be7289@52.69.218.214:26656,7040896f8ae59146dd5b24a598d4bdaeb944e73e@3.14.142.99:26656,17905a181e472cfcae60857e1b20eeab0f060d31@168.119.75.88:37095,1e4252cfc66c001c49f94a8a9b73a40e9bd2f4ef@144.24.107.218:26656,4c407d55d9f611081c1fd884ec02af27cf2f413b@213.199.53.219:30456,3d94333b01145ca232377db6c828ee145a1d8ff2@168.119.96.244:26656,bca27bfe8a46076f27a15bfa75a383c1494e1010@88.99.208.30:26656,9efc1af629161400e27a7a013bf690f8100bf10b@135.125.67.226:26656,8153bf1cff50d0d0d8cfea3e75ac5d7de3db1207@18.182.78.42:26643,899f5240db3b5b47251c3143f4f1ff0187e8985d@51.158.62.39:25956,9ec9f0c04ea681e7c118561563ceade8fd90f39c@46.165.213.225:26656,bdf3f54758e6a712d13fbcda9f49b01f3c1c73b2@65.109.89.245:26656,3bd69ffc421d412ac2c55d31b91c06a991fe0d53@108.143.225.32:26656,2dd8da1b0832dc63cdb32dc4b185fdda72a8e344@203.149.210.210:26656,f3d49c352d201bd816d50fd0a53257f6a603af98@204.10.194.109:26656,d3da792039cf9c4d1dd59a6e6560be199ecd3d9a@157.143.106.68:34656,6353618502d6d292262f3026532fa78579d65c01@82.146.83.3:26656,5d616ce580e08dc50bbfb38187e41b6d6239a731@88.99.102.140:26656,e40764355e1c7f70e34c4803916473adc16e5028@65.109.66.210:26656,696d298d07e41a4137854ec22724e732fa5d13b4@128.140.9.197:26656,19f75a1aea4cdf8ce987b3d4e1ef6617eb3604b3@185.16.38.159:27436,0241c04cf7dd42562af4e4e71e7db1ca09e237f9@202.61.240.193:38801,4d3139b31f5a7d9765a622791e439ea27e8d0bcd@65.109.38.38:24556,fd0bc768e4cbe3daa7b1cd977c8f78e52c5650bd@23.88.38.95:26656,a64d9a66eb9e4bf4f37cecf68e8407bb1a7a845f@135.125.67.228:26656,66fb8062f05a567334e8536d08fc8b70113b0c47@5.9.77.116:11256,b583e4e18de98fce7bae62220b807fbf340373e2@143.198.11.18:26656,bad3bfc35f89a674f38f42778b6929e3d1c808e5@65.21.29.228:23356,e1b058e5cfa2b836ddaa496b10911da62dcf182e@169.155.45.117:26656,285e35b56b08a0eb5ec9ec1dac2007f28500869f@65.108.12.145:26656,d263c8c8fdd279d33de643c3baffbe053d0a8a73@18.223.242.70:26656,24631e98a167492fd4c92c582cee5fd6fcd8ad59@188.34.151.189:26656,916d7fdea49590876a433d7e0d1fe75cba3ae6b4@162.55.6.147:26656,252392f6227c8677bff9975d52877396d5a1c339@174.138.172.50:42656,42a3e1e8c009b3f9ea16e93d18cd057ad1bdfa73@45.13.105.123:26656,1dbf48e4cb50e8fdfd494ebe8d9f3ec148c1cef6@20.61.175.199:26656,022c4aca71fd3824b18243b3d3e7c9ef2fcf52bd@65.108.75.96:11256,02f89d03cb72e02afed36c3843a0252ae744dd18@204.10.194.31:26656,f81e482d6d649e80d8637c0b5aa54ffdc7928b20@65.108.127.231:26656,6c9f6c2836a5d81b982c36c742fc804fe569b8b1@35.78.61.71:26656,1c51f26bb2f727dc212918a89c215ff0ccb58a27@88.99.102.177:26656,259d42b7349c8cb3f71541c2ce6cb5b92c917107@23.88.73.142:26656,f7e5069c1acd824edb05f1d2460fa4a14ddacafc@209.145.53.118:26656,c39c6f17f509011db87f9159dd7fbab9017e5388@65.21.88.53:26656,09551a1c8692b91869ca8a39fcc1fcb076f6fb92@37.27.116.113:23356,f3f437ea0efebe1ce120e852b94fd840a278f9d6@65.21.105.206:26656,0d16ce98d64c0bd09db3d4bb1e06bdd38e2b12e7@135.181.194.81:26656,79dd7594e02dd0710ad89f3a766ae211d4e51531@95.216.68.38:26656,d9b834857365490dffa6a36017b611ad7b6974ee@85.10.193.148:26656,ff029861311d209dd8b900d3dcf7daedac0e8320@144.76.28.47:16456,d41a3069b63e8be34069583d986d1358fa3c9217@136.243.78.152:26656,d32aa17ace03973c2bf9e658ab925892b300b781@85.237.193.117:26656,85aa075c70baa375d1d8a4d4d3e173ed660d1193@161.35.226.148:26656,281ffed48d529d12b211e8fc7dd07bf2c9c60314@37.252.186.199:26656,4f3621e39edc79ab57ba1da46a31694de7423119@79.18.149.68:26656,fc374037cde5d48682250e3b31cd394eab198d43@65.109.30.53:23356,6b03729c64d7a7f1cc7f5d32c271d3157f2685d1@37.27.84.181:26656,add029daa5a196b594dba5bf71704f082c66014d@65.109.53.108:26656,ae64fe43d8df467f383dd037e2c806fc621f3a42@65.108.232.93:23356,360f9f88b03b82449b4b97257ee700ecb0f7f39a@65.21.71.55:26656,59f65cfbe57666e35ea916e4caf25a97bc23f3bf@3.16.251.231:26656,1262ce266dfc393c109876c51274e5393de7baaf@47.243.203.221:26656,9e7f854b7f6142799c8f58a37cd982d006ca329d@37.27.58.244:22656,06e425a39b1f114f3a11b6bae34d569091a265ad@164.152.161.131:26656,5d4bc81abc9632003c0dd625ae995c0d50534cec@136.243.104.103:11256,3aa52a453167f09fc57c144d460fb828dcf3113e@49.13.86.247:26656,eace5ae84412ec175999bc5904c7d3aa484e2f8a@65.108.241.34:26656,0413b3cebc124880a4483473ff927238087f48d4@95.168.164.244:27656,fd10d86445854ec8b91d952c946e4dc86469fc82@88.99.102.150:26656,22971f781f2efebe1f27936ff8a32694f5ff678c@213.199.54.195:26656,8d7743eeb35af9a547a68a22e269b85547a5bc5f@18.141.10.59:26656,1c2d6802a9a33b723d6c82f687b65ec088a89437@185.248.24.16:35656,ea9c06db0790ba32110fe9fe4b3a99c958bc550f@77.248.159.123:26656,9c352ad859d5950238c5fa9aec32695d8b7afaf0@51.79.72.77:23356,f88651fda1455b1ff449d254b798a1397ed85b7e@18.171.122.160:26656,4babdcd4c81d589e789db3b294eebcd779f2227c@66.45.246.166:2056,91ace3666408cc457f0129088a03d9e253236dd1@167.235.12.38:12356,429ebeb33e2c081c790b03b4dee3216e03ff2428@135.181.217.58:26656,12a9657636c239ff6f41ab4d7fba3b001a9badd8@65.21.104.77:26656,d4535a724a45ee78d127a28b533eb314f24c9cc1@65.109.30.14:26656,d55f76487553e2645f9174f5bed4abb6864b2847@37.27.117.86:26656,8cfa6b05576a8da3b3c759d107c8bdbd81e515e2@65.108.201.240:23356,9da443214bea30edd8bcf3008cda5d371aa4a361@94.72.163.162:26656,b5d09cb83dcb8e65999316c0cf7e4ea94f90cf82@37.27.81.108:26656,5ff540218c73f08320396a597bae07c7b6fd2391@95.217.227.117:26656,35c1f999d67de56736b412a1325370a8e2fdb34a@5.189.169.99:26656,f73ff86d28761c010c7afcca1f33455068ac82fd@178.251.228.65:26656,f04796731b6f664233cccbd5c180495017d0290a@95.217.207.17:40656,7257dcc015cfc912960f7d1b50a90d01fb0667bb@95.217.120.218:26656,de9c4333609bf326e0d8a55c8b2e5d70df9dd09d@85.17.178.18:27656,654414d137d02d83af22c7d91bb4f481ccdbc0d8@141.95.97.30:11256,437d5fb4ef2c1485cf92d72777101ad482599ed1@213.199.55.170:30456,a433dde605befdf241bab4361aef844176a48c0d@167.99.124.244:26656,efb9d22a6fdf7460f965982ae013d242bbbfd53c@152.53.19.64:33656,1e0ce4c70da22f27f555b7609acc1a7fac22ba09@51.159.0.48:23177,0e9387a4aa548998eda8f2bb4a5cd799345d5367@65.21.198.100:11256"
SNAP_RPC="https://orai-m-rpc.syanodes.my.id:443"

sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.oraid/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/.oraid/config/config.toml

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

sudo systemctl restart oraid && sudo journalctl -fu oraid -o cat
```


# Useful commands

```bash
# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export ORAI_CHAIN_ID="Oraichain"" >> $HOME/.bash_profile
source $HOME/.bash_profile
```

### WALLET MANAGEMENT

{% hint style="info" %}
*Add Wallet Specify the value \<wallet> with your own wallet name*
{% endhint %}

```bash
#Create Wallet
oraid keys add wallet

#Recover Wallet
oraid keys add wallet --recover

#List Wallet
oraid keys list

#Delete Wallet
oraid keys delete wallet

#Check Wallet Balance
oraid q bank balances $(oraid keys show wallet -a)
```

### VALIDATOR MANAGEMENT

{% hint style="info" %}
*Please adjust , MONIKER , YOUR\_KEYBASE\_ID , YOUR\_DETAILS , YOUR\_WEBSITE\_URL*
{% endhint %}

```bash
#Create Validator
oraid tx staking create-validator \
--amount=1000000orai \
--pubkey=$(oraid tendermint show-validator) \
--moniker=$MONIKER \
--identity="YOUR_KEYBASE_ID" \
--details="YOUR_DETAILS" \
--website="YOUR_WEBSITE_URL" \
--chain-id=$ORAI_CHAIN_ID \
--commission-rate=0.10 \
--commission-max-rate=0.20 \
--commission-max-change-rate=0.01 \
--min-self-delegation=10000 \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices=1orai \
-y

#Edit Validator
oraid tx staking edit-validator \
--new-moniker="YOUR MONIKER" \
--identity="IDENTITY KEYBASE" \
--details="DETAILS VALIDATOR" \
--website="LINK WEBSITE" \
--chain-id=$ORAI_CHAIN_ID \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices=1orai \
-y

#Unjail Validator
oraid tx slashing unjail --from wallet --chain-id $ORAI_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1orai -y

#Check Jailed Reason
oraid query slashing signing-info $(oraid tendermint show-validator)
```

### TOKEN MANAGEMENT

```bash
#Withdraw Rewards
oraid tx distribution withdraw-all-rewards --from wallet --chain-id $ORAI_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1orai -y

#Withdraw Rewards with Comission
oraid tx distribution withdraw-rewards $(oraid keys show wallet --bech val -a) --commission --from wallet --chain-id $ORAI_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1orai -y

#Delegate Token to your own validator
oraid tx staking delegate $(oraid keys show wallet --bech val -a) 1000000orai --from wallet --chain-id $ORAI_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1orai -y

#Delegate Token to other validator
oraid tx staking redelegate $(oraid keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> 1000000uaum --from wallet --chain-id $ORAI_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1orai -y

#Unbond Token from your validator
oraid tx staking unbond $(oraid keys show wallet --bech val -a) 10000000orai --from wallet --chain-id $ORAI_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1orai -y

#Send Token to another wallet
oraid tx bank send wallet <TO_WALLET_ADDRESS> 1000000orai --from wallet --chain-id $ORAI_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1orai -y
```

### GOVERNANCE

```bash
#Vote, You can change the value of yes to no,abstain,nowithveto
oraid tx gov vote 1 yes --from wallet --chain-id $ORAI_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1orai -y

#List all proposals
oraid query gov proposals

#Create new text proposal
oraid tx gov submit-proposal \
--title="Title" \
--description="Description" \
--deposit=1000000000orai \
--type="Text" \
--from=wallet \
--gas-prices=1orai\ 
--gas-adjustment=1.5 \
--gas="auto" \
-y 
```

### SERVICES MANAGEMENT

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

# Enable Service
sudo systemctl enable oraid

# Disable Service
sudo systemctl disable oraid

# Start Service
sudo systemctl start oraid

# Stop Service
sudo systemctl stop oraid

# Restart Service
sudo systemctl restart oraid

# Check Service Status
sudo systemctl status oraid

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

### UTILITY

```bash
#Set Indexer NULL / KV
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.oraid/config/config.toml

#Get Validator info
oraid status 2>&1 | jq .ValidatorInfo

#Get denom info
oraid q bank denom-metadata -oj | jq

#Get sync status
oraid status 2>&1 | jq .SyncInfo.catching_up

#Get latest height
oraid status 2>&1 | jq .SyncInfo.latest_block_height

#Reset Node
oraid tendermint unsafe-reset-all --home $HOME/.oraid --keep-addr-book
```

### DELETE NODE

{% hint style="warning" %} <mark style="color:red;">**WARNING! Use this command wisely Backup your key first it will remove node from your system**</mark>
{% endhint %}

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


# Pactus


# Quicksilver

<figure><img src="https://3732959305-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fr1ChzocIBBGBlfbyRi9s%2Fuploads%2FiwdahftSSbr6Dww7njKE%2Fquicksilver.png?alt=media&amp;token=91d6059a-1b42-434d-8e49-69e915c99ba5" alt=""><figcaption></figcaption></figure>

Quicksilver is a permissionless, sovereign Cosmos SDK zone providing liquid staking for the entire Cosmos Ecosystem. Through Quicksilver, users are issued a voucher, qASSET, representative of their staked asset, which can then be used in DeFi protocols. Quicksilver can scale seamlessly to any IBC-connected chain, and users participating in the protocol can delegate to any validator of their choosing, as well as retain their voting rights through the protocol’s Governance by Proxy feature. QCK is the native token of Quicksilver, which will be used for securing the network through staking, paying transaction fees for the Quicksilver zone, and participating in governance. The QCK token will also accrue rewards from the Staking Rewards fees collected by the protocol.

| Chain ID      | Latest Version Tag |
| ------------- | ------------------ |
| quicksilver-2 | v1.7.5             |

### Public endpoints <a href="#public-endpoints" id="public-endpoints"></a>

* Api : <https://quicksilver-m-api.syanodes.my.id>
* Rpc :  <https://quicksilver-m-rpc.syanodes.my.id>
* grpc with ssl/tls: quicksilver-m-grpc.syanodes.my.id:443

### Links

[Website](https://quicksilver.zone/) | [Discord](https://discord.com/invite/xrSmYMDVrQ) | [Twitter](https://x.com/quicksilverzone)

***


# Node Installation

### Hardware requirements The following requirements are recommended for running QUICKSILVER:

* **6 or more physical CPU cores**
* **At least 1TB of SSD disk storage**
* **At least 16GB of memory (RAM)**
* **At least 500mbps network bandwidth**

## Manual Installation

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

# Install Go
cd $HOME
VER="1.23.4"
wget "https://golang.org/dl/go$VER.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$VER.linux-amd64.tar.gz"
rm "go$VER.linux-amd64.tar.gz"
[ ! -f ~/.bash_profile ] && touch ~/.bash_profile
echo "export PATH=$PATH:/usr/local/go/bin:~/go/bin" >> ~/.bash_profile
source $HOME/.bash_profile
[ ! -d ~/go/bin ] && mkdir -p ~/go/bin
go version


# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export QUICKSILVER_CHAIN_ID="quicksilver-2"" >> $HOME/.bash_profile
echo "export QUICKSILVER_PORT="115"" >> $HOME/.bash_profile
source $HOME/.bash_profile


# Download Binary
cd $HOME
wget -O quicksilverd https://github.com/quicksilver-zone/quicksilver/releases/download/v1.7.5/quicksilverd-v1.7.5-amd64
chmod +x quicksilverd
mv $HOME/quicksilverd $HOME/go/bin/quicksilverd


# Config and Init App
quicksilverd config node tcp://localhost:${QUICKSILVER_PORT}57
quicksilverd config chain-id $QUICKSILVER_CHAIN_ID
quicksilverd init $MONIKER --chain-id $QUICKSILVER_CHAIN_ID


# Add Genesis File and Addrbook
wget -O $HOME/.quicksilverd/config/genesis.json https://snapshot.syanodes.my.id/mainnets/quicksilver/genesis.json
wget -O $HOME/.quicksilverd/config/addrbook.json https://snapshot.syanodes.my.id/mainnets/quicksilver/addrbook.json


#Configure Seeds and Peers
SEEDS=""
PEERS="c950a736496bec7abb89ff137e4c698fc061d9d4@193.34.212.165:36656,1829f35ba04f9ca7a6938f1cd4a056ec395ff558@57.128.20.159:25656,78fc99f2f57edca0440a0afa83f36a01d56a0ea3@144.76.29.90:61156,f1d2ffadfb5c5a0feb09b740a3818672595b8f84@88.198.69.44:11156,ce94c5e02457accd8c0e5f3a61f381f4710b81ae@65.109.29.31:26656,4ac74efa43a964bf6f30078c81d5cbe072d53e5c@135.181.141.120:26656,625eeb91fcc6242798f53426540825e5b37c7670@185.144.99.16:36656,a87f48e433160970318d181bb69c378f4564cd2d@107.155.67.202:26736,e1b058e5cfa2b836ddaa496b10911da62dcf182e@134.65.193.94:26656,4aa307d4ce413837a3da019e966d8115fb4c1467@198.244.229.218:26656,3308d9078fcca016fbd8dc8f3b19666326f41a6f@138.201.121.185:26672,5fa47201aa5208c30982b6f9d8ca44222d256fc5@51.91.70.90:48656,ffd3a67122d557dbc426972196ded625757b71b6@37.120.161.180:11256,cfad318e5387261935777972476df9c26d5bc122@88.99.119.171:46656,50a40c5aba326798ea9520ac0a1207e22a540a0e@95.214.55.100:26556,26aef7f4ca9ba982f09e456fb11d811c8aa64003@65.108.232.168:46656,712ab8988efa4f681225456a1891f739fbd2da6b@51.178.76.62:26656,79b214369c8f52c2d33cf79fc1897677b24cf8cb@94.130.240.229:2000,5b63379fec9edfd0b1b475ae4d67c08bcb4abdc6@51.89.98.102:48656,671c44247a1bb8d305bbd1f935f231fd955d3791@65.109.30.35:11156,4aa0f632db2dbdff121317260dad641e290e4dc5@167.86.115.183:38656,f5d683410b65423ca89ce48a328cb3e0a6561d6f@46.105.56.112:26656,ebfba72389824e819f04e42c62cf93b9e541251a@49.13.146.143:26633,a2e86407c88531b8f62e857ed462eb86634671ea@23.88.100.214:26633,6053a39e67c6bae83430e354f53d99e160e4964b@65.109.28.177:28656,100e867a9c136c1d7b3687e7128202d745d9fbba@88.198.5.77:32656,c3f26a6d02b26668cf46057057cb46a6b893bb6f@65.108.232.104:11156,daaae14161c721448537cd2bb5e6b1bdcc7afd14@51.68.170.145:26656,41caa4106f68977e3a5123e56f57934a2d34a1c1@195.3.223.9:27026,83779cf55cc220c0bf9484560bcdfb93789a88e5@54.39.28.226:11156,ba52d6744d89cf66cf29d7663a21e1299d0f6744@74.80.183.130:26654,7af3aeb6209f3404c2a86d4faa429de4b2d68c1e@195.3.221.249:60656,85ddc35026c80e9f63adacbf9531e067f4079996@95.216.12.106:21026,c9c72a2752cdfe798aa91dd6ddcc0f64597ad934@51.89.14.187:26656,9f5751f22f485a56cf28b55d7b5c9a196a469f91@185.144.99.20:36656,34047b39deae3110158c2bf7359e4a1b559dd8ca@159.89.171.207:26656,4231d453fb95c2a5b57ff93da1d0304dd1958dd3@195.189.96.99:47656,58fe3a7b075e7302f8b46b8171a0aa19ff4a427a@65.108.195.29:31126,e726816f42831689eab9378d5d577f1d06d25716@169.155.46.128:26656,77478af393735191875931fc981bf11b2f38eeb1@65.109.18.169:11156,326c1f2744ef1fda960d9c4645ccbd4b4b439aba@23.227.222.196:26656"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.quicksilverd/config/config.toml
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.00025uqck\"/" $HOME/.quicksilverd/config/app.toml
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.quicksilverd/config/config.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.quicksilverd/config/config.toml


# Config Pruning
pruning="custom"
pruning_keep_recent="100"
pruning_keep_every="0"
pruning_interval="10"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.quicksilverd/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.quicksilverd/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.quicksilverd/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.quicksilverd/config/app.toml


# Set Custom Port
sed -i -e "s%:1317%:${QUICKSILVER_PORT}17%; s%:8080%:${QUICKSILVER_PORT}80%; s%:9090%:${QUICKSILVER_PORT}90%; s%:9091%:${QUICKSILVER_PORT}91%; s%:8545%:${QUICKSILVER_PORT}45%; s%:8546%:${QUICKSILVER_PORT}46%; s%:6065%:${QUICKSILVER_PORT}65%" $HOME/.quicksilverd/config/app.toml
sed -i -e "s%:26658%:${QUICKSILVER_PORT}58%; s%:26657%:${QUICKSILVER_PORT}57%; s%:6060%:${QUICKSILVER_PORT}60%; s%:26656%:${QUICKSILVER_PORT}56%; s%:26660%:${QUICKSILVER_PORT}61%" $HOME/.quicksilverd/config/config.toml


# Set Service File
sudo tee /etc/systemd/system/quicksilverd.service > /dev/null <<EOF
[Unit]
Description=quicksilver-mainnet
After=network-online.target

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

[Install]
WantedBy=multi-user.target
EOF


# Enable and Start Service
sudo systemctl daemon-reload
sudo systemctl enable quicksilverd
sudo systemctl start quicksilverd && sudo journalctl -fu quicksilverd -o cat
```

## Auto Installation

```bash
wget https://snapshot.syanodes.my.id/auto/mainnet/quicksilver_auto && chmod +x quicksilver_auto && ./quicksilver_auto 
```


# Upgrade

```bash
//
```


# Snapshot & State sync

## Snapshot

*Update Every 12 hours*

```bash
sudo systemctl stop quicksilverd

cp $HOME/.quicksilverd/data/priv_validator_state.json $HOME/.quicksilverd/priv_validator_state.json.backup
quicksilverd tendermint unsafe-reset-all --home ~/.quicksilverd/ --keep-addr-book

curl https://ss.syanodes.my.id/quicksilver/ss-quicksilver.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.quicksilverd

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

sudo systemctl restart quicksilverd && sudo journalctl -fu quicksilverd -o cat
```

## State Sync

```bash
sudo systemctl stop quicksilverd

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

peers="c950a736496bec7abb89ff137e4c698fc061d9d4@193.34.212.165:36656,1829f35ba04f9ca7a6938f1cd4a056ec395ff558@57.128.20.159:25656,78fc99f2f57edca0440a0afa83f36a01d56a0ea3@144.76.29.90:61156,f1d2ffadfb5c5a0feb09b740a3818672595b8f84@88.198.69.44:11156,ce94c5e02457accd8c0e5f3a61f381f4710b81ae@65.109.29.31:26656,4ac74efa43a964bf6f30078c81d5cbe072d53e5c@135.181.141.120:26656,625eeb91fcc6242798f53426540825e5b37c7670@185.144.99.16:36656,a87f48e433160970318d181bb69c378f4564cd2d@107.155.67.202:26736,e1b058e5cfa2b836ddaa496b10911da62dcf182e@134.65.193.94:26656,4aa307d4ce413837a3da019e966d8115fb4c1467@198.244.229.218:26656,3308d9078fcca016fbd8dc8f3b19666326f41a6f@138.201.121.185:26672,5fa47201aa5208c30982b6f9d8ca44222d256fc5@51.91.70.90:48656,ffd3a67122d557dbc426972196ded625757b71b6@37.120.161.180:11256,cfad318e5387261935777972476df9c26d5bc122@88.99.119.171:46656,50a40c5aba326798ea9520ac0a1207e22a540a0e@95.214.55.100:26556,26aef7f4ca9ba982f09e456fb11d811c8aa64003@65.108.232.168:46656,712ab8988efa4f681225456a1891f739fbd2da6b@51.178.76.62:26656,79b214369c8f52c2d33cf79fc1897677b24cf8cb@94.130.240.229:2000,5b63379fec9edfd0b1b475ae4d67c08bcb4abdc6@51.89.98.102:48656,671c44247a1bb8d305bbd1f935f231fd955d3791@65.109.30.35:11156,4aa0f632db2dbdff121317260dad641e290e4dc5@167.86.115.183:38656,f5d683410b65423ca89ce48a328cb3e0a6561d6f@46.105.56.112:26656,ebfba72389824e819f04e42c62cf93b9e541251a@49.13.146.143:26633,a2e86407c88531b8f62e857ed462eb86634671ea@23.88.100.214:26633,6053a39e67c6bae83430e354f53d99e160e4964b@65.109.28.177:28656,100e867a9c136c1d7b3687e7128202d745d9fbba@88.198.5.77:32656,c3f26a6d02b26668cf46057057cb46a6b893bb6f@65.108.232.104:11156,daaae14161c721448537cd2bb5e6b1bdcc7afd14@51.68.170.145:26656,41caa4106f68977e3a5123e56f57934a2d34a1c1@195.3.223.9:27026,83779cf55cc220c0bf9484560bcdfb93789a88e5@54.39.28.226:11156,ba52d6744d89cf66cf29d7663a21e1299d0f6744@74.80.183.130:26654,7af3aeb6209f3404c2a86d4faa429de4b2d68c1e@195.3.221.249:60656,85ddc35026c80e9f63adacbf9531e067f4079996@95.216.12.106:21026,c9c72a2752cdfe798aa91dd6ddcc0f64597ad934@51.89.14.187:26656,9f5751f22f485a56cf28b55d7b5c9a196a469f91@185.144.99.20:36656,34047b39deae3110158c2bf7359e4a1b559dd8ca@159.89.171.207:26656,4231d453fb95c2a5b57ff93da1d0304dd1958dd3@195.189.96.99:47656,58fe3a7b075e7302f8b46b8171a0aa19ff4a427a@65.108.195.29:31126,e726816f42831689eab9378d5d577f1d06d25716@169.155.46.128:26656,77478af393735191875931fc981bf11b2f38eeb1@65.109.18.169:11156,326c1f2744ef1fda960d9c4645ccbd4b4b439aba@23.227.222.196:26656"
SNAP_RPC="https://quicksilver-m-rpc.syanodes.my.id:443"

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

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) 

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/.quicksilverd/config/config.toml

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

sudo systemctl restart quicksilverd && sudo journalctl -fu quicksilverd -o cat
```


# Useful commands

```bash
# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export QUICKSILVER_CHAIN_ID="quicksilver-2"" >> $HOME/.bash_profile
source $HOME/.bash_profile
```

### WALLET MANAGEMENT

{% hint style="info" %}
*Add Wallet Specify the value \<wallet> with your own wallet name*
{% endhint %}

```bash
#Create Wallet
quicksilverd keys add wallet

#Recover Wallet
quicksilverd keys add wallet --recover

#List Wallet
quicksilverd keys list

#Delete Wallet
quicksilverd keys delete wallet

#Check Wallet Balance
quicksilverd q bank balances $(quicksilverd keys show wallet -a)
```

### VALIDATOR MANAGEMENT

{% hint style="info" %}
*Please adjust , MONIKER , YOUR\_KEYBASE\_ID , YOUR\_DETAILS , YOUR\_WEBSITE\_URL*
{% endhint %}

```bash
#Create Validator (Staking)
quicksilverd tx staking create-validator \
--amount=10000000uqck \
--pubkey=$(quicksilverd tendermint show-validator) \
--moniker=$MONIKER \
--identity="YOUR_KEYBASE_ID" \
--details="YOUR_DETAILS" \
--website="YOUR_WEBSITE_URL" \
--chain-id=$QUICKSILVER_CHAIN_ID \
--commission-rate=0.10 \
--commission-max-rate=0.20 \
--commission-max-change-rate=0.01 \
--min-self-delegation=10000 \
--from=wallet \
--gas-adjustment 1.5 \
--gas="auto" \
--gas-prices=1uqck \
-y

#Edit Validator
quicksilverd tx staking edit-validator \
--new-moniker="YOUR MONIKER" \
--identity="IDENTITY KEYBASE" \
--details="DETAILS VALIDATOR" \
--website="LINK WEBSITE" \
--chain-id=$QUICKSILVER_CHAIN_ID \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices=1uqck \
-y

#Unjail Validator
quicksilverd tx slashing unjail --from wallet --chain-id $QUICKSILVER_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uqck  -y

#Check Jailed Reason
quicksilverd query slashing signing-info $(quicksilverd tendermint show-validator)
```

### TOKEN MANAGEMENT

```bash
#Withdraw Rewards
quicksilverd tx distribution withdraw-all-rewards --from wallet --chain-id $QUICKSILVER_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uqck -y

#Withdraw Rewards with Comission
quicksilverd tx distribution withdraw-rewards $(quicksilverd keys show wallet --bech val -a) --commission --from wallet --chain-id $QUICKSILVER_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uqck -y

#Delegate Token to your own validator
quicksilverd tx staking delegate $(quicksilverd keys show wallet --bech val -a) 1000000uqck --from wallet --chain-id $QUICKSILVER_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uqck -y

#Delegate Token to other validator
quicksilverd tx staking redelegate $(quicksilverd keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> 1000000uqck --from wallet --chain-id $QUICKSILVER_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uqck -y

#Unbond Token from your validator
quicksilverd tx staking unbond $(quicksilverd keys show wallet --bech val -a) 1000000uqck --from wallet --chain-id $QUICKSILVER_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uqck -y

#Send Token to another wallet
quicksilverd tx bank send wallet <TO_WALLET_ADDRESS> 1000000uqck --from wallet --chain-id $QUICKSILVER_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uqck -y
```

### GOVERNANCE

```bash
#Vote, You can change the value of yes to no,abstain,nowithveto
quicksilverd tx gov vote 1 yes --from wallet --chain-id $QUICKSILVER_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uqck -y

#List all proposals
quicksilverd query gov proposals

#Create new text proposal
quicksilverd tx gov submit-proposal \
--title="Title" \
--description="Description" \
--deposit=100000000uqck \
--type="Text" \
--from=wallet \
--gas-prices=1uqck \ 
--gas-adjustment=1.5 \
--gas="auto" \
-y 
```

### SERVICES MANAGEMENT

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

# Enable Service
sudo systemctl enable quicksilverd

# Disable Service
sudo systemctl disable quicksilverd

# Start Service
sudo systemctl start quicksilverd

# Stop Service
sudo systemctl stop quicksilverd

# Restart Service
sudo systemctl restart quicksilverd

# Check Service Status
sudo systemctl status quicksilverd

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

### UTILITY

```bash
#Set Indexer NULL / KV
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.quicksilverd/config/config.toml

#Get Validator info
quicksilverd status 2>&1 | jq .ValidatorInfo

#Get denom info
quicksilverd q bank denom-metadata -oj | jq

#Get sync status
quicksilverd status 2>&1 | jq .SyncInfo.catching_up

#Get latest height
quicksilverd status 2>&1 | jq .SyncInfo.latest_block_height

#Reset Node
quicksilverd tendermint unsafe-reset-all --home $HOME/.quicksilverd --keep-addr-book
```

### DELETE NODE

{% hint style="warning" %} <mark style="color:red;">**WARNING! Use this command wisely Backup your key first it will remove node from your system**</mark>
{% endhint %}

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


# Realio

<figure><img src="https://3732959305-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fr1ChzocIBBGBlfbyRi9s%2Fuploads%2FMprXJSvxuGsMRw8owMDx%2Frealio.png?alt=media&amp;token=1147f6c7-3642-480a-ab51-72c0834c1e8c" alt=""><figcaption></figcaption></figure>

**An interoperable Layer-1 multi-chain Web3 ecosystem focused on the issuance and management of digitally native real-world assets (RWAs). Its design is fully open-source, permissionless, and purpose-built.**

| Chain ID              | Latest Version Tag |
| --------------------- | ------------------ |
| realionetwork\_3301-1 | v0.9.2             |

### Public endpoints <a href="#public-endpoints" id="public-endpoints"></a>

* Api : <https://realio-m-api.syanodes.my.id>
* Rpc :  <https://realio-m-rpc.syanodes.my.id>
* grpc with ssl/tls: realio-m-grpc.syanodes.my.id:443

### Links

[Website](https://realio.network/) | [Discord](https://discord.com/invite/WhRgHEfDF4) | [Twitter](https://x.com/realio_network)

***


# Node Installation

### Hardware requirements The following requirements are recommended for running REALIO:

* **6 or more physical CPU cores**
* **At least 1TB of SSD disk storage**
* **At least 16GB of memory (RAM)**
* **At least 500mbps network bandwidth**

## Manual Installation

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

# Install Go
cd $HOME
VER="1.22.2"
wget "https://golang.org/dl/go$VER.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$VER.linux-amd64.tar.gz"
rm "go$VER.linux-amd64.tar.gz"
[ ! -f ~/.bash_profile ] && touch ~/.bash_profile
echo "export PATH=$PATH:/usr/local/go/bin:~/go/bin" >> ~/.bash_profile
source $HOME/.bash_profile
[ ! -d ~/go/bin ] && mkdir -p ~/go/bin
go version


# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export REALIO_CHAIN_ID="realionetwork_3301-1"" >> $HOME/.bash_profile
echo "export REALIO_PORT="105"" >> $HOME/.bash_profile
source $HOME/.bash_profile


# Download Binary
cd $HOME
rm -rf realio-network
git clone https://github.com/realiotech/realio-network.git
cd realio-network
git checkout v0.9.2
make install


# Config and Init App
realio-networkd config node tcp://localhost:${REALIO_PORT}57
realio-networkd config chain-id $REALIO_CHAIN_ID
realio-networkd init $MONIKER --chain-id $REALIO_CHAIN_ID


# Add Genesis File and Addrbook
wget -O $HOME/.realio-network/config/genesis.json https://testnet-files.syanodes.my.id/realio-m-genesis.json
wget -O $HOME/.realio-network/config/addrbook.json https://testnet-files.syanodes.my.id/realio-m-addrbook.json


#Configure Seeds and Peers
SEEDS=""
PEERS="704eb376ec58ce6b4d1df7dfd7f0be7e79d5f200@5.9.147.22:23656,a09acd01e40c94b58cb9109fa74ce53c2220fd26@161.97.182.71:46656,915667afd60b28cd01f676fd98fe7328fb189bf7@5.75.186.43:26656,ebd1438f2f6e583d6e5accf749eda5e8005702e9@148.251.66.248:26656,6ea3850572bb7660b13e8f025dba020e337bd1b8@37.27.53.10:26656,2e594b4782b7273ebebe47351885842c85abe8f5@65.108.229.93:32656,b285929f2a8bc21b13d0057f438a374143fdd2e9@173.214.171.102:26706,ee5bcb1a7becf66d4fa06bd021b442afc2b92bc4@94.130.138.48:29656,d99c807a58f876684618af016409a09186065851@173.249.59.70:32656,007b0ecf73efb9d92b4cf5fc5e86247e8959f85d@129.152.25.68:26656"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.realio-network/config/config.toml
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.0ario\"/" $HOME/.realio-network/config/app.toml
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.realio-network/config/config.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.realio-network/config/config.toml


# Config Pruning
pruning="custom"
pruning_keep_recent="100"
pruning_keep_every="0"
pruning_interval="10"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.realio-network/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.realio-network/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.realio-network/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.realio-network/config/app.toml


# Set Custom Port
sed -i -e "s%:1317%:${REALIO_PORT}17%; s%:8080%:${REALIO_PORT}80%; s%:9090%:${REALIO_PORT}90%; s%:9091%:${REALIO_PORT}91%; s%:8545%:${REALIO_PORT}45%; s%:8546%:${REALIO_PORT}46%; s%:6065%:${REALIO_PORT}65%" $HOME/.realio-network/config/app.toml
sed -i -e "s%:26658%:${REALIO_PORT}58%; s%:26657%:${REALIO_PORT}57%; s%:6060%:${REALIO_PORT}60%; s%:26656%:${REALIO_PORT}56%; s%:26660%:${REALIO_PORT}61%" $HOME/.realio-network/config/config.toml


# Set Service File
sudo tee /etc/systemd/system/realio-networkd.service > /dev/null <<EOF
[Unit]
Description=realio-mainnet
After=network-online.target

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

[Install]
WantedBy=multi-user.target
EOF


# Enable and Start Service
sudo systemctl daemon-reload
sudo systemctl enable realio-networkd
sudo systemctl start realio-networkd && sudo journalctl -fu realio-networkd -o cat
```

## Auto Installation

```bash
wget https://snapshot.syanodes.my.id/auto/mainnet/realio_auto && chmod +x realio_auto && ./realio_auto
```


# Snapshot & State sync

## Snapshot

```bash
sudo systemctl stop realio-networkd

cp $HOME/.realio-network/data/priv_validator_state.json $HOME/.realio-network/priv_validator_state.json.backup
realio-networkd tendermint unsafe-reset-all --home ~/.realio-network/ --keep-addr-book

curl https://snapshot.syanodes.my.id/realio/snapshot-realio.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.realio-network

mv $HOME/.realio-network/priv_validator_state.json.backup $HOME/.realio-network/data/priv_validator_state.json

sudo systemctl restart realio-networkd && sudo journalctl -fu realio-networkd -o cat
```

## State Sync

```bash
sudo systemctl stop realio-networkd

cp $HOME/.realio-network/data/priv_validator_state.json $HOME/.realio-network/priv_validator_state.json.backup
realio-networkd tendermint unsafe-reset-all --home $HOME/.realio-network

peers="704eb376ec58ce6b4d1df7dfd7f0be7e79d5f200@5.9.147.22:23656,a09acd01e40c94b58cb9109fa74ce53c2220fd26@161.97.182.71:46656,915667afd60b28cd01f676fd98fe7328fb189bf7@5.75.186.43:26656,ebd1438f2f6e583d6e5accf749eda5e8005702e9@148.251.66.248:26656,6ea3850572bb7660b13e8f025dba020e337bd1b8@37.27.53.10:26656,2e594b4782b7273ebebe47351885842c85abe8f5@65.108.229.93:32656,b285929f2a8bc21b13d0057f438a374143fdd2e9@173.214.171.102:26706,ee5bcb1a7becf66d4fa06bd021b442afc2b92bc4@94.130.138.48:29656,d99c807a58f876684618af016409a09186065851@173.249.59.70:32656,007b0ecf73efb9d92b4cf5fc5e86247e8959f85d@129.152.25.68:26656"
SNAP_RPC="https://realio-m-rpc.syanodes.my.id:443"

sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.realio-network/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/.realio-network/config/config.toml

mv $HOME/.realio-network/priv_validator_state.json.backup $HOME/.realio-network/data/priv_validator_state.json

sudo systemctl restart realio-networkd && sudo journalctl -fu realio-networkd -o cat
```


# Useful commands

```bash
# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export REALIO_CHAIN_ID="realionetwork_3301-1"" >> $HOME/.bash_profile
source $HOME/.bash_profile
```

### WALLET MANAGEMENT

{% hint style="info" %}
*Add Wallet Specify the value \<wallet> with your own wallet name*
{% endhint %}

```bash
#Create Wallet
realio-networkd keys add wallet

#Recover Wallet
realio-networkd keys add wallet --recover

#List Wallet
realio-networkd keys list

#Delete Wallet
realio-networkd keys delete wallet

#Check Wallet Balance
realio-networkd q bank balances $(realio-networkd keys show wallet -a)
```

### VALIDATOR MANAGEMENT

{% hint style="info" %}
*Please adjust , MONIKER , YOUR\_KEYBASE\_ID , YOUR\_DETAILS , YOUR\_WEBSITE\_URL*
{% endhint %}

```bash
#Create Validator
realio-networkd tx staking create-validator \
--amount=100000000000ario \
--pubkey=$(realio-networkd tendermint show-validator) \
--moniker=$MONIKER \
--identity="YOUR_KEYBASE_ID" \
--details="YOUR_DETAILS" \
--website="YOUR_WEBSITE_URL" \
--chain-id=$REALIO_CHAIN_ID \
--commission-rate=0.10 \
--commission-max-rate=0.20 \
--commission-max-change-rate=0.01 \
--min-self-delegation=10000 \
--from=wallet \
--gas-adjustment=1.5 \
--gas 3300000 \
--gas-prices 1000ario 
-y

#Edit Validator
realio-networkd tx staking edit-validator \
--new-moniker="YOUR MONIKER" \
--identity="IDENTITY KEYBASE" \
--details="DETAILS VALIDATOR" \
--website="LINK WEBSITE" \
--chain-id=$REALIO_CHAIN_ID \
--from=wallet \
--gas-adjustment=1.5 \
--gas 3300000 \
--gas-prices 1000ario \
-y

#Unjail Validator
realio-networkd tx slashing unjail --from wallet --chain-id $REALIO_CHAIN_ID --gas-adjustment 1.5 --gas 3300000 \
--gas-prices 1000ario -y

#Check Jailed Reason
realio-networkd query slashing signing-info $(realio-networkd tendermint show-validator)
```

### TOKEN MANAGEMENT

```bash
#Withdraw Rewards
realio-networkd tx distribution withdraw-all-rewards --from wallet --chain-id $REALIO_CHAIN_ID --gas-adjustment 1.5 --gas 3300000 --gas-prices 1000ario -y

#Withdraw Rewards with Comission
realio-networkd tx distribution withdraw-rewards $(realio-networkd keys show wallet --bech val -a) --commission --from wallet --chain-id $REALIO_CHAIN_ID --gas-adjustment 1.5 --gas 3300000 --gas-prices 1000ario -y

#Delegate Token to your own validator
realio-networkd tx staking delegate $(realio-networkd keys show wallet --bech val -a) 100000000ario --from wallet --chain-id $REALIO_CHAIN_ID --gas-adjustment 1.5 --gas 3300000 --gas-prices 1000ario -y

#Delegate Token to other validator
realio-networkd tx staking redelegate $(realio-networkd keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> 1000000uaum --from wallet --chain-id $REALIO_CHAIN_ID --gas-adjustment 1.5 --gas 3300000 --gas-prices 1000ario -y

#Unbond Token from your validator
realio-networkd tx staking unbond $(realio-networkd keys show wallet --bech val -a) 1000000000ario --from wallet --chain-id $REALIO_CHAIN_ID --gas-adjustment 1.5 --gas 3300000 --gas-prices 1000ario -y

#Send Token to another wallet
realio-networkd tx bank send wallet <TO_WALLET_ADDRESS> 100000000ario --from wallet --chain-id $REALIO_CHAIN_ID --gas-adjustment 1.5 --gas 3300000 --gas-prices 1000ario -y
```

### GOVERNANCE

```bash
#Vote, You can change the value of yes to no,abstain,nowithveto
realio-networkd tx gov vote 1 yes --from wallet --chain-id $REALIO_CHAIN_ID --gas-adjustment 1.5 --gas 3300000 --gas-prices 1000ario -y

#List all proposals
realio-networkd query gov proposals

#Create new text proposal
realio-networkd tx gov submit-proposal \
--title="Title" \
--description="Description" \
--deposit=1000000000ario \
--type="Text" \
--from=wallet \
--gas-prices=1ario\ 
--gas-adjustment=1.5 \
--gas="auto" \
-y
```

### SERVICES MANAGEMENT

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

# Enable Service
sudo systemctl enable realio-networkd

# Disable Service
sudo systemctl disable realio-networkd

# Start Service
sudo systemctl start realio-networkd

# Stop Service
sudo systemctl stop realio-networkd

# Restart Service
sudo systemctl restart realio-networkd

# Check Service Status
sudo systemctl status realio-networkd

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

### UTILITY

```bash
#Set Indexer NULL / KV
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.realio-network/config/config.toml

#Get Validator info
realio-networkd status 2>&1 | jq .ValidatorInfo

#Get denom info
realio-networkd q bank denom-metadata -oj | jq

#Get sync status
realio-networkd status 2>&1 | jq .SyncInfo.catching_up

#Get latest height
realio-networkd status 2>&1 | jq .SyncInfo.latest_block_height

#Reset Node
realio-networkd tendermint unsafe-reset-all --home $HOME/.realio-network --keep-addr-book
```

### DELETE NODE

{% hint style="warning" %} <mark style="color:red;">**WARNING! Use this command wisely Backup your key first it will remove node from your system**</mark>
{% endhint %}

```bash
sudo systemctl stop realio-networkd && sudo systemctl disable realio-networkd && sudo rm /etc/systemd/system/realio-networkd.service && sudo systemctl daemon-reload && sudo rm -rf $(which realio-networkd) && rm -rf $HOME/.realio-network
```


# Regen

<figure><img src="https://3732959305-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fr1ChzocIBBGBlfbyRi9s%2Fuploads%2Fsb8SvUf9bXLpb5iKsWR3%2Fregen.png?alt=media&amp;token=f1a34b15-8888-46da-9ef7-6268f2fce5e4" alt="" width="200"><figcaption></figcaption></figure>

Regen Network, a platform to originate and invest in high-integrity carbon and biodiversity credits from ecological regeneration projects

| Chain ID | Latest Version Tag |
| -------- | ------------------ |
| regen-1  | v5.1.0             |

### Public endpoints <a href="#public-endpoints" id="public-endpoints"></a>

* Api : <https://regen-m-api.syanodes.my.id>
* Rpc :  <https://regen-m-rpc.syanodes.my.id>
* grpc with ssl/tls: regen-m-grpc.syanodes.my.id:443

### Links

[Website](https://www.regen.network/) | [Discord](https://discord.gg/6ghMcMBjbz) | [Twitter](http://twitter.com/regen_network)

***


# Node Installation

### Hardware requirements The following requirements are recommended for running REGEN:

* **6 or more physical CPU cores**
* **At least 1TB of SSD disk storage**
* **At least 16GB of memory (RAM)**
* **At least 500mbps network bandwidth**

## Manual Installation

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

# Install Go
cd $HOME
VER="1.22.2"
wget "https://golang.org/dl/go$VER.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$VER.linux-amd64.tar.gz"
rm "go$VER.linux-amd64.tar.gz"
[ ! -f ~/.bash_profile ] && touch ~/.bash_profile
echo "export PATH=$PATH:/usr/local/go/bin:~/go/bin" >> ~/.bash_profile
source $HOME/.bash_profile
[ ! -d ~/go/bin ] && mkdir -p ~/go/bin
go version


# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export REGEN_CHAIN_ID="regen-1"" >> $HOME/.bash_profile
echo "export REGEN_PORT="101"" >> $HOME/.bash_profile
source $HOME/.bash_profile


# Download Binary
cd $HOME
rm -rf regen
git clone https://github.com/regen-network/regen-ledger.git regen
cd regen
git checkout v5.1.0
make install

# Config and Init App
regen config node tcp://localhost:${REGEN_PORT}57
regen config chain-id $REGEN_CHAIN_ID
regen init $MONIKER --chain-id $REGEN_CHAIN_ID


# Add Genesis File and Addrbook
wget -O $HOME/.regen/config/genesis.json https://testnet-files.syanodes.my.id/regen-m-genesis.json
wget -O $HOME/.regen/config/addrbook.json https://testnet-files.syanodes.my.id/regen-m-addrbook.json


#Configure Seeds and Peers
SEEDS=""
PEERS="4e1c2471efb89239fb04a4b75f9f87177fd91d00@169.155.170.84:26656,89757803f40da51678451735445ad40d5b15e059@134.65.193.163:26656,30aa646949a1b4f98f37a7b81ab5b39a85b8b09a@47.147.226.147:30656,1a0c1acdde56fb32fc6e274798874b077baa92eb@65.108.226.120:26656,d7d0b7eef1cdcd061a9ab545925c5c289d20c993@65.108.201.240:22756,2a28151a15b6b5a5b180cc083057fddf4ec732fd@37.27.6.76:26656,8702c89e88f7cbcf4f18083f209715aaf0805fab@84.201.133.78:26656,f8389283fbcea223554e9f58866639019d7c8cfb@5.161.113.35:26656,af25ae9bf62590bd4f89ce7f9b74ad9e1615a5e3@94.237.99.14:26656,41caa4106f68977e3a5123e56f57934a2d34a1c1@95.214.53.233:27216,4f5f4a72cb7b7e1c1f5ee42b6a14648bcff829d8@185.252.220.89:25003,a7db33f408f03e10a0ecb994deebcc05bff39686@142.132.146.165:15632,ba09b10eaa1ac987352954259fa3c4ccceb919b8@108.181.106.114:30656,e1b058e5cfa2b836ddaa496b10911da62dcf182e@169.155.169.74:26656,cac97e0ac29d29da8674faa046d07157b5e2d9eb@95.216.71.51:26656,fbc73479fb081658e7da8badb22570bc9c9c73eb@146.190.228.186:26656,19b618e75d026f4cfaa0da60bebe6e673e535dd9@185.52.54.94:26656,e571c08e2f9d903388e8bb18f30ac4352d70acad@95.214.52.201:26656,6a2b3c75af41d59ec282957760b25846371c3c38@128.199.35.126:26656,42ce45721a72be2333d6963627c26936c0ca877f@158.247.240.241:14900,fc69b1d3d0335aefa157293cc28e1deb8cc29e32@65.109.111.218:22756,68d111c72d9f78a21d99eee328cd825ec44c31ee@78.110.161.68:26656,b51a9fb6f35d7d0e5e51894899218b14baf3004f@64.225.63.61:26656,e726816f42831689eab9378d5d577f1d06d25716@164.152.162.75:26656,d0272a71166cc81a91aafbce55fc3d592e1da18a@54.39.131.67:26656,b2ec575d7fa8bb2a65b1eb33319c3dd92001a112@15.235.50.175:26664,69cf30379f809eabd8df1b57eda656759685eec0@89.149.218.70:26656,97e4468ac589eac505a800411c635b14511a61bb@169.155.46.147:26656,b5937b58338cfbf90f41c4c7c6be4774b05e3e9d@219.100.163.37:26656,b091c835753be917e052661beabcbb14dedf1ba5@125.253.92.113:26656,ebc272824924ea1a27ea3183dd0b9ba713494f83@195.3.220.57:27216,f8abd1351247bb7d173f3f3df6e7cc4925e46188@65.109.35.83:26656,b212d5740b2e11e54f56b072dc13b6134650cfb5@164.152.160.220:26656,730fac9ab405dd72ff771521c50437672db9244d@169.150.255.54:32656,7eba961e3868fad7b60ce757784069a03c069d94@155.133.22.163:26656,41aa9dd2d8f497660e17f0f27db45a7c760cee64@80.64.211.93:26656,e80dc5ff22b2ccf6b36144987e31ddd806e7660a@143.244.176.72:26656,514242205d4d6485a7488f399e06a2a02b4cceff@94.130.201.180:26656,5f1ba938514c70167dd6e1c1e6a7c9aec4c2f33f@65.108.232.93:22756,7e33c73d42a779c84afa948eda6e193bff98c321@199.127.63.149:46656,760e362755ecc490ba4809b403ed9faeb48e5c2e@46.166.143.83:26656,40205a0c20ff600322accca540c10b5ed45cb6a3@142.132.193.194:26656,cadaac8666ceb4482ba2595bf70bb38282e95e81@50.21.167.160:26656,3a8f856806f8129216e55cd76d9a7015cefdbc3b@95.217.35.111:30656,0304d73912acbb461f00b48ff25d9413e517bde8@65.108.71.136:22756,cc6127c9bfa2b888589331f00336fdafd76ca8c8@138.201.63.38:26676,44e14fb52c411d7455c23958494d8c49d807caf9@134.209.237.188:26656,e2a1e9e72c60d5a5fe5a7ed1506dcfdba38f54a7@213.136.88.233:22756,f553466b5ab04025c1077b20c634928dd07861ab@34.159.98.252:26656,d53de711e69c57cab00ee8dbb934f0e2316d4047@95.217.109.223:6768,ec52701cee3167e59a7f34c92255fc07475436e8@5.78.104.198:26656,bc55aca52843154da0982ff43ac3bd50944fa507@164.152.161.131:26656,41d17b34088930869a5356df5397d9538dc326f7@75.119.148.117:26656,5e1087fd3b73bc7e523f247fd57951433423bd42@54.39.131.64:26656,3177b2ae2b8ffe941d96a672a7fd157fe227be55@35.228.54.228:26656,aebb8431609cb126a977592446f5de252d8b7fa1@104.236.201.138:26656,26d62a2267500d5f28494821520e677bd70d9c15@93.115.25.106:32656,22ac5e9c5d8961415c7556eb6ed992cdd6092294@65.109.30.53:22756,3bc7d3952cf862b1ecca095746a3f7e149476aa4@146.59.81.92:32656,e87b68ad9de61bed91a95264dc6a3bdcd4b354c2@138.201.63.42:26676,23a1093a05ae88e2f46e3f2d78ffb183e39b3c77@207.180.236.248:20000,c124ce0b508e8b9ed1c5b6957f362225659b5343@169.155.45.151:26656,687ec793e652c44d39a94ea9e0d3880afacc107b@65.108.199.51:23656,90838bc9b93ad4f8d8301fbb26856429e87e9463@93.115.25.15:26674,b6fbff280454ba890f5e5e51ef3af656277ce4e1@142.132.146.164:15632,232db8d5f75b25edc7f5d4d6168e3969220e47ae@65.109.23.55:1126,ec58f5162710e39a8d9c089bf8695a0a560f11f9@162.55.132.48:15632,e17ca73aea571ecfc643477638d352e45aefd77b@135.181.216.151:30656,e91e5ee041763b0ee4c46bb9786233c994fba2b7@45.77.40.177:26656,f5e2783f547fdc8a1a9cb6a94562a611726aa234@161.97.187.180:26656,9960ac66a403212053346e9d5b193ea9800972c2@51.159.103.211:28656,08d22a146b1d462a7dd2d565dfc58794db8c6e4b@173.249.25.158:26656,d0c91dc1c201e0038f8589dcb20982eaf1d14492@2.83.80.233:26956,b28f91c057414716c32b52f26a06654ff7743830@185.189.181.88:22756,22cafd2227a507d16c1d67a0fb5fd82bd7a13d9c@65.108.76.28:23356,471518432477e31ea348af246c0b54095d41352c@169.155.171.5:26656,d574b53dcf1cf803830bf4b31275af460110df08@65.109.125.172:16656,8793024bf7c68e2aec9a904baaaab00c80a467ac@49.12.165.122:26024,88bb2d938dba5158f89b410b107b4e03ab6cbcd9@164.92.246.85:32399,1420316a4002a3a87f751f914054e8d8d68f0ce5@149.50.96.147:12656,734f2165e3449a6878643280a08519897800dfba@71.236.119.108:29656,d153ddc748f85f490ae7f6195137d6c39d53c89b@5.78.86.30:26656,aeefec401e5d568f04aca0630198729c7239b4da@213.135.246.90:28656,6791609444e95982ee2013199a523172d25054df@80.64.211.92:26656,a589211be1d87db4097aebcf32001aa2694950fd@37.27.114.100:26656,dc7121500d58d40c98f06f14d5a9065935a7adf6@135.181.210.171:2126"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.regen/config/config.toml
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0uregen\"/" $HOME/.regen/config/app.toml
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.regen/config/config.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.regen/config/config.toml


# Config Pruning
pruning="custom"
pruning_keep_recent="100"
pruning_keep_every="0"
pruning_interval="19"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.regen/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.regen/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.regen/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.regen/config/app.toml


# Set Custom Port
sed -i -e "s%:1317%:${REGEN_PORT}17%; s%:8080%:${REGEN_PORT}80%; s%:9090%:${REGEN_PORT}90%; s%:9091%:${REGEN_PORT}91%; s%:8545%:${REGEN_PORT}45%; s%:8546%:${REGEN_PORT}46%; s%:6065%:${REGEN_PORT}65%" $HOME/.regen/config/app.toml
sed -i -e "s%:26658%:${REGEN_PORT}58%; s%:26657%:${REGEN_PORT}57%; s%:6060%:${REGEN_PORT}60%; s%:26656%:${REGEN_PORT}56%; s%:26660%:${REGEN_PORT}61%" $HOME/.regen/config/config.toml


# Set Service File
sudo tee /etc/systemd/system/regen.service > /dev/null <<EOF
[Unit]
Description=ixo-mainnet
After=network-online.target

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

[Install]
WantedBy=multi-user.target
EOF


# Enable and Start Service
sudo systemctl daemon-reload
sudo systemctl enable regen
sudo systemctl start regen && sudo journalctl -fu regen -o cat
```

## Auto Installation

```bash
wget https://snapshot.syanodes.my.id/auto/mainnet/regen_auto && chmod +x regen_auto && ./regen_auto
```


# Snapshot & State sync

## Snapshot

```bash
sudo systemctl stop regen

cp $HOME/.regen/data/priv_validator_state.json $HOME/.regen/priv_validator_state.json.backup
regen tendermint unsafe-reset-all --home ~/.regen/ --keep-addr-book

curl https://snapshot2.syanodes.my.id/regen/snapshot2-regen.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.regen

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

sudo systemctl restart regen && sudo journalctl -fu regen -o cat
```

## State Sync

```bash
sudo systemctl stop regen

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

peers="4e1c2471efb89239fb04a4b75f9f87177fd91d00@169.155.170.84:26656,89757803f40da51678451735445ad40d5b15e059@134.65.193.163:26656,30aa646949a1b4f98f37a7b81ab5b39a85b8b09a@47.147.226.147:30656,1a0c1acdde56fb32fc6e274798874b077baa92eb@65.108.226.120:26656,d7d0b7eef1cdcd061a9ab545925c5c289d20c993@65.108.201.240:22756,2a28151a15b6b5a5b180cc083057fddf4ec732fd@37.27.6.76:26656,8702c89e88f7cbcf4f18083f209715aaf0805fab@84.201.133.78:26656,f8389283fbcea223554e9f58866639019d7c8cfb@5.161.113.35:26656,af25ae9bf62590bd4f89ce7f9b74ad9e1615a5e3@94.237.99.14:26656,41caa4106f68977e3a5123e56f57934a2d34a1c1@95.214.53.233:27216,4f5f4a72cb7b7e1c1f5ee42b6a14648bcff829d8@185.252.220.89:25003,a7db33f408f03e10a0ecb994deebcc05bff39686@142.132.146.165:15632,ba09b10eaa1ac987352954259fa3c4ccceb919b8@108.181.106.114:30656,e1b058e5cfa2b836ddaa496b10911da62dcf182e@169.155.169.74:26656,cac97e0ac29d29da8674faa046d07157b5e2d9eb@95.216.71.51:26656,fbc73479fb081658e7da8badb22570bc9c9c73eb@146.190.228.186:26656,19b618e75d026f4cfaa0da60bebe6e673e535dd9@185.52.54.94:26656,e571c08e2f9d903388e8bb18f30ac4352d70acad@95.214.52.201:26656,6a2b3c75af41d59ec282957760b25846371c3c38@128.199.35.126:26656,42ce45721a72be2333d6963627c26936c0ca877f@158.247.240.241:14900,fc69b1d3d0335aefa157293cc28e1deb8cc29e32@65.109.111.218:22756,68d111c72d9f78a21d99eee328cd825ec44c31ee@78.110.161.68:26656,b51a9fb6f35d7d0e5e51894899218b14baf3004f@64.225.63.61:26656,e726816f42831689eab9378d5d577f1d06d25716@164.152.162.75:26656,d0272a71166cc81a91aafbce55fc3d592e1da18a@54.39.131.67:26656,b2ec575d7fa8bb2a65b1eb33319c3dd92001a112@15.235.50.175:26664,69cf30379f809eabd8df1b57eda656759685eec0@89.149.218.70:26656,97e4468ac589eac505a800411c635b14511a61bb@169.155.46.147:26656,b5937b58338cfbf90f41c4c7c6be4774b05e3e9d@219.100.163.37:26656,b091c835753be917e052661beabcbb14dedf1ba5@125.253.92.113:26656,ebc272824924ea1a27ea3183dd0b9ba713494f83@195.3.220.57:27216,f8abd1351247bb7d173f3f3df6e7cc4925e46188@65.109.35.83:26656,b212d5740b2e11e54f56b072dc13b6134650cfb5@164.152.160.220:26656,730fac9ab405dd72ff771521c50437672db9244d@169.150.255.54:32656,7eba961e3868fad7b60ce757784069a03c069d94@155.133.22.163:26656,41aa9dd2d8f497660e17f0f27db45a7c760cee64@80.64.211.93:26656,e80dc5ff22b2ccf6b36144987e31ddd806e7660a@143.244.176.72:26656,514242205d4d6485a7488f399e06a2a02b4cceff@94.130.201.180:26656,5f1ba938514c70167dd6e1c1e6a7c9aec4c2f33f@65.108.232.93:22756,7e33c73d42a779c84afa948eda6e193bff98c321@199.127.63.149:46656,760e362755ecc490ba4809b403ed9faeb48e5c2e@46.166.143.83:26656,40205a0c20ff600322accca540c10b5ed45cb6a3@142.132.193.194:26656,cadaac8666ceb4482ba2595bf70bb38282e95e81@50.21.167.160:26656,3a8f856806f8129216e55cd76d9a7015cefdbc3b@95.217.35.111:30656,0304d73912acbb461f00b48ff25d9413e517bde8@65.108.71.136:22756,cc6127c9bfa2b888589331f00336fdafd76ca8c8@138.201.63.38:26676,44e14fb52c411d7455c23958494d8c49d807caf9@134.209.237.188:26656,e2a1e9e72c60d5a5fe5a7ed1506dcfdba38f54a7@213.136.88.233:22756,f553466b5ab04025c1077b20c634928dd07861ab@34.159.98.252:26656,d53de711e69c57cab00ee8dbb934f0e2316d4047@95.217.109.223:6768,ec52701cee3167e59a7f34c92255fc07475436e8@5.78.104.198:26656,bc55aca52843154da0982ff43ac3bd50944fa507@164.152.161.131:26656,41d17b34088930869a5356df5397d9538dc326f7@75.119.148.117:26656,5e1087fd3b73bc7e523f247fd57951433423bd42@54.39.131.64:26656,3177b2ae2b8ffe941d96a672a7fd157fe227be55@35.228.54.228:26656,aebb8431609cb126a977592446f5de252d8b7fa1@104.236.201.138:26656,26d62a2267500d5f28494821520e677bd70d9c15@93.115.25.106:32656,22ac5e9c5d8961415c7556eb6ed992cdd6092294@65.109.30.53:22756,3bc7d3952cf862b1ecca095746a3f7e149476aa4@146.59.81.92:32656,e87b68ad9de61bed91a95264dc6a3bdcd4b354c2@138.201.63.42:26676,23a1093a05ae88e2f46e3f2d78ffb183e39b3c77@207.180.236.248:20000,c124ce0b508e8b9ed1c5b6957f362225659b5343@169.155.45.151:26656,687ec793e652c44d39a94ea9e0d3880afacc107b@65.108.199.51:23656,90838bc9b93ad4f8d8301fbb26856429e87e9463@93.115.25.15:26674,b6fbff280454ba890f5e5e51ef3af656277ce4e1@142.132.146.164:15632,232db8d5f75b25edc7f5d4d6168e3969220e47ae@65.109.23.55:1126,ec58f5162710e39a8d9c089bf8695a0a560f11f9@162.55.132.48:15632,e17ca73aea571ecfc643477638d352e45aefd77b@135.181.216.151:30656,e91e5ee041763b0ee4c46bb9786233c994fba2b7@45.77.40.177:26656,f5e2783f547fdc8a1a9cb6a94562a611726aa234@161.97.187.180:26656,9960ac66a403212053346e9d5b193ea9800972c2@51.159.103.211:28656,08d22a146b1d462a7dd2d565dfc58794db8c6e4b@173.249.25.158:26656,d0c91dc1c201e0038f8589dcb20982eaf1d14492@2.83.80.233:26956,b28f91c057414716c32b52f26a06654ff7743830@185.189.181.88:22756,22cafd2227a507d16c1d67a0fb5fd82bd7a13d9c@65.108.76.28:23356,471518432477e31ea348af246c0b54095d41352c@169.155.171.5:26656,d574b53dcf1cf803830bf4b31275af460110df08@65.109.125.172:16656,8793024bf7c68e2aec9a904baaaab00c80a467ac@49.12.165.122:26024,88bb2d938dba5158f89b410b107b4e03ab6cbcd9@164.92.246.85:32399,1420316a4002a3a87f751f914054e8d8d68f0ce5@149.50.96.147:12656,734f2165e3449a6878643280a08519897800dfba@71.236.119.108:29656,d153ddc748f85f490ae7f6195137d6c39d53c89b@5.78.86.30:26656,aeefec401e5d568f04aca0630198729c7239b4da@213.135.246.90:28656,6791609444e95982ee2013199a523172d25054df@80.64.211.92:26656,a589211be1d87db4097aebcf32001aa2694950fd@37.27.114.100:26656,dc7121500d58d40c98f06f14d5a9065935a7adf6@135.181.210.171:2126"
SNAP_RPC="https://regen-m-rpc.syanodes.my.id:443"

sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.regen/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/.regen/config/config.toml

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

sudo systemctl restart regen && sudo journalctl -fu regen -o cat
```


# Useful commands

```bash
# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export REGEN_CHAIN_ID="regen-1"" >> $HOME/.bash_profile
source $HOME/.bash_profile
```

### WALLET MANAGEMENT

{% hint style="info" %}
*Add Wallet Specify the value \<wallet> with your own wallet name*
{% endhint %}

```bash
#Add new wallet
regen keys add wallet

#Recover Wallet
regen keys add wallet --recover

#List Wallet
regen keys list

#Delete Wallet
regen keys delete wallet

#Check Wallet Balance
regen q bank balances $(regen keys show wallet -a)
```

### VALIDATOR MANAGEMENT

{% hint style="info" %}
*Please adjust , MONIKER , YOUR\_KEYBASE\_ID , YOUR\_DETAILS , YOUR\_WEBSITE\_URL*
{% endhint %}

```bash
#Create Validator
regen tx staking create-validator \
--amount=10000000uregen \
--pubkey=$(regen tendermint show-validator) \
--moniker=$MONIKER \
--identity="YOUR_KEYBASE_ID" \
--details="YOUR_DETAILS" \
--website="YOUR_WEBSITE_URL" \
--chain-id=$REGEN_CHAIN_ID \
--commission-rate=0.10 \
--commission-max-rate=0.20 \
--commission-max-change-rate=0.01 \
--min-self-delegation=1000 \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices=10uregen\ 
-y

#Edit Validator
regen tx staking edit-validator \
--new-moniker="YOUR MONIKER" \
--identity="IDENTITY KEYBASE" \
--details="DETAILS VALIDATOR" \
--website="LINK WEBSITE" \
--chain-id=$REGEN_CHAIN_ID \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices=10uregen\ 
-y

#Unjail Validator
regen tx slashing unjail --from wallet --chain-id $REGEN_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10uregen -y

#Check Jailed Reason
regen query slashing signing-info $(regen tendermint show-validator)
```

### TOKEN MANAGEMENT

```bash
#Withdraw Rewards
regen tx distribution withdraw-all-rewards --from wallet --chain-id $REGEN_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10uregen -y

#Withdraw Rewards with Comission
regen tx distribution withdraw-rewards $(regen keys show wallet --bech val -a) --commission --from wallet --chain-id $REGEN_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10uregen -y

#Delegate Token to your own validator
regen tx staking delegate $(regen keys show wallet --bech val -a) 1000000uregen --from wallet --chain-id $REGEN_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10uregen -y

#Delegate Token to other validator
regen tx staking redelegate $(regen keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> 1000000uregen --from wallet --chain-id $REGEN_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10uregen -y

#Unbond Token from your validator
regen tx staking unbond $(regen keys show wallet --bech val -a) 1000000uregen --from wallet --chain-id $REGEN_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10uregen -y

#Send Token to another wallet
regen tx bank send wallet <TO_WALLET_ADDRESS> 1000000uregen --from wallet --chain-id $REGEN_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10uregen -y
```

### GOVERNANCE

```bash
#Vote, You can change the value of yes to no,abstain,nowithveto
regen tx gov vote 1 yes --from wallet --chain-id $REGEN_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10uregen -y

#List all proposals
regen query gov proposals

#Create new text proposal
regen tx gov submit-proposal \
--title="Title" \
--description="Description" \
--deposit=100000000uregen \
--type="Text" \
--from=wallet \
--gas-adjustment 1.5 \
--gas "auto" \
--gas-prices=10uregen\ 
-y
```

### SERVICES MANAGEMENT

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

# Enable Service
sudo systemctl enable regen

# Disable Service
sudo systemctl disable regen

# Start Service
sudo systemctl start regen

# Stop Service
sudo systemctl stop regen

# Restart Service
sudo systemctl restart regen

# Check Service Status
sudo systemctl status regen

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

### UTILITY

```bash
#Set Indexer NULL / KV
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.regen/config/config.toml

#Get Validator info
regen status 2>&1 | jq .ValidatorInfo

#Get denom info
regen q bank denom-metadata -oj | jq

#Get sync status
regen status 2>&1 | jq .SyncInfo.catching_up

#Get latest height
regen status 2>&1 | jq .SyncInfo.latest_block_height

#Reset Node
regen tendermint unsafe-reset-all --home $HOME/.regen --keep-addr-book
```

### DELETE NODE

{% hint style="warning" %} <mark style="color:red;">**WARNING! Use this command wisely Backup your key first it will remove node from your system**</mark>
{% endhint %}

```bash
sudo systemctl stop regen && sudo systemctl disable regen && sudo rm /etc/systemd/system/regen.service && sudo systemctl daemon-reload && sudo rm -rf $(which regen) && rm -rf $HOME/.regen && rm -rf $HOME/go/bin/regen 
```


# Seda

<figure><img src="https://3732959305-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fr1ChzocIBBGBlfbyRi9s%2Fuploads%2FjzMzcgPznrbmOHUVfxGV%2Fseda.jpg?alt=media&amp;token=e38af5a8-6e8c-43ea-9a87-ff57f4d4a905" alt="" width="200"><figcaption></figcaption></figure>

SEDA is a multichainnative data transmission protocol built on a decentralized foundation. It has security guarantees consistent with the blockchains it interacts with facilitated by time-tested cryptography, strong backstops, and a high degree of configurability and computability.

| Chain ID | Latest Version Tag |
| -------- | ------------------ |
| seda-1   | v0.1.1             |

### Public endpoints <a href="#public-endpoints" id="public-endpoints"></a>

* Api : <https://seda-m-api.syanodes.my.id>
* Rpc :  [https://seda-m-rpc.syanodes.my.id](https://seda-m-rpc.syanodes.my.id/)
* grpc with ssl/tls: seda-m-grpc.syanodes.my.id:443

### Links

[Website](https://www.seda.xyz/) | [Discord](https://discord.gg/Ae4V6y6qrW) | [Twitter](https://twitter.com/sedaprotocol)

***


# Node Installation

### Hardware requirements The following requirements are recommended for running SEDA:

* **6 or more physical CPU cores**
* **At least 1TB of SSD disk storage**
* **At least 16GB of memory (RAM)**
* **At least 500mbps network bandwidth**

## Manual Installation

```bash
# Update & install dependencies
sudo apt update && sudo apt upgrade -y
sudo apt install clang pkg-config libssl-dev curl git wget htop tmux build-essential jq make lz4 gcc unzip -y


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


# Install Go
cd $HOME
VER="1.23.4"
wget "https://golang.org/dl/go$VER.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$VER.linux-amd64.tar.gz"
rm "go$VER.linux-amd64.tar.gz"
[ ! -f ~/.bash_profile ] && touch ~/.bash_profile
echo "export PATH=$PATH:/usr/local/go/bin:~/go/bin" >> ~/.bash_profile
source $HOME/.bash_profile
[ ! -d ~/go/bin ] && mkdir -p ~/go/bin
go version


# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export SEDA_CHAIN_ID="seda-1"" >> $HOME/.bash_profile
echo "export SEDA_PORT="6"" >> $HOME/.bash_profile
source $HOME/.bash_profile


# Download Binary
cd $HOME
git clone https://github.com/sedaprotocol/seda-chain.git
cd seda-chain
git checkout v0.1.6
make install


# Config and Init App
sedad init $MONIKER --chain-id $SEDA_CHAIN_ID


# Add Genesis File and Addrbook
wget -O $HOME/.sedad/config/genesis.json https://snapshot.syanodes.my.id/mainnets/seda/genesis.json
wget -O $HOME/.sedad/config/addrbook.json https://snapshot.syanodes.my.id/mainnets/seda/addrbook.json


#Configure Seeds and Peers
SEEDS=""
PEERS="6c153a3a12fd030b2d74e04f7da539b4fdd8165a@135.181.63.105:46656,dcbb080873fceedec82095f7941baf7cbdb86445@65.108.229.120:26656,d60b25fe2c523893a739b81dca99b2ecf571c8d8@65.108.101.109:25856,1a87a68c8a03ecbf6d6e65d4ce780d72d5498c0f@65.108.71.137:25856,7c522356a7b56371d79c3b3e2e90cc0fbcabe123@65.108.99.37:44656,fe6ef8aac1b6e667b8aac2e01a659b607148d199@65.108.72.239:23656,71620b329b80632f1b6d996c53d08c26fe8863f9@217.170.204.54:16656,fcd700cc304953f52c90613609adc1d7d3ded768@95.216.117.238:26656,c3ec965cab80bc11d39ccddabfa3ea48e3a4ba1f@167.235.148.49:26656,97a5a0461c0cee5b23e9a897c88c44232c01c77a@136.243.39.118:26696,82328f5be45110eb01d87ecbdaa923992563a1ce@94.130.14.54:25856,f482ca37b63e53c06bb267cbb0f594d9560234bb@88.99.68.249:25856,3a9b2d046e57d9e4194a4a2e552651bc8b732ded@46.4.29.231:3000,f8846039206179880bdcaf371aa295f44f2af975@95.217.39.34:25856,cc7413feb11a1c92838a27836d421cd6c0f2c87c@144.76.74.73:25856,67dfad81f2ba07e2fad36975cd91bd2c31caacc4@195.201.85.230:26656,9831249de188c49c4f667f021df3205ba78d0f9b@45.13.59.97:28656,a8cc0ef1a8b85317b571cc0b265aaeb3b0960081@185.246.87.73:26656,86aefda8df2348b45e417ef8a295dc2a254fc96d@77.68.126.116:26656,1b022b410d739ada3667388dd5f900f376880a9d@51.159.221.46:26656,1a00b931ca6ad065ebb59b4047188c35c7247e5e@37.252.186.105:3000,9eb343010b328fab1f955f5e18f62032a23afa50@152.53.19.64:20656,858c4a3844000e3ffda9bd73e78a14df43f4c3d9@164.68.107.103:17356,513793f87eb0ceae2f92a3cfae8dfa1fb1fa1e77@35.210.38.51:26656,f3ca6398bd93b2c2b90b9bcc7e862a2c556b9eae@178.63.130.236:36656,3f33590cd6536b3b336120df6e642a1801777b10@49.13.127.180:26656,02ed3aef42c9a6cb32fbea3fe3d117ab3ef8a920@64.185.226.202:25856,4a75daf47b56decb10c858ca9524033e1a47e8ff@64.185.227.122:25856,f86d7d930c9849fe6d58cfdbc103654d3ff7ca52@51.158.252.59:26656,08ae8343b18ac31e81c34d61ce4599c14bb0bab0@65.21.234.111:11656,9b6d05c97e7ee1d04899402b76608fb76bca7cd9@135.125.74.49:57056,d81b682c58bcff94d142db931046234e99f878ca@162.19.169.74:46656,e77d5d21b7539b056fcd21590d710d2aba162c80@74.208.16.201:26636,943fb3eb3726143e36e7e36455e3ab28d03d253d@176.9.53.156:26656,44b419fd4c50d5f020d99815198fec9e0d65eeb7@46.4.23.120:17356,4df6bcdba3397b6f18b80e66d22ea379220f64d0@5.9.145.60:25856,f66b9d59461685d4687e272b03dd0f1b07036421@189.1.170.86:56176,b28a14707a33ab7a069f36473f73e8e8e4436b1f@65.108.204.209:25856,54ad1b2d8f97897f63238955530aadd3349f0605@185.182.194.239:26656,813060d74f33914cd5bcc5c0793d3ef177ffce69@176.9.124.173:26656,286a35a0e1c095e069a7abb6f9dbbde3708feb3f@135.181.25.137:26656,4c11b3f3a350486af3d1335456d6fb7ac783b92a@88.216.198.164:26656,8d887e7007696439a955e839d786532af746f697@94.130.13.186:25856,c9100af84ba8c9dbeb0c1c49837620bf447bf55c@65.109.93.17:36656,b348ba8e728a3fe123a27b0ee072d59e41f0aef8@37.187.149.56:17356,17b84b25216277e3214fd2e8970987fbe6004c49@135.148.103.164:26656,58c919e7b89b8c5b5a3024f5e7cec07d2e3b28d3@78.47.163.48:26656,25ac079b642670134b3a2d5f513ffd046b1ed362@37.120.160.252:26656,3b620287baf6fb56342557955ff39a5d71f9fd71@38.146.3.231:25856,892777ce97dfc69c54dc1540a7ccfbf09ff2ff12@208.91.107.232:25856,6bf81dffce59717f33d81443617d2cdd46d0ff61@148.251.238.70:36656,702f09afd25bbfd21dac1ebe9a6098c6b31c72b4@65.108.98.235:24656,5b4f3aa566881af5cd084c2ca948b53f260848d0@149.50.102.53:17356,0cf0cd8c66888ebdc5f4f3bde4c31fce9533a473@176.9.157.142:25856,a882f636076c6bcea8ed7346c6f1bd8a332dfe35@20.150.223.91:26656,fa4806e7a75a24a9c7c65cca3293798de36b7ca7@135.125.188.14:26656,47a3c94d0bb74476b9befa551a9b4fd67269229a@64.38.176.74:26656,f41ceae74c11c1fa2b218f58ad54bfe5db8d882e@65.109.61.79:25856,d4b0af2651d980d1a12267b8b936689120f39aef@195.201.10.252:17356"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.sedad/config/config.toml
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"10000000000aseda\"/" $HOME/.sedad/config/app.toml
sed -i -e 's|^indexer *=.*|indexer = "kv"|' $HOME/.sedad/config/config.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.sedad/config/config.toml


# Config Pruning
pruning="custom"
pruning_keep_recent="100"
pruning_keep_every="0"
pruning_interval="19"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.sedad/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.sedad/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.sedad/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.sedad/config/app.toml


# Set Custom Port
sed -i.bak -e "s%:1317%:${SEDA_PORT}317%g;
s%:8080%:${SEDA_PORT}080%g;
s%:9090%:${SEDA_PORT}090%g;
s%:9091%:${SEDA_PORT}091%g;
s%:8545%:${SEDA_PORT}545%g;
s%:8546%:${SEDA_PORT}546%g;
s%:6065%:${SEDA_PORT}065%g" $HOME/.sedad/config/app.toml
sed -i.bak -e "s%:26658%:${SEDA_PORT}658%g;
s%:26657%:${SEDA_PORT}657%g;
s%:6060%:${SEDA_PORT}060%g;
s%:26656%:${SEDA_PORT}656%g;
s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):${SEDA_PORT}656\"%;
s%:26660%:${SEDA_PORT}660%g" $HOME/.sedad/config/config.toml
sed -i \
  -e 's|^chain-id *=.*|chain-id = "seda-1"|' \
  -e 's|^node *=.*|node = "tcp://localhost:6657"|' \
  $HOME/.sedad/config/client.toml

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

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

[Install]
WantedBy=multi-user.target
EOF


# Enable and Start Service
sudo systemctl daemon-reload
sudo systemctl enable sedad
sudo systemctl start sedad
sudo journalctl -fu sedad -o cat
```

## Auto Installation

```bash
wget https://snapshot.syanodes.my.id/auto/mainnet/seda_auto && chmod +x seda_auto && ./seda_auto
```


# Upgrade

## Manual Upgrade

**upgrade at height**&#x20;

```bash
cd $HOME
wget -O sedad https://github.com/sedaprotocol/seda-chain/releases/download/v0.1.6/sedad-amd64
chmod +x sedad
sudo mv $HOME/sedad $(which sedad)
sudo systemctl restart sedad && sudo journalctl -fu sedad -o cat
```


# Snapshot & State sync

## Snapshot

```bash
sudo systemctl stop sedad

cp $HOME/.sedad/data/priv_validator_state.json $HOME/.sedad/priv_validator_state.json.backup
sedad tendermint unsafe-reset-all --home ~/.sedad/ --keep-addr-book

curl https://ss.syanodes.my.id/seda/ss-seda.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.sedad

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

sudo systemctl restart sedad && sudo journalctl -fu sedad -o cat
```

## State Sync

```bash
sudo systemctl stop sedad

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

peers="6c153a3a12fd030b2d74e04f7da539b4fdd8165a@135.181.63.105:46656,dcbb080873fceedec82095f7941baf7cbdb86445@65.108.229.120:26656,d60b25fe2c523893a739b81dca99b2ecf571c8d8@65.108.101.109:25856,1a87a68c8a03ecbf6d6e65d4ce780d72d5498c0f@65.108.71.137:25856,7c522356a7b56371d79c3b3e2e90cc0fbcabe123@65.108.99.37:44656,fe6ef8aac1b6e667b8aac2e01a659b607148d199@65.108.72.239:23656,71620b329b80632f1b6d996c53d08c26fe8863f9@217.170.204.54:16656,fcd700cc304953f52c90613609adc1d7d3ded768@95.216.117.238:26656,c3ec965cab80bc11d39ccddabfa3ea48e3a4ba1f@167.235.148.49:26656,97a5a0461c0cee5b23e9a897c88c44232c01c77a@136.243.39.118:26696,82328f5be45110eb01d87ecbdaa923992563a1ce@94.130.14.54:25856,f482ca37b63e53c06bb267cbb0f594d9560234bb@88.99.68.249:25856,3a9b2d046e57d9e4194a4a2e552651bc8b732ded@46.4.29.231:3000,f8846039206179880bdcaf371aa295f44f2af975@95.217.39.34:25856,cc7413feb11a1c92838a27836d421cd6c0f2c87c@144.76.74.73:25856,67dfad81f2ba07e2fad36975cd91bd2c31caacc4@195.201.85.230:26656,9831249de188c49c4f667f021df3205ba78d0f9b@45.13.59.97:28656,a8cc0ef1a8b85317b571cc0b265aaeb3b0960081@185.246.87.73:26656,86aefda8df2348b45e417ef8a295dc2a254fc96d@77.68.126.116:26656,1b022b410d739ada3667388dd5f900f376880a9d@51.159.221.46:26656,1a00b931ca6ad065ebb59b4047188c35c7247e5e@37.252.186.105:3000,9eb343010b328fab1f955f5e18f62032a23afa50@152.53.19.64:20656,858c4a3844000e3ffda9bd73e78a14df43f4c3d9@164.68.107.103:17356,513793f87eb0ceae2f92a3cfae8dfa1fb1fa1e77@35.210.38.51:26656,f3ca6398bd93b2c2b90b9bcc7e862a2c556b9eae@178.63.130.236:36656,3f33590cd6536b3b336120df6e642a1801777b10@49.13.127.180:26656,02ed3aef42c9a6cb32fbea3fe3d117ab3ef8a920@64.185.226.202:25856,4a75daf47b56decb10c858ca9524033e1a47e8ff@64.185.227.122:25856,f86d7d930c9849fe6d58cfdbc103654d3ff7ca52@51.158.252.59:26656,08ae8343b18ac31e81c34d61ce4599c14bb0bab0@65.21.234.111:11656,9b6d05c97e7ee1d04899402b76608fb76bca7cd9@135.125.74.49:57056,d81b682c58bcff94d142db931046234e99f878ca@162.19.169.74:46656,e77d5d21b7539b056fcd21590d710d2aba162c80@74.208.16.201:26636,943fb3eb3726143e36e7e36455e3ab28d03d253d@176.9.53.156:26656,44b419fd4c50d5f020d99815198fec9e0d65eeb7@46.4.23.120:17356,4df6bcdba3397b6f18b80e66d22ea379220f64d0@5.9.145.60:25856,f66b9d59461685d4687e272b03dd0f1b07036421@189.1.170.86:56176,b28a14707a33ab7a069f36473f73e8e8e4436b1f@65.108.204.209:25856,54ad1b2d8f97897f63238955530aadd3349f0605@185.182.194.239:26656,813060d74f33914cd5bcc5c0793d3ef177ffce69@176.9.124.173:26656,286a35a0e1c095e069a7abb6f9dbbde3708feb3f@135.181.25.137:26656,4c11b3f3a350486af3d1335456d6fb7ac783b92a@88.216.198.164:26656,8d887e7007696439a955e839d786532af746f697@94.130.13.186:25856,c9100af84ba8c9dbeb0c1c49837620bf447bf55c@65.109.93.17:36656,b348ba8e728a3fe123a27b0ee072d59e41f0aef8@37.187.149.56:17356,17b84b25216277e3214fd2e8970987fbe6004c49@135.148.103.164:26656,58c919e7b89b8c5b5a3024f5e7cec07d2e3b28d3@78.47.163.48:26656,25ac079b642670134b3a2d5f513ffd046b1ed362@37.120.160.252:26656,3b620287baf6fb56342557955ff39a5d71f9fd71@38.146.3.231:25856,892777ce97dfc69c54dc1540a7ccfbf09ff2ff12@208.91.107.232:25856,6bf81dffce59717f33d81443617d2cdd46d0ff61@148.251.238.70:36656,702f09afd25bbfd21dac1ebe9a6098c6b31c72b4@65.108.98.235:24656,5b4f3aa566881af5cd084c2ca948b53f260848d0@149.50.102.53:17356,0cf0cd8c66888ebdc5f4f3bde4c31fce9533a473@176.9.157.142:25856,a882f636076c6bcea8ed7346c6f1bd8a332dfe35@20.150.223.91:26656,fa4806e7a75a24a9c7c65cca3293798de36b7ca7@135.125.188.14:26656,47a3c94d0bb74476b9befa551a9b4fd67269229a@64.38.176.74:26656,f41ceae74c11c1fa2b218f58ad54bfe5db8d882e@65.109.61.79:25856,d4b0af2651d980d1a12267b8b936689120f39aef@195.201.10.252:17356"
SNAP_RPC="https://seda-m-rpc.syanodes.my.id:443"

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

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) 

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/.sedad/config/config.toml

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

sudo systemctl restart sedad && sudo journalctl -fu sedad -o cat
```


# Useful commands

```bash
# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export SEDA_CHAIN_ID="seda-1"" >> $HOME/.bash_profile
source $HOME/.bash_profile
```

### WALLET MANAGEMENT

{% hint style="info" %}
*Add Wallet Specify the value \<wallet> with your own wallet name*
{% endhint %}

```bash
#Create Wallet
sedad keys add wallet

#Recover Wallet
sedad keys add wallet --recover

#List Wallet
sedad keys list

#Delete Wallet
sedad keys delete wallet

#Check Wallet Balance
sedad q bank balances $(sedad keys show wallet -a)
```

### VALIDATOR MANAGEMENT

{% hint style="info" %}
*Please adjust , MONIKER , YOUR\_KEYBASE\_ID , YOUR\_DETAILS , YOUR\_WEBSITE\_URL*
{% endhint %}

```bash
#Create Validator
sedad tx staking create-validator \
--amount=100000000000aseda \
--pubkey=$(sedad tendermint show-validator) \
--moniker=$MONIKER \
--identity="YOUR_KEYBASE_ID" \
--details="YOUR_DETAILS" \
--website="YOUR_WEBSITE_URL" \
--chain-id=$SEDA_CHAIN_ID \
--commission-rate=0.10 \
--commission-max-rate=0.20 \
--commission-max-change-rate=0.01 \
--min-self-delegation=10000 \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices=1aseda \
-y

#Edit Validator
sedad tx staking edit-validator \
--new-moniker="YOUR MONIKER" \
--identity="IDENTITY KEYBASE" \
--details="DETAILS VALIDATOR" \
--website="LINK WEBSITE" \
--chain-id=$SEDA_CHAIN_ID \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices=1aseda \
-y

#Unjail Validator
sedad tx slashing unjail --from wallet --chain-id $SEDA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1aseda -y

#Check Jailed Reason
sedad query slashing signing-info $(sedad tendermint show-validator)
```

### TOKEN MANAGEMENT

```bash
#Withdraw Rewards
sedad tx distribution withdraw-all-rewards --from wallet --chain-id $SEDA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1aseda -y

#Withdraw Rewards with Comission
sedad tx distribution withdraw-rewards $(sedad keys show wallet --bech val -a) --commission --from wallet --chain-id $SEDA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1aseda -y

#Delegate Token to your own validator
sedad tx staking delegate $(sedad keys show wallet --bech val -a) 100000000aseda --from wallet --chain-id $SEDA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1aseda -y

#Delegate Token to other validator
sedad tx staking redelegate $(sedad keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> 1000000uaum --from wallet --chain-id $SEDA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1aseda -y

#Unbond Token from your validator
sedad tx staking unbond $(sedad keys show wallet --bech val -a) 1000000000aseda --from wallet --chain-id $SEDA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1aseda -y

#Send Token to another wallet
sedad tx bank send wallet <TO_WALLET_ADDRESS> 100000000aseda --from wallet --chain-id $SEDA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1aseda -y
```

### GOVERNANCE

```bash
#Vote, You can change the value of yes to no,abstain,nowithveto
sedad tx gov vote 1 yes --from wallet --chain-id $SEDA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1aseda -y

#List all proposals
sedad query gov proposals

#Create new text proposal
sedad tx gov submit-proposal \
--title="Title" \
--description="Description" \
--deposit=1000000000aseda \
--type="Text" \
--from=wallet \
--gas-prices=1aseda\ 
--gas-adjustment=1.5 \
--gas="auto" \
-y 
```

### SERVICES MANAGEMENT

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

# Enable Service
sudo systemctl enable sedad

# Disable Service
sudo systemctl disable sedad

# Start Service
sudo systemctl start sedad

# Stop Service
sudo systemctl stop sedad

# Restart Service
sudo systemctl restart sedad

# Check Service Status
sudo systemctl status sedad

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

### UTILITY

```bash
#Set Indexer NULL / KV
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.sedad/config/config.toml

#Get Validator info
sedad status 2>&1 | jq .ValidatorInfo

#Get denom info
sedad q bank denom-metadata -oj | jq

#Get sync status
sedad status 2>&1 | jq .SyncInfo.catching_up

#Get latest height
sedad status 2>&1 | jq .SyncInfo.latest_block_height

#Reset Node
sedad tendermint unsafe-reset-all --home $HOME/.sedad --keep-addr-book
```

### DELETE NODE

{% hint style="warning" %} <mark style="color:red;">**WARNING! Use this command wisely Backup your key first it will remove node from your system**</mark>
{% endhint %}

```bash
sudo systemctl stop sedad && sudo systemctl disable sedad && sudo rm /etc/systemd/system/sedad.service && sudo systemctl daemon-reload && sudo rm -rf $(which sedad) && rm -rf $HOME/.sedad && rm -rf $HOME/seda-chain
```


# Selfchain

<figure><img src="https://3732959305-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fr1ChzocIBBGBlfbyRi9s%2Fuploads%2F0yPlFkasrvtmuZymTBPC%2Fselfchain.png?alt=media&amp;token=023a974b-fe54-4888-9c6f-6368ef27cf65" alt="" width="200"><figcaption></figcaption></figure>

Self Chain Is The First Modular Intent-Centric Access Layer L1 Blockchain And Keyless Wallet Infrastructure Service That Uses MPC-TSS/AA For Multi-Chain Web3 Access.

| Chain ID | Latest Version Tag |
| -------- | ------------------ |
| self-1   | v1.0.1             |

### Public endpoints <a href="#public-endpoints" id="public-endpoints"></a>

* Api : [https://selfchain-m-api.syanodes.my.id](https://selfchain-m-rpc.syanodes.my.id)
* Rpc :  <https://selfchain-m-rpc.syanodes.my.id>
* grpc with ssl/tls: selfchain-m-grpc.syanodes.my.id:443

### Links

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

***


# Node Installation

### Hardware requirements The following requirements are recommended for running SELFCHAIN:

* **6 or more physical CPU cores**
* **At least 1TB of SSD disk storage**
* **At least 16GB of memory (RAM)**
* **At least 500mbps network bandwidth**

## Manual Installation

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

# Install Go
cd $HOME
VER="1.22.2"
wget "https://golang.org/dl/go$VER.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$VER.linux-amd64.tar.gz"
rm "go$VER.linux-amd64.tar.gz"
[ ! -f ~/.bash_profile ] && touch ~/.bash_profile
echo "export PATH=$PATH:/usr/local/go/bin:~/go/bin" >> ~/.bash_profile
source $HOME/.bash_profile
[ ! -d ~/go/bin ] && mkdir -p ~/go/bin
go version


# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export SELFCHAIN_CHAIN_ID="self-1"" >> $HOME/.bash_profile
echo "export SELFCHAIN_PORT="102"" >> $HOME/.bash_profile
source $HOME/.bash_profile


# Download Binary
cd $HOME
rm -rf selfchaind
wget https://snapshot2.syanodes.my.id/selfchain/selfchaind
chmod +x selfchaind
sudo mv selfchaind /usr/local/bin


# Config and Init App
selfchaind config node tcp://localhost:${SELFCHAIN_PORT}57
selfchaind config chain-id $SELFCHAIN_CHAIN_ID
selfchaind init $MONIKER --chain-id $SELFCHAIN_CHAIN_ID


# Add Genesis File and Addrbook
wget -O $HOME/.selfchain/config/genesis.json https://testnet-files.syanodes.my.id/selfchain-m-genesis.json
wget -O $HOME/.selfchain/config/addrbook.json https://testnet-files.syanodes.my.id/selfchain-m-addrbook.json


#Configure Seeds and Peers
SEEDS="b307b56b94bd3a02fcad5b6904464a391e13cf48@128.199.33.181:26656,71b8d630e7c3e31f2743fda68e6d3ac64f41cece@209.97.174.97:26656,6ae10267d8581414b37553655be22297b2f92087@174.138.25.159:26656"
PEERS="6ae10267d8581414b37553655be22297b2f92087@174.138.25.159:26656,b307b56b94bd3a02fcad5b6904464a391e13cf48@128.199.33.181:26656,34c3a8a2955b4d6e5deef15c6b091250f5878afe@18.117.74.150:26656,4c8b8296e767cf3d67355dba98781ee0348e87ea@144.76.30.94:30056,c139f537755d5614a3ceaeb0f01b03be94e7ecb5@162.19.171.121:26656,6a3a0db2763d8222d00af55cbbe35824a39c8292@176.9.183.45:34656,e22a53afe2caa3aafae89edec68531e5dffa071f@188.40.72.97:26656,7a9038d1efd34c7f3baea17d8822262a981568b1@217.182.136.79:30156,f238d6a52578975198ceac2b0c2b004d49d5613f@88.198.5.77:31656,8401cbf633c496e464a2d016b333f61ff34e9ee9@167.71.233.135:26656,aab5f0267427d9dbd840fd04e634a02837d44365@51.77.20.28:25565,c743758973f5543578949228ff623918a4b43c54@165.232.177.11:26656,e5b970c7b4e9b0281fc2fc58166c9e9af476c9a3@46.4.23.120:58656,0a67ac1518c816e1927554dfc17c47f4ee457bcb@168.119.75.88:36656,2f547f93392d7351c74a0d8cae1d44f172cf32e5@64.227.156.23:26656,55d3e1761d6752eeb72b8b86decbca0d56f6a885@159.89.173.150:26656,02982b993b659c377238db477ae3698065ebc941@13.250.113.56:26656,9512a59cf93b987aff830148421a514cacb8a1b8@170.64.141.15:26656,024aa95bbdcef24d8d55c04f9c4de2fec2bc3bf6@34.159.240.168:26656,5fec0f158870a9e82e8a48fed83a78d567fb639a@167.235.12.38:22156,7efdc46e50e03e1f1208c8f276047b7fea345cc8@34.159.40.118:26656,62771c2083623cb6db6eda99f404036759c5f4b3@65.109.99.157:16609,a96b7c56cb64c16917a629c9ae0f3b3c0aea584c@35.234.89.188:26656,b844793daeffaedfcdbd5b08688cd10e1859d678@37.120.245.116:26656,790544e857cfe673cab570668131aa7ae2be7e5d@178.63.100.102:26656,a0c70d4dcce7b979faaa375a21300efd03001c99@34.48.99.116:26656,c87c1b17045b27fd14b13d7dbb3469a2248cb1f7@95.217.204.58:24356,637077d431f618181597706810a65c826524fd74@5.9.151.56:24356,d93bbc2d467800a10581d38261041d7dc0bcc4cd@158.220.90.61:26656,e097dc629cbe874b139841dedb06775cc75435ee@65.108.237.188:20656,7bad33a03bec7c0bd174a386045d5ff583b39570@95.216.7.84:36656,c1499d43cf198e2bc5490b9e2018ef22cd657d89@65.108.81.240:26656,d0478546164151adfc225ebc52509736bb05375a@173.234.17.129:26656,ee1265e95bcbfbeff7d096befe17e24c88549c65@65.108.9.83:11356,f282af2ba286abb9d4aab611a8f39176c26d6928@213.239.207.175:61656,e9376f40ac2b672e9f2f66ad212f59801d53afe8@178.162.165.193:26656,9d7dbaa0cb7f28ab8926c738860c18bd6d00aaaf@168.119.75.89:26656,c597aa118302d417e039e5a81d722422e73c85e1@135.125.67.227:26656,a950d48fce4a648aacf7327198e6ea3e545f3112@168.119.166.138:26656,e3edeec5261ec00ba4a87cdd419f601ee5e5e063@109.199.118.239:11356,473303f1a0dff43121cff9b7a12b5b39a42bc46c@37.27.31.253:26656,75f56904bf31a89b4b085eeaaf0fcea04311abed@113.176.142.7:10056,923758c6f7adaec3c9a668dc74ba28fda7066b1c@65.109.120.211:24656,c91ca713d48dac1ac940da53db1ff99cedb3f171@154.38.172.102:10256"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.selfchain/config/config.toml
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.005uslf\"/" $HOME/.selfchain/config/app.toml
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.selfchain/config/config.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.selfchain/config/config.toml


# Config Pruning
pruning="custom"
pruning_keep_recent="100"
pruning_keep_every="0"
pruning_interval="19"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.selfchain/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.selfchain/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.selfchain/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.selfchain/config/app.toml


# Set Custom Port
sed -i -e "s%:1317%:${SELFCHAIN_PORT}17%; s%:8080%:${SELFCHAIN_PORT}80%; s%:9090%:${SELFCHAIN_PORT}90%; s%:9091%:${SELFCHAIN_PORT}91%; s%:8545%:${SELFCHAIN_PORT}45%; s%:8546%:${SELFCHAIN_PORT}46%; s%:6065%:${SELFCHAIN_PORT}65%" $HOME/.selfchain/config/app.toml
sed -i -e "s%:26658%:${SELFCHAIN_PORT}58%; s%:26657%:${SELFCHAIN_PORT}57%; s%:6060%:${SELFCHAIN_PORT}60%; s%:26656%:${SELFCHAIN_PORT}56%; s%:26660%:${SELFCHAIN_PORT}61%" $HOME/.selfchain/config/config.toml


# Set Service File
sudo tee /etc/systemd/system/selfchaind.service > /dev/null <<EOF
[Unit]
Description=selfchain-mainnet
After=network-online.target

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

[Install]
WantedBy=multi-user.target
EOF


# Enable and Start Service
sudo systemctl daemon-reload
sudo systemctl enable selfchaind
sudo systemctl start selfchaind && sudo journalctl -fu selfchaind -o cat
```

## Auto Installation

```bash
wget https://snapshot.syanodes.my.id/auto/mainnet/selfchain_auto && chmod +x selfchain_auto && ./selfchain_auto
```


# Snapshot & State sync

## Snapshot

```bash
sudo systemctl stop selfchaind

cp $HOME/.selfchain/data/priv_validator_state.json $HOME/.selfchain/priv_validator_state.json.backup
selfchaind tendermint unsafe-reset-all --home ~/.selfchain/ --keep-addr-book

curl https://snapshot2.syanodes.my.id/selfchain/snapshot2-selfchain.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.selfchain

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

sudo systemctl restart selfchaind && sudo journalctl -fu selfchaind -o cat
```

## State Sync

```bash
sudo systemctl stop selfchaind

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

peers="b307b56b94bd3a02fcad5b6904464a391e13cf48@128.199.33.181:26656,71b8d630e7c3e31f2743fda68e6d3ac64f41cece@209.97.174.97:26656,6ae10267d8581414b37553655be22297b2f92087@174.138.25.159:26656"
PEERS="6ae10267d8581414b37553655be22297b2f92087@174.138.25.159:26656,b307b56b94bd3a02fcad5b6904464a391e13cf48@128.199.33.181:26656,34c3a8a2955b4d6e5deef15c6b091250f5878afe@18.117.74.150:26656,4c8b8296e767cf3d67355dba98781ee0348e87ea@144.76.30.94:30056,c139f537755d5614a3ceaeb0f01b03be94e7ecb5@162.19.171.121:26656,6a3a0db2763d8222d00af55cbbe35824a39c8292@176.9.183.45:34656,e22a53afe2caa3aafae89edec68531e5dffa071f@188.40.72.97:26656,7a9038d1efd34c7f3baea17d8822262a981568b1@217.182.136.79:30156,f238d6a52578975198ceac2b0c2b004d49d5613f@88.198.5.77:31656,8401cbf633c496e464a2d016b333f61ff34e9ee9@167.71.233.135:26656,aab5f0267427d9dbd840fd04e634a02837d44365@51.77.20.28:25565,c743758973f5543578949228ff623918a4b43c54@165.232.177.11:26656,e5b970c7b4e9b0281fc2fc58166c9e9af476c9a3@46.4.23.120:58656,0a67ac1518c816e1927554dfc17c47f4ee457bcb@168.119.75.88:36656,2f547f93392d7351c74a0d8cae1d44f172cf32e5@64.227.156.23:26656,55d3e1761d6752eeb72b8b86decbca0d56f6a885@159.89.173.150:26656,02982b993b659c377238db477ae3698065ebc941@13.250.113.56:26656,9512a59cf93b987aff830148421a514cacb8a1b8@170.64.141.15:26656,024aa95bbdcef24d8d55c04f9c4de2fec2bc3bf6@34.159.240.168:26656,5fec0f158870a9e82e8a48fed83a78d567fb639a@167.235.12.38:22156,7efdc46e50e03e1f1208c8f276047b7fea345cc8@34.159.40.118:26656,62771c2083623cb6db6eda99f404036759c5f4b3@65.109.99.157:16609,a96b7c56cb64c16917a629c9ae0f3b3c0aea584c@35.234.89.188:26656,b844793daeffaedfcdbd5b08688cd10e1859d678@37.120.245.116:26656,790544e857cfe673cab570668131aa7ae2be7e5d@178.63.100.102:26656,a0c70d4dcce7b979faaa375a21300efd03001c99@34.48.99.116:26656,c87c1b17045b27fd14b13d7dbb3469a2248cb1f7@95.217.204.58:24356,637077d431f618181597706810a65c826524fd74@5.9.151.56:24356,d93bbc2d467800a10581d38261041d7dc0bcc4cd@158.220.90.61:26656,e097dc629cbe874b139841dedb06775cc75435ee@65.108.237.188:20656,7bad33a03bec7c0bd174a386045d5ff583b39570@95.216.7.84:36656,c1499d43cf198e2bc5490b9e2018ef22cd657d89@65.108.81.240:26656,d0478546164151adfc225ebc52509736bb05375a@173.234.17.129:26656,ee1265e95bcbfbeff7d096befe17e24c88549c65@65.108.9.83:11356,f282af2ba286abb9d4aab611a8f39176c26d6928@213.239.207.175:61656,e9376f40ac2b672e9f2f66ad212f59801d53afe8@178.162.165.193:26656,9d7dbaa0cb7f28ab8926c738860c18bd6d00aaaf@168.119.75.89:26656,c597aa118302d417e039e5a81d722422e73c85e1@135.125.67.227:26656,a950d48fce4a648aacf7327198e6ea3e545f3112@168.119.166.138:26656,e3edeec5261ec00ba4a87cdd419f601ee5e5e063@109.199.118.239:11356,473303f1a0dff43121cff9b7a12b5b39a42bc46c@37.27.31.253:26656,75f56904bf31a89b4b085eeaaf0fcea04311abed@113.176.142.7:10056,923758c6f7adaec3c9a668dc74ba28fda7066b1c@65.109.120.211:24656,c91ca713d48dac1ac940da53db1ff99cedb3f171@154.38.172.102:10256"
SNAP_RPC="https://selfchain-m-rpc.syanodes.my.id:443"

sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.selfchain/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/.selfchain/config/config.toml

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

sudo systemctl restart selfchaind && sudo journalctl -fu selfchaind -o cat
```


# Useful commands

```bash
# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export SELFCHAIN_CHAIN_ID="self-1"" >> $HOME/.bash_profile
source $HOME/.bash_profile
```

### WALLET MANAGEMENT

{% hint style="info" %}
*Add Wallet Specify the value \<wallet> with your own wallet name*
{% endhint %}

```bash
#Add new wallet
selfchaind keys add wallet

#Recover Wallet
selfchaind keys add wallet --recover

#List Wallet
selfchaind keys list

#Delete Wallet
selfchaind keys delete wallet

#Check Wallet Balance
selfchaind q bank balances $(selfchaind keys show wallet -a)
```

### VALIDATOR MANAGEMENT

{% hint style="info" %}
*Please adjust , MONIKER , YOUR\_KEYBASE\_ID , YOUR\_DETAILS , YOUR\_WEBSITE\_URL*
{% endhint %}

```bash
#Create Validator
selfchaind tx staking create-validator \
--amount=10000000uslf \
--pubkey=$(selfchaind tendermint show-validator) \
--moniker=$MONIKER \
--identity="YOUR_KEYBASE_ID" \
--details="YOUR_DETAILS" \
--website="YOUR_WEBSITE_URL" \
--chain-id=$SELFCHAIN_CHAIN_ID \
--commission-rate=0.10 \
--commission-max-rate=0.20 \
--commission-max-change-rate=0.01 \
--min-self-delegation=1000 \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices=10uslf\ 
-y

#Edit Validator
selfchaind tx staking edit-validator \
--new-moniker="YOUR MONIKER" \
--identity="IDENTITY KEYBASE" \
--details="DETAILS VALIDATOR" \
--website="LINK WEBSITE" \
--chain-id=$SELFCHAIN_CHAIN_ID \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices=10uslf\ 
-y

#Unjail Validator
selfchaind tx slashing unjail --from wallet --chain-id $SELFCHAIN_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10uslf -y

#Check Jailed Reason
selfchaind query slashing signing-info $(selfchaind tendermint show-validator)
```

### TOKEN MANAGEMENT

```bash
#Withdraw Rewards
selfchaind tx distribution withdraw-all-rewards --from wallet --chain-id $SELFCHAIN_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10uslf -y

#Withdraw Rewards with Comission
selfchaind tx distribution withdraw-rewards $(selfchaind keys show wallet --bech val -a) --commission --from wallet --chain-id $SELFCHAIN_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10uslf -y

#Delegate Token to your own validator
selfchaind tx staking delegate $(selfchaind keys show wallet --bech val -a) 1000000uslf --from wallet --chain-id $SELFCHAIN_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10uslf -y

#Delegate Token to other validator
selfchaind tx staking redelegate $(selfchaind keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> 1000000uslf --from wallet --chain-id $SELFCHAIN_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10uslf -y

#Unbond Token from your validator
selfchaind tx staking unbond $(selfchaind keys show wallet --bech val -a) 1000000uslf --from wallet --chain-id $SELFCHAIN_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10uslf -y

#Send Token to another wallet
selfchaind tx bank send wallet <TO_WALLET_ADDRESS> 1000000uslf --from wallet --chain-id $SELFCHAIN_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10uslf -y
```

### GOVERNANCE

```bash
#Vote, You can change the value of yes to no,abstain,nowithveto
selfchaind tx gov vote 1 yes --from wallet --chain-id $SELFCHAIN_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10uslf -y

#List all proposals
selfchaind query gov proposals

#Create new text proposal
selfchaind tx gov submit-proposal \
--title="Title" \
--description="Description" \
--deposit=100000000uslf \
--type="Text" \
--from=wallet \
--gas-adjustment 1.5 \
--gas "auto" \
--gas-prices=10uslf\ 
-y 
```

### SERVICES MANAGEMENT

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

# Enable Service
sudo systemctl enable selfchaind

# Disable Service
sudo systemctl disable selfchaind

# Start Service
sudo systemctl start selfchaind

# Stop Service
sudo systemctl stop selfchaind

# Restart Service
sudo systemctl restart selfchaind

# Check Service Status
sudo systemctl status selfchaind

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

### UTILITY

```bash
#Set Indexer NULL / KV
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.selfchain/config/config.toml

#Get Validator info
selfchaind status 2>&1 | jq .ValidatorInfo

#Get denom info
selfchaind q bank denom-metadata -oj | jq

#Get sync status
selfchaind status 2>&1 | jq .SyncInfo.catching_up

#Get latest height
selfchaind status 2>&1 | jq .SyncInfo.latest_block_height

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

### DELETE NODE

{% hint style="warning" %} <mark style="color:red;">**WARNING! Use this command wisely Backup your key first it will remove node from your system**</mark>
{% endhint %}

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


# Shentu

<figure><img src="https://3732959305-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fr1ChzocIBBGBlfbyRi9s%2Fuploads%2FeUganjubxCP4P3kcSmHf%2Fshentu.jpg?alt=media&amp;token=bbb24a57-1abd-459d-ac0a-4641c2238a5f" alt="" width="200"><figcaption></figcaption></figure>

A Cross-Chain Protocol with Security Scoring and Decentralized Reimbursements for Building Secure dApps.

| Chain ID   | Latest Version Tag |
| ---------- | ------------------ |
| shentu-2.2 | v2.14.0            |

### Public endpoints <a href="#public-endpoints" id="public-endpoints"></a>

* Api : <https://shentu-m-api.syanodes.my.id>
* Rpc :  <https://shentu-m-rpc.syanodes.my.id>
* grpc with ssl/tls: shentu-m-grpc.syanodes.my.id:443

### Links

[Website](https://www.shentu.technology/) | [Discord](https://discord.com/invite/6nfAk956NH) | [Twitter](https://twitter.com/ShentuChain)

***


# Node Installation

### Hardware requirements The following requirements are recommended for running SHENTU:

* **6 or more physical CPU cores**
* **At least 1TB of SSD disk storage**
* **At least 16GB of memory (RAM)**
* **At least 500mbps network bandwidth**

## Manual Installation

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

# Install Go
cd $HOME
VER="1.22.2"
wget "https://golang.org/dl/go$VER.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$VER.linux-amd64.tar.gz"
rm "go$VER.linux-amd64.tar.gz"
[ ! -f ~/.bash_profile ] && touch ~/.bash_profile
echo "export PATH=$PATH:/usr/local/go/bin:~/go/bin" >> ~/.bash_profile
source $HOME/.bash_profile
[ ! -d ~/go/bin ] && mkdir -p ~/go/bin
go version


# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export SHENTU_CHAIN_ID="shentu-2.2"" >> $HOME/.bash_profile
echo "export SHENTU_PORT="103"" >> $HOME/.bash_profile
source $HOME/.bash_profile


# Download Binary
cd $HOME
rm -rf shentu
git clone https://github.com/shentufoundation/shentu
cd shentu
git checkout v2.14.1
make install


# Config and Init App
shentud config node tcp://localhost:${SHENTU_PORT}57
shentud config chain-id $SHENTU_CHAIN_ID
shentud init $MONIKER --chain-id $SHENTU_CHAIN_ID


# Add Genesis File and Addrbook
wget -O $HOME/.shentud/config/genesis.json https://testnet-files.syanodes.my.id/shentu-m-genesis.json
wget -O $HOME/.shentud/config/addrbook.json https://testnet-files.syanodes.my.id/shentu-m-addrbook.json


#Configure Seeds and Peers
SEEDS=""
PEERS="1480912d16f26b5ea1c4fea2496da95e44cbe845@65.109.115.226:14056,6b01cefc02a93829c864808dddb0c19a2dae7981@150.136.100.41:26656,100aee4f6928d09e3dddfd0c5028cf127509bbd9@162.55.132.48:15607,147eeac0de54a973ade15e46ca427b70d0d535b2@135.181.128.114:14056,9c0b20c318d0ee8f84475ad47afed59b24ba2ea4@95.217.193.17:26656,ecbb18ee93e2aa521706479772ee85cedb2b55cb@49.12.170.121:30022,7f70fb892b68a0a578282683512528aa860b428d@69.197.14.8:26656,065f66f818c1dfd41cf6aa434c21056339b5528d@136.243.39.175:36656,70afecb1dd5c79a378a47ce8bd5197c97997280c@23.88.72.34:14031,a8cd59ec2777e95d5b25278fd46f5069b2f8c25a@5.9.97.174:15607,e75aab6f20e0ac794e9aae1c18c89e428d381bda@195.201.167.242:26656,e3acfacbd8f08c8e61925a3363187b2737022407@47.253.53.245:26656,8888cb6071b560e2a5393394ea8d6babaaa33184@178.238.228.120:26656,2ab1b30a04a1dce6ff50cab40fc0ef690eb048ea@51.210.99.161:26956,b6d870a3925baf56a70ea4d0a6a86f71d021257c@31.220.77.51:26656,867a2986f28575b1fde864136862fde465cac17c@47.253.209.134:26656,986db6bec66e0685d044479ec7567dd6f6cd60cb@45.92.9.174:26656,35cfb70f821827044a1e86c0bc7125f3043fb5bf@5.9.145.125:15604,599c6ba28683b66519f011286b34811a47b6d60a@164.152.161.131:26656,e616367f0198bd5cff20edf1ae63d6aa8dac7ede@98.70.42.191:26656,94e911d79176c2ac90ce545b212429460dd34d5e@35.74.10.164:6656,cdbe37fc5ea42278285dceb90a4fc35e88d1bde9@47.75.91.185:28656,dd4c01118677ab6b683ed3bf6d5b192187a95c40@65.108.230.113:20016,baa8cfcad0eff850ef4e0f159bb9b4af620ae019@202.55.85.83:26656,9755cab2585a2794453a5b396ef13b893393366f@65.108.212.224:46656,648c22816fdd2dc41fca47bde27f74b68b2886de@188.40.89.163:27656,4ba9e5d38b3bd2fbef58c05758c94f0fc8595317@195.3.221.70:15607,ed4db976ce074bfda0f436790f00e5a0716b4cc7@94.250.202.43:14056,37c06d834bf8ba3816c9d74a268c4458e5a69b27@95.217.192.124:29856,0494d17e2cbe835c7e85a073c7c4f0b6dc17d834@31.7.196.49:26656,c55a0d3082a5b833e8e6d8819fd0be431b9cbc74@69.197.43.23:26656,f566d1a6dbed50da77e8799d1700b47590b8c899@95.217.34.147:41656,471518432477e31ea348af246c0b54095d41352c@169.155.171.120:26656,0d80e7cbdffd8a1db1477805ff51a2baf6268f0d@164.90.229.157:26656,bc1d1645903a3ace446e1168c8efb3f634268f0e@153.139.245.108:26656,35113819447f4d86b7cccd4e2c429c5c37aa89e4@51.81.49.59:14056,3c1740cb7d646a31bc3236a7fb3cba1cc87eb08e@5.9.147.138:28656,c7f47b19bad10c2222ad528c73627a14e0108e9d@95.217.116.103:26456,6146648cd0fee9f2e90eedb255c6c315bcee041b@178.63.93.41:26656,f027517455d3f7c105f405365609e4355ca41660@136.243.13.186:3000,89757803f40da51678451735445ad40d5b15e059@169.155.169.81:26656,a074234450b43bb260d93210d6d02d99154c5c7b@139.177.199.173:26656,4e1c2471efb89239fb04a4b75f9f87177fd91d00@169.155.171.114:26656,57715cae6d2cfe621dfc501f156063cb466d4aa8@65.108.126.22:26656,b0690ba7a9cf755fc46486d45b5fd30d0da443de@78.47.143.61:26656,13e5b092aa878dcc54456040e12e57521124bb5c@85.10.203.212:26656,dcceb7e119765d6ff54cb16fef8d008ba9099d56@52.202.184.217:26656,94022bb1d17695c361f50253dfb927a414653b3a@79.18.149.68:26656,05d4bf2e7b85fdf10a18d97308e5471d4cd80a6c@142.132.203.173:26656,9023d9a3d60f147514129aabe6f6b60cfa4ee128@194.195.213.37:26656,b212d5740b2e11e54f56b072dc13b6134650cfb5@164.152.160.117:26656,259259325c4d060fa92209d5e2d456aefa2ef941@69.197.19.19:26656,e1754812621b14c4a993dd354a85421538284da4@89.58.59.44:26656,43b923d403b569575fbee4eef1c0fb0c5d39be2f@165.232.72.33:26656,75f067aa1d40ddadb1d32606fdbff16683e4b9d3@37.27.58.244:26656,fe3b71b0628a9af8625ffd05abeb3bafe9d2226f@168.119.240.200:46656,cde6a6e04537a5e61ebf4201e703e0288b89e2ff@49.12.86.120:26716,938e6f08513926070bba7e6402cbe61ca49b28b9@176.31.207.237:26656,557b26424ad88787a97782bbd877d9c2b8f18eb5@47.242.124.43:26656,a9f5bc2294cd41b3677337305309ae9687dfa8d5@8.208.44.201:26656,9abf31887c1be97cafac77c58644acbbffce0639@87.98.179.97:26656,c69d7772b7e87ce3df72fbb37a9eaab4c5375bcf@71.236.119.108:19656,8f91d396e3395210ef3a8394d48d1888af6d01cd@142.132.202.86:56656,b53388d8791e99935e4f2c85d8b4eb4731c03c77@37.252.186.107:3000,9b4779c49c80444627e37762c3e82971710336a6@34.195.53.91:26656,6d536d8c75f09f33ad628d0fc12a536655aadbfe@65.109.35.60:26656,776ed2479dcb3e66f7b7ba71a05960e63975b0ec@8.208.114.10:26656,93ca38856c1c18e5902a71acc21084f9b2d7978e@54.248.13.68:26656,1fa010a89dedf7dbb91c8239a4fe00c14ffe8715@161.97.133.184:26656,2ebb532c683bec7deb38132f79ff71994745500e@47.253.199.201:26656,1bb63182746372ca3d1f5656f74d83f1ee2f83a8@46.101.197.245:31457,9bb87ff793b464cc1c1d28f07442fb1c1cf82b0b@142.132.146.164:15607,f092c40e4e2a7ab48cfcba38ffa61b6ee04b0b83@150.136.10.254:26656,7114295ffa36c2c1eb09265f5a1849709227dce8@185.147.80.82:26656,f3500190fbd2dadbe1df11a5bcba9034bc271586@57.128.21.247:26656,486df17d82506d6445879060f7d2a5d8ffc5d819@138.201.53.99:26656,5b73f98db91d006f7da1db22244bc316f6b3742e@95.111.244.78:26706,e3f35c5abe22423f654c5e1b33318fbee7503cb3@149.202.64.145:27656,782d1fa966a29cf2cda2c58f15ed5c8e29081750@54.150.71.183:26656,cfcb7288f9ca5ef86ad24b9e755ed1e5555cef60@54.247.115.161:26656,0d3d0a4464a7e4c0eeee427dc0ddbed6deadc156@47.253.99.164:26656,7761c39ad4db60ec9da0ffbe54e91276ba0c1814@65.21.180.80:26656,06360daff2b780ef30efd97650cc5592e0c6fca1@172.110.97.188:12456,d4cbdef21bde1fde444cd31f5a2842c76268f210@94.250.203.213:26656,3046c57c29c290717ed8d079a9e15703bd0d1559@62.171.183.34:26656,3ca62ad1846b426835f28fd81ccd748007fb51c2@49.13.15.59:26656,504d57dce32894491b0c16a2ec4f598d9f0fcf26@198.244.228.17:12456,74ceb11da633e2526388ab363c0f7ed9ba699459@35.75.32.253:6656,fe1570344c2687080c39c6b8141f2654420ced46@69.197.43.19:26656,24f51fdfdc1a02d44e4597930de84b35ff556de1@85.190.254.32:26756,4ba3f83efc53c834ba27eb22452840ee74aecf45@85.215.105.19:15604,e726816f42831689eab9378d5d577f1d06d25716@169.155.47.6:26656,be3d05b4042d3b2404926fec1d37fe42ef455f63@135.181.163.185:26656,6abc14fdb30ea57be013a9021ffb75378fe4d11c@178.18.250.33:14056,fde82d689793ab4fa79dfaec754c016dc837f8ea@69.197.26.21:26656,0501d3c446ddae9a2412a3da6fc699bc99404a8f@144.217.252.56:26656,580f36f526bf72413c0e06111ad69fed1ca28cf1@142.132.253.13:24656,6f9bbce23f674829d8a5c306f5c75c21b7fead9b@78.47.87.115:26656,caed060e714a2715c626cf2f4d1f6cba8fb24a71@65.108.73.245:28656,a3ecf3b7e5d3aca7d853af38ad9d9f3e2d6f4ac7@47.241.32.139:26656,4dff83b8e2170e6fd9d027e2a092d52875c6c589@69.197.23.4:26656,f97807210f9547b8a5016fb18000b46072ca5e30@135.181.113.227:2407,e0a3d96af35f9e53941ae2ed1cf369844fe08f46@95.165.89.222:25656,2ee447610cf2142052b9acab2d003c8c614a91db@57.129.17.74:15200,02881614efedebdb2c25497e53725c92b8f03c08@69.197.5.39:26656,70256dea192d65b1476a007a06bf8bedf068edc6@38.242.128.248:26656,a02464208eb2aa8b78286e2191a278bacd05bc0f@113.176.163.161:26656,9e2f3706ccd8a3b0993a11f1a32a15f4b4513751@167.235.100.136:26656,69baae39041ca1fca854de2ea9fd3367859d95b4@185.208.206.52:14056,a6d64ac8796f4b2db4e2f3e7dcca3c12a73d0978@198.244.167.22:26656,18a9e4366f40ff32077478d6b99c84d0cce15825@158.247.201.157:15200,060027d3bc10ff7ebc1ec315ae5671c541e1568c@66.45.246.166:20016,e07642bc1129a6d9f0e19c8e883476fb564d6674@5.189.128.119:46656,2805d33ce596bd810791d5a38f86ccd9cdc053e4@141.95.66.131:14056,ade4d8bc8cbe014af6ebdf3cb7b1e9ad36f412c0@135.181.5.219:14056"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.shentud/config/config.toml
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0uctk\"/" $HOME/.shentud/config/app.toml
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.shentud/config/config.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.shentud/config/config.toml


# Config Pruning
pruning="custom"
pruning_keep_recent="100"
pruning_keep_every="0"
pruning_interval="19"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.shentud/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.shentud/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.shentud/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.shentud/config/app.toml


# Set Custom Port
sed -i -e "s%:1317%:${SHENTU_PORT}17%; s%:8080%:${SHENTU_PORT}80%; s%:9090%:${SHENTU_PORT}90%; s%:9091%:${SHENTU_PORT}91%; s%:8545%:${SHENTU_PORT}45%; s%:8546%:${SHENTU_PORT}46%; s%:6065%:${SHENTU_PORT}65%" $HOME/.shentud/config/app.toml
sed -i -e "s%:26658%:${SHENTU_PORT}58%; s%:26657%:${SHENTU_PORT}57%; s%:6060%:${SHENTU_PORT}60%; s%:26656%:${SHENTU_PORT}56%; s%:26660%:${SHENTU_PORT}61%" $HOME/.shentud/config/config.toml


# Set Service File
sudo tee /etc/systemd/system/shentud.service > /dev/null <<EOF
[Unit]
Description=shentu-mainnet
After=network-online.target

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

[Install]
WantedBy=multi-user.target
EOF


# Enable and Start Service
sudo systemctl daemon-reload
sudo systemctl enable shentud
sudo systemctl start shentud && sudo journalctl -fu shentud -o cat
```

## Auto Installation

```bash
wget https://snapshot.syanodes.my.id/auto/mainnet/shentu_auto && chmod +x shentu_auto && ./shentu_auto
```


# Upgrade

## Manual Upgrade

**upgrade at height** [24865200](https://explorer.syanodes.my.id/shentu-mainnet/block/24865200)

```bash
cd $HOME
wget -O shentud https://github.com/shentufoundation/shentu/releases/download/v2.15.0/shentud_2.15.0_linux_amd64
chmod +x shentud
sudo mv $HOME/shentud $(which shentud)
sudo systemctl restart shentud && sudo journalctl -fu shentud -o cat
```


# Snapshot & State sync

## Snapshot

```bash
sudo systemctl stop shentud

cp $HOME/.shentud/data/priv_validator_state.json $HOME/.shentud/priv_validator_state.json.backup
shentud tendermint unsafe-reset-all --home ~/.shentud/ --keep-addr-book

curl https://ss.syanodes.my.id/shentu/ss-shentu.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.shentud

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

sudo systemctl restart shentud && sudo journalctl -fu shentud -o cat
```

## State Sync

```bash
sudo systemctl stop shentud

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

peers="1480912d16f26b5ea1c4fea2496da95e44cbe845@65.109.115.226:14056,6b01cefc02a93829c864808dddb0c19a2dae7981@150.136.100.41:26656,100aee4f6928d09e3dddfd0c5028cf127509bbd9@162.55.132.48:15607,147eeac0de54a973ade15e46ca427b70d0d535b2@135.181.128.114:14056,9c0b20c318d0ee8f84475ad47afed59b24ba2ea4@95.217.193.17:26656,ecbb18ee93e2aa521706479772ee85cedb2b55cb@49.12.170.121:30022,7f70fb892b68a0a578282683512528aa860b428d@69.197.14.8:26656,065f66f818c1dfd41cf6aa434c21056339b5528d@136.243.39.175:36656,70afecb1dd5c79a378a47ce8bd5197c97997280c@23.88.72.34:14031,a8cd59ec2777e95d5b25278fd46f5069b2f8c25a@5.9.97.174:15607,e75aab6f20e0ac794e9aae1c18c89e428d381bda@195.201.167.242:26656,e3acfacbd8f08c8e61925a3363187b2737022407@47.253.53.245:26656,8888cb6071b560e2a5393394ea8d6babaaa33184@178.238.228.120:26656,2ab1b30a04a1dce6ff50cab40fc0ef690eb048ea@51.210.99.161:26956,b6d870a3925baf56a70ea4d0a6a86f71d021257c@31.220.77.51:26656,867a2986f28575b1fde864136862fde465cac17c@47.253.209.134:26656,986db6bec66e0685d044479ec7567dd6f6cd60cb@45.92.9.174:26656,35cfb70f821827044a1e86c0bc7125f3043fb5bf@5.9.145.125:15604,599c6ba28683b66519f011286b34811a47b6d60a@164.152.161.131:26656,e616367f0198bd5cff20edf1ae63d6aa8dac7ede@98.70.42.191:26656,94e911d79176c2ac90ce545b212429460dd34d5e@35.74.10.164:6656,cdbe37fc5ea42278285dceb90a4fc35e88d1bde9@47.75.91.185:28656,dd4c01118677ab6b683ed3bf6d5b192187a95c40@65.108.230.113:20016,baa8cfcad0eff850ef4e0f159bb9b4af620ae019@202.55.85.83:26656,9755cab2585a2794453a5b396ef13b893393366f@65.108.212.224:46656,648c22816fdd2dc41fca47bde27f74b68b2886de@188.40.89.163:27656,4ba9e5d38b3bd2fbef58c05758c94f0fc8595317@195.3.221.70:15607,ed4db976ce074bfda0f436790f00e5a0716b4cc7@94.250.202.43:14056,37c06d834bf8ba3816c9d74a268c4458e5a69b27@95.217.192.124:29856,0494d17e2cbe835c7e85a073c7c4f0b6dc17d834@31.7.196.49:26656,c55a0d3082a5b833e8e6d8819fd0be431b9cbc74@69.197.43.23:26656,f566d1a6dbed50da77e8799d1700b47590b8c899@95.217.34.147:41656,471518432477e31ea348af246c0b54095d41352c@169.155.171.120:26656,0d80e7cbdffd8a1db1477805ff51a2baf6268f0d@164.90.229.157:26656,bc1d1645903a3ace446e1168c8efb3f634268f0e@153.139.245.108:26656,35113819447f4d86b7cccd4e2c429c5c37aa89e4@51.81.49.59:14056,3c1740cb7d646a31bc3236a7fb3cba1cc87eb08e@5.9.147.138:28656,c7f47b19bad10c2222ad528c73627a14e0108e9d@95.217.116.103:26456,6146648cd0fee9f2e90eedb255c6c315bcee041b@178.63.93.41:26656,f027517455d3f7c105f405365609e4355ca41660@136.243.13.186:3000,89757803f40da51678451735445ad40d5b15e059@169.155.169.81:26656,a074234450b43bb260d93210d6d02d99154c5c7b@139.177.199.173:26656,4e1c2471efb89239fb04a4b75f9f87177fd91d00@169.155.171.114:26656,57715cae6d2cfe621dfc501f156063cb466d4aa8@65.108.126.22:26656,b0690ba7a9cf755fc46486d45b5fd30d0da443de@78.47.143.61:26656,13e5b092aa878dcc54456040e12e57521124bb5c@85.10.203.212:26656,dcceb7e119765d6ff54cb16fef8d008ba9099d56@52.202.184.217:26656,94022bb1d17695c361f50253dfb927a414653b3a@79.18.149.68:26656,05d4bf2e7b85fdf10a18d97308e5471d4cd80a6c@142.132.203.173:26656,9023d9a3d60f147514129aabe6f6b60cfa4ee128@194.195.213.37:26656,b212d5740b2e11e54f56b072dc13b6134650cfb5@164.152.160.117:26656,259259325c4d060fa92209d5e2d456aefa2ef941@69.197.19.19:26656,e1754812621b14c4a993dd354a85421538284da4@89.58.59.44:26656,43b923d403b569575fbee4eef1c0fb0c5d39be2f@165.232.72.33:26656,75f067aa1d40ddadb1d32606fdbff16683e4b9d3@37.27.58.244:26656,fe3b71b0628a9af8625ffd05abeb3bafe9d2226f@168.119.240.200:46656,cde6a6e04537a5e61ebf4201e703e0288b89e2ff@49.12.86.120:26716,938e6f08513926070bba7e6402cbe61ca49b28b9@176.31.207.237:26656,557b26424ad88787a97782bbd877d9c2b8f18eb5@47.242.124.43:26656,a9f5bc2294cd41b3677337305309ae9687dfa8d5@8.208.44.201:26656,9abf31887c1be97cafac77c58644acbbffce0639@87.98.179.97:26656,c69d7772b7e87ce3df72fbb37a9eaab4c5375bcf@71.236.119.108:19656,8f91d396e3395210ef3a8394d48d1888af6d01cd@142.132.202.86:56656,b53388d8791e99935e4f2c85d8b4eb4731c03c77@37.252.186.107:3000,9b4779c49c80444627e37762c3e82971710336a6@34.195.53.91:26656,6d536d8c75f09f33ad628d0fc12a536655aadbfe@65.109.35.60:26656,776ed2479dcb3e66f7b7ba71a05960e63975b0ec@8.208.114.10:26656,93ca38856c1c18e5902a71acc21084f9b2d7978e@54.248.13.68:26656,1fa010a89dedf7dbb91c8239a4fe00c14ffe8715@161.97.133.184:26656,2ebb532c683bec7deb38132f79ff71994745500e@47.253.199.201:26656,1bb63182746372ca3d1f5656f74d83f1ee2f83a8@46.101.197.245:31457,9bb87ff793b464cc1c1d28f07442fb1c1cf82b0b@142.132.146.164:15607,f092c40e4e2a7ab48cfcba38ffa61b6ee04b0b83@150.136.10.254:26656,7114295ffa36c2c1eb09265f5a1849709227dce8@185.147.80.82:26656,f3500190fbd2dadbe1df11a5bcba9034bc271586@57.128.21.247:26656,486df17d82506d6445879060f7d2a5d8ffc5d819@138.201.53.99:26656,5b73f98db91d006f7da1db22244bc316f6b3742e@95.111.244.78:26706,e3f35c5abe22423f654c5e1b33318fbee7503cb3@149.202.64.145:27656,782d1fa966a29cf2cda2c58f15ed5c8e29081750@54.150.71.183:26656,cfcb7288f9ca5ef86ad24b9e755ed1e5555cef60@54.247.115.161:26656,0d3d0a4464a7e4c0eeee427dc0ddbed6deadc156@47.253.99.164:26656,7761c39ad4db60ec9da0ffbe54e91276ba0c1814@65.21.180.80:26656,06360daff2b780ef30efd97650cc5592e0c6fca1@172.110.97.188:12456,d4cbdef21bde1fde444cd31f5a2842c76268f210@94.250.203.213:26656,3046c57c29c290717ed8d079a9e15703bd0d1559@62.171.183.34:26656,3ca62ad1846b426835f28fd81ccd748007fb51c2@49.13.15.59:26656,504d57dce32894491b0c16a2ec4f598d9f0fcf26@198.244.228.17:12456,74ceb11da633e2526388ab363c0f7ed9ba699459@35.75.32.253:6656,fe1570344c2687080c39c6b8141f2654420ced46@69.197.43.19:26656,24f51fdfdc1a02d44e4597930de84b35ff556de1@85.190.254.32:26756,4ba3f83efc53c834ba27eb22452840ee74aecf45@85.215.105.19:15604,e726816f42831689eab9378d5d577f1d06d25716@169.155.47.6:26656,be3d05b4042d3b2404926fec1d37fe42ef455f63@135.181.163.185:26656,6abc14fdb30ea57be013a9021ffb75378fe4d11c@178.18.250.33:14056,fde82d689793ab4fa79dfaec754c016dc837f8ea@69.197.26.21:26656,0501d3c446ddae9a2412a3da6fc699bc99404a8f@144.217.252.56:26656,580f36f526bf72413c0e06111ad69fed1ca28cf1@142.132.253.13:24656,6f9bbce23f674829d8a5c306f5c75c21b7fead9b@78.47.87.115:26656,caed060e714a2715c626cf2f4d1f6cba8fb24a71@65.108.73.245:28656,a3ecf3b7e5d3aca7d853af38ad9d9f3e2d6f4ac7@47.241.32.139:26656,4dff83b8e2170e6fd9d027e2a092d52875c6c589@69.197.23.4:26656,f97807210f9547b8a5016fb18000b46072ca5e30@135.181.113.227:2407,e0a3d96af35f9e53941ae2ed1cf369844fe08f46@95.165.89.222:25656,2ee447610cf2142052b9acab2d003c8c614a91db@57.129.17.74:15200,02881614efedebdb2c25497e53725c92b8f03c08@69.197.5.39:26656,70256dea192d65b1476a007a06bf8bedf068edc6@38.242.128.248:26656,a02464208eb2aa8b78286e2191a278bacd05bc0f@113.176.163.161:26656,9e2f3706ccd8a3b0993a11f1a32a15f4b4513751@167.235.100.136:26656,69baae39041ca1fca854de2ea9fd3367859d95b4@185.208.206.52:14056,a6d64ac8796f4b2db4e2f3e7dcca3c12a73d0978@198.244.167.22:26656,18a9e4366f40ff32077478d6b99c84d0cce15825@158.247.201.157:15200,060027d3bc10ff7ebc1ec315ae5671c541e1568c@66.45.246.166:20016,e07642bc1129a6d9f0e19c8e883476fb564d6674@5.189.128.119:46656,2805d33ce596bd810791d5a38f86ccd9cdc053e4@141.95.66.131:14056,ade4d8bc8cbe014af6ebdf3cb7b1e9ad36f412c0@135.181.5.219:14056"
SNAP_RPC="https://shentu-m-rpc.syanodes.my.id:443"

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

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) 

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/.shentud/config/config.toml

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

sudo systemctl restart shentud && sudo journalctl -fu shentud -o cat
```


# Useful commands

```bash
# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export SHENTU_CHAIN_ID="shentu-2.2"" >> $HOME/.bash_profile
source $HOME/.bash_profile
```

### WALLET MANAGEMENT

{% hint style="info" %}
*Add Wallet Specify the value \<wallet> with your own wallet name*
{% endhint %}

```bash
#Add new wallet
shentud keys add wallet

#Recover Wallet
shentud keys add wallet --recover

#List Wallet
shentud keys list

#Delete Wallet
shentud keys delete wallet

#Check Wallet Balance
shentud q bank balances $(shentud keys show wallet -a)
```

### VALIDATOR MANAGEMENT

{% hint style="info" %}
*Please adjust , MONIKER , YOUR\_KEYBASE\_ID , YOUR\_DETAILS , YOUR\_WEBSITE\_URL*
{% endhint %}

```bash
#Create Validator
shentud tx staking create-validator \
--amount=1000000uctk \
--pubkey=$(shentud tendermint show-validator) \
--moniker=$MONIKER \
--identity="YOUR_KEYBASE_ID" \
--details="YOUR_DETAILS" \
--website="YOUR_WEBSITE_URL" \
--chain-id=$SHENTU_CHAIN_ID \
--commission-rate=0.10 \
--commission-max-rate=0.20 \
--commission-max-change-rate=0.01 \
--min-self-delegation=1000 \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices=1uctk\ 
-y

#Edit Validator
shentud tx staking edit-validator \
--new-moniker="YOUR MONIKER" \
--identity="IDENTITY KEYBASE" \
--details="DETAILS VALIDATOR" \
--website="LINK WEBSITE" \
--chain-id=$SHENTU_CHAIN_ID \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices=1uctk\ 
-y

#Unjail Validator
shentud tx slashing unjail --from wallet --chain-id $SHENTU_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uctk -y

#Check Jailed Reason
shentud query slashing signing-info $(shentud tendermint show-validator)
```

### TOKEN MANAGEMENT

```bash
#Withdraw Rewards
shentud tx distribution withdraw-all-rewards --from wallet --chain-id $SHENTU_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uctk -y

#Withdraw Rewards with Comission
shentud tx distribution withdraw-rewards $(shentud keys show wallet --bech val -a) --commission --from wallet --chain-id $SHENTU_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uctk -y

#Delegate Token to your own validator
shentud tx staking delegate $(shentud keys show wallet --bech val -a) 100000uctk --from wallet --chain-id $SHENTU_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uctk -y

#Delegate Token to other validator
shentud tx staking redelegate $(shentud keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> 100000uctk --from wallet --chain-id $SHENTU_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uctk -y

#Unbond Token from your validator
shentud tx staking unbond $(shentud keys show wallet --bech val -a) 100000uctk --from wallet --chain-id $SHENTU_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uctk -y

#Send Token to another wallet
shentud tx bank send wallet <TO_WALLET_ADDRESS> 100000uctk --from wallet --chain-id $SHENTU_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uctk -y
```

### GOVERNANCE

```bash
#Vote, You can change the value of yes to no,abstain,nowithveto
shentud tx gov vote 1 yes --from wallet --chain-id $SHENTU_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uctk -y

#List all proposals
shentud query gov proposals

#Create new text proposal
shentud tx gov submit-proposal \
--title="Title" \
--description="Description" \
--deposit=10000000uctk \
--type="Text" \
--from=wallet \
--gas-adjustment 1.5 \
--gas "auto" \
--gas-prices=1uctk\ 
-y 
```

### SERVICES MANAGEMENT

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

# Enable Service
sudo systemctl enable shentud

# Disable Service
sudo systemctl disable shentud

# Start Service
sudo systemctl start shentud

# Stop Service
sudo systemctl stop shentud

# Restart Service
sudo systemctl restart shentud

# Check Service Status
sudo systemctl status shentud

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

### UTILITY

```bash
#Set Indexer NULL / KV
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.shentud/config/config.toml

#Get Validator info
shentud status 2>&1 | jq .ValidatorInfo

#Get denom info
shentud q bank denom-metadata -oj | jq

#Get sync status
shentud status 2>&1 | jq .SyncInfo.catching_up

#Get latest height
shentud status 2>&1 | jq .SyncInfo.latest_block_height

#Reset Node
shentud tendermint unsafe-reset-all --home $HOME/.shentud --keep-addr-book
```

### DELETE NODE

{% hint style="warning" %} <mark style="color:red;">**WARNING! Use this command wisely Backup your key first it will remove node from your system**</mark>
{% endhint %}

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


# Sommelier

<figure><img src="https://3732959305-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fr1ChzocIBBGBlfbyRi9s%2Fuploads%2FHGfQY2rhamwbeR3s0wtb%2Fsommelier.png?alt=media&amp;token=515fb499-1108-41ce-8f23-2380937be3b0" alt="" width="200"><figcaption></figcaption></figure>

Sommelier aggregates and batches transactions, thereby reducing gas fees, providing an attractive alternative to Ethereum’s high transaction costs. As for security, Sommelier uses a decentralized governance mechanism run by validators, ensuring state-of-the-art safety of user funds. Validators pass strategy instructions across the bridge, but users’ assets are never moved across it, instead being deployed directly into Cellars. Further, Cellars are non-custodial, meaning that users can withdraw their assets at any time, while strategy providers never have ownership of those assets.

| Chain ID    | Latest Version Tag |
| ----------- | ------------------ |
| sommelier-3 | v7.0.1             |

### Public endpoints <a href="#public-endpoints" id="public-endpoints"></a>

* Api : <https://sommelier-m-api.syanodes.my.id>
* Rpc :  <https://sommelier-m-rpc.syanodes.my.id>
* grpc with ssl/tls: sommelier-m-grpc.syanodes.my.id:443

### Links

[Website](https://www.sommelier.finance/) | [Discord](https://discord.gg/sommfinance) | [Twitter](https://twitter.com/sommfinance)

***


# Node Installation

### Hardware requirements The following requirements are recommended for running SOMMELIER:

* **6 or more physical CPU cores**
* **At least 1TB of SSD disk storage**
* **At least 16GB of memory (RAM)**
* **At least 500mbps network bandwidth**

## Manual Installation

```bash
# Update & install dependencies
sudo apt update && sudo apt upgrade -y
sudo apt install clang pkg-config libssl-dev curl git wget htop tmux build-essential jq make lz4 gcc unzip -y


# Install Go
cd $HOME
VER="1.22.2"
wget "https://golang.org/dl/go$VER.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$VER.linux-amd64.tar.gz"
rm "go$VER.linux-amd64.tar.gz"
[ ! -f ~/.bash_profile ] && touch ~/.bash_profile
echo "export PATH=$PATH:/usr/local/go/bin:~/go/bin" >> ~/.bash_profile
source $HOME/.bash_profile
[ ! -d ~/go/bin ] && mkdir -p ~/go/bin
go version


# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export SOMMELIER_CHAIN_ID="sommelier-3"" >> $HOME/.bash_profile
echo "export SOMMELIER_PORT="9"" >> $HOME/.bash_profile
source $HOME/.bash_profile


# Download Binary
cd $HOME
rm -rf sommelier
git clone https://github.com/PeggyJV/sommelier sommelier
cd sommelier
git checkout v7.0.1
make install


# Config and Init App
sommelier init $MONIKER --chain-id $SOMMELIER_CHAIN_ID


# Add Genesis File and Addrbook
wget -O $HOME/.sommelier/config/genesis.json https://testnet-files.syanodes.my.id/sommelier-m-genesis.json
wget -O $HOME/.sommelier/config/addrbook.json https://testnet-files.syanodes.my.id/sommelier-m-addrbook.json


#Configure Seeds and Peers
SEEDS=""
PEERS="4b301813e7db41ed3c8109994e18c0e701b29acd@35.185.11.168:26656,c94fd60124e3656df54ff965d178e36c760c195d@65.108.57.224:26656,4a5b215ae51affa285f70298db3fe826ddc5e871@37.27.114.100:26656,e8e3359cfe774d0cad774a0bf34f53cc5b872703@95.216.161.87:26656,04def519ec8b578bc6d9efaa56eb957a131cf6f3@135.181.192.166:26656,362d69cdada0d5926181c602c40f7a7d97186d87@157.90.95.15:26656,163d9989fb6ff216db571b2a95ce47fb9282f93f@157.90.26.189:26658,9a3795cef9443b37db9f0e769902729e9865f383@51.15.206.33:26656,281bca9514fe002d90a4b3db2a1567f66a0ec357@159.69.66.149:26646,7bb0b626fe74992f07447e5f9239a188317517a7@45.83.104.218:2000,41caa4106f68977e3a5123e56f57934a2d34a1c1@95.214.55.227:27176,733ee0a5a74de20745c5236df015642aa53060bc@57.128.96.155:14156,ebc272824924ea1a27ea3183dd0b9ba713494f83@95.214.52.139:27176,ae3df68c1ac6b7a493504e2871b0ab26e1b9c542@38.109.200.33:26656,75b526dd317ebb1d5500cfa5425c9c7af75f7ebe@51.77.56.47:2000,15861ad4a98ee9a872f85fdace2b23422c796cdf@146.59.81.92:36656,0c3fa55c4308e43cb9761e551998da701435fa1b@47.147.226.147:33656,2a31a7bfadfa1b1365fb2427421845da52b610cd@185.165.170.72:26656,ee74b3c6d5037e2c56bc95b989b0a26643d79aa4@81.0.220.94:24556,75c7972462772278129cb6585f63b94fa4ee81a7@44.196.14.252:26656,6e42ef37b18bd6547c4ce7a76111d5377c25e684@34.145.250.69:26656,d87359b6d0f7c736282d48bd38525e2f50cb60d3@35.245.9.232:26656,9ffc9ade220b0a0fc0c9abded0b032f94f3cbb38@65.108.109.103:10656,24a9d13e9e95ecf030253b64c1ef6f283f37d155@34.125.175.228:26656,3cade0e5deb5bbd8adfa98f62eca48b7d8f87414@34.16.142.53:26656,6de25884c1ebe3cdaf8a53faaa876e62baef5e08@15.235.115.155:15400,ea1e0b10ee696dc1a0d1e74329456f34c283bc15@216.66.9.67:30330,03d22833a8b8e414c2da861cab1cbe8f5694063b@5.78.93.29:26656,be0f0de2c77ad41401711d6a395dd6c6440ef124@144.217.158.217:26656,3cfe6e50a07cce40881a5648c54a823769e9bf47@135.181.129.122:15656,e4de0b2171d28fec191e85cf67772f09d17520de@65.109.59.19:2070,5e6678fc29b62e1a81144bf010dfd1228dff1031@63.229.234.75:26656,ed7ef7587d0d7552e973d6fa480ce0ff7f9f39ee@34.70.157.247:26656,db1748aee7658ce2614e27acb38d184654027194@34.150.158.73:26656,1f3736062f874d214e132084644c6a3f357936de@35.186.165.222:26656,6468a9a418bb1f0bff15a826d07cb62dbd680d2b@144.76.62.93:26656,c9a794387928277b7eba6c8428cd2bc08b2e722b@65.108.201.240:14156,2a93608577083485a3e09997159446ab8cfd6b68@54.199.153.43:26656,ad242fe3d7e5abffcae24af91fdcbd004daa3d0f@65.21.84.223:14156,51de9f38f9e3d0b262db301d5147b17750af7795@89.58.12.236:26656,c08eced51e376d9314b313cbece53b1059931ba6@65.108.238.103:14156,fde339de96b78d7d602dc653d88c8064c85cbf0f@128.140.76.182:26658,f3251d67547f88595966101562094ca538d39f8e@65.108.106.135:26696,f2e5d94bd8e11ec722e9a92546b793f8e4e0ea5d@178.63.123.34:2000,302cb1aa66e2ce8be9a766b6e40d98747cdcf906@65.109.90.96:60656,ccfc7878d4a328f4af815d1f13cd334f6073a474@195.201.171.135:26656,159115602e05697aaa48578ba70c09067f4998c3@95.216.116.57:26656,6f5a9c8ea772264f4f968e4510daae3147247380@79.127.196.35:36656,7e041096585d12b99d9f575979744251409dd0a0@93.115.25.106:36656,6d5241c556fd8c461d971584dbd41b007a940a16@65.109.30.53:14156,074bc7d2ded6b568aa5b3df1ed1f530804cd2c66@89.58.29.219:26656,3fb643a2e4bcd9e79ea745c0e61a06fa3ab99ecf@15.235.87.217:26656,52933b1a578465f5e7cd718a41cd97fd2072fab2@65.109.23.55:1076,e15ca4ba5ee5dd515ba73c53737bb3f6deb051a1@65.108.121.190:2130,402902424e92850107cd0d5b35fcf40b54256b91@79.13.57.85:26656,ad7312bcf1beac7ceb817cb6a47b6697d63daf5e@34.134.46.169:26656,8663e7da214559e6dd094a1dde7b877cf9571b6f@37.59.18.132:20002,896e1d89e0e085ab09cb264ed7b83047d2e73f40@107.161.145.162:33656,65df4d055f805666712b600e6789989167029be1@51.195.105.50:26656,0943faa7209a90cb1f2c0758407ec98bcb641d02@51.159.16.49:26656,e6c0d56e8c220b835eb5f4a2786cbcd4ea56696a@107.150.119.135:26656,5a214fdeae9f98e909da4f497b6a84119e04f5d4@209.38.234.219:32357,86cbeedea81c89192f5a57f2916c4c89e0f2686a@46.166.140.167:26656,4d95665a3b60b478c4191c090a1e8ba5bfda448c@139.177.182.181:26656,50ce1794942a3f28adef700caf51b49d3e3beacb@35.203.182.18:26656,044d2fcd404d84b8b0f7953c37da7ed0f5511cff@57.129.36.75:26656,ac65237d8760a58be6818566139d33713983d9ef@135.181.210.171:2076,6542f21c020d67b01dcfa84685b3e389f123ec7e@65.108.232.93:14156,a96d69179e4b72f728b9dd4dbe40400701515fee@80.64.208.51:26656,ff826c4b26ddfb7d5d79612585624115712b0a27@80.64.208.52:26656,f6f62e2914b38b2a21ab5f8162c22a2d6c5b1003@65.108.207.231:26656,e0f4ddb8ebd2130f633bdcd43a40e4e668f08a4b@148.113.8.181:14156,5f5cfac5c38506fbb4275c19e87c4107ec48808d@65.21.198.100:11010"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.sommelier/config/config.toml
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0usomm\"/" $HOME/.sommelier/config/app.toml
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.sommelier/config/config.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.sommelier/config/config.toml


# Config Pruning
pruning="custom"
pruning_keep_recent="100"
pruning_keep_every="0"
pruning_interval="19"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.sommelier/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.sommelier/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.sommelier/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.sommelier/config/app.toml


# Set Custom Port
sed -i.bak -e "s%:1317%:${SOMMELIER_PORT}317%g;
s%:8080%:${SOMMELIER_PORT}080%g;
s%:9090%:${SOMMELIER_PORT}090%g;
s%:9091%:${SOMMELIER_PORT}091%g;
s%:8545%:${SOMMELIER_PORT}545%g;
s%:8546%:${SOMMELIER_PORT}546%g;
s%:6065%:${SOMMELIER_PORT}065%g" $HOME/.sommelier/config/app.toml
sed -i.bak -e "s%:26658%:${SOMMELIER_PORT}658%g;
s%:26657%:${SOMMELIER_PORT}657%g;
s%:6060%:${SOMMELIER_PORT}060%g;
s%:26656%:${SOMMELIER_PORT}656%g;
s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):${SOMMELIER_PORT}656\"%;
s%:26660%:${SOMMELIER_PORT}660%g" $HOME/.sommelier/config/config.toml
sed -i \
  -e 's|^chain-id *=.*|chain-id = "sommelier-3"|' \
  -e 's|^node *=.*|node = "tcp://localhost:9657"|' \
  $HOME/.sommelier/config/client.toml


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

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

[Install]
WantedBy=multi-user.target
EOF


# Enable and Start Service
sudo systemctl daemon-reload
sudo systemctl enable sommelier
sudo systemctl start sommelier && sudo journalctl -fu sommelier -o cat
```

## Auto Installation

```bash
wget https://snapshot.syanodes.my.id/auto/mainnet/sommelier_auto && chmod +x sommelier_auto && ./sommelier_auto
```


# Upgrade

## Manual Upgrade

**upgrade at height** [*18438000*](https://explorer.syanodes.my.id/sommelier-mainnet/block/18438000)

```bash
cd $HOME
mkdir download
cd download
curl -LO https://github.com/PeggyJV/sommelier/releases/download/v9.0.0/sommelier_9.0.0_linux_amd64.tar.gz
tar -xvf sommelier_9.0.0_linux_amd64.tar.gz
rm sommelier_9.0.0_linux_amd64.tar.gz
chmod +x sommelier
sudo mv $HOME/download/sommelier $(which sommelier)
sudo systemctl restart sommelier && sudo journalctl -fu sommelier -o cat
```


# Useful commands

```bash
# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export SOMMELIER_CHAIN_ID="sommelier-3"" >> $HOME/.bash_profile
source $HOME/.bash_profile
```

### WALLET MANAGEMENT

{% hint style="info" %}
*Add Wallet Specify the value \<wallet> with your own wallet name*
{% endhint %}

```bash
#Add new wallet
sommelier keys add wallet

#Recover Wallet
sommelier keys add wallet --recover

#List Wallet
sommelier keys list

#Delete Wallet
sommelier keys delete wallet

#Check Wallet Balance
sommelier q bank balances $(sommelier keys show wallet -a)
```

### VALIDATOR MANAGEMENT

{% hint style="info" %}
*Please adjust , MONIKER , YOUR\_KEYBASE\_ID , YOUR\_DETAILS , YOUR\_WEBSITE\_URL*
{% endhint %}

```bash
#Create Validator
sommelier tx staking create-validator \
--amount=10000000usomm \
--pubkey=$(sommelier tendermint show-validator) \
--moniker=$MONIKER \
--identity="YOUR_KEYBASE_ID" \
--details="YOUR_DETAILS" \
--website="YOUR_WEBSITE_URL" \
--chain-id=$SOMMELIER_CHAIN_ID \
--commission-rate=0.10 \
--commission-max-rate=0.20 \
--commission-max-change-rate=0.01 \
--min-self-delegation=1000 \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices=10usomm\ 
-y

#Edit Validator
sommelier tx staking edit-validator \
--new-moniker="YOUR MONIKER" \
--identity="IDENTITY KEYBASE" \
--details="DETAILS VALIDATOR" \
--website="LINK WEBSITE" \
--chain-id=$SOMMELIER_CHAIN_ID \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices=10usomm\ 
-y

#Unjail Validator
sommelier tx slashing unjail --from wallet --chain-id $SOMMELIER_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10usomm -y

#Check Jailed Reason
sommelier query slashing signing-info $(sommelier tendermint show-validator)
```

### TOKEN MANAGEMENT

```bash
#Withdraw Rewards
sommelier tx distribution withdraw-all-rewards --from wallet --chain-id $SOMMELIER_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10usomm -y

#Withdraw Rewards with Comission
sommelier tx distribution withdraw-rewards $(sommelier keys show wallet --bech val -a) --commission --from wallet --chain-id $SOMMELIER_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10usomm -y

#Delegate Token to your own validator
sommelier tx staking delegate $(sommelier keys show wallet --bech val -a) 1000000usomm --from wallet --chain-id $SOMMELIER_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10usomm -y

#Delegate Token to other validator
sommelier tx staking redelegate $(sommelier keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> 1000000usomm --from wallet --chain-id $SOMMELIER_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10usomm -y

#Unbond Token from your validator
sommelier tx staking unbond $(sommelier keys show wallet --bech val -a) 1000000usomm --from wallet --chain-id $SOMMELIER_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10usomm -y

#Send Token to another wallet
sommelier tx bank send wallet <TO_WALLET_ADDRESS> 1000000usomm --from wallet --chain-id $SOMMELIER_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10usomm -y
```

### GOVERNANCE

```bash
#Vote, You can change the value of yes to no,abstain,nowithveto
sommelier tx gov vote 1 yes --from wallet --chain-id $SOMMELIER_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10usomm -y

#List all proposals
sommelier query gov proposals

#Create new text proposal
sommelier tx gov submit-proposal \
--title="Title" \
--description="Description" \
--deposit=100000000usomm \
--type="Text" \
--from=wallet \
--gas-adjustment 1.5 \
--gas "auto" \
--gas-prices=10usomm\ 
-y 
```

### SERVICES MANAGEMENT

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

# Enable Service
sudo systemctl enable sommelier

# Disable Service
sudo systemctl disable sommelier

# Start Service
sudo systemctl start sommelier

# Stop Service
sudo systemctl stop sommelier

# Restart Service
sudo systemctl restart sommelier

# Check Service Status
sudo systemctl status sommelier

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

### UTILITY

```bash
#Set Indexer NULL / KV
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.sommelier/config/config.toml

#Get Validator info
sommelier status 2>&1 | jq .ValidatorInfo

#Get denom info
sommelier q bank denom-metadata -oj | jq

#Get sync status
sommelier status 2>&1 | jq .SyncInfo.catching_up

#Get latest height
sommelier status 2>&1 | jq .SyncInfo.latest_block_height

#Reset Node
sommelier tendermint unsafe-reset-all --home $HOME/.sommelier --keep-addr-book
```

### DELETE NODE

{% hint style="warning" %} <mark style="color:red;">**WARNING! Use this command wisely Backup your key first it will remove node from your system**</mark>
{% endhint %}

```bash
sudo systemctl stop sommelier && sudo systemctl disable sommelier && sudo rm /etc/systemd/system/sommelier.service && sudo systemctl daemon-reload && sudo rm -rf $(which sommelier) && rm -rf $HOME/.sommelier && rm -rf $HOME/go/bin/sommelier 
```


# Snapshot & State sync

## Snapshot

```bash
sudo systemctl stop sommelier

cp $HOME/.sommelier/data/priv_validator_state.json $HOME/.sommelier/priv_validator_state.json.backup
sommelier tendermint unsafe-reset-all --home ~/.sommelier/ --keep-addr-book

curl https://snapshot2.syanodes.my.id/sommelier/snapshot2-sommelier.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.sommelier

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

sudo systemctl restart sommelier && sudo journalctl -fu sommelier -o cat
```

## State Sync

```bash
sudo systemctl stop sommelier

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

peers="4b301813e7db41ed3c8109994e18c0e701b29acd@35.185.11.168:26656,c94fd60124e3656df54ff965d178e36c760c195d@65.108.57.224:26656,4a5b215ae51affa285f70298db3fe826ddc5e871@37.27.114.100:26656,e8e3359cfe774d0cad774a0bf34f53cc5b872703@95.216.161.87:26656,04def519ec8b578bc6d9efaa56eb957a131cf6f3@135.181.192.166:26656,362d69cdada0d5926181c602c40f7a7d97186d87@157.90.95.15:26656,163d9989fb6ff216db571b2a95ce47fb9282f93f@157.90.26.189:26658,9a3795cef9443b37db9f0e769902729e9865f383@51.15.206.33:26656,281bca9514fe002d90a4b3db2a1567f66a0ec357@159.69.66.149:26646,7bb0b626fe74992f07447e5f9239a188317517a7@45.83.104.218:2000,41caa4106f68977e3a5123e56f57934a2d34a1c1@95.214.55.227:27176,733ee0a5a74de20745c5236df015642aa53060bc@57.128.96.155:14156,ebc272824924ea1a27ea3183dd0b9ba713494f83@95.214.52.139:27176,ae3df68c1ac6b7a493504e2871b0ab26e1b9c542@38.109.200.33:26656,75b526dd317ebb1d5500cfa5425c9c7af75f7ebe@51.77.56.47:2000,15861ad4a98ee9a872f85fdace2b23422c796cdf@146.59.81.92:36656,0c3fa55c4308e43cb9761e551998da701435fa1b@47.147.226.147:33656,2a31a7bfadfa1b1365fb2427421845da52b610cd@185.165.170.72:26656,ee74b3c6d5037e2c56bc95b989b0a26643d79aa4@81.0.220.94:24556,75c7972462772278129cb6585f63b94fa4ee81a7@44.196.14.252:26656,6e42ef37b18bd6547c4ce7a76111d5377c25e684@34.145.250.69:26656,d87359b6d0f7c736282d48bd38525e2f50cb60d3@35.245.9.232:26656,9ffc9ade220b0a0fc0c9abded0b032f94f3cbb38@65.108.109.103:10656,24a9d13e9e95ecf030253b64c1ef6f283f37d155@34.125.175.228:26656,3cade0e5deb5bbd8adfa98f62eca48b7d8f87414@34.16.142.53:26656,6de25884c1ebe3cdaf8a53faaa876e62baef5e08@15.235.115.155:15400,ea1e0b10ee696dc1a0d1e74329456f34c283bc15@216.66.9.67:30330,03d22833a8b8e414c2da861cab1cbe8f5694063b@5.78.93.29:26656,be0f0de2c77ad41401711d6a395dd6c6440ef124@144.217.158.217:26656,3cfe6e50a07cce40881a5648c54a823769e9bf47@135.181.129.122:15656,e4de0b2171d28fec191e85cf67772f09d17520de@65.109.59.19:2070,5e6678fc29b62e1a81144bf010dfd1228dff1031@63.229.234.75:26656,ed7ef7587d0d7552e973d6fa480ce0ff7f9f39ee@34.70.157.247:26656,db1748aee7658ce2614e27acb38d184654027194@34.150.158.73:26656,1f3736062f874d214e132084644c6a3f357936de@35.186.165.222:26656,6468a9a418bb1f0bff15a826d07cb62dbd680d2b@144.76.62.93:26656,c9a794387928277b7eba6c8428cd2bc08b2e722b@65.108.201.240:14156,2a93608577083485a3e09997159446ab8cfd6b68@54.199.153.43:26656,ad242fe3d7e5abffcae24af91fdcbd004daa3d0f@65.21.84.223:14156,51de9f38f9e3d0b262db301d5147b17750af7795@89.58.12.236:26656,c08eced51e376d9314b313cbece53b1059931ba6@65.108.238.103:14156,fde339de96b78d7d602dc653d88c8064c85cbf0f@128.140.76.182:26658,f3251d67547f88595966101562094ca538d39f8e@65.108.106.135:26696,f2e5d94bd8e11ec722e9a92546b793f8e4e0ea5d@178.63.123.34:2000,302cb1aa66e2ce8be9a766b6e40d98747cdcf906@65.109.90.96:60656,ccfc7878d4a328f4af815d1f13cd334f6073a474@195.201.171.135:26656,159115602e05697aaa48578ba70c09067f4998c3@95.216.116.57:26656,6f5a9c8ea772264f4f968e4510daae3147247380@79.127.196.35:36656,7e041096585d12b99d9f575979744251409dd0a0@93.115.25.106:36656,6d5241c556fd8c461d971584dbd41b007a940a16@65.109.30.53:14156,074bc7d2ded6b568aa5b3df1ed1f530804cd2c66@89.58.29.219:26656,3fb643a2e4bcd9e79ea745c0e61a06fa3ab99ecf@15.235.87.217:26656,52933b1a578465f5e7cd718a41cd97fd2072fab2@65.109.23.55:1076,e15ca4ba5ee5dd515ba73c53737bb3f6deb051a1@65.108.121.190:2130,402902424e92850107cd0d5b35fcf40b54256b91@79.13.57.85:26656,ad7312bcf1beac7ceb817cb6a47b6697d63daf5e@34.134.46.169:26656,8663e7da214559e6dd094a1dde7b877cf9571b6f@37.59.18.132:20002,896e1d89e0e085ab09cb264ed7b83047d2e73f40@107.161.145.162:33656,65df4d055f805666712b600e6789989167029be1@51.195.105.50:26656,0943faa7209a90cb1f2c0758407ec98bcb641d02@51.159.16.49:26656,e6c0d56e8c220b835eb5f4a2786cbcd4ea56696a@107.150.119.135:26656,5a214fdeae9f98e909da4f497b6a84119e04f5d4@209.38.234.219:32357,86cbeedea81c89192f5a57f2916c4c89e0f2686a@46.166.140.167:26656,4d95665a3b60b478c4191c090a1e8ba5bfda448c@139.177.182.181:26656,50ce1794942a3f28adef700caf51b49d3e3beacb@35.203.182.18:26656,044d2fcd404d84b8b0f7953c37da7ed0f5511cff@57.129.36.75:26656,ac65237d8760a58be6818566139d33713983d9ef@135.181.210.171:2076,6542f21c020d67b01dcfa84685b3e389f123ec7e@65.108.232.93:14156,a96d69179e4b72f728b9dd4dbe40400701515fee@80.64.208.51:26656,ff826c4b26ddfb7d5d79612585624115712b0a27@80.64.208.52:26656,f6f62e2914b38b2a21ab5f8162c22a2d6c5b1003@65.108.207.231:26656,e0f4ddb8ebd2130f633bdcd43a40e4e668f08a4b@148.113.8.181:14156,5f5cfac5c38506fbb4275c19e87c4107ec48808d@65.21.198.100:11010"
SNAP_RPC="https://sommelier-m-rpc.syanodes.my.id:443"

sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.sommelier/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/.sommelier/config/config.toml

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

sudo systemctl restart sommelier && sudo journalctl -fu sommelier -o cat
```


# Synternet

<figure><img src="https://3732959305-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fr1ChzocIBBGBlfbyRi9s%2Fuploads%2FyBE2dbaiZ4ETKkePMXyI%2Fsynternet.png?alt=media&amp;token=81f95da0-dfba-4ff6-8719-b464269d0a94" alt="" width="200"><figcaption></figcaption></figure>

Synternet is a blockchain that powers modular, interoperable data infrastructure across all major chains. At its core lies the Data Layer, a protocol serving as the customizable execution layer between all blockchains. Designed for efficiency, security, and interoperability, the Data Layer enables a fully decentralized data exchange for developers, organizations, and users. By eliminating dependence on centralized services, Synternet provides swift and seamless access to both real-time and historical on-chain data. Synternet's modular data infrastructure fosters a dynamic ecosystem committed to powering the next generation of decentralized applications while unlocking unprecedented opportunities for innovation.

| Chain ID    | Latest Version Tag |
| ----------- | ------------------ |
| synternet-1 | v0.19.1            |

### Public endpoints <a href="#public-endpoints" id="public-endpoints"></a>

* Api : <https://synternet-m-api.syanodes.my.id>
* Rpc :  <https://synternet-m-rpc.syanodes.my.id>
* grpc with ssl/tls: synternet-m-grpc.syanodes.my.id:443

### Links

[Website](https://www.synternet.com/) | [Discord ](https://discord.gg/Ze7Kswye8B)| [Twitter](https://twitter.com/synternet_com)

***


# Node Installation

### Hardware requirements The following requirements are recommended for running SYNTERNET:

* **6 or more physical CPU cores**
* **At least 1TB of SSD disk storage**
* **At least 16GB of memory (RAM)**
* **At least 500mbps network bandwidth**

## Manual Installation

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

# Install Go
cd $HOME
VER="1.23.2"
wget "https://golang.org/dl/go$VER.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$VER.linux-amd64.tar.gz"
rm "go$VER.linux-amd64.tar.gz"
[ ! -f ~/.bash_profile ] && touch ~/.bash_profile
echo "export PATH=$PATH:/usr/local/go/bin:~/go/bin" >> ~/.bash_profile
source $HOME/.bash_profile
[ ! -d ~/go/bin ] && mkdir -p ~/go/bin
go version


# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export SYNTERNET_CHAIN_ID="synternet-1"" >> $HOME/.bash_profile
echo "export SYNTERNET_PORT="106"" >> $HOME/.bash_profile
source $HOME/.bash_profile


# Download Binary
cd $HOME
wget https://github.com/Synternet/synternet-chain-releases/releases/download/v0.19.1/syntd-linux-amd64-v0.19.1 -O syntd
chmod +x syntd
sudo mv syntd $HOME/go/bin/
syntd version


# Config and Init App
syntd config node tcp://localhost:${SYNTERNET_PORT}57
syntd config chain-id $SYNTERNET_CHAIN_ID
syntd init $MONIKER --chain-id $SYNTERNET_CHAIN_ID


# Add Genesis File and Addrbook
wget -O $HOME/.amber/config/genesis.json https://snapshot.syanodes.my.id/mainnets/synternet/genesis.json
wget -O $HOME/.amber/config/addrbook.json https://snapshot.syanodes.my.id/mainnets/synternet/addrbook.json


#Configure Seeds and Peers
SEEDS=""
PEERS="8ff99ed31b25f07ae71070c94f55cdbbe581cc86@176.9.245.156:26656,5143c9698ff790faaada8ecd5af0a9cf5867865f@95.217.204.58:27956,79c01ac5fe49ed99bb25bfd9158fe409369f6fdf@65.108.71.137:27956,844476f8d07c350629df5ad340680ec3df8b5b7b@65.109.82.144:26456,38f7accfdbc6690a60837c397d22457a0f08a362@37.27.57.224:26656,2eed7e175d204680af243e008e21950f81b8d455@34.89.206.173:26656,36feb015db4537bc2229295bf4e268ab6d100adb@65.21.32.216:26656,6f3262e842b6ecc8cca1571168d6f82f421a5074@95.179.167.16:26656,613e8033a587340d08144084300b003bcfe2ca43@79.137.10.226:26656,13af4eef823f8c9cac093dbc405edff280dc9d87@78.141.193.216:26656,994a52988585be44a90574f4dc73a9bfbddd528e@37.252.186.222:26656,74fc274769eedb14025aa66d4e9fb49d3a1bd3bf@136.243.41.225:26656,87743778ebe813196141441f5eaf97d2135ba117@136.243.171.213:26656,95b14ec701608044c261ebd15d0b3bd84e295acb@72.46.84.135:26656,78fb128c831365c6680382ec4b2db16cf67c12d4@34.118.39.106:26656"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.amber/config/config.toml
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.00025usynt\"/" $HOME/.amber/config/app.toml
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.amber/config/config.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.amber/config/config.toml


# Config Pruning
pruning="custom"
pruning_keep_recent="100"
pruning_keep_every="0"
pruning_interval="10"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.amber/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.amber/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.amber/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.amber/config/app.toml


# Set Custom Port
sed -i -e "s%:1317%:${SYNTERNET_PORT}17%; s%:8080%:${SYNTERNET_PORT}80%; s%:9090%:${SYNTERNET_PORT}90%; s%:9091%:${SYNTERNET_PORT}91%; s%:8545%:${SYNTERNET_PORT}45%; s%:8546%:${SYNTERNET_PORT}46%; s%:6065%:${SYNTERNET_PORT}65%" $HOME/.amber/config/app.toml
sed -i -e "s%:26658%:${SYNTERNET_PORT}58%; s%:26657%:${SYNTERNET_PORT}57%; s%:6060%:${SYNTERNET_PORT}60%; s%:26656%:${SYNTERNET_PORT}56%; s%:26660%:${SYNTERNET_PORT}61%" $HOME/.amber/config/config.toml


# Set Service File
sudo tee /etc/systemd/system/syntd.service > /dev/null <<EOF
[Unit]
Description=synternet-mainnet
After=network-online.target

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

[Install]
WantedBy=multi-user.target
EOF


# Enable and Start Service
sudo systemctl daemon-reload
sudo systemctl enable syntd
sudo systemctl start syntd && sudo journalctl -fu syntd -o cat
```

## Auto Installation

```bash
wget https://snapshot.syanodes.my.id/auto/mainnet/synternet_auto && chmod +x synternet_auto && ./synternet_auto 
```


# Upgrade

## Manual Upgrade

**upgrade at height** [*3186227*](https://explorer.syanodes.my.id/synternet-mainnet/block/3186227)

```bash
wget https://github.com/Synternet/synternet-chain-releases/releases/download/v0.21.0/syntd-linux-amd64-v0.21.0 -O syntd
chmod +x syntd
sudo mv syntd $HOME/go/bin/
sudo systemctl restart syntd && sudo journalctl -fu syntd -o cat
```


# Snapshot & State sync

## Snapshot

```bash
sudo systemctl stop syntd

cp $HOME/.amber/data/priv_validator_state.json $HOME/.amber/priv_validator_state.json.backup
syntd tendermint unsafe-reset-all --home ~/.amber/ --keep-addr-book

curl https://ss.syanodes.my.id/synternet/ss-synternet.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.amber

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

sudo systemctl restart syntd && sudo journalctl -fu syntd -o cat
```

## State Sync

```bash
sudo systemctl stop syntd

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

peers="8ff99ed31b25f07ae71070c94f55cdbbe581cc86@176.9.245.156:26656,5143c9698ff790faaada8ecd5af0a9cf5867865f@95.217.204.58:27956,79c01ac5fe49ed99bb25bfd9158fe409369f6fdf@65.108.71.137:27956,844476f8d07c350629df5ad340680ec3df8b5b7b@65.109.82.144:26456,38f7accfdbc6690a60837c397d22457a0f08a362@37.27.57.224:26656,2eed7e175d204680af243e008e21950f81b8d455@34.89.206.173:26656,36feb015db4537bc2229295bf4e268ab6d100adb@65.21.32.216:26656,6f3262e842b6ecc8cca1571168d6f82f421a5074@95.179.167.16:26656,613e8033a587340d08144084300b003bcfe2ca43@79.137.10.226:26656,13af4eef823f8c9cac093dbc405edff280dc9d87@78.141.193.216:26656,994a52988585be44a90574f4dc73a9bfbddd528e@37.252.186.222:26656,74fc274769eedb14025aa66d4e9fb49d3a1bd3bf@136.243.41.225:26656,87743778ebe813196141441f5eaf97d2135ba117@136.243.171.213:26656,95b14ec701608044c261ebd15d0b3bd84e295acb@72.46.84.135:26656,78fb128c831365c6680382ec4b2db16cf67c12d4@34.118.39.106:26656"
SNAP_RPC="https://synternet-m-rpc.syanodes.my.id:443"

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

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) 

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/.amber/config/config.toml

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

sudo systemctl restart syntd && sudo journalctl -fu syntd -o cat
```


# Useful commands

```bash
# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export SYNTERNET_CHAIN_ID="synternet-1"" >> $HOME/.bash_profile
source $HOME/.bash_profile
```

### WALLET MANAGEMENT

{% hint style="info" %}
*Add Wallet Specify the value \<wallet> with your own wallet name*
{% endhint %}

```bash
#Add new wallet
syntd keys add wallet

#Recover Wallet
syntd keys add wallet --recover

#List Wallet
syntd keys list

#Delete Wallet
syntd keys delete wallet

#Check Wallet Balance
syntd q bank balances $(syntd keys show wallet -a)
```

### VALIDATOR MANAGEMENT

{% hint style="info" %}
*Please adjust , MONIKER , YOUR\_KEYBASE\_ID , YOUR\_DETAILS , YOUR\_WEBSITE\_URL*
{% endhint %}

```bash
#Create Validator
syntd tx staking create-validator \
--amount=1000000usynt \
--pubkey=$(syntd tendermint show-validator) \
--moniker=$MONIKER \
--identity="YOUR_KEYBASE_ID" \
--details="YOUR_DETAILS" \
--website="YOUR_WEBSITE_URL" \
--chain-id=$SYNTERNET_CHAIN_ID \
--commission-rate=0.10 \
--commission-max-rate=0.20 \
--commission-max-change-rate=0.01 \
--min-self-delegation=1000 \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices=1usynt\ 
-y

#Edit Validator
syntd tx staking edit-validator \
--new-moniker="YOUR MONIKER" \
--identity="IDENTITY KEYBASE" \
--details="DETAILS VALIDATOR" \
--website="LINK WEBSITE" \
--chain-id=$SYNTERNET_CHAIN_ID \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices=1usynt\ 
-y

#Unjail Validator
syntd tx slashing unjail --from wallet --chain-id $SYNTERNET_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1usynt -y

#Check Jailed Reason
syntd query slashing signing-info $(syntd tendermint show-validator)
```

### TOKEN MANAGEMENT

```bash
#Withdraw Rewards
syntd tx distribution withdraw-all-rewards --from wallet --chain-id $SYNTERNET_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1usynt -y

#Withdraw Rewards with Comission
syntd tx distribution withdraw-rewards $(syntd keys show wallet --bech val -a) --commission --from wallet --chain-id $SYNTERNET_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1usynt -y

#Delegate Token to your own validator
syntd tx staking delegate $(syntd keys show wallet --bech val -a) 100000usynt --from wallet --chain-id $SYNTERNET_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1usynt -y

#Delegate Token to other validator
syntd tx staking redelegate $(syntd keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> 100000usynt --from wallet --chain-id $SYNTERNET_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1usynt -y

#Unbond Token from your validator
syntd tx staking unbond $(syntd keys show wallet --bech val -a) 100000usynt --from wallet --chain-id $SYNTERNET_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1usynt -y

#Send Token to another wallet
syntd tx bank send wallet <TO_WALLET_ADDRESS> 100000usynt --from wallet --chain-id $SYNTERNET_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1usynt -y
```

### GOVERNANCE

```bash
#Vote, You can change the value of yes to no,abstain,nowithveto
syntd tx gov vote 1 yes --from wallet --chain-id $SYNTERNET_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1usynt -y

#List all proposals
syntd query gov proposals

#Create new text proposal
syntd tx gov submit-proposal \
--title="Title" \
--description="Description" \
--deposit=10000000usynt \
--type="Text" \
--from=wallet \
--gas-adjustment 1.5 \
--gas "auto" \
--gas-prices=1usynt\ 
-y
```

### SERVICES MANAGEMENT

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

# Enable Service
sudo systemctl enable syntd

# Disable Service
sudo systemctl disable syntd

# Start Service
sudo systemctl start syntd

# Stop Service
sudo systemctl stop syntd

# Restart Service
sudo systemctl restart syntd

# Check Service Status
sudo systemctl status syntd

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

### UTILITY

```bash
#Set Indexer NULL / KV
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.amber/config/config.toml

#Get Validator info
syntd status 2>&1 | jq .ValidatorInfo

#Get denom info
syntd q bank denom-metadata -oj | jq

#Get sync status
syntd status 2>&1 | jq .SyncInfo.catching_up

#Get latest height
syntd status 2>&1 | jq .SyncInfo.latest_block_height

#Reset Node
syntd tendermint unsafe-reset-all --home $HOME/.amber --keep-addr-book
```

### DELETE NODE

{% hint style="warning" %} <mark style="color:red;">**WARNING! Use this command wisely Backup your key first it will remove node from your system**</mark>
{% endhint %}

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


# Stafihub

<figure><img src="https://3732959305-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fr1ChzocIBBGBlfbyRi9s%2Fuploads%2FX8BF2JBIkobHlYHaKIMV%2Fstafihub.png?alt=media&amp;token=c06d71e3-c9ed-4718-b19d-839624d722a6" alt="" width="188"><figcaption></figcaption></figure>

StaFi is the first multi-chain liquid staking protocol that unlocks the liquidity of staked assets. StaFi aims to solve the contradiction between mainnet security and token liquidity in PoS consensus. StaFi allows users to stake their tokens without locking their assets or maintaining infrastructure, while still participating in on-chain activities.

StaFiHub is a parallel chain developed by StaFi based on the Cosmos SDK.

| Chain ID   | Latest Version Tag |
| ---------- | ------------------ |
| stafihub-1 | v0.5.0             |

### Public endpoints <a href="#public-endpoints" id="public-endpoints"></a>

* Api : <https://stafihub-m-api.syanodes.my.id>
* Rpc :  <https://stafihub-m-rpc.syanodes.my.id>
* grpc with ssl/tls: stafihub-m-grpc.syanodes.my.id:443

### Links

[Website](https://www.stafihub.io/) | [Discord](https://discord.com/invite/jB77etn) | [Twitter](https://x.com/stafi_protocol)

***


# Node Installation

### Hardware requirements The following requirements are recommended for running STAFIHUB:

* **6 or more physical CPU cores**
* **At least 1TB of SSD disk storage**
* **At least 16GB of memory (RAM)**
* **At least 500mbps network bandwidth**

## Manual Installation

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

# Install Go
cd $HOME
VER="1.20.3"
wget "https://golang.org/dl/go$VER.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$VER.linux-amd64.tar.gz"
rm "go$VER.linux-amd64.tar.gz"
[ ! -f ~/.bash_profile ] && touch ~/.bash_profile
echo "export PATH=$PATH:/usr/local/go/bin:~/go/bin" >> ~/.bash_profile
source $HOME/.bash_profile
[ ! -d ~/go/bin ] && mkdir -p ~/go/bin
go version


# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export STAFIHUB_CHAIN_ID="stafihub-1"" >> $HOME/.bash_profile
echo "export STAFIHUB_PORT="100"" >> $HOME/.bash_profile
source $HOME/.bash_profile


# Download Binary
cd $HOME
rm -rf stafihub
git clone https://github.com/stafihub/stafihub
cd stafihub
git checkout v0.5.0
make install


# Config and Init App
stafihubd config node tcp://localhost:${STAFIHUB_PORT}57
stafihubd config keyring-backend file
stafihubd config chain-id $STAFIHUB_CHAIN_ID
stafihubd init $MONIKER --chain-id $STAFIHUB_CHAIN_ID


# Add Genesis File and Addrbook
wget -O $HOME/.stafihub/config/genesis.json https://testnet-files.syanodes.my.id/stafihub-m-genesis.json
wget -O $HOME/.stafihubhub/config/addrbook.json https://testnet-files.syanodes.my.id/stafihub-m-addrbook.json


#Configure Seeds and Peers
SEEDS=""
PEERS="4ef1b0675641c3bb507356004ed9dcd4c901bd29@65.109.112.170:36656,a5f1489f5d250c8516f13b625226e5ad0af1a16a@65.108.106.131:26666,722c8b02d40d017d76dbb390c8290ae1d24a4665@34.230.84.121:26656,b16a5d941f3c4086bac4bb0ba419d92614202933@47.236.9.84:26656,1ffd9b533b37c58ad651c80cd404689b0800d17f@185.252.220.88:26656,23713826f39eef7ecc8b057fd19345634a1177e1@52.28.96.113:26656,bdd81fda6021be566293509c60968c015cde2315@15.235.119.114:26656,20c0b45c47426c51b3187aa5dca82d9900c2fb36@65.108.5.184:26656,045fe6e054a5abe35f5433bd333f0a1b18aa28cf@45.136.28.11:26656,3aeb3273b60ec8602f5ab2e4cc493ab99554cf44@158.160.7.35:26656,b747cb4906e0dee3f8d937738d36ae8314214cd8@141.95.103.59:26656,a1395521de6111c74cc634c414489f01b2250411@142.132.248.214:26656,767770c8d079687458e49b952783c92d967b2034@65.108.130.246:26656,b6d95e8c295092fab1f9fafbca024a427def8709@135.125.180.36:46656,fac8d4eace04557d518c9275f0e75fcf42d1a013@57.128.133.10:26656,dabf5766124e627dfc344eb7b47fdc75a6f406d5@144.202.9.124:15500,bed296dfadd972ed07cab82c87a0ee5c182dea43@18.136.189.120:26656,2a8762cd32c4d49ef018c9bb0176492237d59142@178.63.41.154:30400,c281d1a4903fc7bf63cdc8ca53ed7182f11332e8@141.95.66.226:15500,59bb809fa8ee7d69caf0e9d87f9bb3407703b5b9@54.234.35.56:26656"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.stafihub/config/config.toml
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0ufis\"/" $HOME/.stafihub/config/app.toml
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.stafihub/config/config.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.stafihub/config/config.toml


# Config Pruning
pruning="custom"
pruning_keep_recent="100"
pruning_keep_every="0"
pruning_interval="19"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.stafihub/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.stafihub/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.stafihub/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.stafihub/config/app.toml


# Set Custom Port
sed -i -e "s%:1317%:${STAFIHUB_PORT}17%; s%:8080%:${STAFIHUB_PORT}80%; s%:9090%:${STAFIHUB_PORT}90%; s%:9091%:${STAFIHUB_PORT}91%; s%:8545%:${STAFIHUB_PORT}45%; s%:8546%:${STAFIHUB_PORT}46%; s%:6065%:${STAFIHUB_PORT}65%" $HOME/.stafihub/config/app.toml
sed -i -e "s%:26658%:${STAFIHUB_PORT}58%; s%:26657%:${STAFIHUB_PORT}57%; s%:6060%:${STAFIHUB_PORT}60%; s%:26656%:${STAFIHUB_PORT}56%; s%:26660%:${STAFIHUB_PORT}61%" $HOME/.stafihub/config/config.toml


# Set Service File
sudo tee /etc/systemd/system/stafihubd.service > /dev/null <<EOF
[Unit]
Description=stafihub-mainnet
After=network-online.target

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

[Install]
WantedBy=multi-user.target
EOF


# Enable and Start Service
sudo systemctl daemon-reload
sudo systemctl enable stafihubd
sudo systemctl start stafihubd && sudo journalctl -fu stafihubd -o cat
```

## Auto Installation

```
wget https://snapshot.syanodes.my.id/auto/mainnet/stafihub_auto && chmod +x stafihub_auto && ./stafihub_auto
```


# Snapshot & State sync

## Snapshot

```bash
sudo systemctl stop stafihubd

cp $HOME/.stafihub/data/priv_validator_state.json $HOME/.stafihub/priv_validator_state.json.backup
stafihubd tendermint unsafe-reset-all --home ~/.stafihub/ --keep-addr-book

curl https://snapshot2.syanodes.my.id/stafihub/snapshot2-stafihub.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.stafihub

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

sudo systemctl restart stafihubd && sudo journalctl -fu stafihubd -o cat
```

## State Sync

```bash
sudo systemctl stop stafihubd

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

peers="4ef1b0675641c3bb507356004ed9dcd4c901bd29@65.109.112.170:36656,a5f1489f5d250c8516f13b625226e5ad0af1a16a@65.108.106.131:26666,722c8b02d40d017d76dbb390c8290ae1d24a4665@34.230.84.121:26656,b16a5d941f3c4086bac4bb0ba419d92614202933@47.236.9.84:26656,1ffd9b533b37c58ad651c80cd404689b0800d17f@185.252.220.88:26656,23713826f39eef7ecc8b057fd19345634a1177e1@52.28.96.113:26656,bdd81fda6021be566293509c60968c015cde2315@15.235.119.114:26656,20c0b45c47426c51b3187aa5dca82d9900c2fb36@65.108.5.184:26656,045fe6e054a5abe35f5433bd333f0a1b18aa28cf@45.136.28.11:26656,3aeb3273b60ec8602f5ab2e4cc493ab99554cf44@158.160.7.35:26656,b747cb4906e0dee3f8d937738d36ae8314214cd8@141.95.103.59:26656,a1395521de6111c74cc634c414489f01b2250411@142.132.248.214:26656,767770c8d079687458e49b952783c92d967b2034@65.108.130.246:26656,b6d95e8c295092fab1f9fafbca024a427def8709@135.125.180.36:46656,fac8d4eace04557d518c9275f0e75fcf42d1a013@57.128.133.10:26656,dabf5766124e627dfc344eb7b47fdc75a6f406d5@144.202.9.124:15500,bed296dfadd972ed07cab82c87a0ee5c182dea43@18.136.189.120:26656,2a8762cd32c4d49ef018c9bb0176492237d59142@178.63.41.154:30400,c281d1a4903fc7bf63cdc8ca53ed7182f11332e8@141.95.66.226:15500,59bb809fa8ee7d69caf0e9d87f9bb3407703b5b9@54.234.35.56:26656"
SNAP_RPC="https://stafihub-m-rpc.syanodes.my.id:443"

sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.stafihub/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/.stafihub/config/config.toml

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

sudo systemctl restart stafihubd && sudo journalctl -fu stafihubd -o cat
```


# Useful commands

```bash
# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export STAFIHUB_CHAIN_ID="stafihub-1"" >> $HOME/.bash_profile
source $HOME/.bash_profile
```

### WALLET MANAGEMENT

{% hint style="info" %}
*Add Wallet Specify the value \<wallet> with your own wallet name*
{% endhint %}

```bash
#Add new wallet
stafihubd keys add wallet

#Recover Wallet
stafihubd keys add wallet --recover

#List Wallet
stafihubd keys list

#Delete Wallet
stafihubd keys delete wallet

#Check Wallet Balance
stafihubd q bank balances $(stafihubd keys show wallet -a)
```

### VALIDATOR MANAGEMENT

{% hint style="info" %}
*Please adjust , MONIKER , YOUR\_KEYBASE\_ID , YOUR\_DETAILS , YOUR\_WEBSITE\_URL*
{% endhint %}

```bash
#Create Validator
stafihubd tx staking create-validator \
--amount=10000000ufis \
--pubkey=$(stafihubd tendermint show-validator) \
--moniker=$MONIKER \
--identity="YOUR_KEYBASE_ID" \
--details="YOUR_DETAILS" \
--website="YOUR_WEBSITE_URL" \
--chain-id=$STAFIHUB_CHAIN_ID \
--commission-rate=0.10 \
--commission-max-rate=0.20 \
--commission-max-change-rate=0.01 \
--min-self-delegation=1000 \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices=10ufis\ 
-y

#Edit Validator
stafihubd tx staking edit-validator \
--new-moniker="YOUR MONIKER" \
--identity="IDENTITY KEYBASE" \
--details="DETAILS VALIDATOR" \
--website="LINK WEBSITE" \
--chain-id=$STAFIHUB_CHAIN_ID \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices=10ufis\ 
-y

#Unjail Validator
stafihubd tx slashing unjail --from wallet --chain-id $STAFIHUB_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10ufis -y

#Check Jailed Reason
stafihubd query slashing signing-info $(stafihubd tendermint show-validator)
```

### TOKEN MANAGEMENT

```bash
#Withdraw Rewards
stafihubd tx distribution withdraw-all-rewards --from wallet --chain-id $STAFIHUB_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10ufis -y

#Withdraw Rewards with Comission
stafihubd tx distribution withdraw-rewards $(stafihubd keys show wallet --bech val -a) --commission --from wallet --chain-id $STAFIHUB_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10ufis -y

#Delegate Token to your own validator
stafihubd tx staking delegate $(stafihubd keys show wallet --bech val -a) 1000000ufis --from wallet --chain-id $STAFIHUB_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10ufis -y

#Delegate Token to other validator
stafihubd tx staking redelegate $(stafihubd keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> 1000000ufis --from wallet --chain-id $STAFIHUB_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10ufis -y

#Unbond Token from your validator
stafihubd tx staking unbond $(stafihubd keys show wallet --bech val -a) 1000000ufis --from wallet --chain-id $STAFIHUB_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10ufis -y

#Send Token to another wallet
stafihubd tx bank send wallet <TO_WALLET_ADDRESS> 1000000ufis --from wallet --chain-id $STAFIHUB_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10ufis -y
```

### GOVERNANCE

```bash
#Vote, You can change the value of yes to no,abstain,nowithveto
stafihubd tx gov vote 1 yes --from wallet --chain-id $STAFIHUB_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10ufis -y

#List all proposals
stafihubd query gov proposals

#Create new text proposal
stafihubd tx gov submit-proposal \
--title="Title" \
--description="Description" \
--deposit=100000000ufis \
--type="Text" \
--from=wallet \
--gas-adjustment 1.5 \
--gas "auto" \
--gas-prices=10ufis\ 
-y
```

### SERVICES MANAGEMENT

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

# Enable Service
sudo systemctl enable stafihubd

# Disable Service
sudo systemctl disable stafihubd

# Start Service
sudo systemctl start stafihubd

# Stop Service
sudo systemctl stop stafihubd

# Restart Service
sudo systemctl restart stafihubd

# Check Service Status
sudo systemctl status stafihubd

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

### UTILITY

```bash
#Set Indexer NULL / KV
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.stafihub/config/config.toml

#Get Validator info
stafihubd status 2>&1 | jq .ValidatorInfo

#Get denom info
stafihubd q bank denom-metadata -oj | jq

#Get sync status
stafihubd status 2>&1 | jq .SyncInfo.catching_up

#Get latest height
stafihubd status 2>&1 | jq .SyncInfo.latest_block_height

#Reset Node
stafihubd tendermint unsafe-reset-all --home $HOME/.stafihub --keep-addr-book
```

### DELETE NODE

{% hint style="warning" %} <mark style="color:red;">**WARNING! Use this command wisely Backup your key first it will remove node from your system**</mark>
{% endhint %}

```bash
sudo systemctl stop stafihubd && sudo systemctl disable stafihubd && sudo rm /etc/systemd/system/stafihubd.service && sudo systemctl daemon-reload && sudo rm -rf $(which stafihubd) && rm -rf $HOME/.stafihub && rm -rf $HOME/go/bin/stafihubd 
```


# Airchain

<figure><img src="https://3732959305-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fr1ChzocIBBGBlfbyRi9s%2Fuploads%2FllQKnFD3Gd8vjiOvcB2s%2Fairchain.png?alt=media&amp;token=4233139c-2669-449a-8558-489f586b17e5" alt="" width="209"><figcaption></figcaption></figure>

Airchains enhancing privacy through ZK scaling. Airchains is a modular zk-Rollup framework platform, uniquely designed to empower developers in constructing comprehensive applications with unparalleled speed and privacy. We provides flexibility in choosing execution and data availability layers.

| Chain ID   | Latest Version Tag |
| ---------- | ------------------ |
| varanasi-1 | v0.3.1             |

### Public endpoints <a href="#public-endpoints" id="public-endpoints"></a>

* Api : [https://airchain-t-api.syanodes.my.id](https://airchain-t-api.syanodes.my.id/)
* Rpc : [ ](< https://mantra-testnet-rpc.syanodes.my.id/>)[https://airchain-t-rpc.syanodes.my.id](https://airchain-t-rpc.syanodes.my.id/)
* grpc with ssl/tls: airchain-t-grpc.syanodes.my.id:443

### Links

[Website](https://www.airchains.io/) | [Discord](https://discord.gg/airchains) | [Twitter](https://twitter.com/airchains_io)

***


# Node Installation

### Hardware requirements The following requirements are recommended for running AIRCHAIN:

* **6 or more physical CPU cores**
* **At least 1TB of SSD disk storage**
* **At least 16GB of memory (RAM)**
* **At least 500mbps network bandwidth**

## Manual Installation

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


# Install Go
cd $HOME
VER="1.22.2"
wget "https://golang.org/dl/go$VER.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$VER.linux-amd64.tar.gz"
rm "go$VER.linux-amd64.tar.gz"
[ ! -f ~/.bash_profile ] && touch ~/.bash_profile
echo "export PATH=$PATH:/usr/local/go/bin:~/go/bin" >> ~/.bash_profile
source $HOME/.bash_profile
[ ! -d ~/go/bin ] && mkdir -p ~/go/bin
go version


#Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh 
rustc --version 

# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export AIR_CHAIN_ID="varanasi-1"" >> $HOME/.bash_profile
echo "export AIR_CHAIN_PORT="55"" >> $HOME/.bash_profile
source $HOME/.bash_profile


# Download 
cd $HOME
wget -O junctiond https://github.com/airchains-network/junction/releases/download/v0.3.1/junctiond-linux-amd64  
chmod +x junctiond  
mv junctiond $HOME/go/bin/


# Config and Init App
junctiond init $MONIKER --chain-id $AIR_CHAIN_ID


# Add Genesis File and Addrbook
wget -O $HOME/.junctiond/config/genesis.json https://testnet-files.syanodes.my.id/airchain-genesis.json
wget -O $HOME/.junctiond/config/addrbook.json https://testnet-files.syanodes.my.id/airchain-addrbook.json


#Configure Seeds and Peers
SEEDS=""
PEERS="db0ef38866b19583db494d7700908ab47c6eddf3@95.214.55.198:55656,9b709b70af46e71d0f468db599b8d3eaeb9905fc@95.214.55.31:34656,db686fcfdf0b4676d601d5beb11faee5ad96bff1@37.27.71.199:28656,ec7d3566e70f479a4a6dd98d1e02e8827cf34f76@72.251.3.24:56256, cfb052e64e508f4b40f0ec07b52a31abfda82270@95.217.62.179:11956, f84b41b95e828ee915aea19dd656cca7d39cf47b@37.17.244.207:33656"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.junctiond/config/config.toml
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.001uamf\"/" $HOME/.junctiond/config/app.toml
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.junctiond/config/config.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.junctiond/config/config.toml


# Config Pruning
pruning="custom"
pruning_keep_recent="100"
pruning_keep_every="0"
pruning_interval="10"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.junctiond/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.junctiond/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.junctiond/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.junctiond/config/app.toml


# Set Custom Port
sed -i.bak -e "s%:1317%:${AIR_CHAIN_PORT}317%g;
s%:8080%:${AIR_CHAIN_PORT}080%g;
s%:9090%:${AIR_CHAIN_PORT}090%g;
s%:9091%:${AIR_CHAIN_PORT}091%g;
s%:8545%:${AIR_CHAIN_PORT}545%g;
s%:8546%:${AIR_CHAIN_PORT}546%g;
s%:6065%:${AIR_CHAIN_PORT}065%g" $HOME/.junctiond/config/app.toml
sed -i.bak -e "s%:26658%:${AIR_CHAIN_PORT}658%g;
s%:26657%:${AIR_CHAIN_PORT}657%g;
s%:6060%:${AIR_CHAIN_PORT}060%g;
s%:26656%:${AIR_CHAIN_PORT}656%g;
s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):${AIR_CHAIN_PORT}656\"%;
s%:26660%:${AIR_CHAIN_PORT}660%g" $HOME/.junctiond/config/config.toml
sed -i \
  -e 's|^chain-id *=.*|chain-id = "varanasi-1"|' \
  -e 's|^node *=.*|node = "tcp://localhost:55657"|' \
  $HOME/.junctiond/config/client.toml


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

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

[Install]
WantedBy=multi-user.target
EOF


# Enable and Start Service
sudo systemctl daemon-reload
sudo systemctl enable junctiond
sudo systemctl start junctiond
sudo journalctl -fu junctiond -o cat
```

## Auto Installation

```bash
wget https://snapshot.syanodes.my.id/auto/testnet/airchain_auto && chmod +x airchain_auto && ./airchain_auto && rm airchain_auto
```


# Snapshot & State sync

## Snapshot

```bash

sudo systemctl stop junctiond

cp $HOME/.junctiond/data/priv_validator_state.json $HOME/.junctiond/priv_validator_state.json.backup
junctiond tendermint unsafe-reset-all --home ~/.junction/ --keep-addr-book

curl https://snapshot.syanodes.my.id/airchain/snapshot-airchain.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.junction

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

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

## State Sync

```bash
//
```


# Useful commands

```bash
# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export AIR_CHAIN_ID="varanasi-1"" >> $HOME/.bash_profile
source $HOME/.bash_profile
```

### WALLET MANAGEMENT

{% hint style="info" %}
*Add Wallet Specify the value \<wallet> with your own wallet name*
{% endhint %}

```bash
#Add new wallet
junctiond keys add wallet

#Recover Wallet
junctiond keys add wallet --recover

#List Wallet
junctiond keys list

#Delete Wallet
junctiond keys delete wallet

#Check Wallet Balance
junctiond q bank balances $(junctiond keys show wallet -a)
```

### VALIDATOR MANAGEMENT

{% hint style="info" %}
*Please adjust , MONIKER , YOUR\_KEYBASE\_ID , YOUR\_DETAILS , YOUR\_WEBSITE\_URL*
{% endhint %}

```bash
#Create Validator
junctiond tx staking create-validator \
--amount=10000000uamf \
--pubkey=$(junctiond tendermint show-validator) \
--moniker=$MONIKER \
--identity="YOUR_KEYBASE_ID" \
--details="YOUR_DETAILS" \
--website="YOUR_WEBSITE_URL" \
--chain-id=$AIR_CHAIN_ID \
--commission-rate=0.10 \
--commission-max-rate=0.20 \
--commission-max-change-rate=0.01 \
--min-self-delegation=1000 \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices 0.1uamf\ 
-y

#Edit Validator
junctiond tx staking edit-validator \
--new-moniker="YOUR MONIKER" \
--identity="IDENTITY KEYBASE" \
--details="DETAILS VALIDATOR" \
--website="LINK WEBSITE" \
--chain-id=$AIR_CHAIN_ID \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices 0.1uamf\ 
-y

#Unjail Validator
junctiond tx slashing unjail --from wallet --chain-id $AIR_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 0.1uamf -y

#Check Jailed Reason
junctiond query slashing signing-info $(junctiond tendermint show-validator)
```

### TOKEN MANAGEMENT

```bash
#Withdraw Rewards
junctiond tx distribution withdraw-all-rewards --from wallet --chain-id $AIR_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 0.1uamf -y

#Withdraw Rewards with Comission
junctiond tx distribution withdraw-rewards $(junctiond keys show wallet --bech val -a) --commission --from wallet --chain-id $AIR_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 0.1uamf -y

#Delegate Token to your own validator
junctiond tx staking delegate $(junctiond keys show wallet --bech val -a) 1000000uamf --from wallet --chain-id $AIR_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 0.1uamf -y

#Delegate Token to other validator
junctiond tx staking redelegate $(junctiond keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> 1000000uamf --from wallet --chain-id $AIR_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 0.1uamf -y

#Unbond Token from your validator
junctiond tx staking unbond $(junctiond keys show wallet --bech val -a) 1000000uamf --from wallet --chain-id $AIR_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 0.1uamf -y

#Send Token to another wallet
junctiond tx bank send wallet <TO_WALLET_ADDRESS> 1000000uamf --from wallet --chain-id $AIR_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 0.1uamf -y
```

### GOVERNANCE

```bash
#Vote, You can change the value of yes to no,abstain,nowithveto
junctiond tx gov vote 1 yes --from wallet --chain-id $AIR_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 0.1uamf -y

#List all proposals
junctiond query gov proposals

#Create new text proposal
junctiond tx gov submit-proposal \
--title="Title" \
--description="Description" \
--deposit=100000000uamf \
--type="Text" \
--from=wallet \
--gas-adjustment 1.5 \
--gas "auto" \
--gas-prices 0.1uamf\ 
-y 
```

### SERVICES MANAGEMENT

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

# Enable Service
sudo systemctl enable junctiond

# Disable Service
sudo systemctl disable junctiond

# Start Service
sudo systemctl start junctiond

# Stop Service
sudo systemctl stop junctiond

# Restart Service
sudo systemctl restart junctiond

# Check Service Status
sudo systemctl status junctiond

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

### UTILITY

```bash
#Set Indexer NULL / KV
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.junctiond/config/config.toml

#Get Validator info
junctiond status 2>&1 | jq .ValidatorInfo

#Get denom info
junctiond q bank denom-metadata -oj | jq

#Get sync status
junctiond status 2>&1 | jq .sync_info.catching_up

#Get latest height
junctiond status 2>&1 | jq .sync_info.latest_block_height

#Reset Node
junctiond tendermint unsafe-reset-all --home $HOME/.junctiond --keep-addr-book
```

### DELETE NODE

{% hint style="warning" %} <mark style="color:red;">**WARNING! Use this command wisely Backup your key first it will remove node from your system**</mark>
{% endhint %}

```bash
sudo systemctl stop junctiond && sudo systemctl disable junctiond && sudo rm /etc/systemd/system/junctiond.service && sudo systemctl daemon-reload && rm -rf $HOME/.junctiond && rm -rf $HOME/go/bin/junctiond
```


# Alignedlayer

<figure><img src="https://3732959305-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fr1ChzocIBBGBlfbyRi9s%2Fuploads%2FcQ4ZwTHWnOL3GmGdu4Tg%2Falignedlayer.jpg?alt=media&amp;token=246684ba-b3cb-4ef5-b669-704804023121" alt="" width="300"><figcaption></figcaption></figure>

Aligned Layer is a Yet Another Company product. It is a ZK verification layer developed on top of the EigenLayer. This will enable cost-effective verification of any SNARK proof, leveraging Ethereum validators' security without the limitations of Ethereum.

***

### Links

[Website](https://alignedlayer.com/) | [Discord](https://discord.gg/alignedlayer) |[ ](https://twitter.com/CrowdControlNet)[Twitter](https://twitter.com/alignedlayer)

***


# Node Installation

### Hardware requirements The following requirements are recommended for running ALIGNEDLAYER:

* **4 or more physical CPU cores**
* **At least 1TB of SSD disk storage**
* **At least 8GB of memory (RAM)**
* **At least 100mbps network bandwidth**

## Manual Installation

```bash
# Update & install dependencies
sudo apt update && sudo apt upgrade -y
sudo apt install clang pkg-config libssl-dev curl git wget htop tmux build-essential jq make lz4 gcc unzip -y


# Install Go
cd $HOME
sudo rm -rf /usr/local/go
curl -Ls https://go.dev/dl/go1.21.4.linux-amd64.tar.gz | sudo tar -xzf - -C /usr/local
eval $(echo 'export PATH=$PATH:/usr/local/go/bin' | sudo tee /etc/profile.d/golang.sh)
eval $(echo 'export PATH=$PATH:$HOME/go/bin' | tee -a $HOME/.profile)
go version


# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export ALIGNEDLAYER_CHAIN_ID="alignedlayer"" >> $HOME/.bash_profile
echo "export ALIGNEDLAYER_PORT="35"" >> $HOME/.bash_profile
source $HOME/.bash_profile


# Download Binary
cd $HOME
rm -rf $HOME/aligned_layer_tendermint && wget https://github.com/yetanotherco/aligned_layer_tendermint/releases/download/v0.1.0/alignedlayerd && chmod +x alignedlayerd
mv $HOME/alignedlayerd $HOME/go/bin
alignedlayerd version

# Config and Init App
alignedlayerd init $MONIKER --chain-id $ALIGNEDLAYER_CHAIN_ID


# Add Genesis File and Addrbook
wget -O $HOME/.alignedlayer/config/genesis.json https://testnet-files.syanodes.my.id/alignedlayer-genesis.json
wget -O $HOME/.alignedlayer/config/addrbook.json https://testnet-files.syanodes.my.id/alignedlayer-addrbook.json

#Configure Seeds and Peers
SEEDS=""
PEERS="9f7c7a0acd6aa8e2d6b77ddad506fb1c6b9edc5f@37.27.20.41:26656,dc2011a64fc5f888a3e575f84ecb680194307b56@148.251.235.130:20656,a1a98d9caf27c3363fab07a8e57ee0927d8c7eec@128.140.3.188:26656,1beca410dba8907a61552554b242b4200788201c@91.107.239.79:26656,f9000461b5f535f0c13a543898cc7ac1cd10f945@88.99.174.203:26656, 32fbefec592ac2ff9ecb3cad69bafaaad01e771a@148.251.235.130:20656,81138177a67195791bbe782fe1ed49f25e582bac@91.107.239.79:26656,c5d0498e345725365c1016795eecff4a67e4c4c9@88.99.174.203:26656,14af04afc663427604e8dd53f4023f7963a255cb@116.203.81.174:26656,9c89e77d51561c8b23957eee85a81ccc99fa7d6b@128.140.3.188:26656,144c2d4fbbaf54dda837bfbc88b688fb2f02c92f@alignedlayer-testnet-peer.itrocket.net:50656,2567ea5aed4bba4e3062a1072a8f1e7fb4e4497c@65.109.85.36:26656,ee72ae2006b86e409ab014e9cc5f26b52c6aa72d@5.189.144.242:26656,f3edb2d04e4dfcfe04918c92108a96bb7c077750@167.86.97.83:26656,af9ea4de452555c82fa31c1057b3f622d361f4cc@86.48.17.209:24256,4aadf13668b6fcb33f0e5b4a6e5bc267712c7dac@64.226.93.215:26656,7292de855372480ae23dbcaf94d36ead187cf6a8@194.163.143.206:50656,98247c9db728d28e095629e5786679630d8348f8@20.172.44.251:5456,afeea4cd47aa80504adbdaa8aa019864e291de55@[2a03:cfc0:8000:13::b910:277f]:13356,8509d4935357ae5dde2f172160dcf2cd10ef29a0@84.247.170.45:24256,dff0ad7bb3aa28f393b3281853353b53f32a2ef7@65.21.109.243:26656"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.alignedlayer/config/config.toml
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0stake\"/" $HOME/.alignedlayer/config/app.toml
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.alignedlayer/config/config.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.alignedlayer/config/config.toml


# Config Pruning
pruning="custom"
pruning_keep_recent="100"
pruning_keep_every="0"
pruning_interval="19"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.alignedlayer/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.alignedlayer/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.alignedlayer/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.alignedlayer/config/app.toml


# Set Custom Port
sed -i.bak -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:${ALIGNEDLAYER_PORT}658\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://127.0.0.1:${ALIGNEDLAYER_PORT}657\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:${ALIGNEDLAYER_PORT}060\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:${ALIGNEDLAYER_PORT}656\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":${ALIGNEDLAYER_PORT}660\"%" $HOME/.alignedlayer/config/config.toml
sed -i.bak -e "s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:${ALIGNEDLAYER_PORT}317\"%; s%^address = \":8080\"%address = \":${ALIGNEDLAYER_PORT}080\"%; s%^address = \"0.0.0.0:9090\"%address = \"0.0.0.0:${ALIGNEDLAYER_PORT}090\"%; s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:${ALIGNEDLAYER_PORT}091\"%" $HOME/.alignedlayer/config/app.toml
sed -i \
  -e 's|^chain-id *=.*|chain-id = "alignedlayer"|' \
  -e 's|^keyring-backend *=.*|keyring-backend = "test"|' \
  -e 's|^node *=.*|node = "tcp://localhost:35657"|' \
  $HOME/.alignedlayer/config/client.toml


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

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

[Install]
WantedBy=multi-user.target
EOF


# Enable and Start Service
sudo systemctl daemon-reload
sudo systemctl enable alignedlayerd
sudo systemctl start alignedlayerd
sudo journalctl -fu alignedlayerd -o cat
```


# Useful commands

```bash
# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export ALIGNEDLAYER_CHAIN_ID="alignedlayer"" >> $HOME/.bash_profile
source $HOME/.bash_profile
```

### WALLET MANAGEMENT

{% hint style="info" %}
*Add Wallet Specify the value \<wallet> with your own wallet name*
{% endhint %}

```bash
#Add new wallet
alignedlayerd keys add wallet

#Recover Wallet
alignedlayerd keys add wallet --recover

#List Wallet
alignedlayerd keys list

#Delete Wallet
alignedlayerd keys delete wallet

#Check Wallet Balance
alignedlayerd q bank balances $(alignedlayerd keys show wallet -a)
```

### VALIDATOR MANAGEMENT

{% hint style="info" %}
*Please adjust , MONIKER , YOUR\_KEYBASE\_ID , YOUR\_DETAILS , YOUR\_WEBSITE\_URL*
{% endhint %}

```bash
#Create Validator
alignedlayerd tx staking create-validator \
--amount=10000000stake \
--pubkey=$(alignedlayerd tendermint show-validator) \
--moniker=$MONIKER \
--identity="YOUR_KEYBASE_ID" \
--details="YOUR_DETAILS" \
--website="YOUR_WEBSITE_URL" \
--chain-id=$ALIGNEDLAYER_CHAIN_ID \
--commission-rate=0.10 \
--commission-max-rate=0.20 \
--commission-max-change-rate=0.01 \
--min-self-delegation=1000 \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices=10stake\ 
-y

#Edit Validator
alignedlayerd tx staking edit-validator \
--new-moniker="YOUR MONIKER" \
--identity="IDENTITY KEYBASE" \
--details="DETAILS VALIDATOR" \
--website="LINK WEBSITE" \
--chain-id=$ALIGNEDLAYER_CHAIN_ID \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices=10stake\ 
-y

#Unjail Validator
alignedlayerd tx slashing unjail --from wallet --chain-id $ALIGNEDLAYER_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10stake -y

#Check Jailed Reason
alignedlayerd query slashing signing-info $(alignedlayerd tendermint show-validator)
```

### TOKEN MANAGEMENT

```bash
alignedlayerd tx distribution withdraw-all-rewards --from wallet --chain-id $ALIGNEDLAYER_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10stake -y

#Withdraw Rewards with Comission
alignedlayerd tx distribution withdraw-rewards $(alignedlayerd keys show wallet --bech val -a) --commission --from wallet --chain-id $ALIGNEDLAYER_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10stake -y

#Delegate Token to your own validator
alignedlayerd tx staking delegate $(alignedlayerd keys show wallet --bech val -a) 1000000stake --from wallet --chain-id $ALIGNEDLAYER_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10stake -y

#Delegate Token to other validator
alignedlayerd tx staking redelegate $(alignedlayerd keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> 1000000stake --from wallet --chain-id $ALIGNEDLAYER_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10stake -y

#Unbond Token from your validator
alignedlayerd tx staking unbond $(alignedlayerd keys show wallet --bech val -a) 1000000stake --from wallet --chain-id $ALIGNEDLAYER_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10stake -y

#Send Token to another wallet
alignedlayerd tx bank send wallet <TO_WALLET_ADDRESS> 1000000stake --from wallet --chain-id $ALIGNEDLAYER_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10stake -y
```

### GOVERNANCE

```bash
#Vote, You can change the value of yes to no,abstain,nowithveto
alignedlayerd tx gov vote 1 yes --from wallet --chain-id $ALIGNEDLAYER_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10stake -y

#List all proposals
alignedlayerd query gov proposals

#Create new text proposal
alignedlayerd tx gov submit-proposal \
--title="Title" \
--description="Description" \
--deposit=100000000stake \
--type="Text" \
--from=wallet \
--gas-adjustment 1.5 \
--gas "auto" \
--gas-prices=10stake\ 
-y 
```

### SERVICES MANAGEMENT

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

# Enable Service
sudo systemctl enable alignedlayerd

# Disable Service
sudo systemctl disable alignedlayerd

# Start Service
sudo systemctl start alignedlayerd

# Stop Service
sudo systemctl stop alignedlayerd

# Restart Service
sudo systemctl restart alignedlayerd

# Check Service Status
sudo systemctl status alignedlayerd

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

### UTILITY

```bash
#Set Indexer NULL / KV
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.alignedlayer/config/config.toml

#Get Validator info
alignedlayerd status 2>&1 | jq .ValidatorInfo

#Get denom info
alignedlayerd q bank denom-metadata -oj | jq

#Get sync status
alignedlayerd status 2>&1 | jq .SyncInfo.catching_up

#Get latest height
alignedlayerd status 2>&1 | jq .SyncInfo.latest_block_height

#Reset Node
alignedlayerd tendermint unsafe-reset-all --home $HOME/.alignedlayer --keep-addr-book
```

### DELETE NODE

{% hint style="warning" %} <mark style="color:red;">**WARNING! Use this command wisely Backup your key first it will remove node from your system**</mark>
{% endhint %}

```bash
sudo systemctl stop alignedlayerd && sudo systemctl disable alignedlayerd && sudo rm /etc/systemd/system/alignedlayerd.service && sudo systemctl daemon-reload && sudo rm -rf $(which alignedlayerd) && rm -rf $HOME/.alignedlayer && rm -rf $HOME/go/bin/alignedlayerd
```


# Allora

<figure><img src="https://3732959305-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fr1ChzocIBBGBlfbyRi9s%2Fuploads%2FmqHqUTke9SLGdJFsD4sp%2Fallora.jpeg?alt=media&amp;token=01d86c73-1daa-4383-8ca0-ccebf315071f" alt="" width="192"><figcaption></figcaption></figure>

Allora enables applications to leverage smarter, more secure AI through a self-improving network of ML models. By combining innovations in crowdsourced intelligence, federated learning, and zkML, Allora unlocks a vast new design space of applications at the intersection of crypto and AI.

| Chain ID | Latest Version Tag |
| -------- | ------------------ |
| testnet  | v0.0.10            |

### Public endpoints <a href="#public-endpoints" id="public-endpoints"></a>

* Api : <https://allora-t-api.syanodes.my.id/>
* Rpc : [ ](< https://mantra-testnet-rpc.syanodes.my.id/>)<https://allora-t-rpc.syanodes.my.id/>
* grpc with ssl/tls: allora-t-grpc.syanodes.my.id:443

### Links

[Website](https://www.allora.network/) | [Discord](https://discord.com/invite/allora) | [Twitter](https://twitter.com/AlloraNetwork)

***


# Node Installation

### Hardware requirements The following requirements are recommended for running ALLORA:

* **6 or more physical CPU cores**
* **At least 1TB of SSD disk storage**
* **At least 16GB of memory (RAM)**
* **At least 500mbps network bandwidth**

## Manual Installation

```bash
# Update & install dependencies
sudo apt update && sudo apt upgrade -y
sudo apt install clang pkg-config libssl-dev curl git wget htop tmux build-essential jq make lz4 gcc unzip -y


# Install Go
cd $HOME
VER="1.22.2"
wget "https://golang.org/dl/go$VER.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$VER.linux-amd64.tar.gz"
rm "go$VER.linux-amd64.tar.gz"
[ ! -f ~/.bash_profile ] && touch ~/.bash_profile
echo "export PATH=$PATH:/usr/local/go/bin:~/go/bin" >> ~/.bash_profile
source $HOME/.bash_profile
[ ! -d ~/go/bin ] && mkdir -p ~/go/bin
go version


# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export ALLORA_CHAIN_ID="testnet"" >> $HOME/.bash_profile
echo "export ALLORA_PORT="40"" >> $HOME/.bash_profile
source $HOME/.bash_profile


# Download Binary
cd $HOME
rm -rf allora
git clone https://github.com/allora-network/allora-chain allora
cd allora
git checkout v0.0.10
make install


# Config and Init App
allorad init $MONIKER --chain-id $ALLORA_CHAIN_ID


# Add Genesis File and Addrbook
wget -O $HOME/.allorad/config/genesis.json https://testnet-files.syanodes.my.id/allora-genesis.json
wget -O $HOME/.allorad/config/addrbook.json https://testnet-files.syanodes.my.id/allora-addrbook.json


#Configure Seeds and Peers
seed=""
peers="daddf466ffda9f06406c3951fea37148e0cc4254@188.40.66.173:26756,ad5a818a2fce6c96bf040c11731e51d253d6ae12@34.125.70.129:26656,18794b770e44eb0fa6cd8509cb91ba5e35717627@206.125.34.196:26662,0e7874473303951f172b67d7fcadab2416d00dad@91.242.214.227:26656,c909c9303c070dd9ced28bafd90a04b1d9179768@89.110.91.116:26656,6b0bae238972c087bfff9f95de243735673ea963@77.64.253.85:26656,5e0cf8c74e9c21d020f7b494d3eb8aef42019346@184.174.33.241:26656,549364a232796942118b5be5f8d62005895eacd7@148.113.16.49:26656,ec462be83cb8870cd79c2fda8677cec45f245949@207.65.221.52:26656,c77c37ff27a9af4924a8839cedd3b22dc21e388f@84.64.112.126:26656,16541ace744a8e58a942bdbe2ddff3a16c2dce90@136.243.78.225:26656,3584b56ad639bb46c20ec9e5d05f39b630c19c4b@54.81.195.244:32001,ea8420deaa561f9eabe620a122378d47c059939c@173.234.17.193:26656,c9d49bf9fdcfd9d304cebea81a4c2a2bc20f68b9@84.247.181.92:26656,c29fd18c07b78b520faeadf67459ab0114402be0@185.209.29.83:26656,455215a20c14eb4801c34c7350ba0a7b040a5e82@38.45.66.178:26656,0e6578d28c31f5876409088ed51d2d3b5540d4ce@66.70.177.125:26656,1dda15c1b0e66f8e5c04344b2a639f51179de9f5@51.89.67.94:21656,2565f8b80bee76b4e26c61b8c5df70d33783bbd0@18.236.127.219:26500,a18a9be73bd26d8d97b30ee74173e1699a8bda6f@136.243.1.83:29656,e005548fecf92ae76d2bf9ebc4a0db863040aea5@113.165.23.45:26656,a2919076678b89c955477d8460c9c932bd9786e7@34.224.166.207:32010,e9d7579905d464d2691b7895012edf5c8279e351@168.119.31.198:56286,b4a3defc0aa044993711109028771da76f86d8d3@89.110.88.106:26656,4750426ca3e0c479bef9d2a639db03b17915ae34@84.247.167.216:26656,c614510aa8e6e20a254bc9aaed1a7078c48e888b@136.38.55.33:26656,9d83bd2586674ed5717c95d2935e3ff8f62d039f@45.94.209.4:26656,540da856351af2689c1413218b54e8ef2bfe63ab@185.211.6.114:26656,0e8ebf8b222c3650e1e48d748d1e160b14171673@89.116.28.226:46656,d1c5b2d12ac4ca49a342f797688ff459dd301702@163.172.68.250:26656,c47af4c7e8eadb7e00fb50d1c0a7bd894dcb67df@185.185.82.170:26656,d223b29165debcac10cc20a00848eadd77090860@80.92.214.29:26656,f784d1678dedc2204ba3e1a4ab04a39d2ada36a7@44.201.28.205:32011,d42629dfc1ba7733f782f9e6534c293b1c8114f7@149.28.152.142:26656,420c2386e132a056613f32b15c6596fd66e4d58f@65.108.225.207:46656,5f92a5e98b1a676a7c8774e1bb13e9aa728442f8@68.7.226.221:26656,97e5ee864b581a432cd742cd507236062fe2c105@203.113.174.180:27656,908ab062e33c1e291c3fd253a67ed5a19fb29087@62.72.5.161:26656,7274bbed56bb07987c2c7e10e610563609965757@84.203.117.234:26656,e0b1fbddbf9254aa89540f4409c016ea12c5b451@51.81.109.67:26656,2ea86e31cf10723ca97966f22efbcc9bbb36d455@34.86.171.35:26656,aa5c421ad84a78bdae42aa93c7a4530c0da2da26@31.220.72.81:26656,15e23295c829cbfb50e876b294c014c20bef53bd@54.196.52.114:32012,ca74bfeeec12f7879963267e5b758a05204d0f97@80.64.208.238:26656,2150d3c0095845ca11bea8a34c0d3ac8c4634e04@110.171.123.186:26656,5dea51d09e84bf84cf33f029a61f66be5b4f7e0a@81.31.244.52:26656,10bfcd1c24220544da433110c1f74f6c04e226a9@149.50.105.169:26656,b8598fc2037b2a3c3b6283be4ab8fa697fd0fd3d@212.126.35.133:26664,61807b914f99020cef984bbb16cdb3cec2a640cb@185.218.126.157:26656,19d11f8b63d120a66c754dd2f9c604b3fed0cfca@212.126.35.132:26656,86ed8efc38b145e256729ca3519ce9294e688a4d@38.242.138.142:26656,223e15952763cdc964d2f90dc5b35586f4fb38b5@89.110.89.214:26656,5664a8e0db4760b0c7414393eb443bf44787544a@37.27.124.38:26654,4b61584be380ceb18fc38a2e40db9de5ee1d19b7@51.15.15.233:26656,a066e59c46ae9f9c50f8e9752e4d3527161af780@87.246.108.81:26656,99c10c7c5ccad59090e34d0fd181dc9b779f1fc5@44.213.89.206:32002,501bf05da57dc7243878769027c4cc07d4b4c131@16.63.229.79:26656,dc4ba719971ec6c6ab1c1a26494569fe21bf7625@94.61.200.48:26656,462e675442969fe73ef8160c32677053670096ab@108.209.102.187:26643,f7b402b0969bf7328405e40a57d650f1ac20795b@108.209.99.65:26670,5425949026e175cf35e090617861e89a0904a38b@45.159.231.59:26656,1cf59abcc0c6da0be2bf759f44d2346172eda6c2@35.90.33.133:26656,316f0ca3746c959701d0d6165ed3e79aaff68cc1@195.201.245.178:56286"
sed -i.bak -e "s/^seed *=.*/seed = \"$seed\"/" ~/.allorad/config/config.toml
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" ~/.allorad/config/config.toml
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0uallo\"/" $HOME/.allorad/config/app.toml
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.allorad/config/config.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.allorad/config/config.toml


# Config Pruning
pruning="custom"
pruning_keep_recent="100"
pruning_keep_every="0"
pruning_interval="19"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.allorad/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.allorad/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.allorad/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.allorad/config/app.toml


# Set Custom Port
sed -i.bak -e "s%:1317%:${ALLORA_PORT}317%g;
s%:8080%:${ALLORA_PORT}080%g;
s%:9090%:${ALLORA_PORT}090%g;
s%:9091%:${ALLORA_PORT}091%g;
s%:8545%:${ALLORA_PORT}545%g;
s%:8546%:${ALLORA_PORT}546%g;
s%:6065%:${ALLORA_PORT}065%g" $HOME/.allorad/config/app.toml
sed -i.bak -e "s%:26658%:${ALLORA_PORT}658%g;
s%:26657%:${ALLORA_PORT}657%g;
s%:6060%:${ALLORA_PORT}060%g;
s%:26656%:${ALLORA_PORT}656%g;
s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):${ALLORA_PORT}656\"%;
s%:26660%:${ALLORA_PORT}660%g" $HOME/.allorad/config/config.toml
sed -i \
  -e 's|^chain-id *=.*|chain-id = "testnet"|' \
  -e 's|^keyring-backend *=.*|keyring-backend = "test"|' \
  -e 's|^node *=.*|node = "tcp://localhost:40657"|' \
  $HOME/.allorad/config/client.toml


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

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

[Install]
WantedBy=multi-user.target
EOF


# Enable and Start Service
sudo systemctl daemon-reload
sudo systemctl enable allorad
sudo systemctl start allorad 
sudo journalctl -fu allorad -o cat
```

## Auto Installation

```bash
wget https://snapshot.syanodes.my.id/auto/testnet/allora_auto && chmod +x allora_auto && ./allora_auto 
```


# Snapshot & State sync

## Snapshot

```bash
sudo systemctl stop allorad

cp $HOME/.allorad/data/priv_validator_state.json $HOME/.allorad/priv_validator_state.json.backup
allorad tendermint unsafe-reset-all --home ~/.allorad/ --keep-addr-book

curl https://snapshot.syanodes.my.id/allora/snapshot-allora.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.allorad

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

sudo systemctl restart allorad && sudo journalctl -fu allorad -o cat
```

## State Sync

```bash
sudo systemctl stop allorad

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

peers="daddf466ffda9f06406c3951fea37148e0cc4254@188.40.66.173:26756,ad5a818a2fce6c96bf040c11731e51d253d6ae12@34.125.70.129:26656,18794b770e44eb0fa6cd8509cb91ba5e35717627@206.125.34.196:26662,0e7874473303951f172b67d7fcadab2416d00dad@91.242.214.227:26656,c909c9303c070dd9ced28bafd90a04b1d9179768@89.110.91.116:26656,6b0bae238972c087bfff9f95de243735673ea963@77.64.253.85:26656,5e0cf8c74e9c21d020f7b494d3eb8aef42019346@184.174.33.241:26656,549364a232796942118b5be5f8d62005895eacd7@148.113.16.49:26656,ec462be83cb8870cd79c2fda8677cec45f245949@207.65.221.52:26656,c77c37ff27a9af4924a8839cedd3b22dc21e388f@84.64.112.126:26656,16541ace744a8e58a942bdbe2ddff3a16c2dce90@136.243.78.225:26656,3584b56ad639bb46c20ec9e5d05f39b630c19c4b@54.81.195.244:32001,ea8420deaa561f9eabe620a122378d47c059939c@173.234.17.193:26656,c9d49bf9fdcfd9d304cebea81a4c2a2bc20f68b9@84.247.181.92:26656,c29fd18c07b78b520faeadf67459ab0114402be0@185.209.29.83:26656,455215a20c14eb4801c34c7350ba0a7b040a5e82@38.45.66.178:26656,0e6578d28c31f5876409088ed51d2d3b5540d4ce@66.70.177.125:26656,1dda15c1b0e66f8e5c04344b2a639f51179de9f5@51.89.67.94:21656,2565f8b80bee76b4e26c61b8c5df70d33783bbd0@18.236.127.219:26500,a18a9be73bd26d8d97b30ee74173e1699a8bda6f@136.243.1.83:29656,e005548fecf92ae76d2bf9ebc4a0db863040aea5@113.165.23.45:26656,a2919076678b89c955477d8460c9c932bd9786e7@34.224.166.207:32010,e9d7579905d464d2691b7895012edf5c8279e351@168.119.31.198:56286,b4a3defc0aa044993711109028771da76f86d8d3@89.110.88.106:26656,4750426ca3e0c479bef9d2a639db03b17915ae34@84.247.167.216:26656,c614510aa8e6e20a254bc9aaed1a7078c48e888b@136.38.55.33:26656,9d83bd2586674ed5717c95d2935e3ff8f62d039f@45.94.209.4:26656,540da856351af2689c1413218b54e8ef2bfe63ab@185.211.6.114:26656,0e8ebf8b222c3650e1e48d748d1e160b14171673@89.116.28.226:46656,d1c5b2d12ac4ca49a342f797688ff459dd301702@163.172.68.250:26656,c47af4c7e8eadb7e00fb50d1c0a7bd894dcb67df@185.185.82.170:26656,d223b29165debcac10cc20a00848eadd77090860@80.92.214.29:26656,f784d1678dedc2204ba3e1a4ab04a39d2ada36a7@44.201.28.205:32011,d42629dfc1ba7733f782f9e6534c293b1c8114f7@149.28.152.142:26656,420c2386e132a056613f32b15c6596fd66e4d58f@65.108.225.207:46656,5f92a5e98b1a676a7c8774e1bb13e9aa728442f8@68.7.226.221:26656,97e5ee864b581a432cd742cd507236062fe2c105@203.113.174.180:27656,908ab062e33c1e291c3fd253a67ed5a19fb29087@62.72.5.161:26656,7274bbed56bb07987c2c7e10e610563609965757@84.203.117.234:26656,e0b1fbddbf9254aa89540f4409c016ea12c5b451@51.81.109.67:26656,2ea86e31cf10723ca97966f22efbcc9bbb36d455@34.86.171.35:26656,aa5c421ad84a78bdae42aa93c7a4530c0da2da26@31.220.72.81:26656,15e23295c829cbfb50e876b294c014c20bef53bd@54.196.52.114:32012,ca74bfeeec12f7879963267e5b758a05204d0f97@80.64.208.238:26656,2150d3c0095845ca11bea8a34c0d3ac8c4634e04@110.171.123.186:26656,5dea51d09e84bf84cf33f029a61f66be5b4f7e0a@81.31.244.52:26656,10bfcd1c24220544da433110c1f74f6c04e226a9@149.50.105.169:26656,b8598fc2037b2a3c3b6283be4ab8fa697fd0fd3d@212.126.35.133:26664,61807b914f99020cef984bbb16cdb3cec2a640cb@185.218.126.157:26656,19d11f8b63d120a66c754dd2f9c604b3fed0cfca@212.126.35.132:26656,86ed8efc38b145e256729ca3519ce9294e688a4d@38.242.138.142:26656,223e15952763cdc964d2f90dc5b35586f4fb38b5@89.110.89.214:26656,5664a8e0db4760b0c7414393eb443bf44787544a@37.27.124.38:26654,4b61584be380ceb18fc38a2e40db9de5ee1d19b7@51.15.15.233:26656,a066e59c46ae9f9c50f8e9752e4d3527161af780@87.246.108.81:26656,99c10c7c5ccad59090e34d0fd181dc9b779f1fc5@44.213.89.206:32002,501bf05da57dc7243878769027c4cc07d4b4c131@16.63.229.79:26656,dc4ba719971ec6c6ab1c1a26494569fe21bf7625@94.61.200.48:26656,462e675442969fe73ef8160c32677053670096ab@108.209.102.187:26643,f7b402b0969bf7328405e40a57d650f1ac20795b@108.209.99.65:26670,5425949026e175cf35e090617861e89a0904a38b@45.159.231.59:26656,1cf59abcc0c6da0be2bf759f44d2346172eda6c2@35.90.33.133:26656,316f0ca3746c959701d0d6165ed3e79aaff68cc1@195.201.245.178:56286"
SNAP_RPC="https://allora-t-rpc.syanodes.my.id:443"

sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.allorad/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/.allorad/config/config.toml

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

sudo systemctl restart allorad && sudo journalctl -fu allorad -o cat
```


# Useful commands

```bash
# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export ALLORA_CHAIN_ID="testnet"" >> $HOME/.bash_profile
source $HOME/.bash_profile
```

### WALLET MANAGEMENT

{% hint style="info" %}
*Add Wallet Specify the value \<wallet> with your own wallet name*
{% endhint %}

```bash
#Create Wallet
allorad keys add wallet

#Recover Wallet
allorad keys add wallet --recover

#List Wallet
allorad keys list

#Delete Wallet
allorad keys delete wallet

#Check Wallet Balance
allorad q bank balances $(allorad keys show wallet -a)
```

### VALIDATOR MANAGEMENT

{% hint style="info" %}
*Please adjust , MONIKER , YOUR\_KEYBASE\_ID , YOUR\_DETAILS , YOUR\_WEBSITE\_URL*
{% endhint %}

```bash
#Check Pubkey
allorad tendermint show-validator

#Make file validator.json
tee $HOME/.allorad/validator.json > /dev/null << EOF
{
    "pubkey": YOUR_PUBKEY,
    "amount": "1000000000uallo",
    "moniker": "MONIKER",
    "identity": "YOUR_KEYBASE_ID",
    "website": "YOUR_WEBSITE_URL",
    "details": "YOUR_DETAILS.",
    "commission-rate": "0.1",
    "commission-max-rate": "0.2",
    "commission-max-change-rate": "0.01",
    "min-self-delegation": "1"
}
EOF

#Create Validator
allorad --home $HOME/.allorad tx staking create-validator $HOME/.allorad/validator.json --from wallet --chain-id $ALLORA_CHAIN_ID --gas 220000 --gas-prices 1uallo

#Edit Validator
allorad tx staking edit-validator \
--new-moniker="YOUR MONIKER" \
--identity="IDENTITY KEYBASE" \
--details="DETAILS VALIDATOR" \
--website="LINK WEBSITE" \
--chain-id=$ALLORA_CHAIN_ID \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices=1uallo \
-y

#Unjail Validator
allorad tx slashing unjail --from wallet --chain-id $ALLORA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uallo -y

#Check Jailed Reason
allorad query slashing signing-info $(allorad tendermint show-validator)
```

### TOKEN MANAGEMENT

```bash
#Withdraw Rewards
allorad tx distribution withdraw-all-rewards --from wallet --chain-id $ALLORA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uallo -y

#Withdraw Rewards with Comission
allorad tx distribution withdraw-rewards $(allorad keys show wallet --bech val -a) --commission --from wallet --chain-id $ALLORA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uallo -y

#Delegate Token to your own validator
allorad tx staking delegate $(allorad keys show wallet --bech val -a) 100000000uallo --from wallet --chain-id $ALLORA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uallo -y

#Delegate Token to other validator
allorad tx staking redelegate $(allorad keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> 1000000uallo --from wallet --chain-id $ALLORA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uallo -y

#Unbond Token from your validator
allorad tx staking unbond $(allorad keys show wallet --bech val -a) 1000000000uallo --from wallet --chain-id $ALLORA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uallo -y

#Send Token to another wallet
allorad tx bank send wallet <TO_WALLET_ADDRESS> 100000000uallo --from wallet --chain-id $ALLORA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uallo -y
```

### GOVERNANCE

```bash
#Vote, You can change the value of yes to no,abstain,nowithveto

allorad tx gov vote 1 yes --from wallet --chain-id $ALLORA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uallo -y

#List all proposals
allorad query gov proposals

#Create new text proposal
allorad tx gov submit-proposal \
--title="Title" \
--description="Description" \
--deposit=1000000000uallo \
--type="Text" \
--from=wallet \
--gas-prices=1uallo\ 
--gas-adjustment=1.5 \
--gas="auto" \
-y 
```

### SERVICES MANAGEMENT

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

# Enable Service
sudo systemctl enable allorad

# Disable Service
sudo systemctl disable allorad

# Start Service
sudo systemctl start allorad

# Stop Service
sudo systemctl stop allorad

# Restart Service
sudo systemctl restart allorad

# Check Service Status
sudo systemctl status allorad

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

### UTILITY

```bash
#Set Indexer NULL / KV
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.allorad/config/config.toml

#Get Validator info
allorad status 2>&1 | jq .ValidatorInfo

#Get denom info
allorad q bank denom-metadata -oj | jq

#Get sync status
allorad status 2>&1 | jq .sync_info.catching_up

#Get latest height
allorad status 2>&1 | jq .sync_info.latest_block_height

#Reset Node
allorad tendermint unsafe-reset-all --home $HOME/.allorad --keep-addr-book
```

### DELETE NODE

{% hint style="warning" %} <mark style="color:red;">**WARNING! Use this command wisely Backup your key first it will remove node from your system**</mark>
{% endhint %}

```bash
sudo systemctl stop allorad && sudo systemctl disable allorad && sudo rm /etc/systemd/system/allorad.service && sudo systemctl daemon-reload && sudo rm -rf $(which allorad) && rm -rf $HOME/.allorad && rm -rf $HOME/go/bin/allorad
```


# Arkeo

<figure><img src="https://3732959305-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fr1ChzocIBBGBlfbyRi9s%2Fuploads%2Fk01iYgMDInV7nVhfCztV%2Fphoto_2023-11-12_20-12-57.jpg?alt=media&amp;token=f9d548fe-e3f9-44a5-b884-2bc515e0dbc1" alt="" width="200"><figcaption></figcaption></figure>

Arkeo was created to provide decentralized applications with increased development velocity, censorship-resistance, and most importantly to be a needed tool in fully decentralizing the UI layer of the web3 stack, all while reducing reliance on centralized data sources. In short, Arkeo is a free-market solution for decentralized infrastructure.

***

### Links

[Website](https://arkeo.network/) | [Discord](https://discord.gg/BfEHpm6uFc) |[ ](https://twitter.com/CrowdControlNet)[Twitter](https://twitter.com/arkeonetwork)

***


# Node Installation

### Hardware requirements The following requirements are recommended for running ARKEO:

* **4 or more physical CPU cores**
* **At least 1TB of SSD disk storage**
* **At least 8GB of memory (RAM)**
* **At least 100mbps network bandwidth**

## Manual Installation

```bash
# Update & install dependencies
sudo apt update && sudo apt upgrade -y
sudo apt install clang pkg-config libssl-dev curl git wget htop tmux build-essential jq make lz4 gcc unzip -y


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


# Install Go
cd $HOME
sudo rm -rf /usr/local/go
curl -Ls https://go.dev/dl/go1.21.4.linux-amd64.tar.gz | sudo tar -xzf - -C /usr/local
eval $(echo 'export PATH=$PATH:/usr/local/go/bin' | sudo tee /etc/profile.d/golang.sh)
eval $(echo 'export PATH=$PATH:$HOME/go/bin' | tee -a $HOME/.profile)
go version


# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export ARKEO_CHAIN_ID="arkeo"" >> $HOME/.bash_profile
echo "export ARKEO_PORT="25"" >> $HOME/.bash_profile
source $HOME/.bash_profile


# Download Binary
cd $HOME
rm -rf arkeod
wget https://testnet-files.itrocket.net/arkeo/arkeod
chmod +x $HOME/arkeod
mv $HOME/arkeod $HOME/go/bin/arkeod


# Config and Init App
arkeod config node tcp://localhost:${ARKEO_PORT}657
arkeod config keyring-backend test
arkeod config chain-id $ARKEO_CHAIN_ID
arkeod init $MONIKER --chain-id $ARKEO_CHAIN_ID


# Add Genesis File and Addrbook
wget -O $HOME/.arkeo/config/genesis.json https://syanodes.my.id/arkeo/genesis.json
wget -O $HOME/.arkeo/config/addrbook.json https://syanodes.my.id/arkeo/addrbook.json


#Configure Seeds and Peers
SEEDS=""
PEERS="a7346c623fd6bb834459dd483529b1420c5b56d7@85.215.38.71:26656,3f9bc5552f02dce211db24d5e42c118c61c4abde@65.108.8.28:60656,be71f456a7aa3da953db899298b53d28b75f4676@65.108.229.93:37656,cf5f027c678dbf3d495e7f98d4be0d769dcbcd19@95.217.100.248:02656,b487e892071fd3d89cc9d0de60eeed60ba7c4e5c@65.109.116.119:15756,c9b8962c35cd81a56ed9a96794a667e152d3d5c9@65.109.23.114:22856,b57d8d3654aded700a5f3165355f6ac0572b124f@85.215.51.140:26656,fb7047dd0951a50a2be5c325a383910e52aa5bf9@185.87.21.107:28656,3f04d47cfd60965007c8693fd3371af23c1b61aa@185.193.67.253:36656,9d59a4815df03dad370a8e5e77e80caa5b9c539f@65.21.131.215:14656,5c3ca78b11bbd746f950c198cac51d4e5d4c0750@65.109.89.18:18656,3b5254683b1638d1dff3447a0852d98057a20c17@85.215.42.173:26656,8d7b24c3ffc552bce34ca28b53f7d0b660e7b119@144.76.174.27:31656,475433a8e79e2d816b82324dc7e990f1526f04b2@85.215.57.101:26656,8c2d799bcc4fbf44ef34bbd2631db5c3f4619e41@213.239.207.175:60656,769de3fabb66d2dcbae7550ce7252f6f469c5d3f@65.108.126.188:26856,db1d6df90a60d408fa638c0670cee1931d4b730d@65.108.72.253:18656,a4dbd1be41263b6c84194c8009f6e109f2aba3f2@62.171.130.196:18656,0db6d3ea33d710d477a155dedba3fa8eb193b0fb@62.171.183.30:26656,cc88a7770d5784247904ec005ddb8713121be00c@144.91.74.160:26656,4369bd17c60296a54f01edd712ca7b3a43991687@65.109.92.235:11006,7ef4a6eb6c41c69f7793813a7069e291e67a80bf@104.152.49.117:26656,41e9f8771e28a5b51d6a99529ccf55db19f34abe@5.161.70.240:26656,98911188da7520af2165b3562b1b28fdc55ed5e7@65.108.91.152:26656,aa8aae4897843ca2b0fe789286e25b7548dc3c3d@45.83.122.236:26656,232f817d82c4ae534f2d9ece5cc4943c580ac64f@38.242.230.80:26656,8c3061826cd4a3b6e4dda647e439609fe15c85fa@95.214.52.157:14056,efd40fa78d967c0cc85aa05f88f224c93f75b0f8@2a01:11656,b7ab002fd8d92182b1bdc24e0ea11c7936a5731f@176.9.110.12:60656,60a1b4f4fe0fc0dbd84e65999c24d56ec3f7d172@142.132.199.236:24656,eb232cc56ab7622bce831cb1f0163530de7329d6@65.21.134.202:14656,128608f3aed48e0f37e157be713ea94a472b7e5b@185.252.232.192:26656,e0d147e64b92af644d704644834224ce3e3a5681@212.220.45.177:26656,8de6ce4191a2bda40e4a3f7e304e6999837ef999@65.109.155.238:29656,d65423c02b9907adbb87b8859eff0942ff0e559e@38.242.230.82:26656,23c2fba68dfa9bfd91aad4da23f79fbc2f627b97@194.195.90.67:26656,374facfe63ab4c786d484c2d7d614063190590b7@88.99.213.25:38656,9c0df85008e400b440232fdb7470c593fa07609a@154.53.56.176:30656,1e7a2f2ed7413cc4b06b8c82b0b2f81605ce7b60@207.180.239.56:26656,c34a4f5a59e81dd1974873641ceb9889a7e8d71a@161.35.113.45:24656,0909dbada3305d135e4b86775a7c39b5578e5978@65.108.111.236:55926,fe010f9dc956d0cfdcb41863a9c8bea604d46d2d@135.181.232.121:21304,b6b4397c840a2bb4e7ab0b88d309cba57874bd52@65.21.197.25:27656,6ae2136893a08a412f0c02eab8d595d502cd5457@65.108.206.118:36656,543195341cd9e37b7cc79db8440f68291aa909b0@144.91.120.67:26656,3448eba83632a074e713bdc3819e3583ff6e2fe8@65.109.82.17:17656,c61438fdfa622fe3a30f7a9df17e0dff28aa7ab1@185.75.181.19:15756,9aac4f5660f62bb0c1c1a1b43c1ea211df7ff9df@193.26.159.34:12656,f5dbb77c25098596ff123c08b79fc83ff1e49612@45.41.204.247:26656"
sed -i -e "s|^persistent_peers *=.*|persistent_peers = \"$PEERS\"|" $HOME/.arkeo/config/config.toml
sed -i -e "s|^seeds *=.*|seeds = \"$SEEDS\"|" $HOME/.arkeo/config/config.toml
sed -i 's/minimum-gas-prices =.*/minimum-gas-prices = "0.001uarkeo"/g' $HOME/.arkeo/config/app.toml
sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.arkeo/config/config.toml
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.arkeo/config/config.toml


# Config Pruning
pruning="custom"
pruning_keep_recent="100"
pruning_keep_every="0"
pruning_interval="19"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.arkeo/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.arkeo/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.arkeo/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.arkeo/config/app.toml


# Set Custom Port
sed -i.bak -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:${ARKEO_PORT}658\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://127.0.0.1:${ARKEO_PORT}657\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:${ARKEO_PORT}060\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:${ARKEO_PORT}656\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":${ARKEO_PORT}660\"%" $HOME/.arkeo/config/config.toml
sed -i.bak -e "s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:${ARKEO_PORT}317\"%; s%^address = \":8080\"%address = \":${ARKEO_PORT}080\"%; s%^address = \"0.0.0.0:9090\"%address = \"0.0.0.0:${ARKEO_PORT}090\"%; s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:${ARKEO_PORT}091\"%" $HOME/.arkeo/config/app.toml


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

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

[Install]
WantedBy=multi-user.target
EOF


# Enable and Start Service
sudo systemctl daemon-reload
sudo systemctl enable arkeod
sudo systemctl start arkeod
sudo journalctl -fu arkeod -o cat
```


# Useful commands

```bash
# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export ARKEO_CHAIN_ID="arkeo"" >> $HOME/.bash_profile
source $HOME/.bash_profile
```

### WALLET MANAGEMENT

{% hint style="info" %}
*Add Wallet Specify the value \<wallet> with your own wallet name*
{% endhint %}

```bash
#Create Wallet
arkeod keys add wallet

#Recover Wallet
arkeod keys add wallet --recover

#List Wallet
arkeod keys list

#Delete Wallet
arkeod keys delete wallet

#Check Wallet Balance
arkeod q bank balances $(arkeod keys show wallet -a)
```

### VALIDATOR MANAGEMENT

{% hint style="info" %}
*Please adjust , MONIKER , YOUR\_KEYBASE\_ID , YOUR\_DETAILS , YOUR\_WEBSITE\_URL*
{% endhint %}

```bash
#Create Validator
arkeod tx staking create-validator \
--amount=10000000uarkeo \
--pubkey=$(arkeod tendermint show-validator) \
--moniker=$MONIKER \
--identity="YOUR_KEYBASE_ID" \
--details="YOUR_DETAILS" \
--website="YOUR_WEBSITE_URL" \
--chain-id=$ARKEO_CHAIN_ID \
--commission-rate=0.10 \
--commission-max-rate=0.20 \
--commission-max-change-rate=0.01 \
--min-self-delegation=1000 \
--from=wallet \
--gas-adjustment 1.5 \
--gas="auto" \
--gas-prices=10uarkeo \
-y

#Edit Validator
arkeod tx staking edit-validator \
--new-moniker="YOUR MONIKER" \
--identity="IDENTITY KEYBASE" \
--details="DETAILS VALIDATOR" \
--website="LINK WEBSITE" \
--chain-id=$ARKEO_CHAIN_ID \
--from=wallet \
--gas-adjustment 1.5 \
--gas="auto" \
--gas-prices=10uarkeo \
-y

#Unjail Validator
arkeod tx slashing unjail --from wallet --chain-id $ARKEO_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10uarkeo -y

#Check Jailed Reason
arkeod query slashing signing-info $(arkeod tendermint show-validator)
```

### TOKEN MANAGEMENT

```bash
#Withdraw Rewards
arkeod tx distribution withdraw-all-rewards --from wallet --chain-id $ARKEO_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10uarkeo -y

#Withdraw Rewards with Comission
arkeod tx distribution withdraw-rewards $(arkeod keys show wallet --bech val -a) --commission --from wallet --chain-id $ARKEO_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10uarkeo -y

#Delegate Token to your own validator
arkeod tx staking delegate $(arkeod keys show wallet --bech val -a) 1000000uarkeo --from wallet --chain-id $ARKEO_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10uarkeo -y

#Delegate Token to other validator
arkeod tx staking redelegate $(arkeod keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> 1000000uarkeo --from wallet --chain-id $ARKEO_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10uarkeo -y

#Unbond Token from your validator
arkeod tx staking unbond $(arkeod keys show wallet --bech val -a) 1000000uarkeo --from wallet --chain-id $ARKEO_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10uarkeo -y

#Send Token to another wallet
arkeod tx bank send wallet <TO_WALLET_ADDRESS> 1000000uarkeo --from wallet --chain-id $ARKEO_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10uarkeo -y
```

### GOVERNANCE

```bash
#Vote You can change the value of yes to no,abstain,nowithveto
arkeod tx gov vote 1 yes --from wallet --chain-id $ARKEO_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10uarkeo -y

#List all proposals
arkeod query gov proposals

#Create new text proposal
arkeod tx gov submit-proposal \
--title="Title" \
--description="Description" \
--deposit=100000000uarkeo \
--type="Text" \
--from=wallet \
--gas-prices=10uarkeo\ 
--gas-adjustment=1.5 \
--gas="auto" \
-y 

```

### SERVICES MANAGEMENT

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

# Enable Service
sudo systemctl enable arkeod

# Disable Service
sudo systemctl disable arkeod

# Start Service
sudo systemctl start arkeod

# Stop Service
sudo systemctl stop arkeod

# Restart Service
sudo systemctl restart arkeod

# Check Service Status
sudo systemctl status arkeod

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

### UTILITY

```bash
#Set Indexer NULL / KV
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.arkeod/config/config.toml

#Get Validator info
arkeod status 2>&1 | jq .ValidatorInfo

#Get denom info
arkeod q bank denom-metadata -oj | jq

#Get sync status
arkeod status 2>&1 | jq .SyncInfo.catching_up

#Get latest height
arkeod status 2>&1 | jq .SyncInfo.latest_block_height

#Reset Node
arkeod tendermint unsafe-reset-all --home $HOME/.arkeod --keep-addr-book
```

### DELETE NODE

{% hint style="warning" %} <mark style="color:red;">**WARNING! Use this command wisely Backup your key first it will remove node from your system**</mark>
{% endhint %}

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


# Artela

<figure><img src="https://3732959305-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fr1ChzocIBBGBlfbyRi9s%2Fuploads%2F7cncRo7vO5SfEmPm8CfE%2FY-YBIFK2_400x400.jpg?alt=media&amp;token=b0506c89-61cb-44c9-9f89-c91966f5342a" alt="" width="177"><figcaption></figcaption></figure>

Artela Network is an extensible blockchain network enabling developers to build feature-rich dApps. As the first layer 1 network equipped with Aspects, Artela Network aims to maximize the value of Aspect and enable developers to build feature-rich dApps.

| Chain ID        | Latest Version Tag |
| --------------- | ------------------ |
| artela\_11822-1 | v0.4.7-rc6         |

### Public endpoints <a href="#public-endpoints" id="public-endpoints"></a>

* Api : <https://artela-t-api.syanodes.my.id/>
* Rpc : [ ](< https://mantra-testnet-rpc.syanodes.my.id/>)<https://artela-t-rpc.syanodes.my.id/>
* grpc with ssl/tls: artela-t-grpc.syanodes.my.id:443

### Links

[Website](https://artela.network/) | [Discord](https://discord.com/invite/artela) |[ ](https://twitter.com/CrowdControlNet)[Twitter](https://twitter.com/artela_network)

***


# Node Installation

### Hardware requirements The following requirements are recommended for running ARTELA:

* **4 or more physical CPU cores**
* **At least 1TB of SSD disk storage**
* **At least 8GB of memory (RAM)**
* **At least 100mbps network bandwidth**

## Manual Installation

```bash
# Update & install dependencies
sudo apt update && sudo apt upgrade -y
sudo apt install clang pkg-config libssl-dev curl git wget htop tmux build-essential jq make lz4 gcc unzip -y


# Install Go
cd $HOME
sudo rm -rf /usr/local/go
curl -Ls https://go.dev/dl/go1.21.4.linux-amd64.tar.gz | sudo tar -xzf - -C /usr/local
eval $(echo 'export PATH=$PATH:/usr/local/go/bin' | sudo tee /etc/profile.d/golang.sh)
eval $(echo 'export PATH=$PATH:$HOME/go/bin' | tee -a $HOME/.profile)
go version


# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export ARTELA_CHAIN_ID="artela_11822-1"" >> $HOME/.bash_profile
echo "export ARTELA_PORT="28"" >> $HOME/.bash_profile
source $HOME/.bash_profile


# Download Binary
cd $HOME
git clone https://github.com/artela-network/artela
cd artela
git checkout v0.4.7-rc6
make install


# Config and Init App
artelad config node tcp://localhost:${ARTELA_PORT}657
artelad config keyring-backend test
artelad config chain-id $ARTELA_CHAIN_ID
artelad init $MONIKER --chain-id $ARTELA_CHAIN_ID


# Add Genesis File and Addrbook
wget -O $HOME/.artelad/config/genesis.json https://testnet-files.syanodes.my.id/artela-genesis.json
wget -O $HOME/.artelad/config/addrbook.json https://testnet-files.syanodes.my.id/artela-addrbook.json


#Configure Seeds and Peers
seed=""
peers="a996136dcb9f63c7ddef626c70ef488cc9e263b8@144.217.68.182:22256,978dee673bd447147f61aa5a1bdaabdfb8f8b853@47.88.57.107:26656,aa416d3628dcce6e87d4b92d1867c8eca36a70a7@47.254.93.86:26656,30fb0055aced21472a01911353101bc4cd356bb3@47.89.230.117:26656,32d0e4aec8d8a8e33273337e1821f2fe2309539a@47.88.58.36:26656,9e2fbfc4b32a1b013e53f3fc9b45638f4cddee36@47.254.66.177:26656,a03ae11a093c67e2554b73d174c4168fe715af10@57.128.103.184:26656,b23bc610c374fd071c20ce4a2349bf91b8fbd7db@65.108.72.233:11656,04fe1c36f8481649101bff41485e66287e40b136@170.64.140.116:26656,0188a9bcff4f411b29dbddda527d77803396e1c6@185.245.182.180:26656,bec6934fcddbac139bdecce19f81510cb5e02949@47.254.24.106:26656,146d6011cce0423f564c9277c6a3390657c53730@157.90.226.23:26656,1b73ac616d74375932fb6847ec67eee4a98174e9@116.202.85.52:25556,35ce36af33e289a29787eedb3127d21bf10edcff@81.0.218.194:45656,de5612c035bd1875f0bd36d7cbf5d660b0d1e943@5.78.64.11:26656"
sed -i.bak -e "s/^seed *=.*/seed = \"$seed\"/" ~/.artelad/config/config.toml
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" ~/.artelad/config/config.toml
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0uart\"/" $HOME/.artelad/config/app.toml
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.artelad/config/config.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.artelad/config/config.toml


# Config Pruning
pruning="custom"
pruning_keep_recent="100"
pruning_keep_every="0"
pruning_interval="19"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.artelad/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.artelad/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.artelad/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.artelad/config/app.toml


# Set Custom Port
sed -i.bak -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:${ARTELA_PORT}658\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://127.0.0.1:${ARTELA_PORT}657\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:${ARTELA_PORT}060\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:${ARTELA_PORT}656\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":${ARTELA_PORT}660\"%" $HOME/.artelad/config/config.toml
sed -i.bak -e "s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:${ARTELA_PORT}317\"%; s%^address = \":8080\"%address = \":${ARTELA_PORT}080\"%; s%^address = \"0.0.0.0:9090\"%address = \"0.0.0.0:${ARTELA_PORT}090\"%; s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:${ARTELA_PORT}091\"%" $HOME/.artelad/config/app.toml


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

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

[Install]
WantedBy=multi-user.target
EOF


# Enable and Start Service
sudo systemctl daemon-reload
sudo systemctl enable artelad
sudo systemctl start artelad && sudo journalctl -fu artelad -o cat
```

## Auto Installation

```bash
wget https://snapshot.syanodes.my.id/auto/testnet/artela_auto && chmod +x artela_auto && ./artela_auto
```


# Upgrade

### Manual Upgrade

```bash
sudo systemctl stop artelad

cd $HOME
cd artela
git fetch --all
git checkout v0.4.7-rc6
make install

sed -E 's/^pool-size[[:space:]]*=[[:space:]]*[0-9]+$/apply-pool-size = 10\nquery-pool-size = 30/' ~/.artelad/config/app.toml > ~/.artelad/config/temp.app.toml && mv ~/.artelad/config/temp.app.toml ~/.artelad/config/app.toml

sudo systemctl start artelad
```


# Snapshot & State sync

## Snapshot

```bash
sudo systemctl stop artelad

cp $HOME/.artelad/data/priv_validator_state.json $HOME/.artelad/priv_validator_state.json.backup
artelad tendermint unsafe-reset-all --home ~/.artelad/ --keep-addr-book

curl https://snapshot1.syanodes.my.id/artela/snapshot1-artela.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.artelad

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

sudo systemctl restart artelad && sudo journalctl -fu artelad -o cat
```

## State Sync

```bash
sudo systemctl stop artelad

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

peers="a996136dcb9f63c7ddef626c70ef488cc9e263b8@144.217.68.182:22256,978dee673bd447147f61aa5a1bdaabdfb8f8b853@47.88.57.107:26656,aa416d3628dcce6e87d4b92d1867c8eca36a70a7@47.254.93.86:26656,30fb0055aced21472a01911353101bc4cd356bb3@47.89.230.117:26656,32d0e4aec8d8a8e33273337e1821f2fe2309539a@47.88.58.36:26656,9e2fbfc4b32a1b013e53f3fc9b45638f4cddee36@47.254.66.177:26656,a03ae11a093c67e2554b73d174c4168fe715af10@57.128.103.184:26656,b23bc610c374fd071c20ce4a2349bf91b8fbd7db@65.108.72.233:11656,04fe1c36f8481649101bff41485e66287e40b136@170.64.140.116:26656,0188a9bcff4f411b29dbddda527d77803396e1c6@185.245.182.180:26656,bec6934fcddbac139bdecce19f81510cb5e02949@47.254.24.106:26656,146d6011cce0423f564c9277c6a3390657c53730@157.90.226.23:26656,1b73ac616d74375932fb6847ec67eee4a98174e9@116.202.85.52:25556,35ce36af33e289a29787eedb3127d21bf10edcff@81.0.218.194:45656,de5612c035bd1875f0bd36d7cbf5d660b0d1e943@5.78.64.11:26656"
SNAP_RPC="https://artela-t-rpc.syanodes.my.id:443"

sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.artelad/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/.artelad/config/config.toml

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

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


# Useful commands

```bash
# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export ARTELA_CHAIN_ID="artela_11822-1"" >> $HOME/.bash_profile
source $HOME/.bash_profile
```

### WALLET MANAGEMENT

{% hint style="info" %}
*Add Wallet Specify the value \<wallet> with your own wallet name*
{% endhint %}

```bash
#Create Wallet
artelad keys add wallet

#Recover Wallet
artelad keys add wallet --recover

#List Wallet
artelad keys list

#Delete Wallet
artelad keys delete wallet

#Check Wallet Balance
artelad q bank balances $(artelad keys show wallet -a)
```

### VALIDATOR MANAGEMENT

{% hint style="info" %}
*Please adjust , MONIKER , YOUR\_KEYBASE\_ID , YOUR\_DETAILS , YOUR\_WEBSITE\_URL*
{% endhint %}

```bash
#Create Validator (Staking)
artelad tx staking create-validator \
--amount=10000000uart \
--pubkey=$(artelad tendermint show-validator) \
--moniker=$MONIKER \
--identity="YOUR_KEYBASE_ID" \
--details="YOUR_DETAILS" \
--website="YOUR_WEBSITE_URL" \
--chain-id=$ARTELA_CHAIN_ID \
--commission-rate=0.10 \
--commission-max-rate=0.20 \
--commission-max-change-rate=0.01 \
--min-self-delegation=1000 \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices=10uart \
-y

#Edit Validator
artelad tx staking edit-validator \
--new-moniker="YOUR MONIKER" \
--identity="IDENTITY KEYBASE" \
--details="DETAILS VALIDATOR" \
--website="LINK WEBSITE" \
--chain-id=$ARTELA_CHAIN_ID \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices=10uart \
-y

#Unjail Validator
artelad tx slashing unjail --from wallet --chain-id $ARTELA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10uart -y

#Check Jailed Reason
artelad query slashing signing-info $(artelad tendermint show-validator)
```

### TOKEN MANAGEMENT

```bash
#Withdraw Rewards
artelad tx distribution withdraw-all-rewards --from wallet --chain-id $ARTELA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10uart -y

#Withdraw Rewards with Comission
artelad tx distribution withdraw-rewards $(artelad keys show wallet --bech val -a) --commission --from wallet --chain-id $ARTELA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10uart -y

#Delegate Token to your own validator
artelad tx staking delegate $(artelad keys show wallet --bech val -a) 1000000uart --from wallet --chain-id $ARTELA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10uart -y

#Delegate Token to other validator
artelad tx staking redelegate $(artelad keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> 1000000uart --from wallet --chain-id $ARTELA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10uart -y

#Unbond Token from your validator
artelad tx staking unbond $(artelad keys show wallet --bech val -a) 1000000uart --from wallet --chain-id $ARTELA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10uart -y

#Send Token to another wallet
artelad tx bank send wallet <TO_WALLET_ADDRESS> 1000000uart --from wallet --chain-id $ARTELA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10uart -y
```

### GOVERNANCE

```bash
#Vote You can change the value of yes to no,abstain,nowithveto
artelad tx gov vote 1 yes --from wallet --chain-id $ARTELA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10uart -y

#List all proposals
artelad query gov proposals

#Create new text proposal
artelad tx gov submit-proposal \
--title="Title" \
--description="Description" \
--deposit=100000000uart \
--type="Text" \
--from=wallet \
--gas-prices=10uart \ 
--gas-adjustment=1.5 \
--gas="auto" \
-y 
```

### SERVICES MANAGEMENT

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

# Enable Service
sudo systemctl enable artelad

# Disable Service
sudo systemctl disable artelad

# Start Service
sudo systemctl start artelad

# Stop Service
sudo systemctl stop artelad

# Restart Service
sudo systemctl restart artelad

# Check Service Status
sudo systemctl status artelad

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

```

### UTILITY

```bash
#Set Indexer NULL / KV
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.artelad/config/config.toml

#Get Validator info
artelad status 2>&1 | jq .ValidatorInfo

#Get denom info
artelad q bank denom-metadata -oj | jq

#Get sync status
artelad status 2>&1 | jq .SyncInfo.catching_up

#Get latest height
artelad status 2>&1 | jq .SyncInfo.latest_block_height

#Reset Node
artelad tendermint unsafe-reset-all --home $HOME/.artelad --keep-addr-book
```

### DELETE NODE

{% hint style="warning" %} <mark style="color:red;">**WARNING! Use this command wisely Backup your key first it will remove node from your system**</mark>
{% endhint %}

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




---

[Next Page](/llms-full.txt/1)

