Nodes Guide

DA Node - ZeroGravity

Learn how to run a DA Node on ZeroGravity

Prerequisites

Generate BLS Key

You will need a BLS Private key to run a DA Node, use this command to generate one, make sure keep a backup of it somewhere safe

docker compose --profile da-node run --rm --entrypoint /usr/local/bin/key-gen da-node

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_NODE_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_NODE_SOCKET_ADDR Your server public IP Address or DNS record pointing to it
  • DA_NODE_SOCKET_PORT a valid, non busy port. e.g. 34180
  • DA_NODE_SIGNER_BLS_PRIVATE_KEY put the BLS private key you have generated in the previous step
  • DA_NODE_SIGNER_ETH_PRIVATE_KEY This requires a private key of an account which staked at least 10 a0gi to a validator, without leading 0x. 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 Node

docker compose --profile da-node up -d da-node

Check logs

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