Bitcoin Forum
May 30, 2024, 10:53:51 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: exceptions.ValueError: bad coinbase size! 1 bytes  (Read 314 times)
lovecodelc (OP)
Newbie
*
Offline Offline

Activity: 15
Merit: 2


View Profile
November 28, 2016, 08: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:
--- <exception caught here> ---
  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>
    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
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!