title | order | parent | ||||
---|---|---|---|---|---|---|
Running a protocol node |
3 |
|
The Protocol-nodes are the backbone of a KYVE pool. They are responsible for collecting data from a data source, bundling and uploading them to Arweave and verifying it. This enables KYVE to store any data stream decentralized and permanently.
Wallets
- A Keplr wallet with $KYVE. (You can claim some here)
- An Arweave keyfile with some AR. (You can claim some here)
Minimum hardware requirements
- 1vCPU
- 4GB RAM
- 1GB DISK
Before continuing, make sure that you have the Keplr wallet installed in your browser. Head over to the KYVE 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.
::: warning
IMPORTANT: Make sure that you are on the correct app URL https://app.kyve.network
:::
Before you can run a protocol node you have to choose a pool you want to join. You can find an overview of all pools
in the KYVE app here. Once you have chosen a pool you have to remember the pool id and the
pool runtime for later. You can find this information right below the pool name once you have clicked on a pool in the overview. In this example we have chosen the first pool with the pool id 0
and the runtime @kyve/evm
.
Due to a limited number of validator slots in each pool only the nodes with the highest stake can claim a validator slot. You can only claim a validator slot if you have more than the minimum staking amount.
To check the minimum staking amount you can click on the tab Validators
once you have selected a pool. There you should see something like this:
In this case all validator slots are occupied, but since the minimum staking amount is 300 $KYVE you just need to have more than 300 to claim a slot. If the minimum staking amount is zero you just have to have more than zero $KYVE.
::: warning IMPORTANT: If you don't have more $KYVE than the minimum staking amount you can not continue! :::
For our case, the prebuilt binaries every operating system can be downloaded here for every operating system. For example on EVM it would be evm-linux
, evm-macos
, evm-windows.exe
.
In general, you can get the binaries by clicking on the Become a validator
button and following the steps until you're on the section Get node binaries
.
Once you're there click the button KYVE node
which should lead you to the github repository.
Once you're on releases you can download the latest binary for your operating system. In our case we download the evm-macos.zip
and unzip it locally.
When you have downloaded and unzipped the binary correctly you can proceed to how to verify your binary
Since we want to run a protocol node on a @kyve/evm
runtime pool we have to clone the correct repository. In our
case clone the EVM repository and make sure your are on branch main
.
git clone https://github.com/KYVENetwork/evm.git
cd evm
Now run the following commands to install dependencies and build the binaries
yarn install
yarn build:binaries
Once the binaries have been build you should see three binaries (one for every operating system) in the out
directory.
Execute the binary using the following command to see the available options (example is on a MacOS machine)
./evm-macos --help
If everything is set up correctly you should see the following
Usage: @kyve/evm [options]
Options:
--name <string> The identifier name of the node. [optional, default = auto generated]
-p, --poolId <number> The id of the pool you want to run on.
-m, --mnemonic <string> Your mnemonic of your account.
-k, --keyfile <string> The path to your Arweave keyfile.
-s, --initialStake <number> Your initial stake the node should start with. Flag is ignored node is already staked [unit = $KYVE].
-n, --network <string> The chain id of the network. [optional, default = korellia] (default: "alpha")
-sp, --space <number> The size of disk space in bytes the node is allowed to use. [optional, default = 1000000000 (1 GB)] (default: "1000000000")
-b, --batchSize <number> The batch size of fetching items from datasource. For synchronous fetching enter 1. [optional, default = 1]
--metrics Run Prometheus metrics server. [optional, default = false] (default: false)
-v, --verbose Run node in verbose mode. [optional, default = false] (default: false)
--version output the version number
-h, --help display help for command
To run your node, copy your Arweave keyfile into your working directory and fetch the mnemonic from Keplr.
Here it is important that you enter the correct --poolId
, your --mnemonic
and your desired --initialStake
.
In our case, we initially stake 10,000 $KYVE to ensure that we get a validator slot.
Run the following command with the same binary as above
./evm-macos --poolId 0 --mnemonic "your mnemonic in here ..." --initialStake 10000 --keyfile ./arweave.json --network korellia
If your node has started correctly, it should print some logs like this:
2022-04-07 14:43:18.673 INFO Starting node ...
2022-04-07 14:43:18.676 INFO Name = cute-maroon-pinniped
2022-04-07 14:43:18.736 INFO Address = kyve1zpmetvqgeuh6ua4q5cnajay6u4uhuuvnjt85m7
2022-04-07 14:43:18.737 INFO Pool Id = 0
2022-04-07 14:43:18.737 INFO @kyve/core = v1.0.2
2022-04-07 14:43:18.738 INFO @kyve/evm = v1.0.1
2022-04-07 14:43:18.739 DEBUG Attempting to fetch pool state.
2022-04-07 14:43:19.059 INFO Running node on runtime @kyve/evm.
2022-04-07 14:43:19.064 INFO Pool version requirements met
2022-04-07 14:43:19.066 INFO Fetched pool state
2022-04-07 14:43:19.172 DEBUG Staking 100.0000 $KYVE ...
2022-04-07 14:43:19.883 DEBUG Transaction = FA101B41873129D16937947ED1460F48A8EFD693B9CD7F12E65F221B5B7C9556
2022-04-07 14:43:26.243 INFO Successfully staked 100.0000 $KYVE
2022-04-07 14:43:26.246 INFO Running node with a stake of 100.0000 $KYVE
2022-04-07 14:43:26.247 INFO Joining KYVE network ...
2022-04-07 14:43:26.370 DEBUG Attempting to verify node.
2022-04-07 14:43:26.371 INFO Node is running as a validator.
2022-04-07 14:43:26.374 INFO Starting new proposal
2022-04-07 14:43:26.377 INFO Cached to height = 0
2022-04-07 14:43:26.489 INFO Selected as VALIDATOR
2022-04-07 14:43:26.608 INFO Validating bundle sYNwr1BttK_WmIkjXJILjjcn60IHSX64QpBqi2fCyuU
2022-04-07 14:43:26.776 DEBUG Downloading bundle from Arweave ...
2022-04-07 14:43:27.648 DEBUG Successfully downloaded bundle from Arweave
...
When you look at your node logs you should then see that the node is starting to verify bundles.
After you have successfully staked you should see your address in the Pool validators table.
Also, you can now manage your stake through the app under Manage stake
.