Closed 857487 closed 4 years ago
#
# block maker cfg
#
# @since 2016-07
# @copyright btc.com
#
# submit block hex
bitcoinds = (
{
rpc_addr = "http://192.168.1.10:18332";
rpc_userpwd = "xxx:xxx"; # username:password
}
# ,
# {
# rpc_addr = "http://10.0.0.1:8332";
# rpc_userpwd = "bitcoinrpc:xxxxxxxxxxxxxxxxxxxxxxxxxx"; # username:password
# }
);
kafka = {
brokers = "127.0.0.1:9092"; # "10.0.0.1:9092,10.0.0.2:9092,..."
};
#
# pool mysql db: table.found_blocks
#
pooldb = {
host = "127.0.0.1";
port = 3306;
username = "root";
password = "xxx";
dbname = "bpool_local_db";
};
blk_makers = (
{
chain_type = "BTC";
enabled = true;
nodes = (
{
rpc_addr = "http://192.168.1.10:18332";
rpc_userpwd = "xxx:xxx";
}
);
rawgbt_topic = "RawGbt";
solved_share_topic = "SolvedShare";
auxpow_solved_share_topic = "AuxPowSolvedShare";
rsk_solved_share_topic = "RskSolvedShare";
job_topic = "BtcJob";
found_aux_block_table = "found_nmc_blocks";
},
{
chain_type = "ETH"; //blockchain short name
enabled = false; //enable worker
nodes = (
{
rpc_addr = "http://127.0.0.1:8545";
rpc_userpwd = "user:pass";
}
);
#solved share topic
solved_share_topic = "EthSolvedShare";
# The hard fork Constantinople of Ethereum mainnet
constantinople_height = 7280000;
},
{
chain_type = "SIA"; //blockchain short name
enabled = false; //enable worker
nodes = (
{
rpc_addr = "http://127.0.0.1:9980/miner/header";
rpc_userpwd = "user:pass";
}
);
#solved share topic
solved_share_topic = "SiaSolvedShare";
},
{
chain_type = "BTM"; //blockchain short name
enabled = false; //enable worker
nodes = (
{
rpc_addr = "http://127.0.0.1:9888/submit-work";
rpc_userpwd = "user:pass";
}
);
#solved share topic
solved_share_topic = "BytomSolvedShare";
}
);
#
# job maker cfg
#
# @since 2016-06
# @copyright btc.com
#
job_workers = (
{
id = 1;
chain_type = "BTC";
enabled = true;
testnet = true; // is using testnet3
# payout address
# the private key of my2dxGb5jz43ktwGxg2doUaEb9WhZ9PQ7K is cQAiutBRMq4wwC9JHeANQLttogZ2EXw9AgnGXMq5S3SAMmbX2oLd
payout_address = "xxx";
# coinbase info with location ID (https://github.com/btccom/btcpool/issues/36)
coinbase_info = "region1/Project BTCPool/";
# block version, default is 0 means use the version which returned by bitcoind
# or you can specify the version you want to signal.
# more info: https://github.com/bitcoin/bips/blob/master/bip-0009.mediawiki
# Example:
# 0 : use bitcoind block version,
# 536870912(0x20000000) : bip9 support (with empty version bits)
# 536870914(0x20000002) : bip141(segwit), bit 1
#
block_version = 0;
rawgbt_topic = "RawGbt";
auxpow_gw_topic = "AuxPowBlock"; // kafka topic of merge mining auxpow work
rsk_rawgw_topic = "RskRawGw"; // kafka topic of RSK merge mining
vcash_rawgw_topic = "VcashRawGw";
job_topic = "BtcJob";
job_interval = 20; // send stratum job interval (seconds)
max_job_delay = 20; // max job dealy (seconds)
# max non-empty gbt life cycle time (seconds)
gbt_life_time = 90;
# max empty gbt life cycle time seconds
# CAUTION: the value SHOULD >= 10. If non-empty job not come in 10 seconds,
# jobmaker will always make a previous height job until its arrival
empty_gbt_life_time = 15;
# policy used to determine the pace of merge mining jobs to be sent.
# 0: merge mining `getwork` does not trigger job updates (RSK and Namecoin).
# 1: update job when the `notify` flag in RSK `getwork` is true or the block height in Namecoin `getwork` higher than before.
# 2: update job when the current block hash of a merge mining `getwork` is different from before (RSK and Namecoin).
merged_mining_notify = 1; # (1 is recommended and default)
zookeeper_lock_path = "/locks/jobmaker_btc";
file_last_job_time = "/work/btcpool/build/run_jobmaker/btc_lastjobtime.txt";
},
{
id = 1;
chain_type = "ETH";
chain_name = "FOUNDATION"; // CLASSIC (ETC Main Network) or FOUNDATION (ETH Main Network)
enabled = false;
rawgw_topic = "EthRawGw";
job_topic = "EthJob";
job_interval = 20; // send stratum job interval (seconds)
max_job_delay = 20; // max job dealy (seconds)
work_life_time = 60; // max getWork life cycle time (seconds)
zookeeper_lock_path = "/locks/jobmaker_eth";
file_last_job_time = "/work/btcpool/build/run_jobmaker/eth_lastjobtime.txt";
},
{
id = 1;
chain_type = "BTM";
enabled = false;
rawgw_topic = "BytomRawGw";
job_topic = "BytomJob";
job_interval = 20; // send stratum job interval (seconds)
max_job_delay = 20; // max job dealy (seconds)
work_life_time = 90; // max getWork life cycle time (seconds)
zookeeper_lock_path = "/locks/jobmaker_bytom";
file_last_job_time = "/work/btcpool/build/run_jobmaker/bytom_lastjobtime.txt";
},
{
id = 1;
chain_type = "SIA";
enabled = false;
rawgw_topic = "SiaRawGw";
job_topic = "SiaJob";
job_interval = 30; // send stratum job interval (seconds)
max_job_delay = 60; // max job dealy (seconds)
work_life_time = 90; // max getWork life cycle time (seconds)
zookeeper_lock_path = "/locks/jobmaker_sia";
file_last_job_time = "/work/btcpool/build/run_jobmaker/sia_lastjobtime.txt";
}
);
kafka = {
brokers = "127.0.0.1:9092"; # "10.0.0.1:9092,10.0.0.2:9092,..."
};
zookeeper = {
brokers = "127.0.0.1:2181"; # "10.0.0.1:2181,10.0.0.2:2181,..."
};
#
# gbt maker cfg
#
# @since 2016-06
# @copyright btc.com
#
gbtmaker = {
# rpc call interval seconds
rpcinterval = 5;
# check zmq when startup
is_check_zmq = true;
rawgbt_topic = "RawGbt";
# use RPC `getblocktemplatelight`, only for bch
lightgbt = false; # if unspecified, default false
};
bitcoind = {
# bitcoind MUST with zmq options: -zmqpubhashblock, -zmqpubhashtx
# '-zmqpubhashtx' will use to check zmq is working when startup gbtmaker
zmq_addr = "tcp://192.168.1.10:15101";
# reconnect if no new messages are received after the following number of seconds
zmq_timeout = 1200;
# rpc settings
rpc_addr = "http://192.168.1.10:18332";
rpc_userpwd = "xxx:xxx"; # username:password
};
kafka = {
brokers = "127.0.0.1:9092"; # "10.0.0.1:9092,10.0.0.2:9092,..."
};
#
# stratum server cfg
#
# @since 2016-06
# @copyright btc.com
#
# is using testnet3
testnet = true;
kafka = {
brokers = "127.0.0.1:9092"; # "10.0.0.1:9092,10.0.0.2:9092,..."
};
zookeeper = {
brokers = "127.0.0.1:2181"; # "10.0.0.1:2181,10.0.0.2:2181,..."
};
sserver = {
# serverType
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 = 0;
# The lock path used when automatically assigning an id
zookeeper_lock_path = "/locks/sserver_btc";
# write last mining notify job send time to file, for monitor
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;
# 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 = "4096";
# max difficulty (hex)
max_difficulty = "17179869184";
# min difficulty (hex)
min_difficulty = "4096";
# Adjust difficulty once every N second
diff_adjust_period = 900;
# When exiting, the connection will be closed gradually within the specified time.
# Set to 0 to disable this feature.
shutdown_grace_period = 3600;
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"
};
#
# 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;
# it could be 4 ~ 8
# it should be 4 if you want proxy stratum jobs with poolwatcher(proxy).cfg
extra_nonce2_size = 8;
# 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
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 ######################
};
users = {
#
# https://example.com/get_user_id_list?last_id=0
# {"err_no":0,"err_msg":null,"data":{"jack":1,"terry":2}}
#
# There is a demo: https://github.com/btccom/btcpool/issues/16#issuecomment-278245381
#
list_id_api_url = "http://192.168.1.20/apidemo.php";
# Make the user name case insensitive
case_insensitive = true;
# 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 = {
# 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;
};
错误日志和配置以上,用的是0.16.3的钱包编译的,搜索了以往的答案,并没有解决这个问题,请开发者解答一下,谢谢!
这是打开模拟器以后用ccminer工作的日志
爆块后,如果还没有收到下一个块的任务,当前任务就会一直stale。仅针对爆块sserver。
在使用regtest时,会一直发生这种情况,因为每个share都能爆块。