Setup a Witness Node using a pre-compiled GitLab artifact
This document assumes that you are running Ubuntu 20.04.
The Gitlab artifacts were built targeting Ubuntu 20.04 and will not work on Ubuntu 18.04. While Peerplays does support Ubuntu 18.04, you'll need to follow the Manual Install guide for Ubuntu or use Docker to use it on this version.
The following steps outline the artifact installation of a Witness Node:
Prepare the environment
Download and extract the artifacts
Copy the artifacts to the proper locations
Update the config.ini File
Start the node
Please see the general Witness hardware requirements.
For the GitLab artifact install, the requirements that we'll need for this guide would be as follows:
Node Type?
CPU
Memory
Storage
Bandwidth
OS
Witness
4 Cores
16GB
100GB SSD
1Gbps
Ubuntu 20.04
The artifacts from GitLab are already built for x86_64 architecture. These will not work with ARM based architecture.
The following dependencies are necessary for a clean install of Ubuntu 20.04:
sudo apt-get install \
autoconf bash bison build-essential ca-certificates dnsutils expect flex git \
graphviz libbz2-dev libcurl4-openssl-dev libncurses-dev libpcre3-dev \
libsnappy-dev libsodium-dev libssl-dev libtool libzip-dev locales lsb-release \
mc nano net-tools ntp openssh-server pkg-config python3 python3-jinja2 sudo \
systemd-coredump wget libboost-all-devCmake 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:
wget https://github.com/Kitware/CMake/releases/download/v3.24.2/cmake-3.24.2-linux-x86_64.sh
chmod 755 ./cmake-3.24.2-linux-x86_64.sh
sudo ./cmake-3.24.2-linux-x86_64.sh --prefix=/usr --skip-license
cmake --versionBoost 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:
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 ldconfigThe components libzmp and cppzmp are used for relaying messages between nodes.
First, install libzmq using the below commands:
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 ldconfigNext, install cppzmp using the below commands:
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
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:
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 ldconfigThe 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:
git clone --branch version3.8.0 --depth 1 https://gitlab.com/PBSA/peerplays-1.0/libbitcoin-explorer.git
cd libbitcoin-explorer
sudo ./install.sh
sudo ldconfigDoxygen 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:
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 ldconfigPerl is a high-level, general-purpose, interpreted, dynamic programming language originally developed for text manipulation.
Install the Perl using the below commands:
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 ldconfigArtifacts are pre-built binaries that are available to download from GitLab. You can see the available pipelines, sorted by release tags, on the GitLab Peerplays project page. The link in the code below refers to release version 1.6.1 which is the latest production release as of the writing of this document. Please make sure to replace the tag with the one you need.
cd $HOME
mkdir artifacts
cd artifacts
sudo wget https://gitlab.com/PBSA/peerplays/-/jobs/artifacts/1.6.1/download?job=build-mainnet -O artifacts.zip
unzip artifacts.zipDouble check the tag in the download link!
Putting the witness_node and cli_wallet programs in the /usr/local/bin directory will allow us to call the program from any directory.
sudo cp $HOME/artifacts/build/programs/witness_node/witness_node /usr/local/bin/witness_node
sudo cp $HOME/artifacts/build/programs/cli_wallet/cli_wallet /usr/local/bin/cli_walletNow we can run start the node with:
cd $HOME
witness_nodeLaunching the witness creates the required directories which contain the config.ini file we'll need to edit. We'll stop the witness now with Ctrl + C so we can edit the config 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.
nano ~/witness_node_data_dir/config.ini
p2p-endpoint = 0.0.0.0:9777
rpc-endpoint = 0.0.0.0:8090
seed-node = ca.peerplays.info:9777
seed-node = de.peerplays.xyz:9777
seed-node = pl.peerplays.org:9777
seed-nodes = []Save the changes and start the Witness back up.
witness_nodeWe have successfully started the witness node and it is now ready for configuration.
Congrats! You've successfully installed your Witness node using GitLab artifacts! 🎊
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,
There are other ways it which the node can be configured. The below document showcase the other ways available for node configuration.
After configuring the node with desired configuration, click below to learn the NEXT steps 👍
Witness: An independent server operator which validates network transactions.
Witness Node: Nodes with a closed RPC port. They don't allow external connections. Instead these nodes focus on processing transactions into blocks.
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:
Preparing the Environment
Build Peerplays
Update the config.ini File
Start the node
Please see the general Witness .
For the manual install, the requirements that we'll need for this guide would be as follows (as per the hardware requirements doc):
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 for more details.
The following dependencies are necessary for a clean install of Ubuntu 20.04:
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:
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:
The components libzmp and cppzmp are used for relaying messages between nodes.
First, install libzmq using the below commands:
Next, install cppzmp using the below commands:
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:
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:
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:
Perl is a high-level, general-purpose, interpreted, dynamic programming language originally developed for text manipulation.
Install the Perl using the below commands:
Use the below commands to build Peerplays:
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).
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. 🎉
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,
There are other ways it which the node can be configured. The below document showcase the other ways available for node configuration.
After configuring the node with desired configuration, click below to learn the NEXT steps 👍
Witness: An independent server operator which validates network transactions.
Witness Node: Nodes with a closed RPC port. They don't allow external connections. Instead these nodes focus on processing transactions into blocks.
Setup a Witness Node using a pre-configured Docker container
This document assumes that you are running Ubuntu 18.04 or 20.04. Other Debian based releases may also work with the provided script.
The following steps outline the Docker installation of a Witness Node:
Preparing the Environment
Installing Docker
Installing the Peerplays image
Starting the Container
Update the config.ini File
Create a Peerplays Account
Update config.ini with Witness Account Info
Start the Container and Vote for Yourself
Please see the Witness node .
For the docker install on Peerplays Mainnet, the requirements that we'll need for this guide would be as follows (as per the hardware requirements doc):
Then we'll clone the Peerplays Docker repository.
Docker can be installed using the run.sh script inside the Peerplays Docker repository:
The run.sh script contains many commands to make managing the node easy. A list of all its are listed in section 9 of this document.
Since the script has added the currently logged in user to the Docker group, you'll need to re-login (or close and reconnect SSH) for Docker to function correctly.
Copy the example.env to .env located in the root of the repository (ie peerplays-docker folder)
We're going to have to make some changes to the .env file so we'll open that now using a text editor.
Here are the important parts of the .env file. These will be the parts that need to be edited or optionally edited. The rest of the file should be unchanged.
Use run.sh to pull the node image:
With at least 8GB of disk space available in your home folder, we'll start the node. This will create and/or start the Peerplays docker container.
Then we'll check the status of the container to see if all is well.
Last we'll stop the container so we can make updates to 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 container back up.
We have successfully started the witness node and it is now ready for configuration.
Exit the cli_wallet with the quit command. We'll stop the container and edit the config.ini file once again.
Once again, we need to wait for the node to sync the blocks to use the cli_wallet. After the sync, you can vote for yourself.
Now you can check your votes to verify it worked.
Complete! You've installed your Witness node and you're up and running. 🎊
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,
There are other ways it which the node can be configured. The below document showcase the other ways available for node configuration.
After configuring the node with desired configuration, click below to learn the NEXT steps 👍
run.sh commands liststart - starts seed container
start_son - starts son seed container
start_son_regtest - starts son seed container and bitcoind container under the docker network
clean - Remove blockchain, p2p, and/or shared mem folder contents, seed, bitcoind, and son docker network (warns beforehand)
dlblocks - download and decompress the blockchain to speed up your first start
replay - starts seed container (in replay mode)
replay_son - starts son seed container (in replay mode)
memory_replay - starts seed container (in replay mode, with --memory-replay)
shm_size - resizes /dev/shm to size given, e.g. ./run.sh shm_size 10G
stop - stops seed container
status - show status of seed container
restart - restarts seed container
install_docker - install docker
install - pulls latest docker image from server (no compiling)
install_full - pulls latest (FULL NODE FOR RPC) docker image from server (no compiling)
rebuild - builds seed container (from docker file), and then restarts it
build - only builds seed container (from docker file)
logs - show all logs inc. docker logs, and seed logs
wallet - open cli_wallet in the container
remote_wallet - open cli_wallet in the container connecting to a remote seed
enter - enter a bash session in the currently running container
shell - launch the seed container with appropriate mounts, then open bash for inspection
Witness: An independent server operator which validates network transactions.
Witness node: Nodes with a closed RPC port. They don't allow external connections. Instead these nodes focus on processing transactions into blocks.
Node Type?
CPU
Memory
Storage
Bandwidth
OS
Witness
4 Cores
16GB ⚠️
100GB SSD
1Gbps
Ubuntu 18.04
sudo apt-get install \
autoconf bash bison build-essential ca-certificates dnsutils expect flex git \
graphviz libbz2-dev libcurl4-openssl-dev libncurses-dev libpcre3-dev \
libsnappy-dev libsodium-dev libssl-dev libtool libzip-dev locales lsb-release \
mc nano net-tools ntp openssh-server pkg-config python3 python3-jinja2 sudo \
systemd-coredump wget libboost-all-devwget https://github.com/Kitware/CMake/releases/download/v3.24.2/cmake-3.24.2-linux-x86_64.sh
chmod 755 ./cmake-3.24.2-linux-x86_64.sh
sudo ./cmake-3.24.2-linux-x86_64.sh --prefix=/usr --skip-license
cmake --versionwget 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 ldconfigwget 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 ldconfiggit clone --branch version3.8.0 --depth 1 https://gitlab.com/PBSA/peerplays-1.0/libbitcoin-explorer.git
cd libbitcoin-explorer
sudo ./install.sh
sudo ldconfigwget 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 ldconfigwget 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 ldconfigcd $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)witness_nodenano $HOME/witness_node_data_dir/config.ini
p2p-endpoint = 0.0.0.0:9777
rpc-endpoint = 127.0.0.1:8090
seed-node = ca.peerplays.info:9777
seed-node = de.peerplays.xyz:9777
seed-node = pl.peerplays.org:9777
seed-nodes = []witness_nodeNode Type?
CPU
Memory
Storage
Bandwidth
OS
Witness
4 Cores
16GB
100GB SSD
1Gbps
Ubuntu 18.04
sudo apt-get update
sudo apt-get install git curlgit clone -b release https://gitlab.com/PBSA/tools-libs/peerplays-docker.gitcd peerplays-docker
sudo ./run.sh install_dockercp example.env .envnano .env# Comma separated port numbers to expose to the internet (binds to 0.0.0.0)
# Expose 9777 to the internet, but only expose RPC ports 8090 and 8091 onto 127.0.0.1 (localhost)
# allowing the host machine access to the container's RPC ports via 127.0.0.1:8090 and 127.0.0.1:8091
# We'll need ports 8090 and 8091 open to our localhost to interact with the Peerplays CLI Wallet.
PORTS=9777,127.0.0.1:8090:8090,127.0.0.1:8091:8091
# Websocket RPC node to use by default for ./run.sh remote_wallet
REMOTE_WS="wss://ca.peerplays.info/"cd ~/peerplays-docker
sudo ./run.sh installsudo ./run.sh replaysudo ./run.sh logssudo ./run.sh stopnano ~/peerplays-docker/data/witness_node_data_dir/config.ini
p2p-endpoint = 0.0.0.0:9777
rpc-endpoint = 127.0.0.1:8090
seed-node = ca.peerplays.info:9777
seed-node = de.peerplays.xyz:9777
seed-node = pl.peerplays.org:9777
seed-nodes = []sudo ./run.sh replaysudo ./run.sh stop
nano ~/peerplays-docker/data/witness_node_data_dir/config.ini
witness-id = "your_witness_id"
private-key = ["block_signing_key", "private_key_for_your_block_signing_key"]sudo ./run.sh startsudo ./run.sh wallet
unlock your-password-here
vote_for_witness created-username created-username true trueget_witness your_witness_accountBased on the requirement, witness node can be installed using any of the below procedure.