Author

Topic: exceptions.ValueError: bad coinbase size! 1 bytes (Read 324 times)

newbie
Activity: 15
Merit: 2
November 28, 2016, 03:56:04 AM
#1
hi everyone, i have made my own altcoin named bitcoin(in order to use bitcoin python p2pool code), i also create p2pool, when i start to run "python run_p2pool.py user1 letmein --bitcoind-p2p-port 10000", run cgminer and antminer U1, the terminal prints message:
--- ---
  File "/home/test/p2pool-13.4/p2pool/util/jsonrpc.py", line 85, in _handle
    result = yield method_meth(*list(preargs) + list(params))
  File "/home/test/p2pool-13.4/p2pool/bitcoin/stratum.py", line 74, in rpc_submit
    return got_response(header, worker_name, coinb_nonce)
  File "/home/test/p2pool-13.4/p2pool/bitcoin/worker_interface.py", line 136, in
    lambda header, user, coinbase_nonce: handler(header, user, pack.IntType(self._my_bits).pack(nonce) + coinbase_nonce),
  File "/home/test/p2pool-13.4/p2pool/work.py", line 389, in got_response
    share = get_share(header, last_txout_nonce)
  File "/home/test/p2pool-13.4/p2pool/data.py", line 213, in get_share
    merkle_link=bitcoin_data.calculate_merkle_link([None] + other_transaction_hashes, 0),
  File "/home/test/p2pool-13.4/p2pool/data.py", line 240, in __init__
    raise ValueError('''bad coinbase size! %i bytes''' % (len(self.share_info['share_data']['coinbase']),))
exceptions.ValueError: bad coinbase size! 1 bytes;

and bitcoind log file prints:
"2377 2016-11-28 08:22:36 ERROR: AcceptBlock: bad-cb-length, Transaction check failed (tx hash 0b43ec     7a2b3922350d59fb0711fa5a25abed7e29d4d48c17d9b7315b302db972)  (code 16)
2378 2016-11-28 08:22:36 ERROR: ProcessNewBlock: AcceptBlock FAILED"

the bitcoin core code here:
1141     if (tx.IsCoinBase())
1142     {
1143         if (tx.vin[0].scriptSig.size() < 2 || tx.vin[0].scriptSig.size() > 100)
1144             return state.DoS(100, false, REJECT_INVALID, "bad-cb-length");
1145     }

the value of 'self.share_info['share_data']['coinbase'])' is R, how to modify it ?
thank you~ Smiley
Jump to: