Nodes Guide

KV Node - ZeroGravity

Learn how to run a KV node on ZeroGravity

Prerequisites

You have completed Getting Started with ZeroGravity

Set environment variables

open .env file with your editor

nano .env

modify the variables in .env file under 0G KV Node configs section with your desired variables.
Important ones are:

  • KV_BLOCKCHAIN_RPC_ENDPOINT If you are running a storage node using this compose file, you can directly connect to it by setting this to http://storage-node:5678 , otherwise use a public Storage RPC endpoint
  • KV_ZGS_NODE_URLS If you are running a node/validator using this compose file, you can directly connect to it by setting this to http://node:8545 , otherwise use a public RPC endpoint
  • KV_RPC_LISTEN_PORT should point to a valid, non busy port. e.g. 34170

Run KV Node

docker compose --profile kv up -d kv-node

Check logs

docker compose --profile kv logs -f --since 1m kv-node

Upgrades

From v1.2.2 to v1.3.0

This is breaking change, so you have to remove the old database and start from scratch.

update repository & images

git pull
docker compose --profile kv pull

remove kv, da-client and da-encoders container (since they are depend on each other, they should be removed at once)

docker compose --profile kv --profile da-client down

remove the kv data volume

docker volume rm 0g-docker_kv_data

bring the containers up again

docker compose --profile kv --profile da-client up -d