# KYVE Protocol Node - Korellia Network


By [GLCstaked](https://paragraph.com/@glcstaked) · 2022-12-17

---

**Protocol Node:** The Protocol or Validator Node collects data from a data source, bundling and uploading them to [Arweave](https://www.arweave.org/) and verifying it, these data sources are pools that you can decide to validate on.

This guide is intended for those who wish to run a protocol node on Korellia now with the latest updates.

[

KYVE's Seventh Protocol Update - Inter-Pool Security, Module Refactoring, and More
----------------------------------------------------------------------------------

KYVE's Seventh Protocol Update - Inter-Pool Security, Module Refactoring, and More We're thrilled to announce the release of KYVE's seventh protocol update! This time, our Engineering team ...

https://blog.kyve.network

![](https://storage.googleapis.com/papyrus_images/284ff3fee7e56b2384dabb4183ab06fb5b77a99db94caf8c9be98bfbcd8d7c98.png)

](https://blog.kyve.network/kyves-seventh-protocol-update-inter-pool-security-module-refactoring-and-more-c507586ada7f)

Here we are joining `pool 0` the Moonbeam pool, you can substitute this for other pools.

[Kysor](https://kysor.kyve.network/) will auto download the binaries for the selected pool for you, you simply need to create the `valaccounts` for the pool and set up a service for kysor to run on that pool in the background.

**Running nodes with KYSOR has the following benefits:**

*   Only use **one** program to run on **every** pool
    
*   Not installing and compiling protocol binaries **manually** for every pool
    
*   Getting the new upgrade binaries during a pool upgrade **automatically** and therefore **don't risk timeout slashes**
    
*   Make running protocol nodes **standardized** and **easier**
    

Set up Wallets- Connect to Korellia Network
-------------------------------------------

The Kyve application can be found here:

[https://app.kyve.network/#/](https://app.kyve.network/#/)

Have [Keplr](https://www.keplr.app/) installed, this will prompt you to connect `Keplr extention` and allow the new network request. This is two confirmations which you should approve.

**Set up Arweave Wallet**

An [Arweave](https://arweave.app/welcome) wallet with a `.json` wallet file is required. You will also need $KYVE and $AR to pay for Transactions which can be obtained from faucets in the respective community channels.

Set up Device
-------------

**Update the system**

    sudo apt update && sudo apt upgrade -y
    

**Move Arweave keyfile into directory**

We need to move our `arweave.json` (which should be funded with AR) into a directory in our system, I’ve placed it here `/home/$USER/kyve/secrets` as I’m running local I just used the UI. _note you can place it wherever you want, but be sure to change the path in the system service file later._

if your on a VPS you could create the file and paste the contents in (usually) by `sudo nano home/ubuntu/kyve/secrets/arweave.json`

**Download the Kysor Protocol node binary**

this is the KYSOR binary which uses one program for every pool, it auto updates and gets the new upgrade binaries during every pool upgrade.

The latest binary can be found [here](https://github.com/KYVENetwork/kyvejs):

    wget https://github.com/KYVENetwork/kyvejs/releases/download/%40kyve%2Fkysor%401.0.0-beta.1/kysor-linux-x64.zip 
    

![](https://storage.googleapis.com/papyrus_images/076688364b1b0ff7357c6e61b034364d143e84ce6771cc67407dc9e9aaeee020.png)

**Move to directory**

unzip and move, you should delete the zip file once done, it can be found in your home directory. (you may need to install zip: `sudo apt install zip -y` )

    unzip kysor-linux-x64.zip
    mv kysor-linux-x64 kysor
    

**Grant permissions and make executable**

     sudo chmod +x kysor
    

**Initialize Kysor**

When you initialise KYSOR you need to specify the network you should run on and if the KYSOR should automatically download and execute the binaries for you. This command creates a `config.toml` under the following directory: `$HOME/.kysor/`. You can edit this file if you wish to change the network or the auto download flag.

    ./kysor init --network korellia --auto-download-binaries
    

![](https://storage.googleapis.com/papyrus_images/ad9b83c7755d193ce278e0ea97c99097bdbbff89edf4642874024fb27b436a8f.png)

**Edit config.toml**

_for running 1.0.0-beta.7 and above the following config.toml is needed_

    cd .kysor
    nano config.toml
    
    #paste the following in the terminal
    chainId = "korellia"
    autoDownloadBinaries = true
    rpc = "https://rpc.korellia.kyve.network"
    rest = "https://api.korellia.kyve.network"
    

**Create validator account**

we are creating a validator account, this is a new account that we will fund with our main account that contains our KYVE

    ./kysor valaccounts create \
    --name moonbeam \
    --pool 0 \
    --storage-priv "$(cat kyve/secrets/arweave.json)" \
    --verbose \
    --metrics
    

**Start the Node**

    ./kysor start --valaccount moonbeam
    

![](https://storage.googleapis.com/papyrus_images/c3efbad3e6d7457f00a1983063d3779469cc003e94d425ca640d9858a3fcc354.png)

The node will not continue until the account is authorized and funded. but first its advised to create a system service for the node, in order to run in the background. you can stop the node with `ctrl+c` or start a new shell

**Create system service to run the node**

    sudo tee <<EOF > /dev/null /etc/systemd/system/moonbeamd.service
    [Unit]
    Description=KYVE Protocol-Node moonbeam daemon
    After=network-online.target
    
    [Service]
    User=$USER
    ExecStart=/home/$USER/kysor start --valaccount moonbeam
    Restart=on-failure
    RestartSec=3
    LimitNOFILE=infinity
    EOF
    

**Start the system service**

    sudo systemctl daemon-reload && \
    sudo systemctl enable moonbeamd && \
    sudo systemctl start moonbeamd
    

**View Logs**

    sudo journalctl -u moonbeamd -f -o cat
    

![](https://storage.googleapis.com/papyrus_images/eb1cadff6ea32833e91b88c410dd7623e8216d4fc00943b9f1742623b8e4658a.png)

This will display your `Valaddress`and a `Valname`: this is a three letter phrase unique to your node. We need both of these to start the node. The node will not continue until the account is authorized and funded.

Authorize Validator
-------------------

You will now need to activate the node head over to the Kyve app and connect your Keplr wallet extension, which should now be funded with $KYVE (make sure to also have $AR in your arweave wallet).

[https://app.kyve.network/#/](https://app.kyve.network/#/)

**Self Delegate**

If you have not done so already, we need to delegate KYVE to our main account which will fund our valaccount/s. Head to `Validators` and find `Become a Validator`

![](https://storage.googleapis.com/papyrus_images/7b72a4d592ad104b42d3ac579debf0e030255c65217945bf64336dc8cf6577c8.png)

Enter an amount to delegate to yourself and click on `self delegate “ammount“ $KYVE` you will be prompted to confirm a transaction via Keplr extension. This is how much we effectively stake to our protocol validator across one or multiple pools.

**Fund Valaccount**

our Valaccount/s are essentially separate wallets managed by our main funding wallet (we self delegated too) we need to fund these with enough $KYVE for fees.

Now head to `validators` > `my validator`, now click on `Join Existing Pool.` here enter your Pool (which should be the same as the Pool specified in the system.service) Your `Valaddress`, and your `Valname` enter an amount of $KYVE less than what you delegated to yourself earlier.

![confirm the transaction on Keplr ](https://storage.googleapis.com/papyrus_images/43e4e810cd91dad329899afe686e953c28c35fa9b7ed66af0ee608f749257a9e.png)

confirm the transaction on Keplr

you should now see your Validator active on the App and in your logs on your device

![](https://storage.googleapis.com/papyrus_images/a55c88f7ef81a66a33579992fdd9e6b46c405933801dc880fee49fbcf2d02d54.png)

_Running successfully should show validating on bundles_

![](https://storage.googleapis.com/papyrus_images/06785b1b07ed589aa6cc6c30458db831fa33ace4b4386cad86362d7435ee670c.png)

Run on Multiple Pools
---------------------

If we wish to run on multiple pools, we can select from the beta app, head over to Pools section and select which pool you want to add. we need to get the `pool ID`

![](https://storage.googleapis.com/papyrus_images/0ba0ce5ed47991a1ea04118a2bbd88a48bfd16439399e2dad177dac0080cc42e.png)

**Create a new Valaccount**

Create New account for Celo, our pool ID will be `2`, and for ease we will name `celo`

    ./kysor valaccounts create \
    --name celo \
    --pool 2 \
    --storage-priv "$(cat kyve/secrets/arweave.json)" \
    --verbose \
    --metrics
    

**Change Port for new service**

On default the metrics server is available under the following endpoint: `http://localhost:8080/metrics` so we need to change the port for the new pool service, as moonbeam is on `8080`, I used `8081.`

    sudo nano /home/$USER/.kysor/valaccounts/celo.toml
    

_If you choose another pool such as avalanche, you would need to edit the_ `avalanche.toml`

**Create a System Service for New Pool**

    sudo tee <<EOF > /dev/null /etc/systemd/system/celod.service
    [Unit]
    Description=KYVE Protocol-Node celo daemon
    After=network-online.target
    
    [Service]
    User=$USER
    ExecStart=/home/$USER/kysor start --valaccount celo
    Restart=on-failure
    RestartSec=3
    LimitNOFILE=infinity
    EOF
    

**Start new service**

    sudo systemctl daemon-reload && \
    sudo systemctl enable celod && \
    sudo systemctl start celod
    

**Fund account**

Follow the same steps to authorize validator, and use the `valaccount` and `valname` that is displayed when starting the service.

We can create a new service for any available pool by following the same steps.

Other Commands
--------------

**Stopping/Restarting your Service for changes**

    sudo systemctl stop <service name>.service
    

Make changes then restart service

    sudo systemctl daemon-reload && sudo systemctl enable <service name>.service && sudo systemctl restart <service name>.service
    

**Managing Valaccounts**

Show valaccount address

    ./kysor valaccounts show-address --name [VALACCOUNT]
    

Show valaccount balance

    ./kysor valaccounts show-balance --name [VALACCOUNT]
    

Transfer valaccount gas funds

    ./kysor valaccounts transfer --from [VALACCOUNT] --amount 1000000000 --recipient [RECIPIENT]
    

Upgrade Kysor Binary
--------------------

Kysor is a tool for managing binary updates itself, in the case that the kysor binary has an update

**Stop Kysor services**

    sudo sytemctl stop <service name>
    

can check services with

    cd /etc/systemd/system/ && ls
    

**Delete old binary**

    sudo rm kysor
    

**Download new binary**

example, fund the latest binary [here](https://github.com/KYVENetwork/kyvejs)

    wget https://github.com/KYVENetwork/kyvejs/releases/download/%40kyve%2Fkysor%401.0.0-beta.7/kysor-linux-x64.zip
    

Now Follow the same steps to unzip/rename and make executable from this guide

**Restart the services**

    sudo systemctl daemon-reload && \
    sudo systemctl enable moonbeamd && \
    sudo systemctl start moonbeamd
    

this would need to be done for all services, view logs and restart the valaccount from the Kyve UI

    sudo journalctl -u moonbeamd -f -o cat
    

Migrate Server - Recover Valaccounts
------------------------------------

Should you need to migrate server, to recover existing valaccounts, already funded and configured, Instead of creating new ones

**1\. Backup Files**

in the working folder `.kysor` backup the contents of the folder `./kysor/valaccounts` and the file `config.toml`

ensure you have your `arweave.json` backed up too

**2\. Shut down old server**

ensure that the services for all valaccounts are stopped, then shut down the server

    sudo systemctl stop <valaccount-service>
    

**3\. Setup new server**

Follow steps to setup a new server Place `arweave.json` within `/home/$USER/kyve/secrets` Download the lastest kysor binary, follow steps to unpack Initialize kysor

    ./kysor init --network korellia --auto-download-binaries 
    

**4\. Place backed up configuration files**

`mkdir .kysor/valaccounts` and move the contents to this folder

Edit the config.toml if need be

    cd .kysor
    sudo nano config.toml
    

**5\. Re-create Services**

If these were also copied then, (otherwise create them again) move `<valaccounts>.service` files to `/etc/systemd/system/`

**6\. Restart Services**

    sudo systemctl daemon-reload && \
    sudo systemctl enable <valaccounts-service> && \
    sudo systemctl start <valaccounts-service>

---

*Originally published on [GLCstaked](https://paragraph.com/@glcstaked/kyve-protocol-node-korellia-network)*
