Skip to content
Permalink
Browse files

update sserver.cfg: add section log and management

  • Loading branch information
SwimmingTiger committed Feb 19, 2020
1 parent 78d70ba commit 822bf87d710061b5b2a59ba65fb62317f66ddc43
Showing with 112 additions and 33 deletions.
  1. +1 −1 docs/Prometheus-Metrics.md
  2. +16 −0 src/bitcoin/cfg/sserver(multi-chains).cfg
  3. +26 −0 src/bitcoin/cfg/sserver.cfg
  4. +69 −32 src/sserver/sserver.cfg
@@ -10,7 +10,7 @@ prometheus = {
# address for prometheus exporter to bind
address = "0.0.0.0"
# port for prometheus exporter to bind
port = 8080
port = 9100
# path of the prometheus exporter url
path = "/metrics"
};
@@ -172,6 +172,22 @@ users = {
namechains_check_interval = 300;
};

prometheus = {
# whether prometheus exporter is enabled
enabled = true
# address for prometheus exporter to bind
address = "0.0.0.0"
# port for prometheus exporter to bind
port = 9100
# path of the prometheus exporter url
path = "/metrics"
};

log = {
# hide "client connect" log with the prefix
#hide_ip_prefix = "100.122.";
};

management = {
enabled = true; # default: true

@@ -138,3 +138,29 @@ users = {
#single_user_name = "user1";
#single_user_puid = 1;
};

prometheus = {
# whether prometheus exporter is enabled
enabled = true
# address for prometheus exporter to bind
address = "0.0.0.0"
# port for prometheus exporter to bind
port = 9100
# path of the prometheus exporter url
path = "/metrics"
};

log = {
# hide "client connect" log with the prefix
#hide_ip_prefix = "100.122.";
};

management = {
enabled = true; # default: true

kafka_brokers = "127.0.0.1:9092"; # "10.0.0.1:9092,10.0.0.2:9092,..."
controller_topic = "BtcManController";
processor_topic = "BtcManProcessor";

auto_switch_chain = false;
};
@@ -10,7 +10,6 @@ testnet = false;

kafka = {
brokers = "127.0.0.1:9092"; # "10.0.0.1:9092,10.0.0.2:9092,..."

};

zookeeper = {
@@ -19,43 +18,43 @@ zookeeper = {

sserver = {
# serverType
type = "SIA";
type = "BTC";

ip = "0.0.0.0";
port = 3333;

# should be global unique, range: [1, 255]
# If the id is 0, try to automatically assign one from zookeeper.
id = 1;
id = 0;
# The lock path used when automatically assigning an id
zookeeper_lock_path = "/locks/sserver_sia";
zookeeper_lock_path = "/locks/sserver_btc";

# write last mining notify job send time to file, for monitor
file_last_notify_time = "/work/btcpool/build/run_sserver/sserver_lastnotifytime.txt";
file_last_notify_time = "./sserver_lastnotifytime.txt";

# the connection will be closed if the miner does not send any message
# to the sserver within the specified seconds.
tcp_read_timeout = 600;

# set a non-empty regex pattern to match the agent for long timeout, it is matched as
# if we are using `grep -i`
# long_timeout_agent = "^BTC.com.*";

# how many seconds between two share submit
share_avg_seconds = 10;

# the lifetime of a job
# It should not be too short, otherwise the valid share will be rejected due to job not found.
max_job_lifetime = 300; // seconds
max_job_lifetime = 300;

# the job interval
# sserver will push latest job if there are no new jobs for this interval
mining_notify_interval = 30;

# default difficulty
default_difficulty = "4";
# default difficulty (hex)
default_difficulty = "4000";

# max difficulty must be hex string
# max difficulty (hex)
max_difficulty = "4000000000000000";

# min difficulty
min_difficulty = "2";
# min difficulty (hex)
min_difficulty = "40";

# Adjust difficulty once every N second
diff_adjust_period = 900;
@@ -64,19 +63,45 @@ sserver = {
# Set to 0 to disable this feature.
shutdown_grace_period = 3600;

# kafaka consumer topic
job_topic = "SiaJob";
nicehash = {
# Set to true if you want to force minimal difficulty for whole sserver
forced = false;

# Fallback value when ZooKeeper is not available
min_difficulty = "10000";

# Read NiceHash minimal difficulty from this ZooKeeper node
min_difficulty_zookeeper_path = "/nicehash/sha256/min_difficulty"
};

# solved share topic
solved_share_topic = "SiaSolvedShare";
#
# version_mask, uint32_t
# 2(0x00000002) : allow client change bit 1
# 16(0x00000010) : allow client change bit 4
# 536862720(0x1fffe000) : allow client change bit 13 to 28
#
# version_mask = 0;
# version_mask = 16;
# version_mask = 536862720; // recommended, BIP9 security
# ...
#
version_mask = 536862720;

# share topic
share_topic = "SiaShareLog";
# it could be 4 ~ 8
# it should be 4 if you want proxy stratum jobs with poolwatcher(proxy).cfg
extra_nonce2_size = 8;

# common events topic
# example: miner connected, miner disconnected, ...
common_events_topic = "SiaCommonEvents";
# Send ShareBitcoinBytesV1 to share_topic to keep compatibility with legacy statshttpd/sharelogger.
use_share_v1 = false;

# topics
job_topic = "BtcJob";
share_topic = "BtcShare";
solved_share_topic = "BtcSolvedShare";
auxpow_solved_share_topic = "AuxSolvedShare"; # auxpow (eg. Namecoin) solved share topic
rsk_solved_share_topic = "RskSolvedShare";
common_events_topic = "BtcCommonEvents";

########################## dev options #########################

# if enable simulator, all share will be accepted. for testing
@@ -90,7 +115,7 @@ sserver = {

# difficulty to send to miners. for development
dev_fixed_difficulty = 0.005;

###################### end of dev options ######################
};

@@ -101,15 +126,17 @@ users = {
#
# There is a demo: https://github.com/btccom/btcpool/issues/16#issuecomment-278245381
#
list_id_api_url = "https://example.com/get_user_id_list";
list_id_api_url = "http://localhost:8000/userlist.php";

# Make the user name case insensitive
case_insensitive = true;

# remove the suffix appended to the user name
# example: tiger_eth -> tiger, aaa_bbb_ccc -> aaa_bbb
strip_user_suffix = true;
user_suffix_separator = "_";

# Enable single user mode.
# In this mode, all sub-accounts connected to the sserver will become the worker name prefix for a specified user.
# Example, a worker "user2.11x20" will become "user1.user2.11x20".
#single_user_mode = false;
#single_user_name = "user1";
#single_user_puid = 1;
};

prometheus = {
@@ -118,7 +145,7 @@ prometheus = {
# address for prometheus exporter to bind
address = "0.0.0.0"
# port for prometheus exporter to bind
port = 8080
port = 9100
# path of the prometheus exporter url
path = "/metrics"
};
@@ -127,3 +154,13 @@ log = {
# hide "client connect" log with the prefix
#hide_ip_prefix = "100.122.";
};

management = {
enabled = true; # default: true

kafka_brokers = "127.0.0.1:9092"; # "10.0.0.1:9092,10.0.0.2:9092,..."
controller_topic = "BtcManController";
processor_topic = "BtcManProcessor";

auto_switch_chain = false;
};

0 comments on commit 822bf87

Please sign in to comment.
You can’t perform that action at this time.