logo

System Requirements

Category
Requirements
CPU
8+ cores
RAM
16+ GB
Storage
1 TB NVME SSD
Bandwidth
100 MBps for Download / Upload

System Update

javascript
sudo apt update && sudo apt upgrade -y sudo apt install curl git wget htop tmux build-essential jq make lz4 gcc unzip -y

Install Rust:(if first time installation)

javascript
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Add Cargo to PATH:

To use Cargo, you need to add the Cargo path to the PATH environment variable. You can do this by adding the following line to your ~/.profile or ~/.bashrc file:
plain text
export PATH="$HOME/.cargo/bin:$PATH"
Then, you need to reload the configuration file:
markdown
source ~/.profile
or
markdown
source ~/.bashrc

Check installation:

markdown
rustc --version cargo --version

Git download

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

Lib install

plain text
sudo apt install libssl-dev
plain text
sudo apt install pkg-config
plain text
sudo apt-get install protobuf-compiler

Build

plain text
cd && cd 0g-da-node
plain text
cargo build --release

Amt download

plain text
cd dev_support
plain text
./download_params.sh
plain text
sudo cp -R /root/0g-da-node/dev_support/params /root/0g-da-node/target/release

Bls key gen

plain text
cd ~ cd 0g-da-node
plain text
cargo run --bin key-gen

Setup your variable settings

plain text
mv /root/0g-da-node/config_example.toml /root/0g-da-node/config.toml sudo nano /root/0g-da-node/config.toml
plain text
log_level = "info" data_path = "./db/" # 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://evm-rpc.0gchain-testnet.unitynodes.com" # 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 = "0xDFC8B84e3C98e8b550c7FEF00BCB2d8742d80a69" # deployed block number of da entrance contract start_block_number = 401178 # signer BLS private key signer_bls_private_key = "" # signer eth account private key signer_eth_private_key = "" # whether to enable data availability sampling enable_das = "false"

Systemd create

plain text
sudo tee /etc/systemd/system/da.service > /dev/null <<EOF[Unit] Description=DA Node After=network.target [Service] User=root WorkingDirectory=$HOME/0g-da-node/target/release ExecStart=$HOME/0g-da-node/target/release/server --config $HOME/0g-da-node/config.toml Restart=on-failure RestartSec=10 LimitNOFILE=65535 [Install] WantedBy=multi-user.target EOF

Systemd start

plain text
sudo systemctl daemon-reload && \ sudo systemctl enable da && \ sudo systemctl start da

Systemd log

markdown
sudo journalctl -u da -f -o cat

Restart the Node

markdown
sudo systemctl restart da

Delete node

markdown
sudo systemctl stop da sudo systemctl disable da sudo rm /etc/systemd/system/da.service sudo rm /usr/local/bin/server rm -rf $HOME/0g-da-node

Video Guide:


Powered by Notaku