System Requirements
Category | Requirements |
CPU | 8+ cores |
RAM | 16+ GB |
Storage | 1 TB NVME SSD |
Bandwidth | 100 MBps for Download / Upload |
System Update
javascriptsudo 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)
javascriptcurl --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 textexport PATH="$HOME/.cargo/bin:$PATH"
Then, you need to reload the configuration file:
markdownsource ~/.profile
or
markdownsource ~/.bashrc
Check installation:
markdownrustc --version cargo --version
Git download
plain textgit clone https://github.com/0glabs/0g-da-node.git
Lib install
plain textsudo apt install libssl-dev
plain textsudo apt install pkg-config
plain textsudo apt-get install protobuf-compiler
Build
plain textcd && cd 0g-da-node
plain textcargo build --release
Amt download
plain textcd dev_support
plain text./download_params.sh
plain textsudo cp -R /root/0g-da-node/dev_support/params /root/0g-da-node/target/release
Bls key gen
plain textcd ~ cd 0g-da-node
plain textcargo run --bin key-gen
Setup your variable settings
plain textmv /root/0g-da-node/config_example.toml /root/0g-da-node/config.toml sudo nano /root/0g-da-node/config.toml
plain textlog_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 textsudo 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 textsudo systemctl daemon-reload && \ sudo systemctl enable da && \ sudo systemctl start da
Systemd log
markdownsudo journalctl -u da -f -o cat
Restart the Node
markdownsudo systemctl restart da
Delete node
markdownsudo 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