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

Merge release to master #617

Merged
merged 72 commits into from
Feb 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
b4b8dfd
fix vote_id_type might be uninitialized #25
takaaki7 Jul 23, 2017
55e5276
Add get_account_history_by_operations
Oct 18, 2017
f6e0e7d
no message
Oct 18, 2017
03bf95a
move version command code
oxarbitrage Dec 13, 2017
a2c3756
Fix windows build issue due to PERLLIB #532
abitmore Dec 14, 2017
63da266
update document for get_account_history_by_operations
Dec 14, 2017
7a88cdb
Merge pull request #536 from oxarbitrage/issue535
oxarbitrage Dec 14, 2017
3e0ef5b
Merge pull request #538 from bitshares/532-win-build-perllib
abitmore Dec 14, 2017
46e115b
Update parameter name and document for get_account_history_by_operations
Dec 15, 2017
84ddcce
Update get_account_history_by_operations, return limit operation history
Dec 15, 2017
9b47aa5
update while condition
Dec 15, 2017
e4fb550
Fix an error for get_account_history_by_operations
Dec 15, 2017
a42779c
add a counter to stop infinite loop
Dec 18, 2017
a5222aa
update get_account_history_by_operations
Dec 19, 2017
7caec24
remove the counter ilog
Dec 20, 2017
b136e81
remove counter, use start for loop condition
Dec 20, 2017
f9af1b5
Merge pull request #430 from zhuliting/develop
oxarbitrage Dec 20, 2017
72032c6
Added unit test to reproducee the OP in issue #338
pmconrad Jul 29, 2017
3ce2a38
Added log message for bad order matching in margin calls
pmconrad Jul 29, 2017
f4e8207
Merge pull request #547 from pmconrad/issue_338_test
oxarbitrage Dec 23, 2017
10a15ca
Merge pull request #546 from pmconrad/issue_453_log
oxarbitrage Dec 23, 2017
f170f52
change proposal index from non unique to unique composite key in by_e…
oxarbitrage Dec 24, 2017
bb275db
Merge pull request #551 from oxarbitrage/change-proposal-index
oxarbitrage Dec 26, 2017
de76b16
update assert log for transfer
Jan 4, 2018
a6d24bc
Merge pull request #557 from zhuliting/develop
oxarbitrage Jan 4, 2018
23c10e8
Update Readme
oxarbitrage Jan 6, 2018
f64c7e3
Log when #531b413 happens
pmconrad Jan 9, 2018
1bee14a
Remove obsolete pre-hf protection from #531b413
pmconrad Jan 9, 2018
ccbca02
Revert "Prevent bid_collateral from executing through proposal before…
pmconrad Jan 9, 2018
a0c7d1c
[docker] also build other binaries, not just witness_node
xeroc Jan 10, 2018
0cefca8
[docker] Expose proper docker p2p port
xeroc Jan 10, 2018
d618641
[docker] Properly use --plugins from environment
xeroc Jan 10, 2018
872dd0c
[docker] separated README
xeroc Jan 10, 2018
4e302f1
Merge pull request #562 from bitshares/oxarbitrage-patch-7
oxarbitrage Jan 10, 2018
b55ff1d
Revert "Softfork for #433 protection until hardfork"
pmconrad Jan 10, 2018
ecedfc5
Test case for get_required_signatures API, #567
abitmore Jan 10, 2018
a231758
Move owner check from API to transaction.cpp, #567
abitmore Jan 10, 2018
6f377a8
Add fill_price for settlement order matching, #563
abitmore Jan 10, 2018
af6bb88
More precise logging for #353
pmconrad Jan 10, 2018
09f5eab
Remove hardfork protection for #353
pmconrad Jan 11, 2018
77090df
Merge pull request #568 from bitshares/docker-updates-201801
oxarbitrage Jan 12, 2018
a4e19bc
Merge pull request #333 from takaaki7/vote_id_type_validation
abitmore Jan 13, 2018
4797615
Test case for vote_id_type initialization. #577
abitmore Jan 13, 2018
49e9b1b
Improve test case for vote_id initialization. #577
abitmore Jan 14, 2018
3d3b2bb
Capture exceptions when initializing vote_id. #577
abitmore Jan 14, 2018
e8f0114
Merge pull request #573 from pmconrad/cleanup_hf
pmconrad Jan 14, 2018
2d9c5cf
Test case about unnecessary active keys, #197
abitmore Jan 14, 2018
066eb48
get_required_authorities: active -= owner. #197
abitmore Jan 14, 2018
87cb344
Tests for #200 get sigs for partially signed trx
abitmore Jan 15, 2018
97fe720
get_required_sigs: don't return signed keys. #200
abitmore Jan 15, 2018
ba18ff4
Test case for #584: parent owner key can not auth
abitmore Jan 18, 2018
08cbaf3
More tests for #584: parent owner key can not auth
abitmore Jan 18, 2018
d53279b
fix db_notify.cpp not included in GRAPHENE_DISABLE_UNITY_BUILD set
Jan 20, 2018
68996fb
Change assert() to FC_ASSERT in db_block.cpp, #511
abitmore Jan 20, 2018
744a2d7
bump fc to last version
oxarbitrage Jan 21, 2018
4076fe7
Merge pull request #593 from oxarbitrage/fc-9_2
abitmore Jan 21, 2018
10bb3a3
Merge pull request #574 from pmconrad/cleanup_353
oxarbitrage Jan 22, 2018
02a4499
Merge pull request #591 from abitmore/511-assert-db-block
oxarbitrage Jan 22, 2018
c55ee9b
Change doubles in market API to string. #144
abitmore Jan 22, 2018
d0297ee
Change CLI to adapt market API change. #144
abitmore Jan 23, 2018
4621473
Remove buy and sell (with doubles) from CLI. #544
abitmore Jan 23, 2018
7c45b52
Merge pull request #578 from abitmore/577-vote-id-exception
abitmore Jan 23, 2018
197ceca
Merge pull request #589 from ihla/fix_disable_unity_build
oxarbitrage Jan 23, 2018
496ab0f
Merge pull request #595 from abitmore/544-remove-buy-sell-cmd
abitmore Jan 23, 2018
ad8b503
Replace pays.asset_id with current_asset. #563
abitmore Jan 24, 2018
25000ab
Refactor to_string functions, add unit tests. #144
abitmore Jan 25, 2018
d4ae6ec
Merge pull request #571 from abitmore/563-settle-fill-price
abitmore Jan 25, 2018
6c86cc8
Merge pull request #570 from abitmore/567-required-sigs
abitmore Jan 25, 2018
774054e
Merge pull request #594 from abitmore/144-fix-api-uses-doubles
oxarbitrage Jan 25, 2018
6c81fdc
bump database
oxarbitrage Jan 26, 2018
1dc5939
Merge pull request #602 from bitshares/oxarbitrage-patch-1
oxarbitrage Jan 26, 2018
c570a73
Merge pull request #603 from bitshares/develop
oxarbitrage Jan 26, 2018
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
125 changes: 125 additions & 0 deletions README-docker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
# Docker Container

This repository comes with built-in Dockerfile to support docker
containers. This README serves as documentation.

## Dockerfile Specifications

The `Dockerfile` performs the following steps:

1. Obtain base image (phusion/baseimage:0.9.19)
2. Install required dependencies using `apt-get`
3. Add bitshares-core source code into container
4. Update git submodules
5. Perform `cmake` with build type `Release`
6. Run `make` and `make_install` (this will install binaries into `/usr/local/bin`
7. Purge source code off the container
8. Add a local bitshares user and set `$HOME` to `/var/lib/bitshares`
9. Make `/var/lib/bitshares` and `/etc/bitshares` a docker *volume*
10. Expose ports `8090` and `2001`
11. Add default config from `docker/default_config.ini` and entry point script
12. Run entry point script by default

The entry point simplifies the use of parameters for the `witness_node`
(which is run by default when spinning up the container).

### 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`

### Default config

The default configuration is:

p2p-endpoint = 0.0.0.0:9090
rpc-endpoint = 0.0.0.0:8090
bucket-size = [60,300,900,1800,3600,14400,86400]
history-per-size = 1000
max-ops-per-account = 1000
partial-operations = true

# Docker Compose

With docker compose, multiple nodes can be managed with a single
`docker-compose.yaml` file:

version: '3'
services:
main:
# Image to run
image: bitshares/bitshares-core:latest
#
volumes:
- ./docker/conf/:/etc/bitshares/
# Optional parameters
environment:
- BITSHARESD_ARGS=--help


version: '3'
services:
fullnode:
# Image to run
image: bitshares/bitshares-core:latest
environment:
# Optional parameters
environment:
- BITSHARESD_ARGS=--help
ports:
- "0.0.0.0:8090:8090"
volumes:
- "bitshares-fullnode:/var/lib/bitshares"


# Docker Hub

This container is properly registered with docker hub under the name:

* [bitshares/bitshares-core](https://hub.docker.com/r/bitshares/bitshares-core/)

Going forward, every release tag as well as all pushes to `develop` and
`testnet` will be built into ready-to-run containers, there.

# Docker Compose

One can use docker compose to setup a trusted full node together with a
delayed node like this:

```
version: '3'
services:

fullnode:
image: bitshares/bitshares-core:latest
ports:
- "0.0.0.0:8090:8090"
volumes:
- "bitshares-fullnode:/var/lib/bitshares"

delayed_node:
image: bitshares/bitshares-core:latest
environment:
- 'BITSHARESD_PLUGINS=delayed_node witness'
- 'BITSHARESD_TRUSTED_NODE=ws://fullnode:8090'
ports:
- "0.0.0.0:8091:8090"
volumes:
- "bitshares-delayed_node:/var/lib/bitshares"
links:
- fullnode

volumes:
bitshares-fullnode:
```
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ the blockchain. After syncing, you can exit the node using Ctrl+C and setup the

rpc-endpoint = 127.0.0.1:8090

**NOTE:** Currently(2017-09-04) a full node need 40GB of RAM to operate and required memory is growing fast. To start a node with reduced RAM check the following: [Memory reduction for nodes](https://github.com/bitshares/bitshares-core/wiki/Memory-reduction-for-nodes).
**NOTE:** By default the witness node will start in reduced memory ram mode by using some of the commands detailed in [Memory reduction for nodes](https://github.com/bitshares/bitshares-core/wiki/Memory-reduction-for-nodes).
In order to run a full node with all the account history you need to remove `partial-operations` and `max-ops-per-account` from your config file. Please note that currently(2017-12-23) a full node need 54GB of RAM to operate and required memory is growing fast.

After starting the witness node again, in a separate terminal you can run:

Expand Down
12 changes: 7 additions & 5 deletions docker/bitsharesentry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ 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
Expand Down Expand Up @@ -82,4 +78,10 @@ fi
## 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}
# Plugins need to be provided in a space-separated list, which
# makes it necessary to write it like this
if [[ ! -z "$BITSHARESD_PLUGINS" ]]; then
$BITSHARESD --data-dir ${HOME} ${ARGS} ${BITSHARESD_ARGS} --plugins "${BITSHARESD_PLUGINS}"
else
$BITSHARESD --data-dir ${HOME} ${ARGS} ${BITSHARESD_ARGS}
fi
1 change: 1 addition & 0 deletions libraries/app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ file(GLOB EGENESIS_HEADERS "../egenesis/include/graphene/app/*.hpp")
add_library( graphene_app
api.cpp
application.cpp
util.cpp
database_api.cpp
impacted.cpp
plugin.cpp
Expand Down
15 changes: 15 additions & 0 deletions libraries/app/api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,21 @@ namespace graphene { namespace app {
return hist->tracked_buckets();
}

history_operation_detail history_api::get_account_history_by_operations(account_id_type account, vector<uint16_t> operation_types, uint32_t start, unsigned limit)
{
FC_ASSERT(limit <= 100);
history_operation_detail result;
vector<operation_history_object> objs = get_relative_account_history(account, start, limit, limit + start - 1);
std::for_each(objs.begin(), objs.end(), [&](const operation_history_object &o) {
if (operation_types.empty() || find(operation_types.begin(), operation_types.end(), o.op.which()) != operation_types.end()) {
result.operation_history_objs.push_back(o);
}
});

result.total_count = objs.size();
return result;
}

vector<bucket_object> history_api::get_market_history( asset_id_type a, asset_id_type b,
uint32_t bucket_seconds, fc::time_point_sec start, fc::time_point_sec end )const
{ try {
Expand Down
11 changes: 0 additions & 11 deletions libraries/app/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@

#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 @@ -945,7 +943,6 @@ 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 @@ -956,14 +953,6 @@ 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
Loading