From 2705fcd2fad92d5eac02c0b72dd2446886a65697 Mon Sep 17 00:00:00 2001 From: JustinW Date: Tue, 6 Jun 2017 16:47:21 -0400 Subject: [PATCH 1/2] Enable single account history tracking on consensus nodes --- contrib/config-for-docker.ini | 2 +- contrib/steemd.run | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/contrib/config-for-docker.ini b/contrib/config-for-docker.ini index 3b2602636f..462f8efb98 100644 --- a/contrib/config-for-docker.ini +++ b/contrib/config-for-docker.ini @@ -38,7 +38,7 @@ enable-plugin = witness account_history bcd-trigger = [[0,10],[85,300]] # Defines a range of accounts to track as a json pair ["from","to"] [from,to] -# track-account-range = +track-account-range = ["",""] # Ignore posting operations, only track transfers and account updates # filter-posting-ops = diff --git a/contrib/steemd.run b/contrib/steemd.run index 428cc64994..5a22516d13 100644 --- a/contrib/steemd.run +++ b/contrib/steemd.run @@ -45,6 +45,10 @@ if [[ ! -z "$STEEMD_PRIVATE_KEY" ]]; then ARGS+=" --private-key=$STEEMD_PRIVATE_KEY" fi +if [[ ! -z "$TRACK_ACCOUNT" ]]; then + ARGS+=" --track-account-range=[\"$TRACK_ACCOUNT\",\"$TRACK_ACCOUNT\"]" +fi + NOW=`date +%s` STEEMD_FEED_START_TIME=`expr $NOW - 1209600` STEEMD_FEED_START_TIMESTAMP=`date --date=@$STEEMD_FEED_START_TIME +%Y-%m-%d:%H:%M:%S` From 2e0057a41946adb4e0321043dfc07aa255e57bd0 Mon Sep 17 00:00:00 2001 From: Michael Vandeberg Date: Wed, 7 Jun 2017 16:23:46 -0400 Subject: [PATCH 2/2] Optimize plugin loading for consensus only node --- contrib/config-for-docker.ini | 4 ++-- contrib/steemd.run | 7 +++++-- doc/quickstart.md | 6 ++++++ 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/contrib/config-for-docker.ini b/contrib/config-for-docker.ini index 462f8efb98..ff2eb8dba7 100644 --- a/contrib/config-for-docker.ini +++ b/contrib/config-for-docker.ini @@ -32,13 +32,13 @@ public-api = database_api login_api # Plugin(s) to enable, may be specified multiple times -enable-plugin = witness account_history +enable-plugin = witness # JSON list of [nblocks,nseconds] pairs, see doc/bcd-trigger.md bcd-trigger = [[0,10],[85,300]] # Defines a range of accounts to track as a json pair ["from","to"] [from,to] -track-account-range = ["",""] +# track-account-range = # Ignore posting operations, only track transfers and account updates # filter-posting-ops = diff --git a/contrib/steemd.run b/contrib/steemd.run index 5a22516d13..22be7ffb3b 100644 --- a/contrib/steemd.run +++ b/contrib/steemd.run @@ -26,7 +26,7 @@ fi # if user did pass in desired seed nodes, use # the ones the user specified: -if [[ ! -z "$STEEMD_SEED_NODES" ]]; then +if [[ ! -z "$STEEMD_SEED_NODES" ]]; then for NODE in $STEEMD_SEED_NODES ; do ARGS+=" --seed-node=$NODE" done @@ -46,7 +46,10 @@ if [[ ! -z "$STEEMD_PRIVATE_KEY" ]]; then fi if [[ ! -z "$TRACK_ACCOUNT" ]]; then - ARGS+=" --track-account-range=[\"$TRACK_ACCOUNT\",\"$TRACK_ACCOUNT\"]" + if [[ ! "$USE_WAY_TOO_MUCH_RAM" ]]; then + ARGS+=" --enable-plugin=witness account_history" + fi + ARGS+=" --track-account-range=[\"$TRACK_ACCOUNT\",\"$TRACK_ACCOUNT\"]" fi NOW=`date +%s` diff --git a/doc/quickstart.md b/doc/quickstart.md index 2931ef497d..62dfeff51c 100644 --- a/doc/quickstart.md +++ b/doc/quickstart.md @@ -37,6 +37,12 @@ track-account-range = ["yourexchangeid", "yourexchangeid"] ``` Do not add other APIs or plugins unless you know what you are doing. +This configuration exists in Docker with the following command + +``` +docker run -d --env TRACK_ACCOUNT="yourexchangeid" steemit/steem +``` + ### Resources usage Please make sure that you have enough resources available.