btccom / btcpool-ABANDONED

backend of pool.btc.com
https://pool.btc.com
MIT License
644 stars 408 forks source link

CKB Simulator Segmentation Fault #473

Open pranavt61 opened 3 years ago

pranavt61 commented 3 years ago

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:

Screen Shot 2020-12-16 at 1 30 13 PM

Working with this docker-compose project: https://github.com/insight-nervos/btcpool-docker-compose/tree/TESTNET

sserver.cfg:

#
# 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";
};
pranavt61 commented 3 years ago

I am using the official btcpool docker image:

btccom/btcpool:2019.09.26-17-support-ckb-mining_bch-0.18.5