Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release candidate #526

Merged
merged 87 commits into from
Dec 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
f8f7e0d
Reduce the max-block-size that is used in new networks by default
xeroc Oct 13, 2017
d8ada40
elasticsearch plugin
oxarbitrage Oct 25, 2017
f781328
clean some comments
oxarbitrage Oct 26, 2017
923ab7e
escape ingle quote
oxarbitrage Oct 26, 2017
509c105
change replace character
oxarbitrage Oct 26, 2017
0a1698b
more on parsing inside ops
oxarbitrage Oct 26, 2017
57ed08d
Merge branch 'develop' into elasticsearch
oxarbitrage Oct 27, 2017
684c15f
Remove not needed includes
oxarbitrage Oct 27, 2017
4a5f355
template approach for visitor operations
oxarbitrage Oct 28, 2017
9ed90c3
use signed block already available
oxarbitrage Oct 29, 2017
a6b2177
block witness from running ES and account_history plugin at the same …
oxarbitrage Oct 30, 2017
dc83959
send oho instead of oho->id
oxarbitrage Oct 30, 2017
058e0a1
Store price in fill_order_operation, for #449
abitmore Nov 2, 2017
95020fd
using data structures
oxarbitrage Nov 2, 2017
aaf9e8e
moving curl to dedicated function
oxarbitrage Nov 2, 2017
c4b6cec
Update `get_trade_history` API to use `fill_price`
abitmore Nov 3, 2017
1e3e9ac
adding tx id again by skipping virtual ops
oxarbitrage Nov 5, 2017
fa1fe56
fix trx id segfault
oxarbitrage Nov 5, 2017
c8834f4
http return codes
oxarbitrage Nov 6, 2017
d404f53
Change operation_history to generic_index, #403
abitmore Nov 6, 2017
a854409
remove check that can cause loss of data
oxarbitrage Nov 7, 2017
090cd96
move curl handler and vector inside impl class
oxarbitrage Nov 7, 2017
e1bd6ec
update default buckets.
oxarbitrage Nov 7, 2017
e8308e4
Proper operation_history_obj initialization, #403
abitmore Nov 7, 2017
28f89ae
change curl_init to constructor
oxarbitrage Nov 7, 2017
7cf7cd2
Merge pull request #464 from abitmore/403-ophis-index-change
abitmore Nov 8, 2017
4e7be5c
monthly indexes
oxarbitrage Nov 8, 2017
430e753
prefix to index
oxarbitrage Nov 8, 2017
1c70b09
Refactor get_ticker API for better performance
abitmore Nov 9, 2017
4124f5f
Add more checks to market history plugin
abitmore Nov 9, 2017
f47b1b9
Merge pull request #466 from bitshares/oxarbitrage-patch-4
oxarbitrage Nov 9, 2017
ad23d58
Change market API's to return more data, #448
abitmore Nov 10, 2017
243b9cf
Add get_trade_history_by_sequence API, for #448
abitmore Nov 10, 2017
2d15b01
adding pull464 changes
oxarbitrage Nov 10, 2017
a81ad3b
allow plugin to have descriptions
oxarbitrage Nov 10, 2017
0e1ac00
Merge pull request #471 from oxarbitrage/plugins_description
oxarbitrage Nov 10, 2017
28eff31
Merge commit 'refs/pull/444/head' of https://github.com/bitshares/bit…
oxarbitrage Nov 10, 2017
71e5a77
Add plugin description
oxarbitrage Nov 10, 2017
3729a88
`get_24_volume` API now returns current time
abitmore Nov 11, 2017
70c2c83
Merge pull request #455 from abitmore/449-fill-order-price
abitmore Nov 11, 2017
bdec30a
Merge pull request #444 from oxarbitrage/elasticsearch
oxarbitrage Nov 11, 2017
ebe0755
Market his: properly remove old buckets. #472
abitmore Nov 12, 2017
af11a5b
Market his: cap volume at max value of int64. #467
abitmore Nov 12, 2017
19dc312
added curl to dependencies README
oxarbitrage Nov 13, 2017
781f5ca
Merge pull request #477 from bitshares/oxarbitrage-patch-5
abitmore Nov 13, 2017
5ee5642
Market his: prune old order matching data. #454
abitmore Nov 13, 2017
7a29c52
libraries/wallet/CMakeLists.txt: add PWD to PERLLIB before running ge…
piem Nov 12, 2017
53a524d
Merge pull request #479 from piem/develop
oxarbitrage Nov 13, 2017
07ed6f1
Market his: change by_id index to ordered_unique
theoreticalbts Feb 29, 2016
cecc926
Change get_trade_history API to use by_market_time
abitmore Nov 13, 2017
9ab2d94
initial docker files
xeroc Oct 10, 2017
050fdfc
Bump FC version
abitmore Nov 14, 2017
240563a
Merge pull request #483 from abitmore/develop-fc-upgrade
oxarbitrage Nov 15, 2017
8bcaca4
Add dependency for libcurl4-openssl-dev
xeroc Nov 15, 2017
33f7552
Update new suppored boost versions to README
oxarbitrage Nov 15, 2017
81e91f4
Merge pull request #482 from bitshares/docker
oxarbitrage Nov 15, 2017
1a264ac
Merge pull request #486 from bitshares/oxarbitrage-patch-6
oxarbitrage Nov 15, 2017
8cd335f
[docker] Create the symlink in the launch script, not the Dockerfile
xeroc Nov 16, 2017
c39fa7c
Merge pull request #488 from bitshares/docker
oxarbitrage Nov 16, 2017
c881a81
Fix error message referring to the old p2p-port option
knaperek Nov 18, 2017
a9a55d7
Merge pull request #489 from knaperek/fix-docs-p2p-port
oxarbitrage Nov 18, 2017
e8da8e0
Merge pull request #478 from abitmore/472-market-his-size
oxarbitrage Nov 20, 2017
02b2fd7
Ensure receive_blind is only called after a successfull receive_from_…
btcinshares Nov 22, 2017
93d72c1
Fix small typo.
btcinshares Nov 22, 2017
bae4f8f
Merge pull request #494 from btcinshares/insufficent_balance_typo_fix
oxarbitrage Nov 22, 2017
eb152a5
Unit tests for get_potential_signatures API. #496
abitmore Nov 22, 2017
eb19ec7
get_potential_signatures API returns owner keys
abitmore Nov 22, 2017
4263c13
Merge pull request #493 from btcinshares/blind_history_order_fix
oxarbitrage Nov 22, 2017
28397c6
[docker] Add cURL lib #476 and environmental variables for configuration
xeroc Nov 23, 2017
01c198f
Merge pull request #498 from bitshares/docker
oxarbitrage Nov 23, 2017
7272b69
Merge pull request #497 from abitmore/496-fix-get-potential-sigs
oxarbitrage Nov 23, 2017
6d2dadc
Merge pull request #1 from bitshares/develop
btcinshares Nov 23, 2017
4d8e6b6
Add sign_memo and read_memo wallet APIs.
btcinshares Nov 27, 2017
3ac7940
remove invalid field from fork database issue #66
oxarbitrage Nov 27, 2017
db14a50
Merge pull request #508 from oxarbitrage/issue66
oxarbitrage Nov 28, 2017
ef374cd
Merge pull request #507 from btcinshares/sign_memo_api
oxarbitrage Nov 29, 2017
ed11ede
Market his plugin: precalculate ticker data. #509
abitmore Nov 30, 2017
43a8d04
get_ticker API now use precalculated data. #509
abitmore Nov 30, 2017
19a421f
Change default max block size to even smaller
abitmore Dec 11, 2017
b860946
Merge pull request #419 from bitshares/reduce-genesis-max-block-size
abitmore Dec 11, 2017
ffeebe5
remove the not required logging
crazybits Dec 8, 2017
b373ad4
remove the log lines instead of comment
crazybits Dec 8, 2017
c13780c
Merge pull request #522 from bitshares/516-cli-logging
abitmore Dec 11, 2017
ee06ec1
Merge pull request #513 from abitmore/509-prepared-ticker
abitmore Dec 11, 2017
282f995
add version command to node
oxarbitrage Dec 11, 2017
9c3e4f1
add version to cli wallet + shortcuts
oxarbitrage Dec 12, 2017
b6d95fd
Merge pull request #524 from oxarbitrage/issue521
oxarbitrage Dec 12, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 58 additions & 16 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,64 @@
# This will build the witness_node in a docker image. Make sure you've already
# checked out the submodules before building.
FROM phusion/baseimage:0.9.19
MAINTAINER The bitshares decentralized organisation

FROM l3iggs/archlinux:latest
MAINTAINER Nathan Hourt <[email protected]>
ENV LANG=en_US.UTF-8
RUN \
apt-get update -y && \
apt-get install -y \
g++ \
autoconf \
cmake \
git \
libbz2-dev \
libreadline-dev \
libboost-all-dev \
libcurl4-openssl-dev \
libssl-dev \
libncurses-dev \
doxygen \
libcurl4-openssl-dev \
&& \
apt-get update -y && \
apt-get install -y fish && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

RUN pacman -Syu --noconfirm gcc make autoconf automake cmake ninja boost libtool git
ADD . /bitshares-core
WORKDIR /bitshares-core

ADD . /bitshares-2
WORKDIR /bitshares-2
RUN cmake -G Ninja -DCMAKE_BUILD_TYPE=Release .
RUN ninja witness_node || ninja -j 1 witness_node
# Compile
RUN \
git submodule update --init --recursive && \
cmake \
-DCMAKE_BUILD_TYPE=Release \
. && \
make witness_node && \
make install && \
#
# Obtain version
mkdir /etc/bitshares && \
git rev-parse --short HEAD > /etc/bitshares/version && \
cd / && \
rm -rf /bitshares-core

RUN mkdir /data_dir
ADD docker/default_config.ini /default_config.ini
ADD docker/launch /launch
RUN chmod a+x /launch
VOLUME /data_dir
# Home directory $HOME
WORKDIR /
RUN useradd -s /bin/bash -m -d /var/lib/bitshares bitshares
ENV HOME /var/lib/bitshares
RUN chown bitshares:bitshares -R /var/lib/bitshares

EXPOSE 8090 9090
# Volume
VOLUME ["/var/lib/bitshares", "/etc/bitshares"]

ENTRYPOINT ["/launch"]
# rpc service:
EXPOSE 8090
# p2p service:
EXPOSE 2001

# default exec/config files
ADD docker/default_config.ini /etc/bitshares/config.ini
ADD docker/bitsharesentry.sh /usr/local/bin/bitsharesentry.sh
RUN chmod a+x /usr/local/bin/bitsharesentry.sh

# default execute entry
CMD /usr/local/bin/bitsharesentry.sh
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Build instructions and additional documentation are available in the
We recommend building on Ubuntu 16.04 LTS, and the build dependencies may be installed with:

sudo apt-get update
sudo apt-get install autoconf cmake git libboost-all-dev libssl-dev g++
sudo apt-get install autoconf cmake git libboost-all-dev libssl-dev g++ libcurl4-openssl-dev

To build after all dependencies are installed:

Expand All @@ -43,8 +43,8 @@ To build after all dependencies are installed:

**NOTE:** BitShares requires an [OpenSSL](https://www.openssl.org/) version in the 1.0.x series. OpenSSL 1.1.0 and newer are NOT supported. If your system OpenSSL version is newer, then you will need to manually provide an older version of OpenSSL and specify it to CMake using `-DOPENSSL_INCLUDE_DIR`, `-DOPENSSL_SSL_LIBRARY`, and `-DOPENSSL_CRYPTO_LIBRARY`.

**NOTE:** BitShares requires a [Boost](http://www.boost.org/) version in the range [1.57, 1.60]. Versions earlier than
1.57 or newer than 1.60 are NOT supported. If your system Boost version is newer, then you will need to manually build
**NOTE:** BitShares requires a [Boost](http://www.boost.org/) version in the range [1.57, 1.63]. Versions earlier than
1.57 or newer than 1.63 are NOT supported. If your system Boost version is newer, then you will need to manually build
an older version of Boost and specify it to CMake using `DBOOST_ROOT`.

After building, the witness node can be launched with:
Expand Down
85 changes: 85 additions & 0 deletions docker/bitsharesentry.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
#!/bin/bash
BITSHARESD="/usr/local/bin/witness_node"

# For blockchain download
VERSION=`cat /etc/bitshares/version`

## Supported Environmental Variables
#
# * $BITSHARESD_SEED_NODES
# * $BITSHARESD_RPC_ENDPOINT
# * $BITSHARESD_PLUGINS
# * $BITSHARESD_REPLAY
# * $BITSHARESD_RESYNC
# * $BITSHARESD_P2P_ENDPOINT
# * $BITSHARESD_WITNESS_ID
# * $BITSHARESD_PRIVATE_KEY
# * $BITSHARESD_TRACK_ACCOUNTS
# * $BITSHARESD_PARTIAL_OPERATIONS
# * $BITSHARESD_MAX_OPS_PER_ACCOUNT
# * $BITSHARESD_ES_NODE_URL
# * $BITSHARESD_TRUSTED_NODE
#

ARGS=""
# Translate environmental variables
if [[ ! -z "$BITSHARESD_SEED_NODES" ]]; then
for NODE in $BITSHARESD_SEED_NODES ; do
ARGS+=" --seed-node=$NODE"
done
fi
if [[ ! -z "$BITSHARESD_RPC_ENDPOINT" ]]; then
ARGS+=" --rpc-endpoint=${BITSHARESD_RPC_ENDPOINT}"
fi

if [[ ! -z "$BITSHARESD_PLUGINS" ]]; then
ARGS+=" --plugins=\"${BITSHARESD_PLUGINS}\""
fi

if [[ ! -z "$BITSHARESD_REPLAY" ]]; then
ARGS+=" --replay-blockchain"
fi

if [[ ! -z "$BITSHARESD_RESYNC" ]]; then
ARGS+=" --resync-blockchain"
fi

if [[ ! -z "$BITSHARESD_P2P_ENDPOINT" ]]; then
ARGS+=" --p2p-endpoint=${BITSHARESD_P2P_ENDPOINT}"
fi

if [[ ! -z "$BITSHARESD_WITNESS_ID" ]]; then
ARGS+=" --witness-id=$BITSHARESD_WITNESS_ID"
fi

if [[ ! -z "$BITSHARESD_PRIVATE_KEY" ]]; then
ARGS+=" --private-key=$BITSHARESD_PRIVATE_KEY"
fi

if [[ ! -z "$BITSHARESD_TRACK_ACCOUNTS" ]]; then
for ACCOUNT in $BITSHARESD_TRACK_ACCOUNTS ; do
ARGS+=" --track-account=$ACCOUNT"
done
fi

if [[ ! -z "$BITSHARESD_PARTIAL_OPERATIONS" ]]; then
ARGS+=" --partial-operations=${BITSHARESD_PARTIAL_OPERATIONS}"
fi

if [[ ! -z "$BITSHARESD_MAX_OPS_PER_ACCOUNT" ]]; then
ARGS+=" --max-ops-per-account=${BITSHARESD_MAX_OPS_PER_ACCOUNT}"
fi

if [[ ! -z "$BITSHARESD_ES_NODE_URL" ]]; then
ARGS+=" --elasticsearch-node-url=${BITSHARESD_ES_NODE_URL}"
fi

if [[ ! -z "$BITSHARESD_TRUSTED_NODE" ]]; then
ARGS+=" --trusted-node=${BITSHARESD_TRUSTED_NODE}"
fi

## Link the bitshares config file into home
## This link has been created in Dockerfile, already
ln -f -s /etc/bitshares/config.ini /var/lib/bitshares

$BITSHARESD --data-dir ${HOME} ${ARGS} ${BITSHARESD_ARGS}
28 changes: 8 additions & 20 deletions docker/default_config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -47,28 +47,16 @@ required-participation = false
# track-account =

# Track market history by grouping orders into buckets of equal size measured in seconds specified as a JSON array of numbers
bucket-size = [15,60,300,3600,86400]
# bucket-size = [15,60,300,3600,86400]
bucket-size = [60,300,900,1800,3600,14400,86400]
# for 1 min, 5 mins, 30 mins, 1h, 4 hs and 1 day. i think this should be the default.
# https://github.com/bitshares/bitshares-core/issues/465

# How far back in time to track history for each bucket size, measured in the number of buckets (default: 1000)
history-per-size = 1000

# declare an appender named "stderr" that writes messages to the console
[log.console_appender.stderr]
stream=std_error

# declare an appender named "p2p" that writes messages to p2p.log
[log.file_appender.p2p]
filename=logs/p2p/p2p.log
# filename can be absolute or relative to this config file

# route any messages logged to the default logger to the "stderr" logger we
# declared above, if they are info level are higher
[logger.default]
level=info
appenders=stderr

# route messages sent to the "p2p" logger to the p2p appender declared above
[logger.p2p]
level=info
appenders=p2p
# Max amount of operations to store in the database, per account (drastically reduces RAM requirements)
max-ops-per-account = 1000

# Remove old operation history # objects from RAM
partial-operations = true
11 changes: 0 additions & 11 deletions docker/launch

This file was deleted.

21 changes: 21 additions & 0 deletions libraries/app/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@

#include <boost/range/adaptor/reversed.hpp>

#include <graphene/utilities/git_revision.hpp>

namespace graphene { namespace app {
using net::item_hash_t;
using net::item_id;
Expand Down Expand Up @@ -943,6 +945,7 @@ void application::set_program_options(boost::program_options::options_descriptio
("resync-blockchain", "Delete all blocks and re-sync with network from scratch")
("force-validate", "Force validation of all transactions")
("genesis-timestamp", bpo::value<uint32_t>(), "Replace timestamp from genesis.json with current time plus this many seconds (experts only!)")
("version,v", "Display version information")
;
command_line_options.add(_cli_options);
configuration_file_options.add(_cfg_options);
Expand All @@ -953,6 +956,14 @@ void application::initialize(const fc::path& data_dir, const boost::program_opti
my->_data_dir = data_dir;
my->_options = &options;

if( options.count("version") )
{
std::cout << "Version: " << graphene::utilities::git_revision_description << "\n";
std::cout << "SHA: " << graphene::utilities::git_revision_sha << "\n";
std::cout << "Timestamp: " << fc::get_approximate_relative_time_string(fc::time_point_sec(graphene::utilities::git_revision_unix_timestamp)) << "\n";
std::exit(EXIT_SUCCESS);
}

if( options.count("create-genesis-json") )
{
fc::path genesis_out = options.at("create-genesis-json").as<boost::filesystem::path>();
Expand Down Expand Up @@ -989,8 +1000,18 @@ void application::initialize(const fc::path& data_dir, const boost::program_opti
wanted.push_back("account_history");
wanted.push_back("market_history");
}
int es_ah_conflict_counter = 0;
for (auto& it : wanted)
{
if(it == "account_history")
++es_ah_conflict_counter;
if(it == "elasticsearch")
++es_ah_conflict_counter;

if(es_ah_conflict_counter > 1) {
elog("Can't start program with elasticsearch and account_history plugin at the same time");
std::exit(EXIT_FAILURE);
}
if (!it.empty()) enable_plugin(it);
}
}
Expand Down
Loading