1. install
sudo apt-get update && sudo apt-get install clang cmake build-essential pkg-config libssl-dev protobuf-compiler llvm llvm-dev
cd $HOME && \\
ver="1.23.3" && \\
wget "<https://golang.org/dl/go$ver.linux-amd64.tar.gz>" && \\
sudo rm -rf /usr/local/go && \\
sudo tar -C /usr/local -xzf "go$ver.linux-amd64.tar.gz" && \\
rm "go$ver.linux-amd64.tar.gz" && \\
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> ~/.bash_profile && \\
source ~/.bash_profile && \\
go version
curl --proto '=https' --tlsv1.2 -sSf <https://sh.rustup.rs> | sh
source $HOME/.cargo/env
rustc --version
git clone -b v1.1.3 <https://github.com/0glabs/0g-da-node.git>
  1. Update
cd $HOME/0g-da-node
git stash
git fetch --all --tags
git checkout 9a48827 
git submodule update --init
cargo build --release
./dev_support/download_params.sh
  1. Generate BLS Key gen
cargo run --bin key-gen

You must back up your BLS key.

  1. Setup config.toml
rm -rf $HOME/0g-da-node/config.toml && curl -o $HOME/0g-da-node/config.toml <https://raw.githubusercontent.com/zstake-xyz/test/refs/heads/main/0g_da_config.toml> && nano $HOME/0g-da-node/config.toml

1000004167.png

  1. ZGS Service create
sudo tee /etc/systemd/system/0gda.service > /dev/null <<EOF
[Unit]
Description=0G-DA Node
After=network.target

[Service]
User=$USER
WorkingDirectory=$HOME/0g-da-node
ExecStart=$HOME/0g-da-node/target/release/server --config $HOME/0g-da-node/config.toml
Restart=always
RestartSec=10
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF
  1. ZGS Service Restart
sudo systemctl daemon-reload && sudo systemctl enable 0gda && sudo systemctl start 0gda