btccom / btcpool-ABANDONED

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

receiving Job not found (=stale) when founding a new block #336

Closed LEVA1989 closed 5 years ago

LEVA1989 commented 5 years ago

Hello, I am trying to mine on BTC testnet. Every time I found a new block, I receive error "receiving Job not found (=stale)"

I0710 11:41:52.207949 1668 StratumServerBitcoin.cc:573] high diff share, blkhash: 0000000000035b87e9916043104de6244f063941b7de26bcfd175bd35555c7a5, diff: 19518, networkDiff: 4077473, by: pooluser.9 I0710 11:41:52.738061 1668 StratumServerBitcoin.cc:573] high diff share, blkhash: 0000000000010abdd64a7e24b5fc257c72813a15e08522a581a94d8d5ca03bef, diff: 62895, networkDiff: 4077473, by: pooluser.16 I0710 11:41:53.327860 1668 StratumServerBitcoin.cc:563] >>>> found a new block: 0000000000000162f8d759064d3e9accf2d383d02ec130416401061878d2fb1d, jobId: 6711998253616405249, userId: 100, by: pooluser.16 <<<< I0710 11:41:53.327939 1668 StratumServerBitcoin.cc:573] high diff share, blkhash: 0000000000000162f8d759064d3e9accf2d383d02ec130416401061878d2fb1d, diff: 12099267, networkDiff: 4077473, by: pooluser.16 I0710 11:41:55.638022 1668 StratumMinerBitcoin.cc:344] rejected share: Job not found (=stale), worker: pooluser.16, versionMask: 00000000, share(jobId: 6711998253616405249, ip: XXX.XXX.XXX.XXX, userId: 100, workerId: -4857662083442525581, time: 1562758915/2019-07-10 11:41:55, height: 1568374, blkBits: 1a041d53/4077473.662475, shareDiff: 16384, nonce: f4f8572e, sessionId: 01000003, versionMask: 00000000, status: 21/Job not found (=stale))

Same time I receive error in file: /work/btcpool/build/run_gbtmaker/log_gbtmaker/gbtmaker.ERROR

Utils.cc:276] server responded with code: 500 GbtMaker.cc:216] bitcoind rpc failure GbtMaker.cc:290] get rawgbt failure

RPC is running on bitcoin-v0.16.3 core.

de1acr0ix commented 5 years ago

Is it possible for you to paste all of your configuration files here, masking out all password/secret part?

LEVA1989 commented 5 years ago

bitcoin.conf

testnet=1
server=1
rpcuser=bitcoinrpc
rpcpassword=xxx
rpcallowip=127.0.0.1/24
zmqpubhashblock=tcp://127.0.0.1:8331
zmqpubhashtx=tcp://127.0.0.1:8331
dbcache=1536
blockmaxweight=4000000
par=1
blocksonly=1
txindex=1
walletbroadcast=1
debug=rpc

blkmaker.cfg

bitcoinds = (
{
  rpc_addr    = "http://127.0.0.1:18332";
  rpc_userpwd = "bitcoinrpc:xxx";
}
);
kafka = {
  brokers = "127.0.0.1:9092";
};
pooldb = {
  host = "127.0.0.1";
  port = 3306;
  username = "root";
  password = "xxxxxx";
  dbname = "bpool_local_db";
};
blk_makers = (
  {
    chain_type = "BTC";
    enabled = true;
    nodes = (
      {
        rpc_addr = "http://127.0.0.1:18332";
        rpc_userpwd = "bitcoinrpc:xxx";
      }
    );
    rawgbt_topic = "RawGbt";
    solved_share_topic = "SolvedShare";
    auxpow_solved_share_topic = "AuxPowSolvedShare";
    rsk_solved_share_topic = "RskSolvedShare";
    job_topic = "StratumJob";
    found_aux_block_table = "found_nmc_blocks";
  }
);

gbtmaker.cfg

gbtmaker = {
  rpcinterval = 10;
  is_check_zmq = false;
  rawgbt_topic = "BtcRawGbt";
  lightgbt = false; 
};
bitcoind = {
  zmq_addr = "tcp://127.0.0.1:8331";
  zmq_timeout = 1200;
  rpc_addr    = "http://127.0.0.1:18332";
  rpc_userpwd = "bitcoinrpc:xxx";
};
kafka = {
  brokers = "127.0.0.1:9092";
};

jobmaker.cfg

job_workers = (
  {
    id = 1;
    chain_type = "BTC";
    enabled = true;
    testnet = true;
    payout_address = "xxx";
    coinbase_info = "region1/Project BTCPool/";
    block_version = 0;
    rawgbt_topic = "BtcRawGbt";
    auxpow_gw_topic = "AuxPowBlock";
    rsk_rawgw_topic = "RskRawGw";
    vcash_rawgw_topic = "VcashRawGw";
    job_topic = "BtcJob";
    job_interval = 20;
    max_job_delay = 20;
    gbt_life_time = 90;
    empty_gbt_life_time = 15;
    merged_mining_notify = 1;
    zookeeper_lock_path = "/locks/jobmaker_btc";
    file_last_job_time = "/work/btcpool/build/run_jobmaker/btc_lastjobtime.txt";
  }
);
kafka = {
  brokers = "127.0.0.1:9092";
};
zookeeper = {
  brokers = "127.0.0.1:2181";
};

sharelogger.cfg

kafka = {
  brokers = "127.0.0.1:9092";
};
sharelog_writers = (
  {
    chain_type = "BTC";
    enabled = true;
    data_dir = "/work/btcpool/data/btcsharelog";
    kafka_group_id = "sharelog_write_btc";
    share_topic = "BtcShareLog";
    compression_level = -1;
  }
);

slparser.cfg

testnet = true;
slparserhttpd = {
  ip = "0.0.0.0";
  port = 8081;
  flush_db_interval = 15;
};
sharelog = {
  chain_type = "BTC";
  data_dir = "/work/btcpool/data/sharelog";
  constantinople_height = 7280000;
  accept_stale = false;
};
dup_share_checker = {
  tracking_height_number = 3;
};
pooldb = {
  host = "127.0.0.1";
  port = 3306;
  username = "root";
  password = "xxxxxx";
  dbname = "bpool_local_stats_db";
};

sserver.cfg

testnet = true;
kafka = {
  brokers = "127.0.0.1:9092";
};
zookeeper = {
  brokers = "127.0.0.1:2181";
};
sserver = {
  type = "BTC";
  ip = "0.0.0.0";
  port = 3333;
  id = 0;
  zookeeper_lock_path = "/locks/sserver_btc";
  file_last_notify_time = "./sserver_lastnotifytime.txt";
  tcp_read_timeout = 600;
  share_avg_seconds = 10;
  max_job_lifetime = 300;
  mining_notify_interval = 30;
  default_difficulty = "4000";
  max_difficulty = "4000000000000000";
  min_difficulty = "40";
  diff_adjust_period = 900;
  version_mask = 536862720;
  extra_nonce2_size = 8;
  use_share_v1 = false;
  job_topic = "BtcJob";
  share_topic = "BtcShare";
  solved_share_topic = "BtcSolvedShare";
  auxpow_solved_share_topic = "AuxSolvedShare";
  rsk_solved_share_topic = "RskSolvedShare";
  common_events_topic = "BtcCommonEvents";
  enable_simulator = false;
  enable_submit_invalid_block = false;
  enable_dev_mode = false;
  dev_fixed_difficulty = 0.005;
};
users = {
  list_id_api_url = "http://localhost:8000/userlist.php";
  case_insensitive = true;
};

statshttpd.cfg

kafka = {
  brokers = "127.0.0.1:9092";
};
statshttpd = {
  chain_type = "BTC";
  share_topic = "BtcShareLog";
  common_events_topic = "BtcCommonEvents";
  ip = "0.0.0.0";
  port = 8080;
  flush_db_interval = 15;
  file_last_flush_time = "/work/btcpool/build/run_statshttpd/statshttpd_lastflushtime.txt";
  use_mysql = true;
  use_redis = false;
  accept_stale = false;
};
dup_share_checker = {
  tracking_height_number = 3;
};
pooldb = {
  host = "127.0.0.1";
  port = 3306;
  username = "root";
  password = "xxxxxx";
  dbname = "bpool_local_db";
};
redis = {
  host = "127.0.0.1";
  port = 6379;
  password = "";
  key_prefix = "";
  key_expire = 0;
  publish_policy = 0;
  index_policy = 0;
  concurrency = 1;
};

@bmhjyu If you need more info, please let me know.

LEVA1989 commented 5 years ago

SOLVED.

blkmaker.cfg had different topic names