# Running a Chain-Node
The Chain-Nodes are the backbone of KYVE. The chain layer is a completely sovereign Proof of Stake (opens new window) blockchain build with Starport (opens new window). This blockchain is run by independent nodes we call Chain-Nodes since they're running on the chain level. The native currency of the KYVE chain is $KYVE, it secures the chain and allows chain nodes to stake and other users to delegate into them.
- 1GB RAM
- 80GB DISK
The guide uses GNU/Linux for the operating system.
# Genesis Installation
During the time, chain-upgrades occur but the blockchains stays the same. Therefore, it is necessary to process older blocks with the appropriate version. We use Cosmovisor the handle automatic upgrades. The setup is explained after the initial setup.
In the genesis setup the node will be fully configured. After that one needs to configure the Cosmovisor.
# Obtaining the binaries
We provide prebuilt binaries on GitHub (https://github.com/KYVENetwork/chain/releases/tag/v0.0.1 (opens new window))
For building the binaries we refer to the
Readme.md in https://github.com/KYVENetwork/chain (opens new window).
Assuming an amd64 Linux system:
Obtain the genesis
It is important to start with the oldest version
v0.0.1 (the genesis version).
Start the chain the first time
The node now starts to sync the blockchain.
The node can be stopped with
strg + C. You do not need to wait for it to sync. Setting up a daemon service is explained later in this chapter.
The seed only needs to be provided for the first startup. It is then automatically saved to the address book.
The chain will start to sync until the first governance upgrade proposal starts to occur. The Chain-Node will halt and probably print a "CONSENSUS FAILURE" error. When this happens the next released binary needs to be started.
To avoid replacing the binaries manually and allow automatic updates we recommend setting up the Cosmovisor.
# Setup Cosmovisor
The Cosmovisor is a tool that listens to on-chain governance proposals and automatically replaces the binary.
The build instructions can be found at https://github.com/cosmos/cosmos-sdk/tree/master/cosmovisor (opens new window) For now we also provide the binary for linux at https://github.com/KYVENetwork/chain/releases/download/v0.0.1/cosmovisor_linux_amd64 (opens new window)
Setup the directory
Copy the binary from the first section to the Cosmovisor directory.
Then export the following environment variables:
IMPORTANT: For production grade validator nodes it is highly recommended turning off auto download and downloading binaries manually instead.
Start the Cosmovisor
The Cosmovisor can be stopped with
strg + C. Setting up a daemon service is explained later in this chapter.
# Obtaining binaries manually
This is needed when
DAEMON_ALLOW_DOWNLOAD_BINARIES is set to
When a new chain-upgrade proposal occurs, users have multiple days time to vote on it. The upgrade-proposal specifies an exact block-height on which the upgrade will be performed. When the proposal is up for vote the GitHub repository is already updated with the new tag and version.
Node-runners then have to check out the specific tag and build the binary on their on. After that the binary needs to be copied to the Cosmovisor directory.
$UPGRADE_NAME will be the name of the tag of the commit. And is also specified
in the governance proposal.
# Setting up Deamon-service
For the daemon service root-privileges are required during the setup.
Create a service file. $USER is the Linux user which runs the process. Replace it before you copy the command
Start the daemon
# Becoming a validator
For becoming a validator you need $KYVE. There are currently 100 validator slots. If all slots are taken you need to stake more than the lowest one in the list to become a validator.
Make sure your node is fully synced and configured correctly.
Create a key or import an existing one
Make sure you have enough balance in your wallet.
Become a validator by submitting the
create-validator transaction to the network.
You need to substitute
Learn your valoper address
Delegate additional stake