I am running the simulator in a docker container to test my pool configuration, however, the simulator crashes with a segmentation fault after connecting to the stratum server:
#
# stratum server cfg
#
# @since 2016-06
# @copyright btc.com
#
testnet = true;
kafka = {
brokers = "kafka:19092";
};
sserver = {
ip = "0.0.0.0";
port = 1800;
// should be global unique, range: [1, 255]
id = 1;
// write last mining notify job send time to file, for monitor
file_last_notify_time = "/work/btcpool/build/run_sserver/sserver_lastnotifytime.txt";
// if enable simulator, all share will be accepted. for testing
enable_simulator = true;
// if enable it, all share will make block and submit. for testing
enable_submit_invalid_block = true;
# if enable, difficulty sent to miners is always miner_difficulty. for development
enable_dev_mode = true;
# difficulty to send to miners. for development
miner_difficulty = 80000000.0;
// how many seconds between two share submit
share_avg_seconds = 4;
version_mask = 536862720;
# serverType
type = "CKB";
# max job delay
max_job_delay = 300;
#default difficulty
#max difficulty
#min difficulty
default_difficulty = "65536";
max_difficulty = "40000000000";
min_difficulty = "2";
# Adjust difficulty once every N second
diff_adjust_period = 900;
# kafaka consumer topic
job_topic = "CkbJob";
#solved share topic
solved_share_topic = "CkbSolvedShare";
#share topic
share_topic = "CkbShareLog";
# common events topic
# example: miner connected, miner disconnected, ...
common_events_topic = "CkbCommonEvents";
};
users = {
#
# https://example.com/get_user_id_list?last_id=0
# {"err_no":0,"err_msg":null,"data":{"jack":1,"terry":2}}
#
#list_id_api_url = "http://127.0.0.1:2333/user-list.php";
list_id_api_url = "http://miner-list:8000/miner_list";
# Make the user name case insensitive
case_insensitive = true;
};
simulator.cfg:
#
# miners simulator cfg
#
# @since 2016-07
# @copyright btc.com
#
simulator = {
# how many connects will connect to the stratum server
number_clients = 1;
# stratum sever host & port
ss_ip = "btcpool";
ss_port = 1800;
enable_tls = false;
# miner's username
username = "alice";
# miner's name prefix
# so the full name will be: <username>.<minername_prefix>-<increase_ID>
minername_prefix = "";
# miner's password
# used to set difficulty with "d=xxx" and/or "md=xxx"
#passwd = "md=32768,d=32768";
type = "CKB";
};
I am running the simulator in a docker container to test my pool configuration, however, the simulator crashes with a segmentation fault after connecting to the stratum server:
Working with this docker-compose project: https://github.com/insight-nervos/btcpool-docker-compose/tree/TESTNET
sserver.cfg:
simulator.cfg: