forked from btccom/btcpool-ABANDONED
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sserver(multi-chains).cfg
143 lines (113 loc) · 4.06 KB
/
sserver(multi-chains).cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
#
# stratum server cfg
#
# @since 2016-06
# @copyright btc.com
#
# is using testnet3
testnet = false;
zookeeper = {
brokers = "127.0.0.1:2181"; # "10.0.0.1:2181,10.0.0.2:2181,..."
};
sserver = {
# serverType
type = "BCH";
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;
# The lock path used when automatically assigning an id
zookeeper_lock_path = "/locks/sserver_bch";
# 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;
# the job interval
# sserver will push latest job if there are no new jobs for this interval
mining_notify_interval = 30;
# default difficulty (hex)
default_difficulty = "4000";
# max difficulty (hex)
max_difficulty = "4000000000000000";
# min difficulty (hex)
min_difficulty = "40";
# Adjust difficulty once every N second
diff_adjust_period = 900;
#
# 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;
# Mining multi chains (such as BTC and BCH) with the same sserver.
# Sserver will query zookeeper to find the chain that a user want mining.
multi_chains = true;
# where to query the chain that a user want mining
zookeeper_userchain_map = "/sserver/userchain/bitcoin/";
########################## dev options #########################
# if enable simulator, all share will be accepted. for testing
enable_simulator = false;
# if enable it, all share will make block and submit. for testing
enable_submit_invalid_block = false;
# if enable, difficulty sent to miners is always dev_fixed_difficulty. for development
enable_dev_mode = false;
# difficulty to send to miners. for development
dev_fixed_difficulty = 0.005;
###################### end of dev options ######################
};
chains = (
{
name = "btc";
users_list_id_api_url = "http://localhost:8000/userlist-btc.php";
#zookeeper_userid_map = "/sserver/userid/btc/";
# write last mining notify job send time to file, for monitor
file_last_notify_time = "/work/btcpool/data/build/run_sserver/sserver_lastnotifytime_btc.txt";
# kafka brokers
kafka_brokers = "127.0.0.1:9092"; # "10.0.0.1:9092,10.0.0.2:9092,..."
# kafka topics
job_topic = "BtcJob";
share_topic = "BtcShare";
solved_share_topic = "BtcSolvedShare";
common_events_topic = "BtcCommonEvents";
auxpow_solved_share_topic = "BtcAuxSolvedShare";
rsk_solved_share_topic = "BtcRskSolvedShare";
},
{
name = "bch";
users_list_id_api_url = "http://localhost:8000/userlist-bch.php";
#zookeeper_userid_map = "/sserver/userid/bch/";
# write last mining notify job send time to file, for monitor
file_last_notify_time = "/work/btcpool/data/build/run_sserver/sserver_lastnotifytime_bch.txt";
# kafka brokers
kafka_brokers = "127.0.0.1:9092"; # "10.0.0.1:9092,10.0.0.2:9092,..."
# kafka topics
job_topic = "BchJob";
share_topic = "BchShare";
solved_share_topic = "BchSolvedShare";
common_events_topic = "BchCommonEvents";
auxpow_solved_share_topic = "BtcAuxSolvedShare";
rsk_solved_share_topic = "BtcRskSolvedShare";
}
);
users = {
# Make the user name case insensitive
case_insensitive = true;
# The parent node of userName-chainName map in Zookeeper
zookeeper_userchain_map = "/sserver/userchain/bitcoin";
# remove the suffix appended to the user name
# example: tiger_eth -> tiger, aaa_bbb_ccc -> aaa_bbb
strip_user_suffix = true;
user_suffix_separator = "_";
# user auto register
enable_auto_reg = false;
auto_reg_max_pending_users = 50;
zookeeper_auto_reg_watch_dir = "/sserver/autoreg";
};