Installation
This section will deal with the installation for the Gaia Full Node and the KYVE protocol validator. The Gaia Full Node will act as the source for the KYVE protocol validator and is required. You can either run the Gaia node on a seperate machine or run it on the same machine with the KYVE protocol together.
Due to very specific requirements, an additional validation layer, accessibility as well as to prevent slashes, it is strongly recommended to run an independent data source node. API providers should be avoided and have already led to critical problems in the past.
Install Gaia full node
The gaia binary with the version v4.2.1
has to be installed. You can follow the official installation instructions here or download the binary directly from here.
If you are building from source please use the specified go version in the go.mod file, else there is the danger of receiving vote slashes.
For gaiad v4.2.1 it is go15
You can verify the successful installation with
./gaiad version
4.2.1
In order to setup the gaia config first choose a moniker and init gaia:
./gaiad init <your-moniker> --chain-id cosmoshub-4
To install the genesis file execute the following command:
wget https://raw.githubusercontent.com/cosmos/mainnet/master/genesis/genesis.cosmoshub-4.json.gz
gzip -d genesis.cosmoshub-4.json.gz
mv genesis.cosmoshub-4.json ~/.gaia/config/genesis.json
Peers can be added via this addrbook which can be retrieved here:
wget https://dl2.quicksync.io/json/addrbook.cosmos.json
mv addrbook.cosmos.json ~/.gaia/config/addrbook.json
chmod 666 ~/.gaia/config/addrbook.json
TIP: You can also add persistent_peers from Polkachu to ensure that you will actually find peers where you can sync with the network: https://polkachu.com/live_peers/cosmos
Configuration
Due to the size of the block_results
response, it is required to set the following in your ~/.gaia/config/config.toml
:
timeout_broadcast_tx_commit = "120s"
For pruning the following settings are recommended to decrease the disk usage:
~/.gaia/config/config.toml
[tx_index]
indexer = "null"
~/.gaia/config/app.toml
pruning = "everything"
index-events = [""]
Finally, the node can be started:
NOTE: For some users it might be required to increase the limit of open files on your system with ulimit -n 65536
INFO: Since the genesis file is quite big (over 100MB) the starting process can take a serveral minutes before the node starts to sync blocks.
./gaiad start --x-crisis-skip-assert-invariants
Now you have to sync blocks until the latest summary of the pool is reached. For example if the latest pool summary is 6,000,000 you can check if the node has synced the blocks until that height with:
curl http://localhost:26657/block?height=6000000
If it returns a valid block response you can continue with starting the actual KYVE protocol validator and start participating in the validation and archival process.
TIP: to save storage space you can start pruning blocks manually after they have been archived by the pool since after that they are not needed anymore.
TIP: to make it easier during chain upgrades we also recommend running the chain with cosmosvisor. You can find official instructions here
Install KYVE protocol validator
Install KYSOR
Get the latest release of the KYSOR binaries here
Once you have the latest version for you operating system simply pull them down:
wget https://github.com/KYVENetwork/kyvejs/releases/download/%40kyve%2Fkysor%401.0.0-beta.20/kysor-linux-x64.zip
unzip kysor-linux-x64.zip
mv kysor-linux-x64 kysor
chmod 700 kysor
To verify that the KYSOR runs successfully just run
./kysor version
Initialize KYSOR
After the successful installation of KYSOR it now needs to be initialized. Depending on the network you want to join a different configuration needs to be passed to the init options.
Like for all Web3 projects, we always recommend using your own endpoints for optimal security and the independence of centralized architecture. This implies running your own KYVE chain node, you can find more information here.
- Mainnet
- Kaon
- Korellia
Official Mainnet endpoints:
EU RPC: 'https://rpc.kyve.network'
EU API: 'https://api.kyve.network'
US RPC: 'https://rpc.kyve.network'
US API: 'https://api.kyve.network'
Depending on your geolocation certain endpoints can be used as a primary and secondary endpoints. Primary endpoints are used by default, secondary ones only when the primary fails and so on. It is also possible to only use one or more than two. It is important that the number of endpoints used for rpc and api are equal.
./kysor init \
--chain-id 'kyve-1' \
--rpc '<primary_rpc>,<secondary_rpc>,...' \
--rest '<primary_api>,<secondary_api>,...'
Official Kaon endpoints:
EU RPC: 'https://rpc.kaon.kyve.network'
EU API: 'https://api.kaon.kyve.network'
US RPC: 'https://rpc.kaon.kyve.network'
US API: 'https://api.kaon.kyve.network'
Depending on your geolocation certain endpoints can be used as a primary and secondary endpoints. Primary endpoints are used by default, secondary ones only when the primary fails and so on. It is also possible to only use one or more than two. It is important that the number of endpoints used for rpc and api are equal.
./kysor init \
--chain-id 'kaon-1' \
--rpc '<primary_rpc>,<secondary_rpc>,...' \
--rest '<primary_api>,<secondary_api>,...'
./kysor init \
--chain-id 'korellia' \
--rpc 'https://rpc.korellia.kyve.network' \
--rest 'https://api.korellia.kyve.network' \
--auto-download-binaries
Once you have initialized KYSOR you can verify the successful initialization by printing out the home directory:
ls ~/.kysor
There should be a config.toml
file where the configurations you just defined are saved. You can change those at any time if you want.
Create the Valaccount
Now that KYSOR is initialized we move on to the next step. For every pool you run on a valaccount has to be created. A new valaccount with a new mnemonic can be created in the following way:
- Mainnet
- Kaon
- Korellia
./kysor valaccounts create \
--name 'cosmoshub' \
--pool 0 \
--storage-priv "$(cat path/to/arweave.json)" \
--metrics
This will create a cosmoshub.toml
file under the KYSOR home directory in ~/.kysor/valaccounts/
where all the other valaccounts are stored. There you can view your valaccount config.
If you want to create a valaccount from an existing mnemonic just add the --recover
flag like this:
./kysor valaccounts create \
--name 'cosmoshub' \
--pool 0 \
--storage-priv "$(cat path/to/arweave.json)" \
--metrics \
--recover
This will prompt you to enter the mnemonic you want to import. More help on how to manage valaccounts can be found with ./kysor valaccounts --help
./kysor valaccounts create \
--name 'cosmoshub' \
--pool 0 \
--storage-priv "$(cat path/to/arweave.json)" \
--metrics
This will create a cosmoshub.toml
file under the KYSOR home directory in ~/.kysor/valaccounts/
where all the other valaccounts are stored. There you can view your valaccount config.
If you want to create a valaccount from an existing mnemonic just add the --recover
flag like this:
./kysor valaccounts create \
--name 'cosmoshub' \
--pool 0 \
--storage-priv "$(cat path/to/arweave.json)" \
--metrics \
--recover
This will prompt you to enter the mnemonic you want to import. More help on how to manage valaccounts can be found with ./kysor valaccounts --help
./kysor valaccounts create \
--name 'cosmoshub' \
--pool 24 \
--storage-priv "$(cat path/to/arweave.json)" \
--metrics
This will create a cosmoshub.toml
file under the KYSOR home directory in ~/.kysor/valaccounts/
where all the other valaccounts are stored. There you can view your valaccount config.
If you want to create a valaccount from an existing mnemonic just add the --recover
flag like this:
./kysor valaccounts create \
--name 'cosmoshub' \
--pool 24 \
--storage-priv "$(cat path/to/arweave.json)" \
--metrics \
--recover
This will prompt you to enter the mnemonic you want to import. More help on how to manage valaccounts can be found with ./kysor valaccounts --help
ATTENTION: Since the valaccount config files store the valaccount's mnemonic and the wallet keyfile for the storage provider you should never share this file with anyone.
Loosing the mnemonic of the valaccount can cause a timeout slash. If a third party ever gets hold of the mnemonic an upload slash can be the worst case since they have control over the vote and upload behaviour of the node. Loosing the private keyfile of the storage provider means loosing your funds.
Install Pool Binaries
In the last step of the installation process of KYSOR the actual pool runtime binaries need to be installed in KYSOR.
General KYSOR Directory Structure
Knowing where KYSOR saves it's logs and binaries can be helpful. The example below shows the following setup: The KYSOR runs on two pools with pool id 0
and 2
. Pool 2
is still running on version 0.8.6
while pool 0
has already upgraded from 1.8.6
to 1.8.7
.kysor
├── config.toml
├── logs