Skip to main content

Data Availability Node


While there are various approaches to running a DA (Data Availability) node, this guide outlines our recommended method and the necessary hardware specifications. DA Nodes performs the core functions of verifying, signing, and storing encoded blob data. It's important to note that your DA signer needs to operate a DA node to verify encoded blob data, sign it, and store it for future farming and rewards. Currently, in order to run a DA Node on Testnet, users must stake 10 A0GI tokens. These can be obtained via our faucet or via rewards from running Storage Nodes or Validator Nodes. You can also reach out to our technical moderators on Discord.

Hardware Requirements

Node TypeMemoryCPUDiskBandwidthAdditional Notes
DA Node16 GB8 cores1 TB NVME SSD100 MBpsFor Download / Upload

Standing up a DA Node and DA Signer

1. Clone the DA Node Repo:

git clone https://github.com/0glabs/0g-da-node.git
cd 0g-da-node

2. Generate BLS Private Key (if needed):

If you don't have a BLS private key, generate one:

cargo run --bin key-gen

Keep the generated BLS private key secure.

3. Set up config.toml:

  1. Create a configuration file named config.toml in the project root directory.

  2. Add the following content to the file, adjusting values as needed:

    log_level = "info"

    data_path = "/data"

    # path to downloaded params folder
    encoder_params_dir = "/params"

    # grpc server listen address
    grpc_listen_address = "0.0.0.0:34000"
    # chain eth rpc endpoint
    eth_rpc_endpoint = "https://rpc-testnet.0g.ai"
    # public grpc service socket address to register in DA contract
    # ip:34000 (keep same port as the grpc listen address)
    # or if you have dns, fill your dns
    socket_address = "<public_ip/dns>:34000"

    # data availability contract to interact with
    da_entrance_address = "0x857C0A28A8634614BB2C96039Cf4a20AFF709Aa9" # testnet config
    # deployed block number of da entrance contract
    start_block_number = 940000 # testnet config

    # signer BLS private key
    signer_bls_private_key = ""
    # signer eth account private key
    signer_eth_private_key = ""
    # miner eth account private key, (could be the same as `signer_eth_private_key`, but not recommended)
    miner_eth_private_key = ""

    # whether to enable data availability sampling
    enable_das = "true"

    Make sure to fill in the signer_bls_private_key, signer_eth_private_key, and miner_eth_private_key fields with your actual private keys.

4. Build and Start the Docker Container:

docker build -t 0g-da-node .
docker run -d --name 0g-da-node 0g-da-node

5: Verify the Node is Running

On the first run, the DA node will register the signer information in the DA contract. You can monitor the console output to ensure the node is running correctly and has successfully registered.

Node Operations

As a DA node operator, your node will perform the following tasks:

  • Encoded blob data verification
  • Signing of verified data
  • Storing blob data for further farming
  • Receiving rewards for these operations

Troubleshooting

  • If you encounter any issues, check the console output for error messages.
  • Ensure that the ports specified in your config.toml file are not being used by other applications.
  • Verify that you have the latest stable version of Rust installed.
  • Make sure your system meets the minimum hardware requirements.

Conclusion

You have now successfully set up and run a 0g DA node as a DA Signer. For more advanced configuration options and usage instructions, please refer to the official GitHub repository.

Remember to keep your private keys secure and regularly update your node software to ensure optimal performance and security.