Skip to content

Commit

Permalink
Move appbase_test to steemd. Misc cleanup. No wallet in this build st…
Browse files Browse the repository at this point in the history
  • Loading branch information
mvandeberg committed Aug 3, 2017
1 parent a3c8e81 commit 4bbdcda
Show file tree
Hide file tree
Showing 49 changed files with 637 additions and 944 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ RUN \
-DCLEAR_VOTES=ON \
-DSKIP_BY_TX_ID=ON \
.. && \
make -j$(nproc) chain_test test_fixed_string && \
make -j$(nproc) chain_test test_fixed_string plugin_test && \
./tests/chain_test && \
./programs/util/test_fixed_string && \
cd /usr/local/src/steem && \
Expand All @@ -75,7 +75,7 @@ RUN \
-DSKIP_BY_TX_ID=ON \
-DCHAINBASE_CHECK_LOCKING=OFF \
.. && \
make -j$(nproc) chain_test && \
make -j$(nproc) chain_test plugin_test && \
./tests/chain_test && \
mkdir -p /var/cobertura && \
gcovr --object-directory="../" --root=../ --xml-pretty --gcov-exclude=".*tests.*" --gcov-exclude=".*fc.*" --gcov-exclude=".*app*" --gcov-exclude=".*net*" --gcov-exclude=".*plugins*" --gcov-exclude=".*schema*" --gcov-exclude=".*time*" --gcov-exclude=".*utilities*" --gcov-exclude=".*wallet*" --gcov-exclude=".*programs*" --output="/var/cobertura/coverage.xml" && \
Expand Down
135 changes: 51 additions & 84 deletions contrib/config-for-docker.ini
Original file line number Diff line number Diff line change
@@ -1,115 +1,82 @@
# this will need to increase depending on which plugins/apis you use
# 16 GB should be sufficient for a consensus node
shared-file-size = 16G

# Endpoint for P2P node to listen on
# p2p-endpoint =

# Maxmimum number of incoming connections on P2P endpoint
# p2p-max-connections =
# Console appender definition json: {"appender", "stream"}
log-console-appender = {"appender":"stderr","stream":"std_err"}

# P2P nodes to connect to on startup (may specify multiple times)
# seed-node =
# File appender definition json: {"appender", "file"}
log-file-appender = {"appender":"p2p","file":"logs/p2p/p2p.log"}

# Pairs of [BLOCK_NUM,BLOCK_ID] that should be enforced as checkpoints.
# checkpoint =

# Endpoint for websocket RPC to listen on
# rpc-endpoint =
# Logger definition json: {"name", "level", "appender"}
log-logger = {"name":"default","level":"info","appender":"stderr"} {"name":"p2p","level":"info","appender":"stderr"}

# Endpoint for TLS websocket RPC to listen on
# rpc-tls-endpoint =

# The TLS certificate file for this server
# server-pem =
# Plugin(s) to enable, may be specified multiple times
plugin = witness

# Password for this certificate
# server-pem-password =
plugin = database_api

# Block signing key to use for init witnesses, overrides genesis file
# dbg-init-key =
# Defines a range of accounts to track as a json pair ["from","to"] [from,to] Can be specified multiple times
# account-history-track-account-range =

# API user specification, may be specified multiple times
# api-user =
# Defines a list of operations which will be explicitly logged.
# account-history-whitelist-ops =

# Set an API to be publicly available, may be specified multiple times
public-api = database_api login_api
# Defines a list of operations which will be explicitly ignored.
# account-history-blacklist-ops =

# Plugin(s) to enable, may be specified multiple times
enable-plugin = witness
# the location of the chain shared memory files (absolute path or relative to application data dir)
shared-file-dir = "blockchain"

# JSON list of [nblocks,nseconds] pairs, see doc/bcd-trigger.md
bcd-trigger = [[0,10],[85,300]]
# Size of the shared memory file. Default: 54G
shared-file-size = 16G

# Defines a range of accounts to track as a json pair ["from","to"] [from,to]
# track-account-range =
# Pairs of [BLOCK_NUM,BLOCK_ID] that should be enforced as checkpoints.
# checkpoint =

# Ignore posting operations, only track transfers and account updates
# filter-posting-ops =
# flush shared memory changes to disk every N blocks
flush-state-interval = 0

# Database edits to apply on startup (may specify multiple times)
# edit-script =

# RPC endpoint of a trusted validating node (required)
# trusted-node =
# edit-script =

# Set the maximum size of cached feed for an account
follow-max-feed-size = 500

# Block time (in epoch seconds) when to start calculating feeds
follow-start-feeds = 0

# 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]
market-history-bucket-size = [15,60,300,3600,86400]

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

# Defines a range of accounts to private messages to/from as a json pair ["from","to"] [from,to)
# pm-account-range =
market-history-buckets-per-size = 5760

# Enable block production, even if the chain is stale.
enable-stale-production = false
# The local IP address and port to listen for incoming connections.
# p2p-endpoint =

# Percent of witnesses (0-99) that must be participating in order to produce blocks
required-participation = false

# name of witness controlled by this node (e.g. initwitness )
# witness =

# name of miner and its private key (e.g. ["account","WIF PRIVATE KEY"] )
# miner =

# Number of threads to use for proof of work mining
# mining-threads =

# WIF PRIVATE KEY to be used by one or more witnesses or miners
# private-key =
# Maxmimum number of incoming connections on P2P endpoint
# p2p-max-connections =

# Account creation fee to be voted on upon successful POW - Minimum fee is 100.000 STEEM (written as 100000)
# miner-account-creation-fee =
# The IP address and port of a remote peer to sync with. Deprecated in favor of p2p-seed-node.
# seed-node =

# Maximum block size (in bytes) to be voted on upon successful POW - Max block size must be between 128 KB and 750 MB
# miner-maximum-block-size =
# The IP address and port of a remote peer to sync with.
# p2p-seed-node =

# SBD interest rate to be vote on upon successful POW - Default interest rate is 10% (written as 1000)
# miner-sbd-interest-rate =
# User agent to advertise to peers
p2p-user-agent = Graphene Reference Implementation

# declare an appender named "stderr" that writes messages to the console
[log.console_appender.stderr]
stream=std_error
# The local IP and port to listen for incoming http connections.
# webserver-http-endpoint =

# 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
# The local IP and port to listen for incoming websocket connections.
# webserver-ws-endpoint =

# 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
# Enable block production, even if the chain is stale.
enable-stale-production = false

# route messages sent to the "p2p" logger to stderr too
[logger.p2p]
level=info
appenders=stderr
# Percent of witnesses (0-99) that must be participating in order to produce blocks
required-participation = false

# name of witness controlled by this node (e.g. initwitness )
# witness =

# WIF PRIVATE KEY to be used by one or more witnesses or miners
# private-key =
107 changes: 52 additions & 55 deletions contrib/fullnode.config.ini
Original file line number Diff line number Diff line change
@@ -1,41 +1,73 @@
# Set larger shared-file-size than default
shared-file-size = 48G
# Console appender definition json: {"appender", "stream"}
log-console-appender = {"appender":"stderr","stream":"std_err"}

# File appender definition json: {"appender", "file"}
log-file-appender = {"appender":"p2p","file":"logs/p2p/p2p.log"}

# Set an API to be publicly available, may be specified multiple times
public-api = database_api login_api account_by_key_api network_broadcast_api tag_api follow_api market_history_api raw_block_api
# Logger definition json: {"name", "level", "appender"}
log-logger = {"name":"default","level":"debug","appender":"stderr"} {"name":"p2p","level":"info","appender":"stderr"}

# Plugin(s) to enable, may be specified multiple times
enable-plugin = witness account_history account_by_key tags follow market_history raw_block
plugin = witness account_history account_by_key tags follow market_history

# JSON list of [nblocks,nseconds] pairs, see doc/bcd-trigger.md
bcd-trigger = [[0,10],[85,300]]
plugin = database_api login_api account_by_key_api network_broadcast_api tag_api follow_api market_history_api condesner_api

# Defines a range of accounts to track as a json pair ["from","to"] [from,to]
# track-account-range =
# Defines a range of accounts to track as a json pair ["from","to"] [from,to] Can be specified multiple times
# account-history-track-account-range =

history-whitelist-ops = transfer_operation transfer_to_vesting_operation withdraw_vesting_operation interest_operation transfer_to_savings_operation transfer_from_savings_operation cancel_transfer_from_savings_operation escrow_transfer_operation escrow_approve_operation escrow_dispute_operation escrow_release_operation fill_convert_request_operation fill_order_operation claim_reward_balance_operation author_reward_operation curation_reward_operation fill_vesting_withdraw_operation fill_transfer_from_savings_operation delegate_vesting_shares_operation return_vesting_delegation_operation comment_benefactor_reward_operation
# Defines a list of operations which will be explicitly logged.
account-history-whitelist-ops = transfer_operation transfer_to_vesting_operation withdraw_vesting_operation interest_operation transfer_to_savings_operation transfer_from_savings_operation cancel_transfer_from_savings_operation escrow_transfer_operation escrow_approve_operation escrow_dispute_operation escrow_release_operation fill_convert_request_operation fill_order_operation claim_reward_balance_operation author_reward_operation curation_reward_operation fill_vesting_withdraw_operation fill_transfer_from_savings_operation delegate_vesting_shares_operation return_vesting_delegation_operation comment_benefactor_reward_operation

# Ignore posting operations, only track transfers and account updates
# filter-posting-ops =
# Defines a list of operations which will be explicitly ignored.
# account-history-blacklist-ops =

# Database edits to apply on startup (may specify multiple times)
# edit-script =
# the location of the chain shared memory files (absolute path or relative to application data dir)
# shared-file-dir = "blockchain"

# RPC endpoint of a trusted validating node (required)
# trusted-node =
# Size of the shared memory file. Default: 54G
shared-file-size = 48G

# Pairs of [BLOCK_NUM,BLOCK_ID] that should be enforced as checkpoints.
# checkpoint =

# flush shared memory changes to disk every N blocks
# flush-state-interval = 0

# Database edits to apply on startup (may specify multiple times)
# edit-script =

# Set the maximum size of cached feed for an account
follow-max-feed-size = 500

# Block time (in epoch seconds) when to start calculating feeds
# follow-start-feeds = 0

# 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]
market-history-bucket-size = [15,60,300,3600,86400]

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

# The local IP address and port to listen for incoming connections.
# p2p-endpoint =

# Maxmimum number of incoming connections on P2P endpoint
# p2p-max-connections =

# The IP address and port of a remote peer to sync with. Deprecated in favor of p2p-seed-node.
# seed-node =

# Defines a range of accounts to private messages to/from as a json pair ["from","to"] [from,to)
# pm-account-range =
# The IP address and port of a remote peer to sync with.
# p2p-seed-node =

# User agent to advertise to peers
p2p-user-agent = Graphene Reference Implementation

# The local IP and port to listen for incoming http connections.
# webserver-http-endpoint =

# The local IP and port to listen for incoming websocket connections.
# webserver-ws-endpoint =

# Enable block production, even if the chain is stale.
enable-stale-production = false
Expand All @@ -46,40 +78,5 @@ required-participation = false
# name of witness controlled by this node (e.g. initwitness )
# witness =

# name of miner and its private key (e.g. ["account","WIF PRIVATE KEY"] )
# miner =

# Number of threads to use for proof of work mining
# mining-threads =

# WIF PRIVATE KEY to be used by one or more witnesses or miners
# private-key =

# Account creation fee to be voted on upon successful POW - Minimum fee is 100.000 STEEM (written as 100000)
# miner-account-creation-fee =

# Maximum block size (in bytes) to be voted on upon successful POW - Max block size must be between 128 KB and 750 MB
# miner-maximum-block-size =

# SBD interest rate to be vote on upon successful POW - Default interest rate is 10% (written as 1000)
# miner-sbd-interest-rate =

# 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=debug
appenders=stderr

# route messages sent to the "p2p" logger to stderr too
[logger.p2p]
level=info
appenders=stderr
6 changes: 2 additions & 4 deletions contrib/startpaassteemd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ ARGS=""
# seed nodes, use the ones above:
if [[ -z "$STEEMD_SEED_NODES" ]]; then
for NODE in $SEED_NODES ; do
ARGS+=" --seed-node=$NODE"
ARGS+=" --p2p-seed-node=$NODE"
done
fi

# if user did pass in desired seed nodes, use
# the ones the user specified:
if [[ ! -z "$STEEMD_SEED_NODES" ]]; then
for NODE in $STEEMD_SEED_NODES ; do
ARGS+=" --seed-node=$NODE"
ARGS+=" --p2p-seed-node=$NODE"
done
fi

Expand All @@ -36,8 +36,6 @@ STEEMD_FEED_START_TIME=`expr $NOW - 1209600`

ARGS+=" --follow-start-feeds=$STEEMD_FEED_START_TIME"

ARGS+=" --disable-get-block"

# overwrite local config with image one
cp /etc/steemd/fullnode.config.ini $HOME/config.ini

Expand Down
12 changes: 4 additions & 8 deletions contrib/steemd.run
Original file line number Diff line number Diff line change
Expand Up @@ -20,36 +20,32 @@ ARGS=""
# seed nodes, use the ones above:
if [[ -z "$STEEMD_SEED_NODES" ]]; then
for NODE in $SEED_NODES ; do
ARGS+=" --seed-node=$NODE"
ARGS+=" --p2p-seed-node=$NODE"
done
fi

# if user did pass in desired seed nodes, use
# the ones the user specified:
if [[ ! -z "$STEEMD_SEED_NODES" ]]; then
for NODE in $STEEMD_SEED_NODES ; do
ARGS+=" --seed-node=$NODE"
ARGS+=" --p2p-seed-node=$NODE"
done
fi

if [[ ! -z "$STEEMD_WITNESS_NAME" ]]; then
ARGS+=" --witness=\"$STEEMD_WITNESS_NAME\""
fi

if [[ ! -z "$STEEMD_MINER_NAME" ]]; then
ARGS+=" --miner=[\"$STEEMD_MINER_NAME\",\"$STEEMD_PRIVATE_KEY\"]"
ARGS+=" --mining-threads=$(nproc)"
fi

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

if [[ ! -z "$TRACK_ACCOUNT" ]]; then
if [[ ! "$USE_WAY_TOO_MUCH_RAM" ]]; then
ARGS+=" --enable-plugin=account_history"
ARGS+=" --plugin=account_history"
fi
ARGS+=" --track-account-range=[\"$TRACK_ACCOUNT\",\"$TRACK_ACCOUNT\"]"
ARGS+=" --account-history-track-account-range=[\"$TRACK_ACCOUNT\",\"$TRACK_ACCOUNT\"]"
fi

NOW=`date +%s`
Expand Down
2 changes: 1 addition & 1 deletion contrib/sync-sv-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ if [[ ! -z "$BLOCKCHAIN_TIME" ]]; then
fi
echo steemdsync: replacing current version of blockchain-latest.tar.bz2 with $FILE_NAME
aws s3 cp s3://$S3_BUCKET/$FILE_NAME s3://$S3_BUCKET/blockchain-$VERSION-latest.tar.bz2
aws s3api put-object-acl --bucket $S3_BUCKET --key blockchain-$VERSION-latest.tar.bz2 --acl public-read
aws s3api put-object-acl --bucket $S3_BUCKET --key blockchain-$VERSION-latest.tar.bz2 --acl public-read
if [[ ! $? -eq 0 ]]; then
echo NOTIFYALERT! steemdsync was unable to overwrite the current blockchainstate with $FILE_NAME
exit 1
Expand Down
Loading

0 comments on commit 4bbdcda

Please sign in to comment.