Royc30ne

Royc30ne

机器学习 | 联邦学习 | VPS | 摄影 | 日常

Quilibrium Node Basic Setup Tutorial

Created by Royc30ne. Thanks to Demipoet for the initial version.
Last updated version: 1.4.5 (Sunset) 2024/3/6


Project website: Quilibrium
Project introduction: Quilibrium is a decentralized internet layer protocol that provides the comfort of cloud computing without sacrificing privacy or scalability. Transitioning to NoCloud may be easier than you think with familiar API-compatible SDKs.

Minimum configuration requirements for running nodes#


During the Dawn phase, servers must have at least 16GB of memory (preferably 32GB), 250GB of storage space (preferably solid-state drives), and 50MBps symmetrical bandwidth. For Intel/AMD, the benchmark processor is a Skylake processor with a clock speed of 3.4GHz and 12 dedicated cores. For ARM, you can refer to Apple's M1 series.

Install dependencies#


Update apt sources#


sudo apt upgrade
sudo apt update

Install Git#


sudo apt install git

Install GO#


The current version (as of 1.2.14) does not support project builds using go1.21.x or go1.19.x, and go1.20.x must be used. Installation packages for different versions of Go can be found on this page: https://go.dev/dl/

Here is an example using version 1.20.14
Download the distribution package

wget  https://go.dev/dl/go1.20.14.linux-amd64.tar.gz

Unpack the file

sudo tar -xvf go1.20.14.linux-amd64.tar.gz 

Move to the usr directory

sudo  mv  go  /usr/local

Delete the installation package

sudo  rm  go1.20.14.linux-amd64.tar.gz

Add Go to the system environment variables

sudo vim  ~/.bashrc

Press i to start inserting text in the ~/.bashrc file
Scroll to the end of the file and insert the following content on a new line at the end:

GOROOT=/usr/local/go
GOPATH=$HOME/go
PATH=$GOPATH/bin:$GOROOT/bin:$PATH

Press esc to stop inserting text, enter :wq, and then press the Enter key on the keyboard.

Run

source  ~/.bashrc
go version

The terminal will return

go version go1.20.14 linux/amd64

Configure Linux network device settings#


Purpose: Optimize throughput (bandwidth) and latency for typical large-scale parallel workloads in Q and other networks.

Run

sudo vim  /etc/sysctl.conf

Press i to start inserting text in the /etc/sysctl.conf file
Scroll to the end of the file and insert the following content on a new line at the end:

# Increase buffer sizes for better network performance
net.core.rmem_max=600000000
net.core.wmem_max=600000000

Press esc to stop inserting text, enter :wq, and then press the Enter key on the keyboard.

Run

sudo  sysctl  -p

Restart to apply the configuration

reboot

Deploy Quilibrium nodes#


Clone the Quilibrium CeremonyClient repository#


Run

cd ~
git  clone  https://github.com/QuilibriumNetwork/ceremonyclient.git

Enter the ceremonyclient/node folder

Note: All subsequent commands will be run in the node/ folder.

cd ceremonyclient/node

Import voucher hex (optional)#


Note: This is only applicable to users with offline vouchers. If you do not have a voucher, skip this section.

Run:

sudo vim /root/voucher.hex

Press i to start inserting text in the voucher.hex file
Copy and paste the 228-character voucher hex into the file
Press esc to stop inserting text, enter :wq, and then press the Enter key on the keyboard.

Run:

GOEXPERIMENT=arenas  go  run  ./...  -import-priv-key  `cat /root/voucher.hex`

Take note of your Peer ID. The Peer ID may become your Q wallet in the future.
It will be the last line in the reply, starting with "Qm " and labeled with Peer ID.

Initialize Q wallet and .config folder#


Only applicable if you skipped the previous section because you do not have an offline voucher and you are installing a new Q node.

Run:

cd ~/ceremonyclient/node
GOEXPERIMENT=arenas go run ./...

Since this will trigger the Q node to start, what you really need now is for the start script to create the .config folder inside ~/ceremonyclient/node, and create the config.yml and keys.yml files.

Once you see the logs generated, you can press ctl + c to pause the node.

Configure Linux firewall#


Run:

sudo ufw enable

Allow ports 22, 8336, 443 in order

sudo ufw allow 22
sudo ufw allow 8336
sudo ufw allow 443

Run:

sudo ufw status

The terminal will return

> To            Action            From
> --            ------            -----
> 22            ALLOW             Anywhere
> 8336          ALLOW             Anywhere
> 443           ALLOW             Anywhere
> 22 (v6)       ALLOW             Anywhere (v6)
> 8336 (v6)     ALLOW             Anywhere (v6)
> 443 (v6)      ALLOW             Anywhere (v6)

Configure config.yml#


Enable gRPC to enable gRPC functional calls for the node#


Note: This interface is a read-only interface, unauthenticated, and unrestricted in rate. It is recommended to enable them only if access is properly controlled through a firewall or only queried through the local host (e.g., if port 8337 is used for gRPC calls, it is better not to allow it in the firewall configuration later and only trigger gRPC calls on the local host).

Enter the ceremonyclient/node folder:

cd ~/ceremonyclient/node

Run:

sudo vim  .config/config.yml

Press i to start inserting text in the config.yml file
Replace the field listenGrpcMultiaddr: "" at the end of the file with

listenGrpcMultiaddr: /ip4/127.0.0.1/tcp/8337

Press esc to stop inserting text, enter :wq, and then press the Enter key on the keyboard to exit.

Enable statistics data collection by selection#


Enter the ceremonyclient/node folder:

cd ~/ceremonyclient/node

Run:

sudo vim  .config/config.yml

Press i to start inserting text in the config.yml file
In the middle of the file, there is a field engine, add a subfield named statsMultiaddr

engine:
  statsMultiaddr: "/dns/stats.quilibrium.com/tcp/443"

Quick start node#


All commands will be run in the node/ folder.

cd ~/ceremonyclient/node

Start the node

GOEXPERIMENT=arenas go run ./...

View Peer ID

GOEXPERIMENT=arenas go run ./... -peer-id

Token balance

GOEXPERIMENT=arenas go run ./... -balance

Advanced configuration#

TBC

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.