Random Number Generator (RNG)
Other Documentation
Beatrice
Currently the Beatrice testnet has functionality for SON while the mainnet does not. This requires a few more packages to be installed and some extra configuration to enable Bitcoin connectivity.

Building on Ubuntu 18.04 LTS and Installation Instructions

The following dependencies are necessary for a clean install of Ubuntu 18.04 LTS:
1
sudo apt-get update
2
sudo apt-get -y install autoconf bash build-essential ca-certificates cmake \
3
dnsutils doxygen git graphviz libbz2-dev libcurl4-openssl-dev \
4
libncurses-dev libreadline-dev libssl-dev libtool libzmq3-dev \
5
locales ntp pkg-config wget autotools-dev libicu-dev python-dev
Copied!

Build Boost 1.67.0

1
mkdir $HOME/src
2
cd $HOME/src
3
export BOOST_ROOT=$HOME/src/boost_1_67_0
4
sudo apt-get update
5
sudo apt-get install -y autotools-dev libicu-dev python-dev
6
wget -c 'http://sourceforge.net/projects/boost/files/boost/1.67.0/boost_1_67_0.tar.bz2/download' \
7
-O boost_1_67_0.tar.bz2
8
tar xjf boost_1_67_0.tar.bz2
9
cd boost_1_67_0/
10
./bootstrap.sh "--prefix=$BOOST_ROOT"
11
./b2 install
Copied!

Building Peerplays

1
cd $HOME/src
2
export BOOST_ROOT=$HOME/src/boost_1_67_0
3
git clone https://github.com/peerplays-network/peerplays.git
4
cd peerplays
5
git checkout beatrice
6
git submodule update --init --recursive
7
git submodule sync --recursive
8
cmake -DBOOST_ROOT="$BOOST_ROOT" -DCMAKE_BUILD_TYPE=Release
9
make -j$(nproc)
Copied!

Starting A Peerplays Witness Node

1
./programs/witness_node/witness_node
Copied!
Important: Next stop the Witness node before continuing.
1
vi witness_node_data_dir/config.ini
Copied!
Configure the p2p-endpoint and rpc-endpoint:
1
p2p-endpoint = 0.0.0.0:9777
2
rpc-endpoint = 127.0.0.1:8090
Copied!
Start the Witness node back up.
1
./programs/witness_node/witness_node
Copied!

Starting the witness as a service

We can add the Peerplays blockchain node as a service by placing a service file under/etc/systemd/system similar to:
1
[Unit]
2
Description=Witness
3
[Service]
4
User=ubuntu
5
WorkingDirectory=/home/ubuntu/beatrice
6
ExecStart=/home/ubuntu/beatrice/witness_node
7
Restart=always
8
[Install]
9
WantedBy=mult-user.target
Copied!

Replaying the witness node

The witness node will create saving points every 10000 blocks
To replay a node from the last saving point, run the witness node binary without the replay flag:
1
./witness_node
Copied!
To replay a node from block 0, run the witness node binary with the replay-blockchain flag:
1
./witness_node --replay-blockchain
Copied!