Deploying a Node on KYVE

101

KYVE protocol nodes switch between uploader and validator roles to ensure data integrity. Running a node earns $KYVE rewards but requires meeting hardware and wallet requirements.

Protocol nodes are the backbone of KYVE’s storage pools. They switch between two roles: one node will be an uploader, collecting data from a data source, bundling and uploading them to a storage provider, and the rest in the pool will be validators, voting on whether the data is valid or not.

These roles are automatically switched after each piece of data, making sure a different node is selected as an uploader at a time to avoid any possible bad influence. With each pool having up to 50 protocol nodes, they all come together to create a decentralized network for making data trustless.

Why run a protocol node?

When a protocol node behaves correctly, i.e. voting with the majority of the node network or doing its job correctly as an uploader, they are rewarded in $KYVE. Meaning the stake you put at risk to run your node will increase by a certain percentage.

However, in order to keep proper incentivization, if your node behaves incorrectly, i.e. voting incorrectly, it will get slashed (tokens will be taken away from your original stake).

Not only does running a protocol provide opportunity for token rewards, but it also means taking part in KYVE’s mission and changing the world of data for the better!

  • Please note: The KYVE app runs on mainnet, therefore, be cautious of risks when it comes to running a node. If you’d like to test out running a node, feel free to do so on our testnet Kaon or devnet Korellia.
  • In order to complete this course, you also should have some basic knowledge on coding on your local computer terminal, and or have already run a node.
  • Spinning up a KYVE node takes between 5-20 minutes depending on your familiarity with the required actions.

Ready to run a KYVE protocol node on Korellia? Let’s get started — >

Requirements

Before we get started, it’s important to make sure you have all the right materials! To run a protocol node, you will need two wallets:

  1. Either a Keplr or Cosmostation wallet with $tKYVE if you want to run a node on KYVE’s testnet, which you can claim some on KYVE testnet faucet.
  2. An Arweave key file with some AR tokens. For testnet purposes and to reduce costs for validators, the data on the KYVE testnet are stored in a local environment that doesn't require any upload fees.

Then, there are the minimum hardware requirements:

  • 1vCPU
  • 4GB RAM
  • 1GB DISK

Before continuing, make sure that you have the Keplr or Cosmostation wallet installed in your browser. Head over to the KYVE testnet app and make sure to connect your wallet (this automatically adds and switches to the KYVE network).

Go to the faucet tab and claim some tokens via one of three faucets. The wheel is the easiest option:

Once you are sure to have these requirements, you can go ahead and get started!

Choose a pool

As mentioned in previous courses, KYVE’s data lake is made up of data storage pools. Each pool pertains to a specific set of data, for example, Cronos blockchain data.

To run a protocol node, the first step is choosing a pool you would like to join! Korellia has a lot of different pools to choose from. You can find an overview of all testnet pools on KYVE in the KYVE app.

It’s important to choose wisely, this way you can be sure to run in a consistent and rewarding pool. There are a few factors to look in to to ensure this:

  • You may see that there are some pools that are active, and others that are paused. If a pool runs out of funding, it will be paused. It’s important to choose a pool that is active.
  • You can also look into the pool’s metrics to see the amount of slashes that occurred, this way you can see how stable the pool is.

Once you have chosen a pool, for example, Moonbeam, you have to remember the pool id and the pool runtime for later which can be both found when you click on the pool overview. For the Moonbeam pool, this would be: Pool ID 0, runtime @kyvejs/evm, as seen highlighted in red below.

Verify that you can claim a validator slot

When choosing a pool, it’s also important to check if you can claim a validator slot.

Each storage pool on KYVE is limited to 50 protocol nodes. Due to this limitation, only the nodes with the highest delegation on $KYVE can claim a validator slot:

  • This also means you can only claim a validator slot if you have more than the minimum delegation amount.

To check the minimum delegation amount you can click on the validators tab once you have selected a pool. There, you should see something like this: In the example above, there are nine free validator slots available, and you would just need more than 0 $KYVE or $tKYVE (tesntet tokens) delegated to your node in order to participate. If this were not the case, and the slots were all full with a minimum delegation of 300 KYVE ⁄ tKYVE, you would need to have more than 300 KYVE ⁄ tKYVE delegated to your node.

Make sure you check if the slots are full and if you can meet the minimum delegation amount in order to continue!

Create a storage provider wallet

KYVE is storage agnostic, meaning that it allows users to choose which storage provider KYVE should store the data onto. This is one of the main customization features for developers using KYVE.

Currently, Korellia supports storage onto Arweave directly, and also through Bundlr. These are permanent data storage solutions, making data immutable. However, KYVE is looking into providing other storage solutions in the near future for mainnet to best apply to all use cases.

Depending on which storage provider the pool runs on, you have to setup a wallet with which you can upload data. On the pool overview, it is clearly listed which storage provider a pool uses.

For this course, we will continue with the Moonbeam pool, which is stored onto Arweave…

Setting up an Arweave wallet

In order to setup an Arweave wallet, you need a keyfile which will be the private key of Arweave.

Because this amount won’t be enough to let validators run for a longer time, you will need to get some additional $AR. You can exchange them on common exchanges. We would recommend an amount of ~1 AR which is more than enough.

To know for a bundlr wallet, check KYVE documentations.

Create a Validator Account

Now that you chose the pool you want to join and have a well funded storage provider account, you can finally create your validator account which will hold all of your stake. Let’s get started:

  1. The first step is to connect your wallet to the KYVE app.
  2. We would highly recommend creating the valaccount from a cold wallet like a Ledger since this wallet will hold all of your delegation and rewards. If you loose that wallet you loose all of your stake. You just need to connect this wallet to the app in order to create the account or claim your rewards later.
  3. Once you have a wallet connected to the app you have to enable the Expert mode. This mode allows you to create a validator account with the currently connected wallet. You can find the expert mode button in the drawer on the left right at the bottom.
  4. With expert mode enabled you can now head over to the Validators page and click on the top right to create a Validator.

If the validator was successfully created you should have been routed to your dedicated validator page were you can see all the information about your validator including other delegations and performance metrics.

Ready to Run

Now we have to get into the coding part of things… Running a protocol node can be done in 3 ways:

  • With KYSOR (we highly recommend, take our KYSOR course to find out more);
  • Running with prebuilt binaries;
  • Or compiling binaries yourself and running manually.

In this course, we will learn option #2, running with prebuilt binaries.

To get started, download the current protocol node binaries. Now, open up your local terminal (if you’re a Mac user, or the equivalent on PC).

Example: If we want to run on the Moonbeam pool with Pool Id 0 we can do the following:

In order to pass secrets like the valaccount mnemonic or the private key file of the storage provider we export them to the environment. This can be done in the following way:

To run the protocol node the following command needs to be executed:

  • The valaccount has to be created prior to this step. The easiest way is to just create it with Keplr or Cosmostation wallet and then export it.
  • The logs and the cache files are generated in the current directory. You can specify the home directory with the optional flag ** –home.**
  • The prometheus metrics server runs default on port 8080, you can overwrite that with the optional flag ** –metrics-port**

Join a Pool

After the node is running you can finally join the pool with your valaccount!

If the node is starting for the first time, it should something like this in the logs:

  1. With this information (Valaddress and Valname) you can head back to the the KYVE app and join the pool.
  2. Now that the node is already running it just needs the authorization from it’s main validator account in order to run for this validator and generate rewards. For that visit your validator page and click on Join existing pool.

A dialog should open where you should select the pool you want to join (here Moonbeam).

  1. After that, enter the Valaddress that needs to be authorized and the Valname, which just serves as a security that the node has actually been started. (If you join a pool without having the node running you are in danger of receiving a timeout slash because once you join a pool you are expected to validate and upload data).
  2. For the last option you can do a one time transfer so that the valaccount has some KYVE ⁄ tKYVE to pay for transaction fees. We would recommend sending 1000 KYVE ⁄ tKYVE for the start. Make sure that the valaccount always has enough KYVE ⁄ tKYVE to pay for the fees, otherwise you are again in danger of receiving a timeout slash.

Once you have joined the pool the node should continue in about ~10 seconds.

All seems to work just fine? Congrats! You’re successfully participating in a KYVE pool!

Join Multiple Pools to Increase Rewards

There’s also the possibility of joining multiple pools in order to increase your rewards. This is optional, of course, and increases potential slashing risks.

If you want to join another pool just repeat the steps from point 4. You can see all the pools you are participating in your validator page.

Conclusion

Congrats! You now know how to run a protocol node on KYVE, earning $KYVE rewards and participating in our mission towards providing a trustless future for data!

101

Related Courses

Decentralized Storage: Discovering Arweave and Filecoin

Learn about decentralized storage solutions Arweave and Filecoin, their differences, and how KYVE leverages them for decentralized data use cases.
Go To Course

The History of Blockchain

Explore the history of blockchain technology, from its origins in the late '80s to the creation of Bitcoin, and understand its evolution and impact.
Go To Course

Discover The Different Blockchain Layers

Explore the multi-layered blockchain ecosystem from foundational Layer 0 to user-facing Layer 3, understanding their functions, components, and trade-offs.
Go To Course