Protocol Node: The Protocol or Validator Node collects data from a data source, bundling and uploading them to Arweave 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.
Here we are joining pool 0
the Moonbeam pool, you can substitute this for other pools.
Kysor 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
The Kyve application can be found here:
Have Keplr 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 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.
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:
wget https://github.com/KYVENetwork/kyvejs/releases/download/%40kyve%2Fkysor%401.0.0-beta.1/kysor-linux-x64.zip
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
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
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
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.
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).
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
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.
you should now see your Validator active on the App and in your logs on your device
Running successfully should show validating on bundles
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
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.
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]
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
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
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>