Manual installation steps to configure a witness node running on ubuntu 18.04/20.04
This is an introduction for a new witness node to get up to speed on the Peerplays blockchain. It is intended for Witnesses planning to join a live, already deployed, blockchain. The node running on ubuntu 18.04 or ubuntu 20.04 can follow the steps in the document for manual installation.
The following steps outline the manual installation of a Witness Node:
For the manual install, the requirements that we'll need for this guide would be as follows (as per the hardware requirements doc):
Node Type?
CPU
Memory
Storage
Bandwidth
OS
Witness
4 Cores
16GB ⚠️
100GB SSD
1Gbps
Ubuntu 18.04
The memory requirements shown in the table above are adequate to operate the node. Building and installing the node from source code (as with this manual installation guide) will require more memory. You may run into errors during the build and install process if the system memory is too low. See Installing vs Operating for more details.
1.2. Installing the required dependencies
The following dependencies are necessary for a clean install of Ubuntu 20.04:
1.3 cmake setup
Cmake is an open-source, cross platform tool that uses independent configuration files to generate native build tool files specific to the compiler and platform. It consists of precompiled binaries and the cmake tools makes configuration, building, and debugging much easier.
Install the cmake using the below commands:
1.4 Install Boost libraries
Boost libraries provide free peer-reviewed portable C++ source libraries and it can be used across broad spectrum of application.
Install Boost libraries using the below commands:
1.5 Install libzmq
The components libzmp and cppzmp are used for relaying messages between nodes.
First, install libzmq using the below commands:
1.6 Install cppzmq
Next, install cppzmp using the below commands:
1.7 Install gsl
GSL is the GNU scientific library for numerical computing. It is a collection of routines for numerical computing in e.g. linear algebra, probability, random number generation, statistics, differentiation, etc.,
Install the gsl using the below commands:
1.8 Install libbitcoin
The libbitcoin toolkit is a set of cross platform C++ libraries for building bitcoin applications. The toolkit consists of several libraries, most of which depend on the base libbitcoin-system library.
Install the libbitcoin using the below commands:
1.9 Install Doxygen
Doxygen is a software utility that recognizes comments within C++ code that have a certain form, and uses them to produce a collection of HTML files containing the information in those comments.
Install the Doxygen using the below commands:
2.0 Install Perl
Perl is a high-level, general-purpose, interpreted, dynamic programming language originally developed for text manipulation.
Install the Perl using the below commands:
2. Build Peerplays
Use the below commands to build Peerplays:
2.1. Starting the Peerplays Witness Node
If we have installed the blockchain following the above steps, the node can be started as follows:
Launching the Witness for the first time creates the directories which contain the configuration files.
Next, stop the Witness node before continuing (Ctrl + c).
3. Update the config.ini File
We need to set the endpoint and seed-node addresses so we can access the cli_wallet and download all the initial blocks from the chain. Within the config.ini file, locate the p2p-endpoint, rpc-endpoint, and seed-node settings and enter the following addresses.
Save the changes and start the node back up.
We have successfully started the witness node and it is now ready for configuration.
Success! You built a Peerplays witness node from the latest source code and now it's up and running. 🎉
4. Node Configuration
Next step is to configure the witness node based on the requirement. There are different ways in which the nodes can be configured such as block producer, SON node, API node, and delayed node.
Becoming a block producer is one of the important steps as it is mandatory to use the node for transactions across the wallet. Follow the steps from the below document to become a block producer,
wget https://boostorg.jfrog.io/artifactory/main/release/1.72.0/source/boost_1_72_0.tar.gz
tar -xzvf boost_1_72_0.tar.gz
cd boost_1_72_0
./bootstrap.sh
./b2
sudo ./b2 install
sudo ldconfig
wget https://github.com/zeromq/libzmq/archive/refs/tags/v4.3.4.tar.gz
tar -xzvf v4.3.4.tar.gz
cd libzmq-4.3.4
mkdir build
cd build
cmake ..
make -j$(nproc)
sudo make install
sudo ldconfig
wget https://github.com/zeromq/cppzmq/archive/refs/tags/v4.9.0.tar.gz
tar -xzvf v4.9.0.tar.gz
cd cppzmq-4.9.0
mkdir build
cd build
cmake ..
make -j$(nproc)
sudo make install
sudo ldconfig
wget https://github.com/imatix/gsl/archive/refs/tags/v4.1.4.tar.gz
tar -xzvf v4.1.4.tar.gz
cd gsl-4.1.4
make -j$(nproc)
sudo make install
sudo ldconfig
wget https://github.com/doxygen/doxygen/archive/refs/tags/Release_1_8_17.tar.gz
tar -xvf Release_1_8_17.tar.gz
cd doxygen-Release_1_8_17
mkdir build
cd build
cmake ..
make -j$(nproc)
sudo make install
sudo ldconfig
wget https://github.com/Perl/perl5/archive/refs/tags/v5.30.0.tar.gz
tar -xvf v5.30.0.tar.gz
cd perl5-5.30.0
./Configure -des
make -j$(nproc)
sudo make install
sudo ldconfig
cd $HOME
git clone https://github.com/peerplays-network/peerplays
cd peerplays
git checkout 1.6.1 # Replace with most recent tag
git submodule update --init --recursive
# If you want to build Mainnet node
cmake -DCMAKE_BUILD_TYPE=Release
# If you want to build Testnet node
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_PEERPLAYS_TESTNET=1
# the following command will install the executable files under /usr/local
sudo make install
# the following isn't required if you ran the "sudo make install" command above.
# If you prefer, the "make -j$(nproc)" command will install the
# programs under $HOME/peerplays/programs
# Update the -j flag depending on your current system specs:
# Recommended 4GB of RAM per 1 CPU core
# make -j2 for 8GB RAM
# make -j4 for 16GB RAM
# make -j8 for 32GB RAM
make -j$(nproc)