diff --git a/plugins/account_history/plugin.cpp b/plugins/account_history/plugin.cpp index 97ce29bd1c..f428279106 100644 --- a/plugins/account_history/plugin.cpp +++ b/plugins/account_history/plugin.cpp @@ -346,7 +346,7 @@ void plugin::set_program_options( ("track-account-range", boost::program_options::value< vector< string > >()->composing()->multitoken(), "Defines a range of accounts to track as a json pair [\"from\",\"to\"] [from,to] Can be specified multiple times") ("history-whitelist-ops", boost::program_options::value< vector< string > >()->composing(), "Defines a list of operations which will be explicitly logged.") ("history-blacklist-ops", boost::program_options::value< vector< string > >()->composing(), "Defines a list of operations which will be explicitly ignored.") - ("history-start-block", boost::program_options::value()->composing(), "Defines starting block from wich recording starts") + ("history-start-block", boost::program_options::value()->composing(), "Defines starting block from which recording stats.") ; cfg.add(cli); } diff --git a/share/golosd/config/config.ini b/share/golosd/config/config.ini index e011933d57..e36ac09730 100644 --- a/share/golosd/config/config.ini +++ b/share/golosd/config/config.ini @@ -1,72 +1,90 @@ # Endpoint for P2P node to listen on -# p2p-endpoint = +p2p-endpoint = 0.0.0.0:4243 # Maxmimum number of incoming connections on P2P endpoint # p2p-max-connections = # P2P nodes to connect to on startup (may specify multiple times) -# seed-node = +# p2p-seed-node = # Pairs of [BLOCK_NUM,BLOCK_ID] that should be enforced as checkpoints. # checkpoint = -# Endpoint for websocket RPC to listen on -# rpc-endpoint = - -# Endpoint for TLS websocket RPC to listen on -# rpc-tls-endpoint = - -# The TLS certificate file for this server -# server-pem = - -# Password for this certificate -# server-pem-password = - -# Block signing key to use for init witnesses, overrides genesis file -# dbg-init-key = - -# API user specification, may be specified multiple times -# api-user = - +# Number of threads for rpc-clients. The optimal value is `-1` webserver-thread-pool-size = 2 + +# IP:PORT for HTTP connections webserver-http-endpoint = 0.0.0.0:8090 + +# IP:PORT for WebSocket connections webserver-ws-endpoint = 0.0.0.0:8091 -rpc-endpoint = 0.0.0.0:2001 +# Maximum microseconds for trying to get read lock read-wait-micro = 500000 + +# Maximum retries to get read lock. Each retry is read-wait-micro microseconds. +# When all retries are made, the rpc-client receives error 'Unable to acquire READ lock'. max-read-wait-retries = 2 +# Maximum microseconds for trying to get write lock on broadcast transaction. write-wait-micro = 500000 + +# Maximum retries to get write lock. Each retry is write-wait-micro microseconds. +# When all retries are made, the rpc-client receives error 'Unable to acquire WRITE lock'. max-write-wait-retries = 3 +# Do all write operations (push_block/push_transaction) in the single thread. +# Write lock of database is very heavy. When many threads tries to lock database on writing, rpc-clients +# receive many errors 'Unable to acquire READ lock' ('Unable to acquire WRITE lock'). +# Enabling of this options can increase performance. single-write-thread = true -# Plugins doesn't validate data, so they can be disabled on push_transaction(). -# Disabling of this option allows to increase performance. +# Enable plugin notifications about operations in a pushed transaction, which should be included to the next generated +# block. Plugins doesn't validate data in operations, they only update its own indexes, so notifications can be +# disabled on push_transaction() without any side-effects. The option doesn't have effect on a pushing signed blocks, +# so it is safe. +# Disabling of this option can increase performance. enable-plugins-on-push-transaction = false +# A start size for shared memory file when it doesn't have any data. Possible cases: +# - If shared memory has data and the value is greater then the size of shared_memory.bin, +# the file will be grown to requested size. +# - If shared memory has data and the value is less then the size of shared_memory.bin, nothing happens. +# Changing of this parameter doesn't require the replaying. shared-file-size = 2G -inc-shared-file-size = 2G + +# The minimum free space in the shared memory file. When free space reaches the following value, the size of the +# shared_memory.bin increases by the value of inc-shared-file-size. min-free-shared-file-size = 500M + +# Step of increasing size of shared_memory.bin. When the free memory size reaches min-free-shared-file-size, +# the shared memory size increases by the following value. +inc-shared-file-size = 2G + +# How often do checking the free space in shared_memory.bin. A very frequent checking can decrease performance. +# It's not critical if the free size became very small, because the daemon catches the `bad_alloc` exception +# and resizes. The optimal strategy is do checking of the free space, but not very often. block-num-check-free-size = 1000 # each 3000 seconds plugin = chain p2p json_rpc webserver network_broadcast_api witness test_api database_api private_message follow social_network market_history account_by_key account_history statsd block_info raw_block +# Remove votes before defined block, should increase performance +clear-votes-before-block = 4294967295 # clear votes after each cashout -# JSON list of [nblocks,nseconds] pairs, see documentation/bcd-trigger.md -bcd-trigger = [[0,10],[85,300]] +# Virtual operations will not be passed to the plugins, enabling of the option helps to save some memory. +skip-virtual-ops = false -# Defines a range of accounts to track as a json pair ["from","to"] [from,to] +# Defines a range of accounts to track by the account_history plugin as a json pair ["from","to"] [from,to] # track-account-range = -# Ignore posting operations, only track transfers and account updates -# filter-posting-ops = +# Defines a list of operations which will be explicitly logged by the account_history plugin. +# history-whitelist-ops = account_create_operation account_update_operation comment_operation delete_comment_operation vote_operation author_reward_operation curation_reward_operation liquidity_reward_operation interest_operation fill_convert_request_operation transfer_operation transfer_to_vesting_operation withdraw_vesting_operation witness_update_operation account_witness_vote_operation account_witness_proxy_operation feed_publish_operation limit_order_create_operation fill_order_operation limit_order_cancel_operation pow_operation fill_vesting_withdraw_operation shutdown_witness_operation custom_operation request_account_recovery_operation recover_account_operation change_recovery_account_operation escrow_transfer_operation escrow_approve_operation escrow_dispute_operation escrow_release_operation transfer_to_savings_operation transfer_from_savings_operation cancel_transfer_from_savings_operation decline_voting_rights_operation comment_benefactor_reward_operation -# Database edits to apply on startup (may specify multiple times) -# edit-script = +# Defines a list of operations which will be explicitly ignored by the account_history plugin. +# history-blacklist-ops = -# RPC endpoint of a trusted validating node (required) -# trusted-node = +# Defines starting block from which recording stats by the account_history plugin. +# history-start-block = 0 # Set the maximum size of cached feed for an account follow-max-feed-size = 500 @@ -93,7 +111,7 @@ required-participation = 0 # miner = # Number of threads to use for proof of work mining -# mining-threads = +mining-threads = 0 # WIF PRIVATE KEY to be used by one or more witnesses or miners # private-key = @@ -119,10 +137,10 @@ filename=logs/p2p/p2p.log # 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 +level=debug appenders=stderr # route messages sent to the "p2p" logger to stderr too [logger.p2p] -level=info +level=error appenders=stderr diff --git a/share/golosd/config/config_debug.ini b/share/golosd/config/config_debug.ini index 99a0caaa4e..f2bf0a354a 100644 --- a/share/golosd/config/config_debug.ini +++ b/share/golosd/config/config_debug.ini @@ -5,68 +5,86 @@ # p2p-max-connections = # P2P nodes to connect to on startup (may specify multiple times) -# seed-node = +# p2p-seed-node = # Pairs of [BLOCK_NUM,BLOCK_ID] that should be enforced as checkpoints. # checkpoint = -# Endpoint for websocket RPC to listen on -# rpc-endpoint = - -# Endpoint for TLS websocket RPC to listen on -# rpc-tls-endpoint = - -# The TLS certificate file for this server -# server-pem = - -# Password for this certificate -# server-pem-password = - -# Block signing key to use for init witnesses, overrides genesis file -# dbg-init-key = - -# API user specification, may be specified multiple times -# api-user = - +# Number of threads for rpc-clients. Optimal value `-1` webserver-thread-pool-size = 2 + +# IP:PORT for HTTP connections webserver-http-endpoint = 0.0.0.0:8090 -webserver-ws-endpoint = 0.0.0.0:8091 -rpc-endpoint = 0.0.0.0:2001 -shared-file-size = 100M -inc-shared-file-size = 100M -min-free-shared-file-size = 50M -block-num-check-free-size = 100 # each 300 seconds +# IP:PORT for WebSocket connections +webserver-ws-endpoint = 0.0.0.0:8091 +# Maximum microseconds for trying to get read lock read-wait-micro = 500000 + +# Maximum retries to get read lock. Each retry is read-wait-micro microseconds. +# When all retries are made, the rpc-client receives error 'Unable to acquire READ lock'. max-read-wait-retries = 2 +# Maximum microseconds for trying to get write lock on broadcast transaction. write-wait-micro = 500000 + +# Maximum retries to get write lock. Each retry is write-wait-micro microseconds. +# When all retries are made, the rpc-client receives error 'Unable to acquire WRITE lock'. max-write-wait-retries = 3 +# Do all write operations (push_block/push_transaction) in the single thread. +# Write lock of database is very heavy. When many threads tries to lock database on writing, rpc-clients +# receive many errors 'Unable to acquire READ lock' ('Unable to acquire WRITE lock'). +# Enabling of this options can increase performance. single-write-thread = true +# Enable plugin notifications about operations in a pushed transaction, which should be included to the next generated +# block. Plugins doesn't validate data in operations, they only update its own indexes, so notifications can be +# disabled on push_transaction() without any side-effects. The option doesn't have effect on a pushing signed blocks, +# so it is safe. +# Disabling of this option can increase performance. +enable-plugins-on-push-transaction = true + +# A start size for shared memory file when it doesn't have any data. Possible cases: +# - If shared memory has data and the value is greater then the size of shared_memory.bin, +# the file will be grown to requested size. +# - If shared memory has data and the value is less then the size of shared_memory.bin, nothing happens. +# Changing of this parameter doesn't require the replaying. +shared-file-size = 100M + +# The minimum free space in the shared memory file. When free space reaches the following value, the size of the +# shared_memory.bin increases by the value of inc-shared-file-size. +min-free-shared-file-size = 50M + +# Step of increasing size of shared_memory.bin. When the free memory size reaches min-free-shared-file-size, +# the shared memory size increases by the following value. +inc-shared-file-size = 100M + +# How often do checking the free space in shared_memory.bin. A very frequent checking can decrease performance. +# It's not critical if the free size became very small, because the daemon catches the `bad_alloc` exception +# and resizes. The optimal strategy is do checking of the free space, but not very often. +block-num-check-free-size = 10 # each 30 seconds plugin = chain p2p json_rpc webserver network_broadcast_api witness test_api database_api private_message follow social_network market_history account_by_key account_history statsd block_info raw_block debug_node -# Plugins doesn't validate data, so they can be disabled on push_transaction(). -# Disabling of this option allows to increase performance. -enable-plugins-on-push-transaction = true +# Remove votes before defined block, should increase performance +clear-votes-before-block = 0 # don't clear votes -# JSON list of [nblocks,nseconds] pairs, see documentation/bcd-trigger.md -bcd-trigger = [[0,10],[85,300]] +# Virtual operations will not be passed to the plugins, enabling of the option helps to save some memory. +skip-virtual-ops = false -# Defines a range of accounts to track as a json pair ["from","to"] [from,to] +# Defines a range of accounts to track by the account_history plugin as a json pair ["from","to"] [from,to] # track-account-range = -# Ignore posting operations, only track transfers and account updates -# filter-posting-ops = +# Defines a list of operations which will be explicitly logged by the account_history plugin. +# history-whitelist-ops = -# Database edits to apply on startup (may specify multiple times) -# edit-script = +# Defines a list of operations which will be explicitly ignored by the account_history plugin. +# history-blacklist-ops = -# RPC endpoint of a trusted validating node (required) -# trusted-node = +# Defines starting block from which recording stats by the account_history plugin. +# history-start-block = # Set the maximum size of cached feed for an account follow-max-feed-size = 500 diff --git a/share/golosd/config/config_stock_exchange.ini b/share/golosd/config/config_stock_exchange.ini index 939b4a867d..6f72115b6f 100644 --- a/share/golosd/config/config_stock_exchange.ini +++ b/share/golosd/config/config_stock_exchange.ini @@ -1,72 +1,90 @@ # Endpoint for P2P node to listen on -# p2p-endpoint = +p2p-endpoint = 0.0.0.0:4243 # Maxmimum number of incoming connections on P2P endpoint # p2p-max-connections = # P2P nodes to connect to on startup (may specify multiple times) -# seed-node = +# p2p-seed-node = # Pairs of [BLOCK_NUM,BLOCK_ID] that should be enforced as checkpoints. # checkpoint = -# Endpoint for websocket RPC to listen on -# rpc-endpoint = +# Number of threads for rpc-clients. The optimal value is `-1` +webserver-thread-pool-size = 2 -# Endpoint for TLS websocket RPC to listen on -# rpc-tls-endpoint = +# IP:PORT for HTTP connections +webserver-http-endpoint = 127.0.0.1:8090 -# The TLS certificate file for this server -# server-pem = - -# Password for this certificate -# server-pem-password = - -# Block signing key to use for init witnesses, overrides genesis file -# dbg-init-key = - -# API user specification, may be specified multiple times -# api-user = - -webserver-thread-pool-size = 4 -webserver-http-endpoint = 0.0.0.0:8090 -webserver-ws-endpoint = 0.0.0.0:8091 -rpc-endpoint = 0.0.0.0:2001 - -shared-file-size = 2G -inc-shared-file-size = 2G -min-free-shared-file-size = 500M -block-num-check-free-size = 1000 # each 3000 seconds +# IP:PORT for WebSocket connections +webserver-ws-endpoint = 127.0.0.1:8091 +# Maximum microseconds for trying to get read lock read-wait-micro = 500000 -max-read-wait-retries = 3 +# Maximum retries to get read lock. Each retry is read-wait-micro microseconds. +# When all retries are made, the rpc-client receives error 'Unable to acquire READ lock'. +max-read-wait-retries = 10 + +# Maximum microseconds for trying to get write lock on broadcast transaction. write-wait-micro = 500000 + +# Maximum retries to get write lock. Each retry is write-wait-micro microseconds. +# When all retries are made, the rpc-client receives error 'Unable to acquire WRITE lock'. max-write-wait-retries = 3 +# Do all write operations (push_block/push_transaction) in the single thread. +# Write lock of database is very heavy. When many threads tries to lock database on writing, rpc-clients +# receive many errors 'Unable to acquire READ lock' ('Unable to acquire WRITE lock'). +# Enabling of this options can increase performance. single-write-thread = true -# Plugins doesn't validate data, so they can be disabled on push_transaction(). -# Disabling of this option allows to increase performance. +# Enable plugin notifications about operations in a pushed transaction, which should be included to the next generated +# block. Plugins doesn't validate data in operations, they only update its own indexes, so notifications can be +# disabled on push_transaction() without any side-effects. The option doesn't have effect on a pushing signed blocks, +# so it is safe. +# Disabling of this option can increase performance. enable-plugins-on-push-transaction = false +# A start size for shared memory file when it doesn't have any data. Possible cases: +# - If shared memory has data and the value is greater then the size of shared_memory.bin, +# the file will be grown to requested size. +# - If shared memory has data and the value is less then the size of shared_memory.bin, nothing happens. +# Changing of this parameter doesn't require the replaying. +shared-file-size = 2G + +# The minimum free space in the shared memory file. When free space reaches the following value, the size of the +# shared_memory.bin increases by the value of inc-shared-file-size. +min-free-shared-file-size = 500M + +# Step of increasing size of shared_memory.bin. When the free memory size reaches min-free-shared-file-size, +# the shared memory size increases by the following value. +inc-shared-file-size = 2G + +# How often do checking the free space in shared_memory.bin. A very frequent checking can decrease performance. +# It's not critical if the free size became very small, because the daemon catches the `bad_alloc` exception +# and resizes. The optimal strategy is do checking of the free space, but not very often. +block-num-check-free-size = 1000 # each 3000 seconds + plugin = chain p2p json_rpc webserver network_broadcast_api witness database_api block_info raw_block account_history market_history +# Remove votes before defined block, should increase performance +clear-votes-before-block = 4294967295 # clear votes after each cashout -# JSON list of [nblocks,nseconds] pairs, see documentation/bcd-trigger.md -bcd-trigger = [[0,10],[85,300]] +# Virtual operations will not be passed to the plugins, enabling of the option helps to save some memory. +skip-virtual-ops = true -# Defines a range of accounts to track as a json pair ["from","to"] [from,to] +# Defines a range of accounts to track by the account_history plugin as a json pair ["from","to"] [from,to] # track-account-range = -# Ignore posting operations, only track transfers and account updates -# filter-posting-ops = +# Defines a list of operations which will be explicitly logged by the account_history plugin. +# history-whitelist-ops = -# Database edits to apply on startup (may specify multiple times) -# edit-script = +# Defines a list of operations which will be explicitly ignored by the account_history plugin. +# history-blacklist-ops = -# RPC endpoint of a trusted validating node (required) -# trusted-node = +# Defines starting block from which recording stats by the account_history plugin. +# history-start-block = # 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] @@ -74,35 +92,14 @@ 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 = - # Enable block production, even if the chain is stale. enable-stale-production = false # Percent of witnesses (0-99) that must be participating in order to produce blocks required-participation = 0 -# 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 = +mining-threads = 0 # declare an appender named "stderr" that writes messages to the console [log.console_appender.stderr] @@ -116,10 +113,10 @@ filename=logs/p2p/p2p.log # 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 +level=debug appenders=stderr # route messages sent to the "p2p" logger to stderr too [logger.p2p] -level=info +level=error appenders=stderr diff --git a/share/golosd/config/config_witness.ini b/share/golosd/config/config_witness.ini index c70c9b96d4..360ca6ab13 100644 --- a/share/golosd/config/config_witness.ini +++ b/share/golosd/config/config_witness.ini @@ -1,75 +1,77 @@ # Endpoint for P2P node to listen on -# p2p-endpoint = +p2p-endpoint = 0.0.0.0:4243 # Maxmimum number of incoming connections on P2P endpoint # p2p-max-connections = # P2P nodes to connect to on startup (may specify multiple times) -# seed-node = +# p2p-seed-node = # Pairs of [BLOCK_NUM,BLOCK_ID] that should be enforced as checkpoints. # checkpoint = -# Endpoint for websocket RPC to listen on -# rpc-endpoint = - -# Endpoint for TLS websocket RPC to listen on -# rpc-tls-endpoint = - -# The TLS certificate file for this server -# server-pem = - -# Password for this certificate -# server-pem-password = +# Number of threads for rpc-clients. The optimal value is `-1` +webserver-thread-pool-size = 2 -# Block signing key to use for init witnesses, overrides genesis file -# dbg-init-key = +# IP:PORT for HTTP connections +webserver-http-endpoint = 127.0.0.1:8090 -# API user specification, may be specified multiple times -# api-user = - -webserver-thread-pool-size = 2 -webserver-http-endpoint = 0.0.0.0:8090 -webserver-ws-endpoint = 0.0.0.0:8091 -rpc-endpoint = 0.0.0.0:2001 +# IP:PORT for WebSocket connections +webserver-ws-endpoint = 127.0.0.1:8091 +# Maximum microseconds for trying to get read lock read-wait-micro = 500000 + +# Maximum retries to get read lock. Each retry is read-wait-micro microseconds. +# When all retries are made, the rpc-client receives error 'Unable to acquire READ lock'. max-read-wait-retries = 2 +# Maximum microseconds for trying to get write lock on broadcast transaction. write-wait-micro = 500000 + +# Maximum retries to get write lock. Each retry is write-wait-micro microseconds. +# When all retries are made, the rpc-client receives error 'Unable to acquire WRITE lock'. max-write-wait-retries = 3 +# Do all write operations (push_block/push_transaction) in the single thread. +# Write lock of database is very heavy. When many threads tries to lock database on writing, rpc-clients +# receive many errors 'Unable to acquire READ lock' ('Unable to acquire WRITE lock'). +# Enabling of this options can increase performance. single-write-thread = true -# Plugins doesn't validate data, so they can be disabled on push_transaction(). -# Disabling of this option allows to increase performance. +# Enable plugin notifications about operations in a pushed transaction, which should be included to the next generated +# block. Plugins doesn't validate data in operations, they only update its own indexes, so notifications can be +# disabled on push_transaction() without any side-effects. The option doesn't have effect on a pushing signed blocks, +# so it is safe. +# Disabling of this option can increase performance. enable-plugins-on-push-transaction = false +# Start size for shared memory file. Possible cases: +# - If the value is greater then the size of shared_memory.bin, the file will grow to requested size. +# - If the value is less then the size of shared_memory.bin, nothing happens. +# Changing of this parameter doesn't force of replaying. shared-file-size = 2G -inc-shared-file-size = 2G -min-free-shared-file-size = 500M -block-num-check-free-size = 1000 # each 3000 seconds - -plugin = chain p2p json_rpc webserver network_broadcast_api witness database_api - -# JSON list of [nblocks,nseconds] pairs, see documentation/bcd-trigger.md -bcd-trigger = [[0,10],[85,300]] +# The minimum free space in the shared memory file. When free space reaches the following value, the size of the +# shared_memory.bin increases by the value of inc-shared-file-size. +min-free-shared-file-size = 500M -# Defines a range of accounts to track as a json pair ["from","to"] [from,to] -# track-account-range = +# Step of increasing size of shared_memory.bin. When the free memory size reaches min-free-shared-file-size, +# the shared memory size increases by the following value. +inc-shared-file-size = 2G -# Ignore posting operations, only track transfers and account updates -# filter-posting-ops = +# How often do checking the free space in shared_memory.bin. A very frequent checking can decrease performance. +# It's not critical if the free size became very small, because the daemon catches the `bad_alloc` exception +# and resizes. The optimal strategy is do checking of the free space, but not very often. +block-num-check-free-size = 1000 # each 3000 seconds -# Database edits to apply on startup (may specify multiple times) -# edit-script = +plugin = chain p2p json_rpc webserver network_broadcast_api witness database_api -# RPC endpoint of a trusted validating node (required) -# trusted-node = +# Remove votes before defined block, should increase performance +clear-votes-before-block = 4294967295 # clear votes after each cashout -# Defines a range of accounts to private messages to/from as a json pair ["from","to"] [from,to) -# pm-account-range = +# Virtual operations will not be passed to the plugins, enabling of the option helps to save some memory. +skip-virtual-ops = true # Enable block production, even if the chain is stale. enable-stale-production = false @@ -84,7 +86,7 @@ witness = "cyberfounder" # miner = # Number of threads to use for proof of work mining -# mining-threads = +mining-threads = 0 # WIF PRIVATE KEY to be used by one or more witnesses or miners private-key = 5JVFFWRLwz6JoP9kguuRFfytToGU6cLgBVTL9t6NB3D3BQLbUBS @@ -110,10 +112,10 @@ filename=logs/p2p/p2p.log # 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 +level=debug appenders=stderr # route messages sent to the "p2p" logger to stderr too [logger.p2p] -level=info +level=error appenders=stderr