Nodes Guide

DA Client - ZeroGravity

Learn how to run a DA Client on ZeroGravity

Prerequisites

You have completed Getting Started with ZeroGravity You are already running a KV node using this compose file Learn how to run a KV node on ZeroGravity

Set environment variables

open .env file with your editor

nano .env

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

  • DA_CLIENT_ETH_RPC_ENDPOINT 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 like https://testnet-v2-0g-api-rpc.emberstake.xyz
  • DA_CLIENT_ENCODER_SOCKET If you are running an Encoder using this compose file, you can directly connect to it by setting this to http://da-encoder:34000 , otherwise use a public DA Encoder
  • DA_CLIENT_LISTEN_PORT should point to a valid, non busy port. e.g. 34195
  • DA_CLIENT_PRIVATE_KEYThis requires a private key, without leading 0x, funded by testnet tokens from faucet. you have two ways to get this private key
    • create a fresh wallet on metamask, export private key and REMOVE LEADING 0X
    • or use your validator account private key. export it by 0gchaind keys unsafe-export-eth-key $WALLET_NAME

Run DA Client

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

Check logs

docker compose logs -f --since 1m da-client