Merge branch 'develop' into feature/260-voting-info
This commit is contained in:
commit
027464c36f
4 changed files with 173 additions and 171 deletions
80
README.md
80
README.md
|
|
@ -2,95 +2,73 @@ Intro for new developers and witnesses
|
||||||
------------------------
|
------------------------
|
||||||
|
|
||||||
This is a quick introduction to get new developers and witnesses up to speed on Peerplays blockchain. It is intended for witnesses plannig to join a live, already deployed blockchain.
|
This is a quick introduction to get new developers and witnesses up to speed on Peerplays blockchain. It is intended for witnesses plannig to join a live, already deployed blockchain.
|
||||||
# Building on Ubuntu 18.04 LTS and Installation Instructions
|
|
||||||
|
|
||||||
The following dependencies were necessary for a clean install of Ubuntu 18.04 LTS:
|
|
||||||
|
|
||||||
|
# Building and Installation Instructions
|
||||||
|
|
||||||
|
Officially supported OS is Ubuntu 20.04.
|
||||||
|
|
||||||
|
Following dependencies are needed for a clean install of Ubuntu 20.04:
|
||||||
```
|
```
|
||||||
sudo apt-get install autoconf bash build-essential ca-certificates cmake \
|
sudo apt-get install \
|
||||||
doxygen git graphviz libbz2-dev libcurl4-openssl-dev libncurses-dev \
|
apt-utils autoconf bash build-essential ca-certificates cmake dnsutils \
|
||||||
libreadline-dev libssl-dev libtool libzmq3-dev locales ntp pkg-config \
|
doxygen expect git graphviz libboost1.67-all-dev libbz2-dev libcurl4-openssl-dev \
|
||||||
wget
|
libncurses-dev libreadline-dev libsnappy-dev libssl-dev libtool libzip-dev \
|
||||||
```
|
libzmq3-dev locales mc nano net-tools ntp openssh-server pkg-config perl \
|
||||||
## Build Boost 1.67.0
|
python3 python3-jinja2 sudo wget
|
||||||
|
|
||||||
|
|
||||||
```
|
|
||||||
mkdir $HOME/src
|
|
||||||
cd $HOME/src
|
|
||||||
export BOOST_ROOT=$HOME/src/boost_1_67_0
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y autotools-dev build-essential libbz2-dev libicu-dev python-dev
|
|
||||||
wget -c 'http://sourceforge.net/projects/boost/files/boost/1.67.0/boost_1_67_0.tar.bz2/download'\
|
|
||||||
-O boost_1_67_0.tar.bz2
|
|
||||||
tar xjf boost_1_67_0.tar.bz2
|
|
||||||
cd boost_1_67_0/
|
|
||||||
./bootstrap.sh "--prefix=$BOOST_ROOT"
|
|
||||||
./b2 install
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Building Peerplays
|
## Building Peerplays
|
||||||
|
|
||||||
```
|
```
|
||||||
|
mkdir $HOME/src
|
||||||
cd $HOME/src
|
cd $HOME/src
|
||||||
export BOOST_ROOT=$HOME/src/boost_1_67_0
|
git clone https://gitlab.com/PBSA/peerplays.git
|
||||||
git clone https://github.com/peerplays-network/peerplays.git
|
|
||||||
cd peerplays
|
cd peerplays
|
||||||
git submodule update --init --recursive
|
git submodule update --init --recursive
|
||||||
# If you want to build Mainnet node
|
# If you want to build Mainnet node
|
||||||
cmake -DBOOST_ROOT="$BOOST_ROOT" -DCMAKE_BUILD_TYPE=Release
|
cmake -DCMAKE_BUILD_TYPE=Release
|
||||||
# If you want to build Testnet node
|
# If you want to build Testnet node
|
||||||
cmake -DBOOST_ROOT="$BOOST_ROOT" -DCMAKE_BUILD_TYPE=Release -DBUILD_PEERPLAYS_TESTNET=1
|
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_PEERPLAYS_TESTNET=1
|
||||||
make -j$(nproc)
|
make -j$(nproc)
|
||||||
|
|
||||||
make install # this can install the executable files under /usr/local
|
make install # this can install the executable files under /usr/local
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Docker image
|
## Docker images
|
||||||
|
|
||||||
|
Install docker, and add current user to docker group.
|
||||||
```
|
```
|
||||||
# Install docker
|
|
||||||
sudo apt install docker.io
|
sudo apt install docker.io
|
||||||
|
|
||||||
|
|
||||||
# Add current user to docker group
|
|
||||||
sudo usermod -a -G docker $USER
|
sudo usermod -a -G docker $USER
|
||||||
|
|
||||||
# You need to restart your shell session, to apply group membership
|
# You need to restart your shell session, to apply group membership
|
||||||
# Type 'groups' to verify that you are a member of a docker group
|
# Type 'groups' to verify that you are a member of a docker group
|
||||||
|
```
|
||||||
|
|
||||||
|
### Official docker image for Peerplas Mainnet
|
||||||
|
|
||||||
|
```
|
||||||
|
docker pull datasecuritynode/peerplays:latest
|
||||||
|
```
|
||||||
|
|
||||||
|
### Building docker image manually
|
||||||
|
```
|
||||||
# Build docker image (from the project root, must be a docker group member)
|
# Build docker image (from the project root, must be a docker group member)
|
||||||
docker build -t peerplays .
|
docker build -t peerplays .
|
||||||
|
```
|
||||||
|
|
||||||
|
### Start docker image
|
||||||
# Start docker image
|
```
|
||||||
docker start peerplays
|
docker start peerplays
|
||||||
|
|
||||||
# Exposed ports
|
|
||||||
# # rpc service:
|
|
||||||
# EXPOSE 8090
|
|
||||||
# # p2p service:
|
|
||||||
# EXPOSE 1776
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Rest of the instructions on starting the chain remains same.
|
Rest of the instructions on starting the chain remains same.
|
||||||
|
|
||||||
Starting A Peerplays Node
|
Starting A Peerplays Node
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
For Ubuntu 14.04 LTS and up users, see
|
|
||||||
[this](https://github.com/cryptonomex/graphene/wiki/build-ubuntu) and
|
|
||||||
then proceed with:
|
|
||||||
|
|
||||||
git clone https://github.com/peerplays-network/peerplays.git
|
|
||||||
cd peerplays
|
|
||||||
git submodule update --init --recursive
|
|
||||||
cmake -DBOOST_ROOT="$BOOST_ROOT" -DCMAKE_BUILD_TYPE=Release .
|
|
||||||
make
|
|
||||||
./programs/witness_node/witness_node
|
|
||||||
|
|
||||||
Launching the witness creates required directories. Next, **stop the witness** and continue.
|
Launching the witness creates required directories. Next, **stop the witness** and continue.
|
||||||
|
|
||||||
$ vi witness_node_data_dir/config.ini
|
$ vi witness_node_data_dir/config.ini
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <boost/exception/diagnostic_information.hpp>
|
||||||
#include <fc/exception/exception.hpp>
|
#include <fc/exception/exception.hpp>
|
||||||
#include <graphene/chain/protocol/protocol.hpp>
|
#include <graphene/chain/protocol/protocol.hpp>
|
||||||
|
|
||||||
|
|
@ -75,6 +76,14 @@
|
||||||
elog( "Caught plugin exception: ${e}", ("e", e.to_detail_string() ) ); \
|
elog( "Caught plugin exception: ${e}", ("e", e.to_detail_string() ) ); \
|
||||||
throw; \
|
throw; \
|
||||||
} \
|
} \
|
||||||
|
catch( const boost::exception& e ) \
|
||||||
|
{ \
|
||||||
|
elog( "Caught plugin boost::exception: ${e}", ("e", boost::diagnostic_information(e) ) ); \
|
||||||
|
} \
|
||||||
|
catch( const std::exception& e ) \
|
||||||
|
{ \
|
||||||
|
elog( "Caught plugin std::exception: ${e}", ("e", e.what() ) ); \
|
||||||
|
} \
|
||||||
catch( ... ) \
|
catch( ... ) \
|
||||||
{ \
|
{ \
|
||||||
wlog( "Caught unexpected exception in plugin" ); \
|
wlog( "Caught unexpected exception in plugin" ); \
|
||||||
|
|
|
||||||
|
|
@ -78,6 +78,8 @@ account_history_plugin_impl::~account_history_plugin_impl()
|
||||||
}
|
}
|
||||||
|
|
||||||
void account_history_plugin_impl::update_account_histories( const signed_block& b )
|
void account_history_plugin_impl::update_account_histories( const signed_block& b )
|
||||||
|
{
|
||||||
|
try \
|
||||||
{
|
{
|
||||||
graphene::chain::database& db = database();
|
graphene::chain::database& db = database();
|
||||||
vector<optional< operation_history_object > >& hist = db.get_applied_operations();
|
vector<optional< operation_history_object > >& hist = db.get_applied_operations();
|
||||||
|
|
@ -198,6 +200,19 @@ void account_history_plugin_impl::update_account_histories( const signed_block&
|
||||||
skip_oho_id();
|
skip_oho_id();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch( const boost::exception& e )
|
||||||
|
{
|
||||||
|
elog( "Caught account_history_plugin::update_account_histories(...) boost::exception: ${e}", ("e", boost::diagnostic_information(e) ) );
|
||||||
|
}
|
||||||
|
catch( const std::exception& e )
|
||||||
|
{
|
||||||
|
elog( "Caught account_history_plugin::update_account_histories(...) std::exception: ${e}", ("e", e.what() ) );
|
||||||
|
}
|
||||||
|
catch( ... )
|
||||||
|
{
|
||||||
|
wlog( "Caught unexpected exception in account_history_plugin::update_account_histories(...)" );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void account_history_plugin_impl::add_account_history( const account_id_type account_id, const operation_history_id_type op_id )
|
void account_history_plugin_impl::add_account_history( const account_id_type account_id, const operation_history_id_type op_id )
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import xml.etree.ElementTree as etree
|
import defusedxml.ElementTree as etree
|
||||||
|
|
||||||
def process_node(path, node):
|
def process_node(path, node):
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue