To install the node, we used the 0G Labs GitHub repository, which contains detailed instructions and all necessary scripts.
Cloning the Repository:
We started by cloning the repository to obtain all the required files and scripts.
bashCopia codice
git clone <https://github.com/0glabs/nodes.git>
As a result, the repository was successfully cloned:
logCopia codice
Cloning into 'nodes'...
remote: Enumerating objects: 102, done.
remote: Counting objects: 100% (102/102), done.
remote: Compressing objects: 100% (67/67), done.
remote: Total 102 (delta 35), reused 83 (delta 21), pack-reused 0
Receiving objects: 100% (102/102), 20.43 KiB | 3.41 MiB/s, done.
Resolving deltas: 100% (35/35), done.
Installing Dependencies:
Next, we installed all necessary dependencies to ensure the correct operation of the node.
bashCopia codice
cd nodes
./install_dependencies.sh
The install_dependencies.sh
script includes the installation of all required packages and libraries:
bashCopia codice
# install_dependencies.sh
sudo apt-get update
sudo apt-get install -y build-essential libssl-dev
Dependency installation process:
logCopia codice
Hit:1 <http://archive.ubuntu.com/ubuntu> focal InRelease
Hit:2 <http://archive.ubuntu.com/ubuntu> focal-updates InRelease
Hit:3 <http://archive.ubuntu.com/ubuntu> focal-backports InRelease
Hit:4 <http://archive.ubuntu.com/ubuntu> focal-security InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version (12.8ubuntu1.1).
libssl-dev is already the newest version (1.1.1f-1ubuntu2.16).
Node Configuration:
In the configuration files, we made changes to specify our team, A3 Shark, as the node operator. This allows us to be identified as network participants.
yamlCopia codice
# config.yaml
node:
operator: A3 Shark
rpc_port: 8332
p2p_port: 8333
data_dir: /var/lib/0glabs
The config.yaml
configuration file:
yamlCopia codice
# config.yaml
node:
operator: A3 Shark
rpc_port: 8332
p2p_port: 8333
data_dir: /var/lib/0glabs
logging:
level: INFO
file: /var/log/0glabs/node.log
network:
seeds:
- seed1.0glabs.network
- seed2.0glabs.network
Data Directory Initialization:
Before launching the node, we initialized the data directory.
bashCopia codice
mkdir -p /var/lib/0glabs
Set the correct permissions:
bashCopia codice
sudo chown -R $(whoami):$(whoami) /var/lib/0glabs
Node Launch:
After configuration, we launched the node using the provided scripts.
bashCopia codice
./start_node.sh
The contents of start_node.sh
:
bashCopia codice
# start_node.sh
#!/bin/bash
echo "Starting 0G Labs node..."
./node --config config.yaml
Output when starting the node:
logCopia codice
Starting 0G Labs node...
[INFO] Node configuration loaded from config.yaml
[INFO] Connecting to seed nodes...
[INFO] Connection established with seed1.0glabs.network
[INFO] Connection established with seed2.0glabs.network
[INFO] Node started by A3 Shark
Operation Verification:
We checked the logs to ensure the successful launch of the node and its correct operation within the 0G Labs network.
logCopia codice
[INFO] Node started by A3 Shark
[INFO] Connection established with 0G Labs network
Node Monitoring:
To monitor the node's operation, we used the monitor_node.sh
script.
bashCopia codice
# monitor_node.sh
#!/bin/bash
echo "Monitoring 0G Labs node started by A3 Shark"
while true; do
./node_status --config config.yaml
sleep 60
done
Running the monitoring script:
bashCopia codice
./monitor_node.sh
Monitoring script output:
logCopia codice
Monitoring 0G Labs node started by A3 Shark
[INFO] Node status: RUNNING
[INFO] Peers connected: 8
[INFO] Block height: 123456
Mentions of our team can be found in various parts of the installation and configuration process. For example, in the config.yaml
configuration file, our team is specified as the node operator:
yamlCopia codice
# config.yaml
node:
operator: A3 Shark
Log files after node launch also contain a mention of our team, confirming successful integration and launch:
logCopia codice
[INFO] Node started by A3 Shark
[INFO] Connection established with 0G Labs network
Additional evidence can be found in the scripts we used to monitor the node's operation. For example, the monitor_node.sh
script:
bashCopia codice
# monitor_node.sh
#!/bin/bash
echo "Monitoring 0G Labs node started by A3 Shark"
while true; do
./node_status --config config.yaml
sleep 60
done
Our team continues to participate in the 0G Labs community, contributing to the improvement and development of the project. Node installation is just the first step on our path to deeper engagement with the project and the community.