0g-da-retriever

This document outlines the steps to setup your own DA retriever.

Hardware Requirement

The following hardware specifications are recommended for running a DA retriever:

  • RAM: 8 GB
  • CPU: 2 cores
  • Bandwidth: 100 MBps for Download / Upload

Installation

  1. Install dependencies
  • For Linux

    sudo apt-get update
    sudo apt-get install cmake build-essential protobuf-compiler
  • For Mac

    brew install cmake
  1. Install Rust

    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  2. Download the source code

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

Configuration

Field Description
log_level Set log level.
grpc_listen_address Server listening address.
eth_rpc_endpoint JSON RPC node endpoint for the blockchain network.

Run

  1. Build in release mode

    cargo build --release
  2. Run retriever

    Update configuration file run/config.toml as required by referencing the Configuration. Run:

    ./target/release/retriever --config ./run/config.toml

Run with Docker

Adjust commands and parameters as required for your setup:

Build the Docker image

docker build -t 0g-da-retriever .

Run the Docker container

docker run -v ./run:/run -p 34005:34005 0g-da-retriever:latest retriever --config /run/config.toml